YOLOv5是Ultralytics推出的开源视觉AI模型,支持目标检测、图像分割与分类任务,具备快速准确的推理能力,可导出为ONNX、CoreML、TFLite等多种格式,适用于多场景计算机视觉应用,Docker镜像提供便捷部署环境。
中文 | 한국어 | 日本語 | Русский | Deutsch | Français | Español | Português | हिन्दी | العربية
https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb
YOLOv5 🚀 is the world's most loved vision AI, representing Ultralytics open-source research into future vision AI methods, incorporating lessons learned and best practices evolved over thousands of hours of research and development.
We hope that the resources here will help you get the most out of YOLOv5. Please browse the YOLOv5 Docs for details, raise an issue on https://github.com/ultralytics/yolov5/issues/new/choose for support, and join our *** community for questions and discussions!
To request an Enterprise License please complete the form at Ultralytics Licensing.
YOLOv8 🚀 NEW
We are thrilled to announce the launch of Ultralytics YOLOv8 🚀, our NEW cutting-edge, state-of-the-art (SOTA) model released at https://github.com/ultralytics/ultralytics. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection, image segmentation and image classification tasks.
See the YOLOv8 Docs for details and get started with:
bashpip install ultralytics
Documentation
See the YOLOv5 Docs for full documentation on training, testing and deployment. See below for quickstart examples.
Install
Clone repo and install https://github.com/ultralytics/yolov5/blob/master/requirements.txt in a https://www.python.org/ environment, including https://pytorch.org/get-started/locally/.
bashgit clone https://github.com/ultralytics/yolov5 # clone cd yolov5 pip install -r requirements.txt # install
Inference
YOLOv5 PyTorch Hub inference. https://github.com/ultralytics/yolov5/tree/master/models download automatically from the latest YOLOv5 https://github.com/ultralytics/yolov5/releases.
pythonimport torch # Model model = torch.hub.load("ultralytics/yolov5", "yolov5s") # or yolov5n - yolov5x6, custom # Images img = "https://ultralytics.com/images/zidane.jpg" # or file, Path, PIL, OpenCV, numpy, list # Inference results = model(img) # Results results.print() # or .show(), .save(), .crop(), .pandas(), etc.
Inference with detect.py
detect.py runs inference on a variety of sources, downloading https://github.com/ultralytics/yolov5/tree/master/models automatically from the latest YOLOv5 https://github.com/ultralytics/yolov5/releases and saving results to runs/detect.
bashpython detect.py --weights yolov5s.pt --source 0 # webcam img.jpg # image vid.mp4 # video screen # screenshot path/ # directory list.txt # list of images list.streams # list of streams 'path/*.jpg' # glob 'https://youtu.be/LNwODJXcvt4' # YouTube 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
Training
The commands below reproduce YOLOv5 https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh results. https://github.com/ultralytics/yolov5/tree/master/models and https://github.com/ultralytics/yolov5/tree/master/data download automatically from the latest YOLOv5 https://github.com/ultralytics/yolov5/releases. Training times for YOLOv5n/s/m/l/x are 1/2/4/6/8 days on a V100 GPU (Multi-GPU times faster). Use the largest --batch-size possible, or pass --batch-size -1 for YOLOv5 https://github.com/ultralytics/yolov5/pull/5092. Batch sizes shown for V100-16GB.
bashpython train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov5n.yaml --batch-size 128 yolov5s 64 yolov5m 40 yolov5l 24 yolov5x 16
Tutorials
- Train Custom Data 🚀 RECOMMENDED
- Tips for Best Training Results ☘️
- Multi-GPU Training
- PyTorch Hub 🌟 NEW
- TFLite, ONNX, CoreML, TensorRT Export 🚀
- NVIDIA Jetson platform Deployment 🌟 NEW
- Test-Time Augmentation (TTA)
- Model Ensembling
- Model Pruning/Sparsity
- Hyperparameter Evolution
- Transfer Learning with Frozen Layers
- Architecture Summary 🌟 NEW
- Roboflow for Datasets, Labeling, and Active Learning
- ClearML Logging 🌟 NEW
- YOLOv5 with Neural Magic's Deepsparse 🌟 NEW
- Comet Logging 🌟 NEW
Integrations
| Roboflow | ClearML ⭐ NEW | Comet ⭐ NEW | Neural Magic ⭐ NEW |
|---|---|---|---|
| Label and export your custom datasets directly to YOLOv5 for training with Roboflow | Automatically track, visualize and even remotely train YOLOv5 using ClearML (open-source!) | Free forever, Comet lets you save YOLOv5 models, resume training, and interactively visualise and debug predictions | Run YOLOv5 inference up to 6x faster with Neural Magic DeepSparse |
Ultralytics HUB
Experience seamless AI with Ultralytics HUB ⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly Ultralytics App. Start your journey for Free now!
Environments
Get started in seconds with our verified environments. Click each icon below for details.
Contribute
We love your input! We want to make contributing to YOLOv5 as easy and transparent as possible. Please see our Contributing Guide to get started, and fill out the YOLOv5 Survey to send us feedback on your experiences. Thank you to all our contributors!
https://github.com/ultralytics/yolov5/graphs/contributorsLicense
Ultralytics offers two licensing options to accommodate diverse use cases:
- AGPL-3.0 License: This https://opensource.org/licenses/ open-source license is ideal for students and enthusiasts, promoting open collaboration and knowledge sharing. See the https://github.com/ultralytics/yolov5/blob/master/LICENSE file for more details.
- Enterprise License: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial goods and services, bypassing the open-source requirements of AGPL-3.0. If your scenario involves embedding our solutions into a commercial offering, reach out through Ultralytics Licensing.
Contact
For YOLOv5 bug reports and feature requests please visit https://github.com/ultralytics/yolov5/issues, and join our *** community for questions and discussions!
ultralytics 命名空间的其他可用镜像:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务