Ultralytics

Latest version: v8.2.14

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

Scan your dependencies

Page 5 of 8

7.4

7.1

7.0

[assets]: https://github.com/ultralytics/yolov5/releases
[previous]: https://github.com/ultralytics/yolov5/releases/tag/v6.2
[current]: https://github.com/ultralytics/yolov5/releases/tag/v7.0
[TTA]: https://github.com/ultralytics/yolov5/issues/303

<div align="center">
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
<img width="850" src="https://github.com/ultralytics/assets/blob/main/yolov5/v70/splash.png"></a>
</div>
<br>

Our new YOLOv5 v7.0 instance segmentation models are the fastest and most accurate in the world, beating all current [SOTA benchmarks](https://paperswithcode.com/sota/real-time-instance-segmentation-on-mscoco). We've made them super simple to train, validate and deploy. See full details in our [Release Notes](https://github.com/ultralytics/yolov5/releases/v7.0) and visit our [YOLOv5 Segmentation Colab Notebook](https://github.com/ultralytics/yolov5/blob/master/segment/tutorial.ipynb) for quickstart tutorials.

<div align="center">
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
<img width="800" src="https://user-images.githubusercontent.com/61612323/204180385-84f3aca9-a5e9-43d8-a617-dda7ca12e54a.png"></a>
</div>
<br>

Our primary goal with this release is to introduce super simple YOLOv5 segmentation workflows just like our existing object detection models. The new v7.0 YOLOv5-seg models below are just a start, we will continue to improve these going forward together with our existing detection and classification models. We'd love your feedback and [contributions](https://github.com/ultralytics/yolov5/blob/master/CONTRIBUTING.md) on this effort!

This release incorporates [**280 PRs** from **41 contributors**](https://github.com/ultralytics/yolov5/compare/v6.2...v7.0) since our last [release][previous] in August 2022.


Important Updates

- **Segmentation Models ⭐ NEW**: SOTA YOLOv5-seg COCO-pretrained segmentation models are now available for the first time (https://github.com/ultralytics/yolov5/pull/9052 by glenn-jocher, AyushExel and Laughing-q)
- **Paddle Paddle Export**: Export any YOLOv5 model (cls, seg, det) to Paddle format with python export.py --include paddle (https://github.com/ultralytics/yolov5/pull/9459 by glenn-jocher)
- **YOLOv5 AutoCache**: Use `python train.py --cache ram` will now scan available memory and compare against predicted dataset RAM usage. This reduces risk in caching and should help improve adoption of the dataset caching feature, which can significantly speed up training. (https://github.com/ultralytics/yolov5/pull/10027 by glenn-jocher)
- **Comet Logging and Visualization Integration:** Free forever, [Comet](https://bit.ly/yolov5-readme-comet) lets you save YOLOv5 models, resume training, and interactively visualise and debug predictions. (https://github.com/ultralytics/yolov5/pull/9232 by DN6)


New Segmentation Checkpoints

We trained YOLOv5 segmentations models on COCO for 300 epochs at image size 640 using A100 GPUs. We exported all models to ONNX FP32 for CPU speed tests and to TensorRT FP16 for GPU speed tests. We ran all speed tests on Google [Colab Pro](https://colab.research.google.com/signup) notebooks for easy reproducibility.

| Model | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Train time<br><sup>300 epochs<br>A100 (hours) | Speed<br><sup>ONNX CPU<br>(ms) | Speed<br><sup>TRT A100<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>640 (B) |
|----------------------------------------------------------------------------------------------------|-----------------------|----------------------|-----------------------|-----------------------------------------------|--------------------------------|--------------------------------|--------------------|------------------------|

6.2

[assets]: https://github.com/ultralytics/yolov5/releases
[previous]: https://github.com/ultralytics/yolov5/releases/tag/v6.1
[current]: https://github.com/ultralytics/yolov5/releases/tag/v6.2
[TTA]: https://github.com/ultralytics/yolov5/issues/303

<div align="center">
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
<img width="850" src="https://github.com/ultralytics/assets/blob/master/yolov5/v62/splash_readme.png"></a>
</div>
<br>

This release incorporates [**401 PRs** from **41 contributors**](https://github.com/ultralytics/yolov5/compare/v6.1...v6.2) since our last [release][previous] in February 2022. It adds [Classification](https://github.com/ultralytics/yolov5/pull/8956) training, validation, prediction and export (to all 11 [formats](https://github.com/ultralytics/yolov5/issues/251)), and also provides ImageNet-pretrained [YOLOv5m-cls](https://github.com/ultralytics/yolov5/releases/download/v6.2/yolov5m-cls.pt), [ResNet](https://github.com/ultralytics/yolov5/releases/download/v6.2/ResNet50.pt) (18, 34, 50, 101) and [EfficientNet](https://github.com/ultralytics/yolov5/releases/download/v6.2/efficientnet_b0.pt) (b0-b3) models.

My main goal with this release is to introduce super simple YOLOv5 classification workflows just like our existing object detection models. The new v6.2 YOLOv5-cls models below are just a start, we will continue to improve these going forward together with our existing detection models. We'd love your [contributions](https://github.com/ultralytics/yolov5/blob/master/CONTRIBUTING.md) on this effort!

Our next release, v6.3 is scheduled for September and will bring official **instance segmentation** support to YOLOv5, with a major v7.0 release later this year **updating architectures** across all 3 tasks - classification, detection and segmentation.

Important Updates

- **Classification Models ⭐ NEW**: YOLOv5-cls ImageNet-pretrained classification models are now available for the first time (https://github.com/ultralytics/yolov5/pull/8956 by glenn-jocher)
- **ClearML logging ⭐ NEW**: Integration with the open-source experiment tracker [ClearML](https://cutt.ly/yolov5-readme-clearml). Installing with `pip install clearml` will enable the integration and allow users to track every training run in ClearML. This in turn allows users to track and compare runs and even schedule runs remotely. (https://github.com/ultralytics/yolov5/pull/8620 by thepycoder)
- **Deci.ai optimization ⭐ NEW**: Automatically compile and quantize YOLOv5 for better inference performance in one click at [Deci](https://bit.ly/yolov5-deci-platform) (https://github.com/ultralytics/yolov5/pull/8956 by glenn-jocher).
- **GPU Export Benchmarks**: Benchmark (mAP and speed) all YOLOv5 export formats with `python utils/benchmarks.py --weights yolov5s.pt --device 0` for GPU benchmarks or `--device cpu` for CPU benchmarks (https://github.com/ultralytics/yolov5/pull/6963 by glenn-jocher).
- **Training Reproducibility**: Single-GPU YOLOv5 training with `torch>=1.12.0` is now fully reproducible, and a new `--seed` argument can be used (default seed=0) (https://github.com/ultralytics/yolov5/pull/8213 by AyushExel).
- **Apple Metal Performance Shader (MPS) Support**: MPS support for Apple M1/M2 devices with `--device mps` (full functionality is pending torch updates in https://github.com/pytorch/pytorch/issues/77764) (https://github.com/ultralytics/yolov5/pull/7878 by glenn-jocher)

New Classification Checkpoints

We trained YOLOv5-cls classification models on ImageNet for 90 epochs using a 4xA100 instance, and we trained ResNet and EfficientNet models alongside with the same default training settings to compare. We exported all models to ONNX FP32 for CPU speed tests and to TensorRT FP16 for GPU speed tests. We ran all speed tests on Google [Colab Pro](https://colab.research.google.com/signup) for easy reproducibility.

| Model | size<br><sup>(pixels) | accuracy<br><sup>top1 | accuracy<br><sup>top5 | Train time<br><sup>90 epochs<br>4x A100 (hours) | Speed<br><sup>ONNX-CPU<br>(ms) | Speed<br><sup>TensorRT-V100<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>224 (B) |
|----------------------------------------------------------------------------------------------------|-----------------------|-----------------------|-----------------------|-------------------------------------------------|--------------------------------|-------------------------------------|--------------------|------------------------|

6.1

[assets]: https://github.com/ultralytics/yolov5/releases
[previous]: https://github.com/ultralytics/yolov5/releases/tag/v6.0
[current]: https://github.com/ultralytics/yolov5/releases/tag/v6.1
[TTA]: https://github.com/ultralytics/yolov5/issues/303

This release incorporates many new features and bug fixes ([**271 PRs** from **48 contributors**](https://github.com/ultralytics/yolov5/compare/v6.0...v6.1)) since our last [release][previous] in October 2021. It adds [TensorRT](https://github.com/ultralytics/yolov5/pull/5699), [Edge TPU](https://github.com/ultralytics/yolov5/pull/3630) and [OpenVINO](https://github.com/ultralytics/yolov5/pull/6057) support, and provides retrained models at `--batch-size 128` with new default one-cycle linear LR [scheduler](https://github.com/ultralytics/yolov5/pull/6729). YOLOv5 now officially supports 11 different formats, not just for export but for inference (both detect.py and PyTorch Hub), and validation to profile mAP and speed results after export.

Format | `export.py --include` | Model
:--- | --: | :--
[PyTorch](https://pytorch.org/) | - | `yolov5s.pt`
[TorchScript](https://pytorch.org/docs/stable/jit.html) | `torchscript` | `yolov5s.torchscript`
[ONNX](https://onnx.ai/) | `onnx` | `yolov5s.onnx`
[OpenVINO](https://docs.openvino.ai/latest/index.html) | `openvino` | `yolov5s_openvino_model/`
[TensorRT](https://developer.nvidia.com/tensorrt) | `engine` | `yolov5s.engine`
[CoreML](https://github.com/apple/coremltools) | `coreml` | `yolov5s.mlmodel`
[TensorFlow SavedModel](https://www.tensorflow.org/guide/saved_model) | `saved_model` | `yolov5s_saved_model/`
[TensorFlow GraphDef](https://www.tensorflow.org/api_docs/python/tf/Graph) | `pb` | `yolov5s.pb`
[TensorFlow Lite](https://www.tensorflow.org/lite) | `tflite` | `yolov5s.tflite`
[TensorFlow Edge TPU](https://coral.ai/docs/edgetpu/models-intro/) | `edgetpu` | `yolov5s_edgetpu.tflite`
[TensorFlow.js](https://www.tensorflow.org/js) | `tfjs` | `yolov5s_web_model/`


Usage examples (ONNX shown):
bash
Export: python export.py --weights yolov5s.pt --include onnx
Detect: python detect.py --weights yolov5s.onnx
PyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s.onnx')
Validate: python val.py --weights yolov5s.onnx
Visualize: https://netron.app



Important Updates

- **TensorRT support**: TensorFlow, Keras, TFLite, TF.js model export now fully integrated using `python export.py --include saved_model pb tflite tfjs` (https://github.com/ultralytics/yolov5/pull/5699 by imyhxy)
- **Tensorflow Edge TPU support ⭐ NEW**: New smaller YOLOv5n (1.9M params) model below YOLOv5s (7.5M params), exports to 2.1 MB INT8 size, ideal for ultralight mobile solutions. (https://github.com/ultralytics/yolov5/pull/3630 by zldrobit)
- **OpenVINO support**: YOLOv5 ONNX models are now compatible with both OpenCV DNN and ONNX Runtime (https://github.com/ultralytics/yolov5/pull/6057 by glenn-jocher).
- **Export Benchmarks**: Benchmark (mAP and speed) all YOLOv5 export formats with `python utils/benchmarks.py --weights yolov5s.pt`. Currently operates on CPU, future updates will implement GPU support. (https://github.com/ultralytics/yolov5/pull/6613 by glenn-jocher).
- **Architecture:** no changes
- **Hyperparameters:** minor change
- hyp-scratch-large.yaml `lrf` reduced from 0.2 to 0.1 (https://github.com/ultralytics/yolov5/pull/6525 by glenn-jocher).
- **Training:** Default Learning Rate (LR) scheduler updated
- One-cycle with cosine replace with one-cycle linear for improved results (https://github.com/ultralytics/yolov5/pull/6729 by glenn-jocher).

New Results

All model trainings logged to https://wandb.ai/glenn-jocher/YOLOv5_v61_official

<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/155040763-93c22a27-347c-4e3c-847a-8094621d3f4e.png"></p>
<details>
<summary>YOLOv5-P5 640 Figure (click to expand)</summary>

<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/155040757-ce0934a3-06a6-43dc-a979-2edbbd69ea0e.png"></p>
</details>
<details>
<summary>Figure Notes (click to expand)</summary>

* **COCO AP val** denotes mAP0.5:0.95 metric measured on the 5000-image [COCO val2017](http://cocodataset.org) dataset over various inference sizes from 256 to 1536.
* **GPU Speed** measures average inference time per image on [COCO val2017](http://cocodataset.org) dataset using a [AWS p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/) V100 instance at batch-size 32.
* **EfficientDet** data from [google/automl](https://github.com/google/automl) at batch size 8.
* **Reproduce** by `python val.py --task study --data coco.yaml --iou 0.7 --weights yolov5n6.pt yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt`
</details>

Example YOLOv5l before and after metrics:

|YOLOv5l<br><sup>Large|size<br><sup>(pixels) |mAP<sup>val<br>0.5:0.95 |mAP<sup>val<br>0.5 |Speed<br><sup>CPU b1<br>(ms) |Speed<br><sup>V100 b1<br>(ms) |Speed<br><sup>V100 b32<br>(ms) |params<br><sup>(M) |FLOPs<br><sup> 640 (B)
--- |--- |--- |--- |--- |--- |--- |--- |---

6.0

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

This release incorporates many new features and bug fixes ([**465 PRs** from **73 contributors**](https://github.com/ultralytics/yolov5/compare/v5.0...v6.0)) since our last [release v5.0](https://github.com/ultralytics/yolov5/releases/tag/v5.0) in April, brings architecture tweaks, and also introduces new P5 and P6 'Nano' models: **YOLOv5n** and **YOLOv5n6**. Nano models maintain the YOLOv5s depth multiple of 0.33 but reduce the YOLOv5s width multiple from 0.50 to 0.25, resulting in ~75% fewer parameters, from 7.5M to 1.9M, ideal for mobile and CPU solutions.

Example usage:
bash
python detect.py --weights yolov5n.pt --img 640 Nano P5 model trained at --img 640 (28.4 mAP0.5:0.95)
python detect.py --weights yolov5n6.pt --img 1280 Nano P6 model trained at --img 1280 (34.0 mAP0.5:0.95)



Important Updates

- **Roboflow Integration ⭐ NEW**: Train YOLOv5 models directly on any Roboflow dataset with our new integration! (https://github.com/ultralytics/yolov5/issues/4975 by Jacobsolawetz)

- **YOLOv5n 'Nano' models ⭐ NEW**: New smaller YOLOv5n (1.9M params) model below YOLOv5s (7.5M params), exports to 2.1 MB INT8 size, ideal for ultralight mobile solutions. (https://github.com/ultralytics/yolov5/discussions/5027 by glenn-jocher)
- **TensorFlow and Keras Export**: TensorFlow, Keras, TFLite, TF.js model export now fully integrated using `python export.py --include saved_model pb tflite tfjs` (https://github.com/ultralytics/yolov5/pull/1127 by zldrobit)
- **OpenCV DNN**: YOLOv5 ONNX models are now compatible with both OpenCV DNN and ONNX Runtime (https://github.com/ultralytics/yolov5/pull/4833 by SamFC10).
- **Model Architecture:** Updated backbones are slightly smaller, faster and more accurate.
- Replacement of `Focus()` with an equivalent `Conv(k=6, s=2, p=2)` layer (https://github.com/ultralytics/yolov5/issues/4825 by thomasbi1) for improved exportability
- New `SPPF()` replacement for `SPP()` layer for reduced ops (https://github.com/ultralytics/yolov5/pull/4420 by glenn-jocher)
- Reduction in P3 backbone layer `C3()` repeats from 9 to 6 for improved speeds
- Reorder places `SPPF()` at end of backbone
- Reintroduction of shortcut in the last `C3()` backbone layer
- Updated [hyperparameters](https://github.com/ultralytics/yolov5/blob/master/data/hyps/hyp.scratch-high.yaml) with increased mixup and copy-paste augmentation


New Results

<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/136901921-abcfcd9d-f978-4942-9b97-0e3f202907df.png"></p>
<details>
<summary>YOLOv5-P5 640 Figure (click to expand)</summary>

<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/136763877-b174052b-c12f-48d2-8bc4-545e3853398e.png"></p>
</details>
<details>
<summary>Figure Notes (click to expand)</summary>

* **COCO AP val** denotes mAP0.5:0.95 metric measured on the 5000-image [COCO val2017](http://cocodataset.org) dataset over various inference sizes from 256 to 1536.
* **GPU Speed** measures average inference time per image on [COCO val2017](http://cocodataset.org) dataset using a [AWS p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/) V100 instance at batch-size 32.
* **EfficientDet** data from [google/automl](https://github.com/google/automl) at batch size 8.
* **Reproduce** by `python val.py --task study --data coco.yaml --iou 0.7 --weights yolov5n6.pt yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt`
</details>

mAP improves from +0.3% to +1.1% across all models, and ~5% FLOPs reduction produces slight speed improvements and a reduced CUDA memory footprint. Example YOLOv5l before and after metrics:

|YOLOv5l<br><sup>Large|size<br><sup>(pixels) |mAP<sup>val<br>0.5:0.95 |mAP<sup>val<br>0.5 |Speed<br><sup>CPU b1<br>(ms) |Speed<br><sup>V100 b1<br>(ms) |Speed<br><sup>V100 b32<br>(ms) |params<br><sup>(M) |FLOPs<br><sup>640 (B)
--- |--- |--- |--- |--- |--- |--- |--- |---

Page 5 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.