YOLOv5: PyTorch object detection model
Real-time object detection with cross-platform deployment support.
Learn more about YOLOv5
YOLOv5 is an object detection model implemented in PyTorch that processes images to identify and localize objects within them. The architecture uses a convolutional neural network approach optimized for real-time inference across different hardware targets. It provides built-in export capabilities to multiple formats, enabling deployment on diverse platforms from desktop systems to mobile devices and edge hardware. Common applications include surveillance systems, autonomous vehicle perception, industrial inspection, and general-purpose computer vision tasks requiring object localization.
Multi-Format Model Export
Convert trained models to ONNX, CoreML, TFLite, and other formats from a single PyTorch checkpoint. Enables deployment across mobile, edge, and cloud platforms without retraining or maintaining separate implementations.
PyTorch-Native Implementation
Built entirely on PyTorch framework for direct access to the ecosystem's tools and libraries. Allows standard Python workflows for model customization, fine-tuning, and integration with existing PyTorch pipelines.
Unified Multi-Task Architecture
Single codebase handles object detection, instance segmentation, and classification tasks with shared training infrastructure. Reduces maintenance overhead and enables task switching without learning new frameworks or toolchains.
import torch
# Load pre-trained model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
# Run inference on an image
results = model('https://ultralytics.com/images/zidane.jpg')
# Display results
results.show()
results.print()Introduces SOTA YOLOv5 instance segmentation models, Paddle export support, and Comet logging integration.
- –Segmentation Models NEW: SOTA YOLOv5-seg COCO-pretrained segmentation models are now available for the first time
- –Paddle Export: Export any YOLOv5 model (cls, seg, det) to Paddle format with python export.py --include paddle
- –Comet Logging and Visualization Integration: Free forever, Comet lets you save YOLOv5 models, resume training, and interactively visualise and debug predictions
Adds YOLOv5 classification models, Apple M1 support, training reproducibility, and ClearML/Deci.ai integrations.
- –Classification Models NEW: YOLOv5-cls ImageNet-pretrained classification models are now available for the first time
- –Deci.ai optimization NEW: Automatically compile and quantize YOLOv5 for better inference performance in one click at Deci
- –Training Reproducibility: Single-GPU YOLOv5 training with torch>=1.12.0 is now fully reproducible, and a new --seed argument can be used
- –Apple Metal Performance Shader (MPS) Support: MPS support for Apple M1/M2 devices with --device mps
Adds TensorRT, TensorFlow Edge TPU and OpenVINO export and inference support with new YOLOv5n ultralight model.
- –TensorRT support: TensorFlow, Keras, TFLite, TF.js model export now fully integrated using python export.py --include saved_model pb tflite tfjs
- –Tensorflow Edge TPU support NEW: New smaller YOLOv5n (1.9M params) model below YOLOv5s (7.5M params), exports to 2.1 MB INT8 size
- –OpenVINO support: YOLOv5 ONNX models are now compatible with both OpenCV DNN and ONNX Runtime
See how people are using YOLOv5
Top in AI & ML
Related Repositories
Discover similar tools and frameworks used by developers
LivePortrait
PyTorch implementation for animating portraits by transferring expressions from driving videos.
FAISS
Efficient approximate nearest neighbor search for billion-scale vectors.
AutoGPT
Block-based visual editor for autonomous AI agents.
whisper.cpp
Lightweight C++ port of OpenAI Whisper for cross-platform speech recognition.
Wan2.2
Open-source diffusion framework for multi-modal video generation.
Related Reading
Guides and comparisons from the Greptile content library
Best AI Code Review Tools for GitHub
Top-rated AI code review tools for GitHub teams in 2025. Compare features, pricing, and accuracy to find the perfect fit for faster PR reviews and bulletproof code quality.
10 Powerful Code Quality Tools That Catch Bugs Before Deployment
We tested 10 code quality tools that catch bugs before production. Detailed comparison with real-world examples, pricing, and ROI analysis for dev teams.
Top AI Code Review Tools for Small Dev Teams 2026
Affordable, lightweight AI code review tools that help small teams catch bugs faster. Practical comparisons of accuracy, ease of use, and value for teams without enterprise budgets.
Best CodeRabbit Alternatives for Smarter AI Code Reviews in 2026
7 powerful CodeRabbit alternatives ranked by real dev teams. Feature comparison, pricing analysis, and honest reviews to find your perfect AI code reviewer.