singhranjodh / PyTorch_YOLOv4

PyTorch implementation of YOLOv4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YOLOv4

This is PyTorch implementation of YOLOv4 which is based on ultralytics/yolov3.

development log

Expand

Pretrained Models & Comparison

Model Test Size APval AP50val AP75val APSval APMval APLval cfg weights
YOLOv4 672 47.7% 66.7% 52.1% 30.5% 52.6% 61.4% cfg weights
YOLOv4pacsp-s 672 36.6% 55.5% 39.6% 21.2% 41.1% 47.0% cfg weights
YOLOv4pacsp 672 47.2% 66.2% 51.6% 30.4% 52.3% 60.8% cfg weights
YOLOv4pacsp-x 672 49.3% 68.1% 53.6% 31.8% 54.5% 63.6% cfg weights
YOLOv4pacsp-s-mish 672 38.6% 57.7% 41.8% 22.3% 43.5% 49.3% cfg weights
(+BoF) 640 39.9% 59.1% 43.1% 24.4% 45.2% 51.4% weights
YOLOv4pacsp-mish 672 48.1% 66.9% 52.3% 30.8% 53.4% 61.7% cfg weights
(+BoF) 640 49.3% 68.2% 53.8% 31.9% 54.9% 62.8% weights
YOLOv4pacsp-x-mish 672 50.0% 68.5% 54.4% 32.9% 54.9% 64.0% cfg weights
(+BoF) 640 51.0% 69.7% 55.5% 33.3% 56.2% 65.5% weights

Requirements

pip install -r requirements.txt

※ For running Mish models, please install https://github.com/thomasbrandon/mish-cuda

Training

python train.py --device 0 --batch-size 16 --img 640 640 --data coco.yaml --cfg cfg/yolov4-pacsp.cfg --weights '' --name yolov4-pacsp

Testing

python test.py --img 640 --conf 0.001 --batch 8 --device 0 --data coco.yaml --cfg cfg/yolov4-pacsp.cfg --weights weights/yolov4-pacsp.pt

Citation

@article{bochkovskiy2020yolov4,
  title={{YOLOv4}: Optimal Speed and Accuracy of Object Detection},
  author={Bochkovskiy, Alexey and Wang, Chien-Yao and Liao, Hong-Yuan Mark},
  journal={arXiv preprint arXiv:2004.10934},
  year={2020}
}
@inproceedings{wang2020cspnet,
  title={{CSPNet}: A New Backbone That Can Enhance Learning Capability of {CNN}},
  author={Wang, Chien-Yao and Mark Liao, Hong-Yuan and Wu, Yueh-Hua and Chen, Ping-Yang and Hsieh, Jun-Wei and Yeh, I-Hau},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops},
  pages={390--391},
  year={2020}
}

Acknowledgements

About

PyTorch implementation of YOLOv4


Languages

Language:Python 98.3%Language:Shell 1.7%