- CUDA >= 11.2
pip install -r requirements.txt
cd utils/iou_cuda
python setup.py install
- Use dataset similar to yolov5, but change in label: [cx, cy, w, h, real, imagine]
- Check Convert_labels.ipynb to convert labels and prepare dataset tree.
- Edit path and number of classes in data/rotate_cepdof.yaml
- Edit number of classes in models/rotate_yolov5s_cepdof.yaml
- Run utils.rotate_kmean_anchors to generate predefined anchors for your specific datasets with specified image size.
python rotate_train.py --weights '' --data data/rotate_cepdof.yaml --cfg models/rotate_yolov5s_cepdof.yaml --rotate
python rotate_detect.py --weights rotate_best.pt --img 1024 \
--conf 0.75 --source Lunch2_000001.jpg --iou-thres 0.4
export ONNX_EXPORT=1
python models/export.py --weights weights/rotate_best.pt --include onnx --dynamic --opset-version 11