Practical overview
When it fits
Use YOLOv5 when you need a PyTorch-based codebase for visual inference or model training, especially when the same project should cover detection, segmentation or classification and provide an export path.
Who it is for
- Developers building computer-vision workflows for images, video or streams.
- Teams training object-detection models on configured datasets.
- Practitioners who need instance segmentation or image classification alongside detection.
Documented uses
- Run object detection on local image and video files, webcams, directories or supported streams.
- Train a model using a dataset configuration and model configuration.
- Apply instance segmentation or image classification tasks.
- Export models for supported deployment formats.
Requirements & limits
The source repository is public and identifies its license as AGPL-3.0. Ultralytics directs enterprise-license requests to its licensing information.
- The project is a model and codebase, so users supply the computing environment and inputs rather than sending work to a documented hosted inference service.
- Custom training can be compute-intensive; the README estimates one to eight days on a single NVIDIA V100 GPU across the listed model sizes.
- The repository documents input options ranging from image and video files to webcam and network streams.
- AGPL-3.0 is the repository's stated license; organizations should review licensing requirements for their intended use.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run object detection on a local image or video
Use the documented detect.py script to process one local image or video with YOLOv5 weights.
Before you start
- The YOLOv5 repository and its Python execution environment.
- A local image or video file.
- A YOLOv5 weights file; the documentation gives yolov5s.pt as an example and notes that models can be downloaded automatically.
Steps
Choose a local image or video file as the input source.
Run detect.py with the weights file and the input path, following the documented examples.
Review the inference results saved under runs/detect.
Expected outcome
YOLOv5 inference results for the chosen image or video are saved in the runs/detect directory.
Guide limitations
- The README examples document detection, not a full environment-installation procedure.
- Runtime and accuracy depend on the user's environment and input; the guide makes no performance guarantee.
Train YOLOv5 on the documented COCO configuration
Follow the repository's example command to train a YOLOv5 model on COCO.
Before you start
- The YOLOv5 repository and its Python execution environment.
- The documented COCO data configuration and model configuration; referenced models and datasets are downloaded from YOLOv5 releases.
- Hardware with enough capacity for the selected batch size; the README's batch-size examples are for V100-16GB GPUs.
Steps
Select a documented model configuration and batch size from the COCO training examples.
Run train.py with the COCO data configuration, the selected model configuration, and the documented epoch count.
Use the resulting training workflow to train the selected model on COCO.
Expected outcome
A training run for the selected YOLOv5 configuration on COCO.
Guide limitations
- The README estimates approximately one to eight days on a single NVIDIA V100 GPU across YOLOv5n/s/m/l/x, and says multi-GPU training can reduce training time.
- These are documented example settings, not a guarantee of runtime or results on other hardware.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- ultralytics/yolov5 · Official homepage title · retained in its source language

