YOLOV8版本已发布
Please refer to install.md for installation and dataset preparation.
This repo is based on yolov5.
And this repo has been rebuilt, Please see GetStart.md for the Oriented Detection latest basic usage.
- 通过mk_train_list.py来制作训练和评估的数据集训练txt。
- python train.py --weights yolov5s.pt --data 'data/yolov5obb_demo.yaml' --hyp 'data/hyps/obb/hyp.finetune_dota.yaml' --cfg models/yolov5s.yaml --epochs 300 --batch-size 16 --img 640 --device 0
- python val.py --data data/yolov5obb_demo.yaml --weights /your weights_path/best.pt --task 'val' --img 640
- python detect.py --weights /your weights_path/best.pt --source /test_img_path/ --img 640 --device 6 --conf-thres 0.25 --iou-thres 0.1 --hide-labels --hide-conf
- python export.py --weights /your weights_path/best.pt --batch 1
- 先进行上面的预训练,对训练好的模型再进行稀疏训练
- python train_sparity.py --st --sr 0.0002 --weights /your weights_path/best.pt --data data/yolov5obb_demo.yaml --epochs 100 --imgsz 640 --adam --cfg models/yolov5s.yaml --batch-size 16
- python prune.py --percent 0.7 --weights /your_save_path/last.pt --data data/yolov5obb_demo.yaml --cfg models/yolov5s.yaml
- python prune_finetune.py --weights /your save_path/pruned_model.pt --data data/yolov5obb_demo.yaml --epochs 100 --imgsz 640 --adam
- python track_predict.py
I have used utility functions from other wonderful open-source projects. Espeicially thank the authors of:
- ultralytics/yolov5.
- Thinklab-SJTU/CSL_RetinaNet_Tensorflow.
- jbwang1997/OBBDetection
- CAPTAIN-WHU/DOTA_devkit
想要了解相关实现的细节和原理可以看我的知乎文章:
在使用中有任何问题,建议先按照install.md检查环境依赖项,再按照GetStart.md检查使用流程是否正确,善用搜索引擎和github中的issue搜索框,可以极大程度上节省你的时间。