XinzeLee / PolygonObjectDetection

This repository is based on Ultralytics/yolov5, with adjustments to enable polygon prediction boxes.
356 stars 95 forks source link

How to train based on networks such as yolov5m? #5

Open wangzhihui22 opened 3 years ago

wangzhihui22 commented 3 years ago

Thank you very much for your work, but yolov5s cannot meet my accuracy requirements, how can it be trained based on networks such as yolov5m?

XinzeLee commented 3 years ago

Thank you for your interests in polygon-yolov5. To implement polygon-yolov5m, you can follow the steps below: (1) in ./polygon-yolov5/models dir, copy model configuration file yolov5m.yaml to polygon-yolov5m.yaml, and modify the nc, anchors, head (only modify the last Detect class to Polygon_Detect); (2) use the model you just defined in the training: python polygon_train.py --weights "" --cfg polygon_yolov5m.yaml \ --data polygon_ucas.yaml --hyp hyp.ucas.yaml --img-size 1024 \ --epochs 3 --batch-size 12 --noautoanchor --polygon --cache