ultralytics/yolov5
YOLOV5: OBJECT DETECTION ON PYTORCH
Computer vision model for object detection, instance segmentation, and image classification. Runs on PyTorch, supports export to CoreML and ONNX.
// KEY FEATURES
- 5 model sizes: from nano (yolov5n) to xlarge (yolov5x)
- Inference via PyTorch Hub or detect.py script
- Source support: webcam, video, photo, YouTube, screen
- Export to CoreML, ONNX, TFLite for deployment
// DEEP DIVE: HOW IT WORKS
YOLOv5 is built on PyTorch and ships as a set of pre-trained weights (yolov5n/s/m/l/x) with different speed-accuracy trade-offs. The repository includes scripts for training, validation, and export, plus the detect.py utility that automatically downloads weights and runs inference on any source: file, folder, stream, webcam, or screen.
Unlike newer versions (YOLOv8/v10), v5 is a mature release with a frozen API and extensive integration examples. Inside it uses a CSPDarknet backbone with PANet head; detection, segmentation, and classification tasks are supported without changing the codebase. The ultralytics package (pip install ultralytics) is now the main entry point for current models.
Requirements: Python ≥ 3.8, PyTorch ≥ 1.8, CUDA for GPU acceleration. Export to CoreML, ONNX, TensorRT, TFLite is available via export.py. Licensed AGPL-3.0 — commercial use requires a separate agreement with Ultralytics.
// USE CASES
Best for: CV engineers for rapid production detection deployment
- Run real-time object detection on webcam video stream
- Train model on custom data for defect detection in manufacturing
- Export weights to CoreML for integration into iOS application
// QUICK START
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt
python detect.py --weights yolov5s.pt --source 0Commands are taken from the repository README — check the current version on GitHub before running.
New repositories every 30 minutes
REDDYX AI scans GitHub 24/7 and ships the best AI/ML/Web3 projects to Telegram.
Join on Telegram