Skip to content

Register now for

# YOLOv7 vs. YOLOv9: A Detailed Technical Comparison

When selecting a YOLO model for object detection, understanding the nuances between different versions is crucial. This page provides a detailed technical comparison between YOLOv7 and YOLOv9, two significant models in the YOLO series developed by researchers at the Institute of Information Science, Academia Sinica, Taiwan. We will explore their architectural innovations, performance benchmarks, and suitability for various applications to help you make an informed decision for your next computer vision project.

## YOLOv7: Efficient and Fast Object Detection

Released in July 2022, YOLOv7 was a landmark model that aimed to significantly optimize both speed and accuracy for real-time object detection, setting new standards for efficiency at the time.

Authors: Chien-Yao Wang, Alexey Bochkovskiy, and Hong-Yuan Mark Liao
Organization: Institute of Information Science, Academia Sinica, Taiwan
Date: 2022-07-06
Arxiv: https://arxiv.org/abs/2207.02696
GitHub: https://github.com/WongKinYiu/yolov7
Docs: https://docs.ultralytics.com/models/yolov7/

### Architecture and Key Features

YOLOv7's design philosophy centers on maximizing inference speed without compromising accuracy. It introduced several key architectural elements and training strategies to achieve this balance:

- Extended Efficient Layer Aggregation Network (E-ELAN): This core component of the backbone enhances the network's learning capability by managing feature aggregation more efficiently. As detailed in the research paper, it allows the model to learn more robust features without a substantial increase in computational cost.
- Compound Model Scaling: YOLOv7 introduced compound scaling methods for model depth and width, enabling effective optimization across a range of model sizes to suit different computational budgets.
- Trainable Bag-of-Freebies: This concept involves incorporating various optimization techniques during the training process, such as advanced data augmentation and label assignment strategies. These methods improve the final model's accuracy without adding any overhead to the inference cost.

### Strengths and Weaknesses

#### Strengths

- High Inference Speed: Optimized for real-time applications, YOLOv7 often delivers faster inference than many subsequent models in certain hardware and batch size configurations.
- Strong Performance: It achieves competitive mAP scores, making it a reliable and powerful choice for many detection tasks.
- Established Model: Having been available for some time, YOLOv7 benefits from wider adoption, extensive community resources, and numerous proven deployment examples.

#### Weaknesses

- Lower Peak Accuracy: Compared to the newer YOLOv9, YOLOv7 may exhibit slightly lower maximum accuracy, especially in complex scenarios with many small or overlapping objects.
- Anchor-Based Detection: It relies on predefined anchor boxes, which can sometimes be less flexible than anchor-free approaches for detecting objects with unusual or highly varied aspect ratios.

### Use Cases

YOLOv7 is exceptionally well-suited for applications where inference speed is the most critical factor:

- Real-time video analysis and surveillance systems.
- Edge AI deployments on resource-constrained devices, such as those found in robotics and drones.
- Rapid prototyping and development of object detection systems where quick turnaround is essential.

Learn more about YOLOv7

## YOLOv9: Programmable Gradient Information for Enhanced Accuracy

Introduced in February 2024, YOLOv9 represents a significant architectural evolution by directly tackling the problem of information loss in deep neural networks, leading to substantial gains in accuracy.

Authors: Chien-Yao Wang and 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
Docs: https://docs.ultralytics.com/models/yolov9/

### Architecture and Key Features

YOLOv9 introduces novel concepts designed to improve information flow through the network, resulting in more effective learning and higher accuracy.

- Programmable Gradient Information (PGI): This is the cornerstone innovation of YOLOv9. PGI addresses the information bottleneck problem inherent in deep networks by generating reliable gradients through auxiliary reversible branches. This ensures that crucial information is preserved for updates in deeper layers, preventing the loss of key details needed for accurate detection.
- Generalized Efficient Layer Aggregation Network (GELAN): Building on the successes of architectures like CSPNet (used in YOLOv5), GELAN is a new, highly efficient network architecture. It optimizes parameter utilization and computational efficiency, allowing YOLOv9 to achieve better performance with fewer resources.

