YOLO From Zero to Mastery
Learning Path and Version Selection Guide
Version Selection Guide
| Version | Release Date | Development Team | Use Cases | Recommendation Index |
|---|---|---|---|---|
| YOLO26 | 2026.01 | Ultralytics Official | Edge deployment, CPU inference, industrial applications | ⭐⭐⭐⭐⭐ |
| YOLOv8 | 2023.01 | Ultralytics Official | Beginner learning, complete ecosystem, general scenarios | ⭐⭐⭐⭐⭐ |
| YOLO11 | 2024.09 | Ultralytics Official | Efficiency optimization, lightweight deployment | ⭐⭐⭐⭐ |
| YOLOv10 | 2024.05 | Tsinghua University | Research exploration, NMS-free end-to-end | ⭐⭐⭐⭐ |
| YOLOv9 | 2024.01 | National Taiwan University | High precision, small object detection | ⭐⭐⭐⭐ |
| YOLOv12 | 2025.02 | Buffalo University + Chinese Academy of Sciences | Attention mechanism research | ⭐⭐⭐ |
Learning Path Recommendations
- Beginner Stage (1-2 weeks): Start with YOLOv8, master basic concepts and API usage
- Intermediate Stage (2-3 weeks): Learn custom dataset training, parameter tuning and optimization
- Advanced Stage (2-3 weeks): Learn model deployment, engineering implementation
- Research Stage (ongoing): Explore new features in YOLO11, YOLO26, YOLOv9/v10/v12
Complete YOLO Development History Timeline
| Version | Release Date | Core Innovation | Milestone Significance |
|---|---|---|---|
| YOLOv1 | 2015.06 | Pioneer single-stage detection | Foundation for real-time detection |
| YOLOv2 | 2016.12 | Batch Normalization, Anchor | Dual improvement in accuracy and speed |
| YOLOv3 | 2018.04 | Multi-scale detection, residual networks | Industry standard |
| YOLOv4 | 2020.04 | CSPDarknet, Mosaic | Peak of engineering implementation |
| YOLOv5 | 2020.06 | PyTorch framework, user-friendly | Highest adoption rate |
| YOLOv7 | 2022.07 | E-ELAN, reparameterization | Balance between speed and accuracy |
| YOLOv8 | 2023.01 | C2f, Anchor-Free, unified framework | Ultralytics unified ecosystem |
| YOLOv9 | 2024.01 | GELAN, PGI programmable gradient | Training efficiency revolution |
| YOLOv10 | 2024.05 | NMS-free, efficiency-precision tradeoff | End-to-end detection |
| YOLO11 | 2024.09 | Architecture optimization, parameter reduction | Efficiency optimized version |
| YOLOv12 | 2025.02 | Area Attention mechanism | Attention architecture |
| YOLO26 | 2026.01 | DFL-free, NMS-free, 43% CPU optimization | Edge computing new standard |
Core Principles and Version Comparison
Ultralytics Official Main Line Versions
YOLOv8 Core Features:
Model Loading and Inference Across Versions
Ultralytics Unified API (Works with v8/11/26)
| |
Image Detection Hands-on Example
| |
Video Detection Hands-on Example
| |
Real-time Camera Detection
| |
Version-specific Code Differences
| Feature | YOLOv8 | YOLO11 | YOLO26 | YOLOv9 | YOLOv10 |
|---|---|---|---|---|---|
| Unified API | ✅ | ✅ | ✅ | ❌ Separate repo | ❌ Separate repo |
| No NMS | ❌ | ❌ | ✅ | ❌ | ✅ |
| DFL Module | ✅ | ✅ | ❌ Removed | ✅ | ✅ |
| MuSGD Optimizer | ❌ | ❌ | ✅ | ❌ | ❌ |
| Export Compatibility | Good | Good | Best | Fair | Fair |
Results Object API Deep Dive
The model() or model.predict() call returns a list of Results objects. Each Results object encapsulates all inference outputs for a single image. Understanding its internal structure is essential for downstream processing.
Data Annotation Tools Usage
LabelImg Installation and Usage
| |
Annotation Process:
- Open Dir → Select image folder
- Change Save Dir → Select annotation save folder
- Select YOLO format
- Create RectBox → Draw bounding box → Enter class name
- Save
LabelMe Installation and Usage
| |
CVAT Self-Hosted Annotation Platform
CVAT (Computer Vision Annotation Tool) is an open-source annotation platform by Intel, supporting Docker self-hosted deployment for team collaboration and large-scale annotation projects.
Complete Custom Dataset Training Process
Ultralytics Unified Training Code
| |
Training Parameter Differences Across Versions
| Parameter | YOLOv8 | YOLO11 | YOLO26 |
|---|---|---|---|
| Default Optimizer | SGD | SGD | MuSGD |
| DFL Loss | ✅ | ✅ | ❌ Removed |
| NMS Post-processing | ✅ | ✅ | ❌ Native no NMS |
| Small Object Optimization | Average | Better | Best (STAL) |
| CPU Inference Speed | Baseline | +25% | +43% |
Loss Function Breakdown
YOLO’s loss function consists of three components, each targeting a different learning objective:
Model Lightweighting Strategies
Model Size Selection
| Model | Parameters (M) | mAP | CPU Inference | Use Cases |
|---|---|---|---|---|
| YOLO26n | 2.8 | 38.9 | Fastest | Edge devices, Embedded |
| YOLO26s | 9.4 | 48.2 | Very fast | Mobile, Web |
| YOLO26m | 21.8 | 53.1 | Medium | Server, High performance |
| YOLO11n | 2.6 | 39.6 | Fast | Lightweight deployment |
| YOLOv8n | 3.2 | 37.3 | Baseline | General purpose |
Knowledge Distillation
| |
Model Pruning
Structured vs Unstructured Pruning
| Type | Method | Sparsity Pattern | Hardware Acceleration | Compression Ratio |
|---|---|---|---|---|
| Unstructured | Weight pruning | Random sparse | Difficult (special HW needed) | High |
| Structured | Channel pruning | Regular sparse | Native acceleration | Medium |
Torch Prune Channel Pruning Example
| |
Pruning Ratio Guidelines
| Model | Safe Ratio | Aggressive Ratio | mAP Drop |
|---|---|---|---|
| YOLO26n | ≤20% | 20-40% | <1% / 2-5% |
| YOLO26s | ≤30% | 30-50% | <1% / 3-6% |
| YOLO26m | ≤40% | 40-60% | <1% / 3-8% |
| YOLOv8n | ≤20% | 20-35% | <1% / 2-4% |
Model Pruning and Quantization
Export Time Quantization
| |
TensorRT INT8 Calibration Step-by-Step
Calibration Dataset Preparation
INT8 quantization requires representative calibration data to determine activation value ranges:
Model Export (17 Format Support)
Ultralytics Unified Export API
| |
Version Export Compatibility
| Format | YOLOv8 | YOLO11 | YOLO26 |
|---|---|---|---|
| ONNX | ✅ | ✅ | ✅ Best |
| TensorRT | ✅ | ✅ | ✅ No NMS, Simpler |
| OpenVINO | ✅ | ✅ | ✅ |
| TFLite | ✅ | ✅ | ✅ |
| NCNN | ✅ | ✅ | ✅ |
Python Deployment Practice
ONNX Runtime Deployment
| |
TensorRT Python Deployment
| |
OpenVINO Deployment with Benchmarking
| |
NCNN Mobile Deployment
NCNN is Tencent’s open-source mobile inference framework supporting ARM NEON and Vulkan GPU acceleration.
Environment Installation Issues
Q1: CUDA not available, only using CPU?
First confirm your NVIDIA driver version supports the required CUDA version. A driver that is too old will make CUDA unavailable:
| |
If nvidia-smi shows a CUDA version but PyTorch still uses CPU, you have installed the CPU-only PyTorch build. Uninstall and reinstall with the --index-url flag for the correct CUDA version. For CUDA 11.8, replace cu121 with cu118 in the URL. Always use a conda or venv virtual environment to isolate PyTorch versions and avoid system-level conflicts.
Chapter 8: Complete YOLO Tutorial with Golang
Go language, with its high performance, low memory footprint, and native concurrency features, has become one of the preferred languages for industrial YOLO deployment. This chapter provides a comprehensive implementation guide for YOLO in the Go ecosystem.
Introduction to YOLO-Related Libraries in Go Ecosystem
| Library | Stars | Maintenance Status | Use Case | Recommendation |
|---|---|---|---|---|
| onnxruntime-go | ⭐ 1.2k | Active | ONNX model inference, CPU/GPU acceleration | ⭐⭐⭐⭐⭐ |
| gocv | ⭐ 5.8k | Active | OpenCV bindings, image processing + DNN inference | ⭐⭐⭐⭐⭐ |
| yolo-go | ⭐ 800+ | Active | Pre-packaged YOLO detection library, out-of-the-box | ⭐⭐⭐⭐ |
| go-yolo | ⭐ 300+ | Maintained | Darknet CGO bindings | ⭐⭐⭐ |
| gorgonia | ⭐ 4.9k | Active | Pure Go computational graph, custom networks | ⭐⭐⭐ |
Core Feature Comparison:
Chapter 9: Complete YOLO Tutorial with Rust
With its three core characteristics of memory safety, zero-cost abstractions, and extreme performance, Rust has become the ultimate choice for production-grade YOLO deployment. In edge computing and high-concurrency scenarios, Rust’s performance advantages are particularly significant.
YOLO-related Libraries in Rust Ecosystem
| Library Name | Crates.io | Maintenance Status | Use Cases | Recommendation Index |
|---|---|---|---|---|
| ort (onnxruntime-rs) | v2.0.0 | Super Active | Official ONNX binding, full platform support | ⭐⭐⭐⭐⭐ |
| ultralytics-inference | v0.0.11 | Official Maintenance | Official Ultralytics Rust library | ⭐⭐⭐⭐⭐ |
| tract | v0.21.0 | Active | Pure Rust inference engine, no external dependencies | ⭐⭐⭐⭐ |
| opencv-rust | v0.94.0 | Active | OpenCV binding, DNN + image processing | ⭐⭐⭐⭐ |
| tch-rs | v0.15.0 | Active | LibTorch binding, PyTorch models | ⭐⭐⭐ |
| candle | v0.6.0 | Super Active | HuggingFace pure Rust ML framework | ⭐⭐⭐⭐ |
Core Features Comparison: