# yolov5 | Ultralytics | Knowledge Base | Instagit

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite

GitHub Stars: 56.9k

Repository: https://github.com/ultralytics/yolov5

---

## Articles

### [How to Implement Custom Loss Functions or Metrics in YOLOv5](/ultralytics/yolov5/how-to-implement-custom-loss-functions-metrics-yolov5)

Learn how to implement custom loss functions and metrics in YOLOv5 by subclassing nn.Module and integrating them into the training pipeline without core modifications.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Configure Data Augmentation Techniques in YOLOv5 Training](/ultralytics/yolov5/how-to-configure-data-augmentation-techniques-yolov5-training)

Learn to configure YOLOv5 data augmentation techniques by editing hyper-parameter YAML files and using the augment flag. Improve your model's performance effectively.

- Tags: how-to-guide
- Published: 2026-03-06

### [What Is the Role of the Detect Head in YOLOv5? Architecture and Implementation Explained](/ultralytics/yolov5/what-is-role-of-detect-head-in-yolov5)

Discover the Detect head in YOLOv5. Understand its role in object detection, anchor decoding, grid generation, and bounding box regression for precise predictions. Learn how it transforms feature maps into outputs.

- Tags: internals
- Published: 2026-03-06

### [How to Analyze YOLOv5 Training Results and Performance Metrics](/ultralytics/yolov5/how-to-analyze-yolov5-training-results-performance-metrics)

Analyze YOLOv5 training results with CSV logs, confusion matrices, PR curves, and loss plots. Understand key metrics to evaluate object detection performance effectively.

- Tags: how-to-guide
- Published: 2026-03-06

### [Test-Time Augmentation (TTA) in YOLOv5: How to Enable and Use It](/ultralytics/yolov5/what-is-test-time-augmentation-tta-how-to-use-yolov5)

Boost YOLOv5 inference accuracy with Test-Time Augmentation TTA. Learn how to easily enable TTA using the augment flag and improve your object detection results.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Optimize YOLOv5 Inference Speed on Edge Devices: 8 Proven Techniques](/ultralytics/yolov5/how-to-optimize-yolov5-inference-speed-edge-devices)

Boost YOLOv5 inference speed on edge devices using half-precision, TensorRT, OpenVINO, and reduced resolution. Achieve real-time performance on resource-constrained hardware.

- Tags: performance
- Published: 2026-03-06

### [Supported Export Formats for YOLOv5 Models: CoreML, TFLite, ONNX and More](/ultralytics/yolov5/supported-export-formats-yolov5-coreml-tflite)

Export YOLOv5 models to 12 formats like CoreML TFLite ONNX TensorRT TFJS and more. Easily deploy your models everywhere with ultralytics YOLOv5.

- Tags: supported-formats
- Published: 2026-03-06

### [How to Fine-Tune YOLOv5 for Custom Object Detection: A Complete Technical Guide](/ultralytics/yolov5/how-to-fine-tune-yolov5-specific-object-detection-task)

Learn to fine-tune YOLOv5 for custom object detection. Prepare your dataset, configure YOLO format, and train with pre-trained weights for faster, accurate results.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Resume YOLOv5 Training from a Checkpoint](/ultralytics/yolov5/how-to-resume-yolov5-training-from-checkpoint)

Easily resume YOLOv5 training from a checkpoint using the --resume command. Restore your model and optimizer state to continue learning without losing progress.

- Tags: how-to-guide
- Published: 2026-03-06

### [How Exponential Moving Average (EMA) Improves YOLOv5 Model Performance](/ultralytics/yolov5/how-exponential-moving-average-ema-affects-yolov5-performance)

Discover how Exponential Moving Average EMA boosts YOLOv5 performance. Achieve higher mAP and stable training with this weight smoothing technique. Learn more!

- Tags: performance
- Published: 2026-03-06

### [How to Perform Transfer Learning with YOLOv5 Using Pre-trained Weights](/ultralytics/yolov5/how-to-perform-transfer-learning-yolov5-pretrained-weights)