### Strengths and Weaknesses

#### Strengths

- Enhanced Accuracy: The combination of PGI and GELAN leads to superior feature extraction and significantly higher mAP scores compared to YOLOv7, which is particularly evident in the larger model variants.
- Improved Efficiency: YOLOv9 achieves better accuracy with fewer parameters and computations than previous models. For a given accuracy level, YOLOv9 is often more efficient than YOLOv7.
- State-of-the-Art Innovations: It represents the latest advancements from the original YOLO research lineage, pushing the boundaries of what is possible in real-time object detection.

#### Weaknesses

- Computational Demand: While efficient for its accuracy, the advanced architecture, especially in larger variants like YOLOv9e, can still require substantial computational resources for training and deployment.
- Newer Model: As a more recent release, community support and third-party deployment tutorials might be less extensive than for a well-established model like YOLOv7. However, its integration into the Ultralytics ecosystem helps mitigate this by providing a streamlined user experience.

### Use Cases

YOLOv9 is the ideal choice for applications that demand the highest levels of accuracy and efficiency:

- Complex detection tasks in autonomous vehicles and advanced driver-assistance systems.
- High-precision security systems that require minimizing false positives and negatives.
- Applications where model size and computational cost are critical constraints, but high accuracy cannot be compromised.

Learn more about YOLOv9

## Performance and Efficiency Head-to-Head

When comparing YOLOv7 and YOLOv9 directly, a clear trend emerges: YOLOv9 offers a superior trade-off between accuracy and computational cost. For instance, the YOLOv9m model achieves the same 51.4% mAP as YOLOv7l but does so with nearly half the parameters (20.0M vs. 36.9M) and fewer FLOPs. Similarly, YOLOv9c delivers performance comparable to YOLOv7x (53.0% vs. 53.1% mAP) while being significantly more efficient, using only 25.3M parameters compared to YOLOv7x's 71.3M. This efficiency gain is a direct result of the architectural improvements in YOLOv9, particularly PGI and GELAN, which enable more effective learning.

Model | size (pixels) | mAPval 50-95 | Speed CPU ONNX (ms) | Speed T4 TensorRT10 (ms) | params (M) | FLOPs (B)
--- | --- | --- | --- | --- | --- | ---
YOLOv7l | 640 | 51.4 | - | 6.84 | 36.9 | 104.7
YOLOv7x | 640 | 53.1 | - | 11.57 | 71.3 | 189.9
YOLOv9t | 640 | 38.3 | - | 2.30 | 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

## Conclusion and Recommendations

Both YOLOv7 and YOLOv9 are formidable object detection models, but they cater to slightly different priorities.

- YOLOv7 remains a strong contender, especially for applications where raw inference speed is the paramount concern and an established, widely supported architecture is preferred. It is a proven workhorse for many real-time systems.

- YOLOv9 is the clear successor and the recommended choice for new projects that require state-of-the-art accuracy and efficiency. Its innovative architecture solves key problems in deep learning, resulting in a model that is both more accurate and more computationally efficient than its predecessor.

While both models are excellent, developers seeking a more integrated and versatile solution should also consider models from the Ultralytics ecosystem, such as Ultralytics YOLOv8 and the latest YOLO11. These models offer a streamlined user experience, extensive documentation, and support for a wide range of tasks beyond detection, including instance segmentation, pose estimation, and classification, all within a single, well-maintained framework.

## Explore Other Models

For further comparisons and to explore other state-of-the-art models, check out these other pages in the Ultralytics documentation:

- YOLOv5: Known for its balance of performance and widespread adoption.
- YOLOv8: A versatile and powerful model supporting multiple vision tasks.
- YOLOv10: Focuses on real-time, end-to-end object detection by eliminating the need for NMS.
- YOLO11: The latest state-of-the-art model from Ultralytics, offering top-tier performance and efficiency.
- RT-DETR: A transformer-based detector that offers a different architectural approach.

📅 Created 1 year ago ✏️ Updated 1 month ago

## Comments