Awesome
YOLOv10: Real-Time End-to-End Object Detection
Official PyTorch implementation of YOLOv10.
<p align="center"> <img src="figures/latency.svg" width=48%> <img src="figures/params.svg" width=48%> <br> Comparisons with others in terms of latency-accuracy (left) and size-accuracy (right) trade-offs. </p>YOLOv10: Real-Time End-to-End Object Detection.
Ao Wang, Hui Chen, Lihao Liu, Kai Chen, Zijia Lin, Jungong Han, and Guiguang Ding
<a href="https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov10-object-detection-on-custom-dataset.ipynb#scrollTo=SaKTSzSWnG7s"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
UPDATES 🔥
- 2024/05/30: We provide some clarifications and suggestions for detecting smaller objects or objects in the distance with YOLOv10. Thanks to SkalskiP!
- 2024/05/30: Thanks to eaidova for the integration with OpenVINOâ„¢!
- 2024/05/29: Add the gradio demo for running the models locally. Thanks to AK!
- 2024/05/27: Thanks to sujanshresstha for the integration with DeepSORT!
- 2024/05/27: We have updated the checkpoints with other attributes, like class names, for ease of use.
- 2024/05/26: Thanks to CVHub520 for the integration into X-AnyLabeling!
- 2024/05/26: Thanks to DanielSarmiento04 for integrate in c++ | ONNX | OPENCV!
- 2024/05/25: Add Transformers.js demo and onnx weights(yolov10n/s/m/b/l/x). Thanks to xenova!
- 2024/05/25: Add colab demo, HuggingFace Demo, and HuggingFace Model Page. Thanks to SkalskiP and kadirnar!
Performance
COCO
Model | Test Size | #Params | FLOPs | AP<sup>val</sup> | Latency |
---|---|---|---|---|---|
YOLOv10-N | 640 | 2.3M | 6.7G | 38.5% | 1.84ms |
YOLOv10-S | 640 | 7.2M | 21.6G | 46.3% | 2.49ms |
YOLOv10-M | 640 | 15.4M | 59.1G | 51.1% | 4.74ms |
YOLOv10-B | 640 | 19.1M | 92.0G | 52.5% | 5.74ms |
YOLOv10-L | 640 | 24.4M | 120.3G | 53.2% | 7.28ms |
YOLOv10-X | 640 | 29.5M | 160.4G | 54.4% | 10.70ms |
Installation
conda
virtual environment is recommended.
conda create -n yolov10 python=3.9
conda activate yolov10
pip install -r requirements.txt
pip install -e .
Demo
wget https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt
python app.py
# Please visit http://127.0.0.1:7860
Validation
yolov10n.pt
yolov10s.pt
yolov10m.pt
yolov10b.pt
yolov10l.pt
yolov10x.pt
yolo val model=yolov10n/s/m/b/l/x.pt data=coco.yaml batch=256
Training
yolo detect train data=coco.yaml model=yolov10n/s/m/b/l/x.yaml epochs=500 batch=256 imgsz=640 device=0,1,2,3,4,5,6,7
Prediction
Note that a smaller confidence threshold can be set to detect smaller objects or objects in the distance. Please refer to here for details.
yolo predict model=yolov10n/s/m/b/l/x.pt
Export
# End-to-End ONNX
yolo export model=yolov10n/s/m/b/l/x.pt format=onnx opset=13 simplify
# Predict with ONNX
yolo predict model=yolov10n/s/m/b/l/x.onnx
# End-to-End TensorRT
yolo export model=yolov10n/s/m/b/l/x.pt format=engine half=True simplify opset=13 workspace=16
# Or
trtexec --onnx=yolov10n/s/m/b/l/x.onnx --saveEngine=yolov10n/s/m/b/l/x.engine --fp16
# Predict with TensorRT
yolo predict model=yolov10n/s/m/b/l/x.engine
Acknowledgement
The code base is built with ultralytics and RT-DETR.
Thanks for the great implementations!
Citation
If our code or models help your work, please cite our paper:
@misc{wang2024yolov10,
title={YOLOv10: Real-Time End-to-End Object Detection},
author={Ao Wang and Hui Chen and Lihao Liu and Kai Chen and Zijia Lin and Jungong Han and Guiguang Ding},
year={2024},
eprint={2405.14458},
archivePrefix={arXiv},
primaryClass={cs.CV}
}