Learn transfer learning with YOLOv5 using pre-trained weights. Load checkpoints and fine-tune detection heads on custom datasets for faster, more accurate object detection.

- Tags: tutorial
- Published: 2026-03-06

### [How Hyperparameter Evolution Works in YOLOv5 Training: A Complete Guide to Genetic Algorithm Optimization](/ultralytics/yolov5/how-hyperparameter-evolution-works-yolov5)

Discover how YOLOv5 uses genetic algorithm hyperparameter evolution to automatically find optimal training settings. Learn to leverage the evolve flag for better mAP.

- Tags: deep-dive
- Published: 2026-03-06

### [YOLOv5 Architecture Deep Dive: C3, SPPF, and Detection Modules Explained](/ultralytics/yolov5/key-components-yolov5-architecture-c3-sppf)

Discover the core components of the YOLOv5 architecture including C3, SPPF, and Detect modules. Understand how these elements build the powerful CSPDarknet53 backbone and FPN head for efficient object detection.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Integrate YOLOv5 with Weights & Biases for Experiment Tracking](/ultralytics/yolov5/integrate-yolov5-with-weights-biases)

Integrate YOLOv5 with Weights & Biases for effortless experiment tracking. Automatically log metrics, store checkpoints, and version datasets using the --log wandb flag.

- Tags: how-to-guide
- Published: 2026-03-06

### [YOLOv5 AutoBatch: Automatic Batch Size Optimization Explained](/ultralytics/yolov5/purpose-of-autobatch-in-yolov5)

Discover YOLOv5 AutoBatch, the feature that automatically finds the optimal batch size for your GPU, maximizing throughput and avoiding memory errors during training.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Set Up YOLOv5 for Multi-GPU Training with PyTorch DDP](/ultralytics/yolov5/how-to-setup-yolov5-for-multi-gpu-training)

Learn to set up YOLOv5 for multi-GPU training with PyTorch DDP. Accelerate your object detection tasks by utilizing all your GPUs efficiently. Get started now.

- Tags: how-to-guide
- Published: 2026-03-06

### [YOLOv5 Image Segmentation: A Complete Training and Implementation Guide](/ultralytics/yolov5/can-yolov5-be-used-for-image-segmentation-how-to-train)

Learn how to use YOLOv5 for image segmentation. This guide covers training and implementation of segmentation models with pixel-wise object masks and fast inference.

- Tags: tutorial
- Published: 2026-03-06

### [How to Use TensorRT for YOLOv5 Inference Optimization](/ultralytics/yolov5/how-to-use-tensorrt-for-yolov5-inference-optimization)

Optimize YOLOv5 inference speed with TensorRT. Convert your PyTorch model using export.py for significant GPU acceleration with the same API.

- Tags: how-to-guide
- Published: 2026-03-06

### [How to Export a YOLOv5 Model to ONNX Format for Inference](/ultralytics/yolov5/how-to-export-yolov5-model-to-onnx)

Easily export your YOLOv5 model to ONNX format using the export.py script. Optimize your PyTorch checkpoints for fast inference with ONNX Runtime, OpenCV DNN, and TensorRT.

- Tags: how-to-guide
- Published: 2026-03-06

### [YOLOv5 Model Sizes (n, s, m, l, x): Complete Guide to Speed and Accuracy Trade-offs](/ultralytics/yolov5/yolov5-model-sizes-n-s-m-l-x-use-cases)

Explore YOLOv5 model sizes n, s, m, l, x. Understand speed vs accuracy trade-offs and choose the best variant for your object detection tasks.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Perform Object Detection with YOLOv5 on a Custom Dataset](/ultralytics/yolov5/how-to-perform-object-detection-with-yolov5-on-custom-dataset)

Effortlessly perform object detection with YOLOv5 on your custom dataset. Follow our step-by-step guide to train, detect, and deploy your models with ease.

- Tags: tutorial
- Published: 2026-03-06

