This releases includes nn.Hardswish() activation implementation on Conv() modules, which increases mAP for all models at the expense of about 10% in inference speed. Training speeds are not significantly affected, though CUDA memory requirements increase about 10%. Training from scratch as well as finetuning both benefit from this change. The smallest models benefit the most from the Hardswish() activations, with increases of +0.9/+0.8/+0.7/+0.2mAP@0.5:0.95 for YOLOv5s/m/l/x.
All mAP values in our README are now reported at --img-size 640 (v2.0 reported at 672, and v1.0 reported at 736), so we've succeeded in increasing mAP while reducing the required --img-size :)
We've also listed YOLOv5x Test Time Augmentation (TTA) mAP and speeds for v3.0 in our README table for the first time (and for v2.0 below). Best results are YOLOv5x with TTA at 50.8 mAP@0.5:0.95. We've also updated efficientdet results in our comparison plot to reflect recent improvements in the google/automl repo.
Breaking ChangesThis release does not contain breaking changes.This release is only backwards compatible with v2.0 models trained with torch>=1.6.Bug FixesHyperparameter evolution fixed, tutorial added (#607)Added FunctionalityPyTorch 1.6 compatible. torch>=1.6 required (43a616a)PyTorch 1.6 native Automatic Mixed Precision (AMP) replaces NVIDIA Apex AMP (#573)nn.Hardswish() activations replace nn.LeakyReLU(0.1) in base convolution module models.Conv()Dataset Autodownload feature added (#685)Model Autodownload improved (#711)Layer freezing code added (#679)TensorRT export tutorial added (#623)** GPU Speed measures end-to-end time per image averaged over 5000 COCO val2017 images using a V100 GPU with batch size 32, and includes image preprocessing, PyTorch FP16 inference, postprocessing and NMS. EfficientDet data from [google/automl](https://github.com/google/automl) at batch size 8.August 13, 2020: v3.0 release: nn.Hardswish() activations, data autodownload, native AMP.July 23, 2020: v2.0 release: improved model definition, training and mAP.June 22, 2020: PANet updates: new heads, reduced parameters, improved speed and mAP 364fcfd.June 19, 2020: FP16 as new default for smaller checkpoints and faster inference d4c6674.June 9, 2020: CSP updates: improved speed, size, and accuracy (credit to @WongKinYiu for CSP).May 27, 2020: Public release. YOLOv5 models are SOTA among all known YOLO implementations.April 1, 2020: Start development of future compound-scaled YOLOv3/YOLOv4-based PyTorch models.Pretrained Checkpointsv3.0 with nn.Hardswish()ModelAPvalAPtestAP50SpeedGPUFPSGPUparamsFLOPSYOLOv5s37.037.056.22.4ms4767.5M13.2BYOLOv5m44.344.363.23.4ms33321.8M39.4BYOLOv5l47.747.766.54.4ms25647.8M88.1BYOLOv5x49.249.267.76.9ms16489.0M166.4BYOLOv5x + TTA50.850.868.925.5ms3989.0M354.3BYOLOv3-SPP45.645.565.24.5ms22263.0M118.0B** APtest denotes COCO test-dev2017 server results, all other AP results in the table denote val2017 accuracy.** All AP numbers are for single-model single-scale without ensemble or test-time augmentation except for TTA. Reproduce by python test.py --data coco.yaml --img 640 --conf 0.001. Test Time Augmentation (TTA) runs at 3 image sizes. Reproduce TTA results by python test.py --data coco.yaml --img 832 --augment** SpeedGPU measures end-to-end time per image averaged over 5000 COCO val2017 images using a GCP n1-standard-16 instance with one V100 GPU, and includes image preprocessing, PyTorch FP16 image inference at --batch-size 32 --img-size 640, postprocessing and NMS. Average NMS time included in this chart is 1-2ms/img. Reproduce by python test.py --data coco.yaml --img 640 --conf 0.1** All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation).
v2.0 with nn.LeakyReLU(0.1)ModelAPvalAPtestAP50SpeedGPUFPSGPUparamsFLOPSYOLOv5s36.136.155.32.2ms4767.5M13.2BYOLOv5m43.543.562.53.2ms33321.8M39.4BYOLOv5l47.047.165.64.1ms25647.8M88.1BYOLOv5x49.049.067.46.4ms16489.0M166.4BYOLOv5x + TTA50.450.468.523.4ms4389.0M354.3BYOLOv3-SPP45.645.565.24.5ms22263.0M118.0B** APtest denotes COCO test-dev2017 server results, all other AP results in the table denote val2017 accuracy.** All AP numbers are for single-model single-scale without ensemble or test-time augmentation. Reproduce by python test.py --data coco.yaml --img 672 --conf 0.001** SpeedGPU measures end-to-end time per image averaged over 5000 COCO val2017 images using a GCP n1-standard-16 instance with one V100 GPU, and includes image preprocessing, PyTorch FP16 image inference at --batch-size 32 --img-size 640, postprocessing and NMS. Average NMS time included in this chart is 1-2ms/img. Reproduce by python test.py --data coco.yaml --img 640 --conf 0.1** All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation).