Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
liangliang 87dd3d3963 | 4 months ago | |
---|---|---|
.github/ISSUE_TEMPLATE | 1 year ago | |
assets | 1 year ago | |
configs | 8 months ago | |
data | 5 months ago | |
deploy | 11 months ago | |
docs | 8 months ago | |
tools | 7 months ago | |
yolov6 | 4 months ago | |
.gitignore | 1 year ago | |
.pre-commit-config.yaml | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 7 months ago | |
README_cn.md | 1 year ago | |
hubconf.py | 1 year ago | |
inference.ipynb | 1 year ago | |
requirements.txt | 1 year ago | |
tutorial.ipynb | 7 months ago |
English | 简体中文
Implementation of paper:
Model | Size | mAPval 0.5:0.95 |
SpeedT4 trt fp16 b1 (fps) |
SpeedT4 trt fp16 b32 (fps) |
Params (M) |
FLOPs (G) |
---|---|---|---|---|---|---|
YOLOv6-N | 640 | 37.5 | 779 | 1187 | 4.7 | 11.4 |
YOLOv6-S | 640 | 45.0 | 339 | 484 | 18.5 | 45.3 |
YOLOv6-M | 640 | 50.0 | 175 | 226 | 34.9 | 85.8 |
YOLOv6-L | 640 | 52.8 | 98 | 116 | 59.6 | 150.7 |
YOLOv6-N6 | 1280 | 44.9 | 228 | 281 | 10.4 | 49.8 |
YOLOv6-S6 | 1280 | 50.3 | 98 | 108 | 41.4 | 198.0 |
YOLOv6-M6 | 1280 | 55.2 | 47 | 55 | 79.6 | 379.5 |
YOLOv6-L6 | 1280 | 57.2 | 26 | 29 | 140.4 | 673.4 |
Model | Size | mAPval 0.5:0.95 |
SpeedT4 trt fp16 b1 (fps) |
SpeedT4 trt fp16 b32 (fps) |
Params (M) |
FLOPs (G) |
---|---|---|---|---|---|---|
YOLOv6-N | 640 | 35.9300e 36.3400e |
802 | 1234 | 4.3 | 11.1 |
YOLOv6-T | 640 | 40.3300e 41.1400e |
449 | 659 | 15.0 | 36.7 |
YOLOv6-S | 640 | 43.5300e 43.8400e |
358 | 495 | 17.2 | 44.2 |
YOLOv6-M | 640 | 49.5 | 179 | 233 | 34.3 | 82.2 |
YOLOv6-L-ReLU | 640 | 51.7 | 113 | 149 | 58.5 | 144.0 |
YOLOv6-L | 640 | 52.5 | 98 | 121 | 58.5 | 144.0 |
Model | Size | Precision | mAPval 0.5:0.95 |
SpeedT4 trt b1 (fps) |
SpeedT4 trt b32 (fps) |
---|---|---|---|---|---|
YOLOv6-N RepOpt | 640 | INT8 | 34.8 | 1114 | 1828 |
YOLOv6-N | 640 | FP16 | 35.9 | 802 | 1234 |
YOLOv6-T RepOpt | 640 | INT8 | 39.8 | 741 | 1167 |
YOLOv6-T | 640 | FP16 | 40.3 | 449 | 659 |
YOLOv6-S RepOpt | 640 | INT8 | 43.3 | 619 | 924 |
YOLOv6-S | 640 | FP16 | 43.5 | 377 | 541 |
Model | Size | mAPval 0.5:0.95 |
sm8350 (ms) |
mt6853 (ms) |
sdm660 (ms) |
Params (M) |
FLOPs (G) |
---|---|---|---|---|---|---|---|
YOLOv6Lite-S | 320*320 | 22.4 | 7.99 | 11.99 | 41.86 | 0.55 | 0.56 |
YOLOv6Lite-M | 320*320 | 25.1 | 9.08 | 13.27 | 47.95 | 0.79 | 0.67 |
YOLOv6Lite-L | 320*320 | 28.0 | 11.37 | 16.20 | 61.40 | 1.09 | 0.87 |
YOLOv6Lite-L | 320*192 | 25.0 | 7.02 | 9.66 | 36.13 | 1.09 | 0.52 |
YOLOv6Lite-L | 224*128 | 18.9 | 3.63 | 4.99 | 17.76 | 1.09 | 0.24 |
git clone https://github.com/meituan/YOLOv6
cd YOLOv6
pip install -r requirements.txt
Please refer to Train COCO Dataset.
Single GPU
# P5 models
python tools/train.py --batch 32 --conf configs/yolov6s_finetune.py --data data/dataset.yaml --fuse_ab --device 0
# P6 models
python tools/train.py --batch 32 --conf configs/yolov6s6_finetune.py --data data/dataset.yaml --img 1280 --device 0
Multi GPUs (DDP mode recommended)
# P5 models
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --batch 256 --conf configs/yolov6s_finetune.py --data data/dataset.yaml --fuse_ab --device 0,1,2,3,4,5,6,7
# P6 models
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --batch 128 --conf configs/yolov6s6_finetune.py --data data/dataset.yaml --img 1280 --device 0,1,2,3,4,5,6,7
├── coco
│ ├── annotations
│ │ ├── instances_train2017.json
│ │ └── instances_val2017.json
│ ├── images
│ │ ├── train2017
│ │ └── val2017
│ ├── labels
│ │ ├── train2017
│ │ ├── val2017
│ ├── LICENSE
│ ├── README.txt
YOLOv6 supports different input resolution modes. For details, see How to Set the Input Size.
If your training process is corrupted, you can resume training by
# single GPU training.
python tools/train.py --resume
# multi GPU training.
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --resume
Above command will automatically find the latest checkpoint in YOLOv6 directory, then resume the training process.
Your can also specify a checkpoint path to --resume
parameter by
# remember to replace /path/to/your/checkpoint/path to the checkpoint path which you want to resume training.
--resume /path/to/your/checkpoint/path
This will resume from the specific checkpoint you provide.
Reproduce mAP on COCO val2017 dataset with 640×640 or 1280x1280 resolution
# P5 models
python tools/eval.py --data data/coco.yaml --batch 32 --weights yolov6s.pt --task val --reproduce_640_eval
# P6 models
python tools/eval.py --data data/coco.yaml --batch 32 --weights yolov6s6.pt --task val --reproduce_640_eval --img 1280
First, download a pretrained model from the YOLOv6 release or use your trained model to do inference.
Second, run inference with tools/infer.py
# P5 models
python tools/infer.py --weights yolov6s.pt --source img.jpg / imgdir / video.mp4
# P6 models
python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --source img.jpg / imgdir / video.mp4
If you want to inference on local camera or web camera, you can run:
# P5 models
python tools/infer.py --weights yolov6s.pt --webcam --webcam-addr 0
# P6 models
python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --webcam --webcam-addr 0
webcam-addr
can be local camera number id or rtsp address.
YOLOv6 Training with Amazon Sagemaker: yolov6-sagemaker from ashwincc
YOLOv6 NCNN Android app demo: ncnn-android-yolov6 from FeiGeChuanShu
YOLOv6 ONNXRuntime/MNN/TNN C++: YOLOv6-ORT, YOLOv6-MNN and YOLOv6-TNN from DefTruth
YOLOv6 TensorRT Python: yolov6-tensorrt-python from Linaom1214
YOLOv6 web demo on Huggingface Spaces with Gradio.
Interactive demo on DagsHub with Streamlit
Tutorial: How to train YOLOv6 on a custom dataset
YouTube Tutorial: How to train YOLOv6 on a custom dataset
Blog post: YOLOv6 Object Detection – Paper Explanation and Inference
If you have any questions, welcome to join our WeChat group to discuss and exchange.
YOLOv6: a single-stage object detection framework dedicated to industrial applications.
https://readpaper.com/paper/4665431421117022209
Jupyter Notebook Python C++ other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》