YOLOv5: The Production-Minded Object Detector That Time Hasn't Frozen
PyTorch-based YOLOv5 from Ultralytics for object detection, instance segmentation, and classification, with training and export to ONNX, TensorRT, TFLite, and CoreML.
At a glance
- What is it?
- Ultralytics YOLOv5 remains a fast, easy-to-use PyTorch detector for detection, segmentation, and classification, but its last release was in 2022. This review covers what it does, how to run it, and where it now falls short.
- Who is it for?
- Adopt YOLOv5 if you need a proven, lightweight detector for detection, segmentation, or classification and you can live with the AGPL-3.0 license or buy an enterprise license. Do not adopt it if you need pose estimation, oriented object detection, or the latest architecture improvements, because those live in the successor package.
- Can I use it commercially?
- Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What YOLOv5 Actually Solves
YOLOv5 is a single-stage object detector built on PyTorch. It solves the problem of real-time detection with a simple training and inference workflow. The README emphasizes speed, accuracy, and ease of use, and the project delivers on the last two through a clean CLI and Python API. It is aimed at engineers who need to detect objects in images, video, or webcam streams without writing custom model code. The same codebase also supports instance segmentation and image classification, so a team can cover three vision tasks with one set of weights and scripts. The target user is someone who wants a working model quickly, not a researcher pushing state-of-the-art accuracy. The project has been production-proven, according to its own documentation, which means it has seen enough real-world use to be stable, but that stability comes with a frozen release cycle.
The Mechanism: A Single-Stage Detector with PyTorch at Its Core
YOLOv5 is a convolutional neural network that predicts bounding boxes and class probabilities directly from an image in one pass. Unlike two-stage detectors that propose regions first, YOLOv5 divides the image into a grid and predicts boxes, confidence scores, and class probabilities for each cell. The README does not give architectural details beyond mentioning PyTorch, but the model family includes yolov5n, yolov5s, yolov5m, yolov5l, and yolov5x, which trade speed for accuracy by scaling depth and width. The data flow is straightforward: you feed an image source, the model processes it, and the results object gives you methods like .print(), .show(), .save(), .crop(), and .pandas() for output. The repository handles resizing and normalization automatically when you use the PyTorch Hub interface, which reduces the boilerplate you would otherwise write. The training pipeline mirrors this simplicity: you specify a dataset and a model size, and the scripts handle downloads and setup. The design favors ease of use over architectural novelty, which is fine for most deployment scenarios.
Getting It Running: Commands That Actually Work
Installation follows a standard clone-and-install pattern. You need Python 3.8 or newer and PyTorch 1.8 or newer. The README gives these commands: git clone https://github.com/ultralytics/yolov5, cd yolov5, pip install -r requirements.txt. For inference, you can use PyTorch Hub with a single line: torch.hub.load('ultralytics/yolov5', 'yolov5s'). Then you pass an image source, which can be a URL, local file, PIL image, OpenCV frame, or numpy array. The results object handles the rest. If you prefer a script, detect.py accepts a --weights flag and a --source flag. The source can be 0 for webcam, a file path, a directory, or even a screen capture via the 'screen' keyword. Training is equally direct: the README shows commands to reproduce COCO results, with training times for the n, s, m, l, and x variants listed as roughly 1, 2, 4, and 6 hours respectively, though the exact times depend on hardware. The commands are minimal, which lowers the barrier to entry, but it also means you must read the full docs for details on custom datasets.
Where It Falls Short: The 2022 Freeze
The last release is v7.0 from November 2022, and the last push to master is from the same date. The repository is not archived, but it is effectively in maintenance mode. That creates a real limitation: no new features, no architecture improvements, and no updates for newer PyTorch versions or hardware. If you need pose estimation or oriented object detection, YOLOv5 does not have them. The README itself points to the successor package, ultralytics, for those tasks. Another limitation is the license. YOLOv5 is AGPL-3.0, which is copyleft and can be a problem for closed-source commercial products. The README mentions an Enterprise License form, but that is a separate purchase. If you cannot accept AGPL or pay for a license, YOLOv5 is the wrong tool. Also, the training times listed are for COCO reproduction, but custom data will vary, and the documentation does not provide a clear path for edge cases like very small objects or high-resolution images. For a production system that must run for years, a frozen codebase can be a risk if you need security patches or compatibility fixes.
The Alternative: The ultralytics Package
The main alternative is the ultralytics package, which the README explicitly recommends for newer architectures and additional tasks. You install it with pip install ultralytics. The key difference is scope: the ultralytics package unifies detection, segmentation, classification, pose estimation, and oriented object detection under one Python and CLI interface. It is actively maintained, with a unified API that replaces the separate scripts in YOLOv5. If you are starting a new project, the ultralytics package is the safer bet because it gets updates and has a broader task coverage. However, YOLOv5 still has a simpler, more mature codebase for the three tasks it supports, and some teams may prefer its stability. The trade-off is between a frozen but proven codebase and a live one with more features. The README does not claim that YOLOv5 is faster or more accurate than the ultralytics package, so the choice comes down to maintenance and feature needs.
Maintenance and Upgrade Cost
The maintenance cost is low because the codebase is stable, but that is a double-edged sword. There are no new releases to track, so your CI pipeline will not break from upstream changes. However, you must handle dependency fixes yourself. PyTorch evolves, and a model trained with PyTorch 1.8 may not run on a newer version without changes. The README does not provide migration notes for PyTorch upgrades, so you are on your own. The export options from v6.1 include TensorRT, Edge TPU, and OpenVINO, which gives you deployment paths, but those exports may rely on specific versions of those tools. Upgrading to the ultralytics package later would mean re-training or at least converting weights, and the README does not promise a direct migration path. The license is AGPL-3.0, which has implications for distribution; the README points to an enterprise license for commercial use, but you must contact Ultralytics for terms. There is no automated upgrade tool in the repository, so plan for manual effort if you need to move to the successor package.
Editorial conclusion
Adopt YOLOv5 if you need a proven, lightweight detector for detection, segmentation, or classification and you can live with the AGPL-3.0 license or buy an enterprise license. Do not adopt it if you need pose estimation, oriented object detection, or the latest architecture improvements, because those live in the successor package. Before committing, verify that your Python environment (>=3.8) and PyTorch (>=1.8) match the requirements, and check whether your deployment target supports the export formats you need, such as TensorRT, Edge TPU, or OpenVINO from v6.1. The repository is not archived, but the last push was in November 2022, so plan your maintenance around a frozen codebase.
Community notes