Some checks failed
deploy / build-n-publish (push) Has been cancelled
lint / lint (push) Has been cancelled
build / build_cpu (3.7, 1.5.1, torch1.5, 0.6.1) (push) Has been cancelled
build / build_cpu (3.7, 1.6.0, torch1.6, 0.7.0) (push) Has been cancelled
build / build_cpu (3.7, 1.7.0, torch1.7, 0.8.1) (push) Has been cancelled
build / build_cpu (3.7, 1.8.0, torch1.8, 0.9.0) (push) Has been cancelled
build / build_cpu (3.7, 1.9.0, torch1.9, 0.10.0) (push) Has been cancelled
build / build_cuda101 (3.7, 1.5.1+cu101, torch1.5, 0.6.1+cu101) (push) Has been cancelled
build / build_cuda101 (3.7, 1.6.0+cu101, torch1.6, 0.7.0+cu101) (push) Has been cancelled
build / build_cuda101 (3.7, 1.7.0+cu101, torch1.7, 0.8.1+cu101) (push) Has been cancelled
build / build_cuda101 (3.7, 1.8.0+cu101, torch1.8, 0.9.0+cu101) (push) Has been cancelled
build / build_cuda102 (3.6, 1.9.0+cu102, torch1.9, 0.10.0+cu102) (push) Has been cancelled
build / build_cuda102 (3.7, 1.9.0+cu102, torch1.9, 0.10.0+cu102) (push) Has been cancelled
build / build_cuda102 (3.8, 1.9.0+cu102, torch1.9, 0.10.0+cu102) (push) Has been cancelled
build / build_cuda102 (3.9, 1.9.0+cu102, torch1.9, 0.10.0+cu102) (push) Has been cancelled
build / test_windows (windows-2022, cpu, 3.8) (push) Has been cancelled
build / test_windows (windows-2022, cu111, 3.8) (push) Has been cancelled
- Add golf1/2/4/7/8 dataset classes for semantic segmentation - Add kneron-specific configs (meconfig series, kn_stdc1_golf4class) - Organize scripts into tools/check/ and tools/kneron/ - Add kneron_preprocessing module - Update README with quick-start guide - Update .gitignore to exclude data dirs, onnx, nef outputs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
2.2 KiB
Plaintext
58 lines
2.2 KiB
Plaintext
環境安裝:
|
||
# 建立與啟動 conda 環境
|
||
conda create -n stdc_golface python=3.8 -y
|
||
conda activate stdc_golface
|
||
|
||
# 安裝 PyTorch + 對應 CUDA 11.3 版本
|
||
conda install pytorch=1.11.0 torchvision=0.12.0 torchaudio cudatoolkit=11.3 -c pytorch -y
|
||
|
||
# 安裝對應版本的 mmcv-full
|
||
pip install mmcv-full==1.5.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
|
||
|
||
# 安裝 kneronstdc 專案
|
||
cd kneronstdc
|
||
pip install -e .
|
||
|
||
# 安裝常用工具套件
|
||
pip install opencv-python tqdm matplotlib cityscapesscripts
|
||
|
||
# 安裝 yapf 格式化工具(指定版本)
|
||
pip install yapf==0.31.0
|
||
--------------------------------------------------------------------------------------
|
||
data:
|
||
使用 Roboflow 匯出資料集格式請選擇:
|
||
|
||
Semantic Segmentation Masks
|
||
|
||
使用 seg2city.py 腳本將 Roboflow 格式轉換為 Cityscapes 格式
|
||
|
||
Cityscapes 範例資料可作為參考
|
||
|
||
將轉換後的資料放置至 data/cityscapes 資料夾
|
||
|
||
(cityscapes 為訓練預設的 dataset 名稱)
|
||
--------------------------------------------------------------------------------------
|
||
訓練模型:
|
||
開剛剛新裝好的env,用cmd下指令,cd到kneronstdc裡面
|
||
train的指令:
|
||
python tools/train.py configs/stdc/kn_stdc1_in1k-pre_512x1024_80k_cityscapes.py
|
||
|
||
test的指令:
|
||
python tools/test.py configs/stdc/kn_stdc1_in1k-pre_512x1024_80k_cityscapes.py work_dirs/kn_stdc1_in1k-pre_512x1024_80k_cityscapes/latest.pth --show-dir work_dirs/vis_results
|
||
------------------------------------------------------------------------------------
|
||
映射到資料夾
|
||
docker run --rm -it -v $(wslpath -u 'C:\Users\rd_de\kneronstdc'):/workspace/kneronstdc kneron/toolchain:latest
|
||
|
||
轉ONNX指令
|
||
python tools/pytorch2onnx_kneron.py configs/stdc/kn_stdc1_in1k-pre_512x1024_80k_cityscapes.py --checkpoint work_dirs/kn_stdc1_in1k-pre_512x1024_80k_cityscapes/latest.pth --output-file work_dirs/kn_stdc1_in1k-pre_512x1024_80k_cityscapes/latest.onnx --verify
|
||
|
||
把nef拉出來到電腦
|
||
docker cp f78594411e1b:/data1/kneron_flow/models_630.nef "C:\Users\rd_de\kneronstdc\work_dirs\nef\models_630.nef"
|
||
---------------------------------------------------------------------------------------
|
||
pip install opencv-python
|
||
RUN apt update && apt install -y libgl1
|
||
|
||
|
||
|
||
|