Ultralytics

Latest version: v8.2.14

Safety actively analyzes 627248 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 8

5.0

This release implements **YOLOv5-P6** models and retrained **YOLOv5-P5** models. All model sizes YOLOv5s/m/l/x are now available in both P5 and P6 architectures:

* **YOLOv5-P5** models (same architecture as v4.0 release): **3 output layers** P3, P4, P5 at strides 8, 16, 32, trained at `--img 640`
bash
python detect.py --weights yolov5s.pt P5 models
yolov5m.pt
yolov5l.pt
yolov5x.pt

* **YOLOv5-P6** models: **4 output layers** P3, P4, P5, P6 at strides 8, 16, 32, 64 trained at `--img 1280`
bash
python detect.py --weights yolov5s6.pt P6 models
yolov5m6.pt
yolov5l6.pt
yolov5x6.pt


Example usage:
bash
Command Line
python detect.py --weights yolov5m.pt --img 640 P5 model at 640
python detect.py --weights yolov5m6.pt --img 640 P6 model at 640
python detect.py --weights yolov5m6.pt --img 1280 P6 model at 1280

python
PyTorch Hub
model = torch.hub.load('ultralytics/yolov5', 'yolov5m6') P6 model
results = model(imgs, size=1280) inference at 1280


Notable Updates

