Skip to content

Register now for

# YOLOv9 vs YOLOv5: A Detailed Comparison

This page provides a technical comparison between two significant object detection models: YOLOv9 and Ultralytics YOLOv5. Both models are part of the influential YOLO (You Only Look Once) series, known for balancing speed and accuracy in real-time object detection. This comparison explores their architectural differences, performance metrics, and ideal use cases to help you select the most suitable model for your computer vision projects.

## YOLOv9: Advancing Accuracy with Novel Architecture

YOLOv9 was introduced in February 2024, bringing significant architectural innovations to the forefront of object detection. It aims to solve the problem of information loss in deep neural networks, a critical challenge for training highly effective models.

Authors: Chien-Yao Wang, Hong-Yuan Mark Liao
Organization: Institute of Information Science, Academia Sinica, Taiwan
Date: 2024-02-21
Arxiv: https://arxiv.org/abs/2402.13616
GitHub: https://github.com/WongKinYiu/yolov9
Documentation: https://docs.ultralytics.com/models/yolov9/

### Architecture and Innovations

YOLOv9 introduces two groundbreaking concepts detailed in its paper, "YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information":

- Programmable Gradient Information (PGI): This novel approach is designed to tackle the information bottleneck problem that occurs as data flows through deep network layers. PGI ensures that complete input information is available for calculating the loss function, thereby preserving crucial data for more accurate gradient updates and more effective model training.
- Generalized Efficient Layer Aggregation Network (GELAN): YOLOv9 also features GELAN, a new network architecture optimized for superior parameter utilization and computational efficiency. It builds upon the principles of CSPNet and ELAN to create a structure that achieves higher accuracy with fewer parameters and computational costs (FLOPs).

### Strengths

- Enhanced Accuracy: YOLOv9 sets a new state-of-the-art on the COCO dataset, surpassing many previous real-time object detectors in mean Average Precision (mAP).
- Improved Efficiency: The combination of PGI and GELAN results in models that are not only highly accurate but also computationally efficient, making them powerful for tasks where performance is critical.
- Information Preservation: By directly addressing the information bottleneck, PGI allows for the training of deeper, more complex networks without the typical degradation in performance, leading to more robust models.

### Weaknesses

- Training Resources: As noted in the YOLOv9 documentation, training YOLOv9 models can be more resource-intensive and time-consuming compared to more established models like YOLOv5.
- Newer Ecosystem: As a more recent model from a different research group, its ecosystem, community support, and third-party integrations are less mature than those of the well-established Ultralytics YOLOv5.
- Task Versatility: The original YOLOv9 focuses primarily on object detection. It lacks the built-in support for other vision tasks like instance segmentation, image classification, and pose estimation, which are natively supported in Ultralytics models.

### Use Cases

- Applications demanding the highest possible object detection accuracy, such as advanced video analytics and high-precision industrial inspection.
- Scenarios where computational efficiency must be balanced with top-tier performance, like in AI for traffic management.
- Research and development in advanced computer vision where exploring novel architectures is a priority.

Learn more about YOLOv9

## Ultralytics YOLOv5: The Established and Versatile Standard

Released in 2020, Ultralytics YOLOv5 quickly became an industry standard due to its exceptional balance of speed, accuracy, and ease of use. Developed entirely in PyTorch, it has been continuously refined and is backed by a robust ecosystem.

Author: Glenn Jocher
Organization: Ultralytics
Date: 2020-06-26
GitHub: https://github.com/ultralytics/yolov5
Documentation: https://docs.ultralytics.com/models/yolov5/

### Architecture and Features

YOLOv5 utilizes a proven architecture featuring a CSPDarknet53 backbone and a PANet neck for effective feature aggregation. Its anchor-based detection head is highly efficient. The model is available in various sizes (n, s, m, l, x), allowing developers to choose the perfect trade-off between performance and resource constraints.

### Strengths

