Yolov5s/readme.txt

25 lines
1.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

使用cmd做
創建一個可以跑yolov5的envs
從roboflow下載yolov8格式的資料集放到golfaceyolov5範例如test1data。
修改test1data裡面的data.yaml可直接照格式複製記得改路徑。
要train的時候記得cd到yolov5裡面
train的指令:
python train.py --data C:/Users/rd_de/yolov5git/data/10-02+10-01+10-038class/data.yaml --weights for720best.pt --img 640 --batch-size 8 --epochs 300 --device 0
train完到runs/train/expX看結果裡面有weight
測試test data
python detect.py --weights runs/train/exp27/weights/best.pt --source test14data/test/images --img 640 --conf 0.25 --device 0
docker run --rm -it -v $(wslpath -u 'C:\Users\rd_de\golfaceyolov5\yolov5'):/workspace/yolov5 kneron/toolchain:latest
轉onnx
(yolov5_export) C:\Users\rd_de\yolov5git\yolov5>python exporting/yolov5_export.py --data data/mepretrained_paths_720.yaml
(yolov5_export) C:\Users\rd_de\yolov5git\ai_training\detection\yolov5>python -m onnxsim C:/Users/rd_de/yolov5git/runs/train/exp29735/weights/best.onnx C:/Users/rd_de/yolov5git/runs/train/exp29735/weights/best_simplified.onnx
root@DESKTOP-R99GP8R:~# docker run --rm -it -v $(wslpath -u 'C:\Users\rd_de\golfaceyolov5\yolov5'):/workspace/yolov5 kneron/toolchain:latest
docker cp 2f8a95bb8bd9:/data1/kneron_flow/runs/train/exp6/weights/models_630.nef C:\Users\rd_de\golfaceyolov5\yolov5\runs\train\exp6\weights