- **YouTube Inference**: Direct inference from YouTube videos, i.e. `python detect.py --source 'https://youtu.be/NUsoVlDFqZg'`. Live streaming videos and normal videos supported. (https://github.com/ultralytics/yolov5/pull/2752)
- **AWS Integration**: Amazon AWS integration and new [AWS Quickstart Guide](https://github.com/ultralytics/yolov5/wiki/AWS-Quickstart) for simple EC2 instance YOLOv5 training and resuming of interrupted Spot instances. (https://github.com/ultralytics/yolov5/pull/2185)
- **Supervise.ly Integration**: New integration with the [Supervisely Ecosystem](https://github.com/supervisely-ecosystem) for training and deploying YOLOv5 models with Supervise.ly (https://github.com/ultralytics/yolov5/issues/2518)
- **Improved W&B Integration:** Allows saving datasets and models directly to [Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_readme). This allows for --resume directly from W&B (useful for temporary environments like Colab), as well as enhanced visualization tools. See this [blog](https://wandb.ai/cayush/yolov5-dsviz-demo/reports/Object-Detection-with-YOLO-and-Weights-Biases--Vmlldzo0NTgzMjk) by AyushExel for details. (https://github.com/ultralytics/yolov5/pull/2125)


Updated Results

P6 models include an extra P6/64 output layer for detection of larger objects, and benefit the most from training at higher resolution. For this reason we trained all P5 models at 640, and all P6 models at 1280.

<p align="center"><img width="800" src="https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png"></p>
<details>
<summary>YOLOv5-P5 640 Figure (click to expand)</summary>

<p align="center"><img width="800" src="https://user-images.githubusercontent.com/26833433/114313219-f1d70e00-9af5-11eb-9973-52b1f98d321a.png"></p>
</details>
<details>
<summary>Figure Notes (click to expand)</summary>

* 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.
* **Reproduce** by `python test.py --task study --data coco.yaml --iou 0.7 --weights yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt`
</details>

- **April 11, 2021**: [v5.0 release](https://github.com/ultralytics/yolov5/releases/tag/v5.0): YOLOv5-P6 1280 models, [AWS](https://github.com/ultralytics/yolov5/wiki/AWS-Quickstart), [Supervise.ly](https://github.com/ultralytics/yolov5/issues/2518) and [YouTube](https://github.com/ultralytics/yolov5/pull/2752) integrations.
- **January 5, 2021**: [v4.0 release](https://github.com/ultralytics/yolov5/releases/tag/v4.0): nn.SiLU() activations, [Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_readme) logging, [PyTorch Hub](https://pytorch.org/hub/ultralytics_yolov5/) integration.
- **August 13, 2020**: [v3.0 release](https://github.com/ultralytics/yolov5/releases/tag/v3.0): nn.Hardswish() activations, data autodownload, native AMP.
- **July 23, 2020**: [v2.0 release](https://github.com/ultralytics/yolov5/releases/tag/v2.0): improved model definition, training and mAP.


Pretrained Checkpoints

[assets]: https://github.com/ultralytics/yolov5/releases

Model |size<br><sup>(pixels) |mAP<sup>val<br>0.5:0.95 |mAP<sup>test<br>0.5:0.95 |mAP<sup>val<br>0.5 |Speed<br><sup>V100 (ms) | |params<br><sup>(M) |FLOPS<br><sup>640 (B)
--- |--- |--- |--- |--- |--- |---|--- |---
[YOLOv5s][assets] |640 |36.7 |36.7 |55.4 |**2.0** | |7.3 |17.0
[YOLOv5m][assets] |640 |44.5 |44.5 |63.1 |2.7 | |21.4 |51.3
[YOLOv5l][assets] |640 |48.2 |48.2 |66.9 |3.8 | |47.0 |115.4
[YOLOv5x][assets] |640 |**50.4** |**50.4** |**68.8** |6.1 | |87.7 |218.8
| | | | | | || |
[YOLOv5s6][assets] |1280 |43.3 |43.3 |61.9 |**4.3** | |12.7 |17.4
[YOLOv5m6][assets] |1280 |50.5 |50.5 |68.7 |8.4 | |35.9 |52.4
[YOLOv5l6][assets] |1280 |53.4 |53.4 |71.1 |12.3 | |77.2 |117.7
[YOLOv5x6][assets] |1280 |**54.4** |**54.4** |**72.0** |22.4 | |141.8 |222.9
| | | | | | || |

4.0

This release implements two architecture changes to YOLOv5, as well as various bug fixes and performance improvements.

Breaking Changes

- nn.SiLU() activations replace nn.LeakyReLU(0.1) and nn.Hardswish() activations used in previous versions. nn.SiLU() was introduced in PyTorch 1.7.0 (https://pytorch.org/docs/stable/generated/torch.nn.SiLU.html), and due to the recent timeframe certain export pipelines may be temporarily unavailable (CoreML possibly) without updates to the associated tools (i.e. coremltools).

Bug Fixes
- Multi-GPU --resume 1810
- leaf Variable inplace bug fix 1759
- Various additional bug fixes contained in PRs 1235 through 1837

Added Functionality
- Weights & Biases (W&B) Feature Addition 1235
- Utils reorganization 1392
- PyTorch Hub and autoShape update 1415
- W&B artifacts feature addition 1712
- Various additional feature additions contained in PRs 1235 through 1837


Updated Results

Latest models are all slightly smaller to due removal of one convolution within each bottleneck, which have been renamed as C3() modules now in light of the 3 I/O convolutions each one does vs the 4 in the standard CSP bottleneck. The previous manual concatenation and LeakyReLU(0.1) activations have both removed, simplifying the architecture, reducing parameter count, and better exploiting the .fuse() operation at inference time.

nn.SiLU() activations replace nn.LeakyReLU(0.1) and nn.Hardswish() activations throughout the model, simplifying the architecture as we now only have one single activation function used everywhere rather than the two types before.

In general the changes result in smaller models (89.0M params -> 87.7M YOLOv5x), faster inference times (6.9ms -> 6.0ms), and improved mAP (49.2 -> 50.1) for all models except YOLOv5s, which reduced mAP slightly (37.0 -> 36.8). In general the largest models benefit the most from this update. YOLOv5x in particular is now above 50.0 mAP at --img-size 640, which may be the first time this is possible at 640 resolution for any architecture I'm aware of (correct me if I'm wrong though).

<img src="https://user-images.githubusercontent.com/26833433/103594689-455e0e00-4eae-11eb-9cdf-7d753e2ceeeb.png" width="1000">** 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.


Pretrained Checkpoints

| Model | size | AP<sup>val</sup> | AP<sup>test</sup> | AP<sub>50</sub> | Speed<sub>V100</sub> | FPS<sub>V100</sub> || params | GFLOPS |
|---------- |------ |------ |------ |------ | -------- | ------| ------ |------ | :------: |

3.9

3.7

3.1

This release aggregates various minor bug fixes and performance improvements since the main v3.0 release and incorporates PyTorch 1.7.0 compatibility updates. v3.1 models share weights with v3.0 models but contain minor module updates (`inplace` fields for nn.Hardswish() activations) for native PyTorch 1.7.0 compatibility. For PyTorch 1.7.0 release updates see https://github.com/pytorch/pytorch/releases/tag/v1.7.0.


Breaking Changes

- 'giou' hyperparameter has been renamed to 'box' to better reflect a criteria-agnostic regression loss term (https://github.com/ultralytics/yolov5/pull/1120)


Bug Fixes
- PyTorch 1.7 compatibility update. `torch>=1.6.0` required, `torch>=1.7.0` recommended (https://github.com/ultralytics/yolov5/pull/1233)
- GhostConv module bug fix (https://github.com/ultralytics/yolov5/pull/1176)
- Rectangular padding min stride bug fix from 64 to 32 (https://github.com/ultralytics/yolov5/pull/1165)
- Mosaic4 bug fix (https://github.com/ultralytics/yolov5/pull/1021)
- Logging directory runs/exp bug fix (https://github.com/ultralytics/yolov5/pull/978)
- Various additional

Added Functionality
- PyTorch Hub functionality with YOLOv5 .autoshape() method added (https://github.com/ultralytics/yolov5/pull/1210)
- Autolabelling addition and standardization across detect.py and test.py (https://github.com/ultralytics/yolov5/pull/1182)
- Precision-Recall Curve automatic plotting when testing (https://github.com/ultralytics/yolov5/pull/1107)
- Self-host VOC dataset for more reliable access and faster downloading (https://github.com/ultralytics/yolov5/pull/1077)
- Adding option to output autolabel confidence with --save-conf in test.py and detect.py (https://github.com/ultralytics/yolov5/pull/994)
- Google App Engine deployment option (https://github.com/ultralytics/yolov5/pull/964)
- Infinite Dataloader for faster training (https://github.com/ultralytics/yolov5/pull/876)
- Various additional

3.0

Model | AP<sup>val</sup> | AP<sup>test</sup> | AP<sub>50</sub> | Speed<sub>GPU</sub> | FPS<sub>GPU</sub> || params | FLOPS |
---------- |------ |------ |------ | -------- | ------| ------ |------ | :------: |

Page 6 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.