- Exceptional Speed and Efficiency: YOLOv5 is highly optimized for fast inference, making it ideal for real-time applications on a wide range of hardware, from powerful GPUs to resource-constrained edge devices.
- Ease of Use: Renowned for its streamlined user experience, YOLOv5 offers simple Python and CLI interfaces, along with extensive and clear documentation.
- Well-Maintained Ecosystem: YOLOv5 benefits from the comprehensive Ultralytics ecosystem, which includes active development, a large and supportive community on Discord, frequent updates, and powerful tools like Ultralytics HUB for no-code training and deployment.
- Performance Balance: It achieves a strong trade-off between inference speed and detection accuracy, making it suitable for a diverse range of real-world deployment scenarios.
- Versatility: Unlike many specialized models, YOLOv5 supports multiple tasks out-of-the-box, including object detection, instance segmentation, and image classification.
- Training Efficiency: YOLOv5 offers efficient training processes, readily available pre-trained weights, and generally lower memory requirements compared to many other architectures, especially transformer-based models.

### Weaknesses

- Peak Accuracy: While highly accurate for its time, newer models like YOLOv9 can achieve higher mAP scores on benchmarks like COCO.
- Anchor-Based Design: It relies on predefined anchor boxes, which may require more tuning for datasets with unusually shaped objects compared to modern anchor-free approaches.

### Use Cases

- Real-time video surveillance and security systems.
- Deployment on resource-constrained edge devices like Raspberry Pi and NVIDIA Jetson.
- Industrial automation and quality control, such as improving manufacturing with computer vision.
- Rapid prototyping and development, thanks to its ease of use and extensive support.

Learn more about YOLOv5

## Performance and Benchmarks: YOLOv9 vs. YOLOv5

The performance comparison between YOLOv9 and YOLOv5 highlights the advancements in model architecture over the years. YOLOv9 models consistently achieve higher mAP scores than their YOLOv5 counterparts, often with a more efficient use of parameters and FLOPs at the higher end. For example, YOLOv9-C achieves 53.0% mAP with 25.3M parameters, outperforming YOLOv5x's 50.7% mAP with 86.7M parameters.

However, YOLOv5 excels in speed, especially its smaller variants like YOLOv5n and YOLOv5s, which offer extremely fast inference times on both CPU and GPU, making them unbeatable for many real-time edge applications.

Model | size (pixels) | mAPval 50-95 | Speed CPU ONNX (ms) | Speed T4 TensorRT10 (ms) | params (M) | FLOPs (B)
--- | --- | --- | --- | --- | --- | ---
YOLOv9t | 640 | 38.3 | - | 2.3 | 2.0 | 7.7
YOLOv9s | 640 | 46.8 | - | 3.54 | 7.1 | 26.4
YOLOv9m | 640 | 51.4 | - | 6.43 | 20.0 | 76.3
YOLOv9c | 640 | 53.0 | - | 7.16 | 25.3 | 102.1
YOLOv9e | 640 | 55.6 | - | 16.77 | 57.3 | 189.0
YOLOv5n | 640 | 28.0 | 73.6 | 1.12 | 2.6 | 7.7
YOLOv5s | 640 | 37.4 | 120.7 | 1.92 | 9.1 | 24.0
YOLOv5m | 640 | 45.4 | 233.9 | 4.03 | 25.1 | 64.2
YOLOv5l | 640 | 49.0 | 408.4 | 6.61 | 53.2 | 135.0
YOLOv5x | 640 | 50.7 | 763.2 | 11.89 | 97.2 | 246.4

## Conclusion: Which Model Should You Choose?

The choice between YOLOv9 and YOLOv5 depends heavily on your project's specific needs.

- YOLOv9 is the superior choice for applications where maximum accuracy is the primary goal, and you have sufficient computational resources for training. Its innovative architecture makes it ideal for pushing the boundaries of object detection performance in specialized fields.

- Ultralytics YOLOv5 remains the more practical and versatile option for a broader range of applications. Its key advantages—ease of use, speed, multi-task support, and a mature, well-supported ecosystem—make it the go-to model for developers who need to build robust, real-world solutions quickly and efficiently. For projects requiring deployment on edge devices or a balance between speed and accuracy, YOLOv5 is often the optimal choice.

For those looking for a middle ground or even more advanced features, Ultralytics offers a full suite of models. Consider exploring YOLOv8, which combines many of the usability benefits of YOLOv5 with an anchor-free architecture and even greater versatility, or the latest YOLO11 for state-of-the-art performance within the Ultralytics ecosystem. You can find more comparisons on our model comparison page.

📅 Created 1 year ago ✏️ Updated 1 month ago

## Comments