GithubHelp home page GithubHelp logo

xiang-wuu / yolov6 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meituan/yolov6

0.0 0.0 0.0 13.57 MB

YOLOv6: a single-stage object detection framework dedicated to industrial applications.

License: GNU General Public License v3.0

Shell 0.01% Python 5.14% Jupyter Notebook 94.85%

yolov6's Introduction

YOLOv6

Introduction

YOLOv6 is a single-stage object detection framework dedicated to industrial applications, with hardware-friendly efficient design and high performance.

YOLOv6-nano achieves 35.0 mAP on COCO val2017 dataset with 1242 FPS on T4 using TensorRT FP16 for bs32 inference, and YOLOv6-s achieves 43.1 mAP on COCO val2017 dataset with 520 FPS on T4 using TensorRT FP16 for bs32 inference.

YOLOv6 is composed of the following methods:

  • Hardware-friendly Design for Backbone and Neck
  • Efficient Decoupled Head with SIoU Loss

Coming soon

  • YOLOv6 m/l/x model.
  • Deployment for MNN/TNN/NCNN/CoreML...
  • Quantization tools

Quick Start

Install

git clone https://github.com/meituan/YOLOv6
cd YOLOv6
pip install -r requirements.txt

Inference

First, download a pretrained model from the YOLOv6 release

Second, run inference with tools/infer.py

python tools/infer.py --weights yolov6s.pt --source img.jpg / imgdir
                                yolov6n.pt

Training

Single GPU

python tools/train.py --batch 32 --conf configs/yolov6s.py --data data/coco.yaml --device 0
                                        configs/yolov6n.py

Multi GPUs (DDP mode recommended)

python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --batch 256 --conf configs/yolov6s.py --data data/coco.yaml --device 0,1,2,3,4,5,6,7
                                                                                        configs/yolov6n.py
  • conf: select config file to specify network/optimizer/hyperparameters
  • data: prepare COCO dataset, YOLO format coco labels and specify dataset paths in data.yaml
  • make sure your dataset structure as follows:
├── coco
│   ├── annotations
│   │   ├── instances_train2017.json
│   │   └── instances_val2017.json
│   ├── images
│   │   ├── train2017
│   │   └── val2017
│   ├── labels
│   │   ├── train2017
│   │   ├── val2017
│   ├── LICENSE
│   ├── README.txt

Evaluation

Reproduce mAP on COCO val2017 dataset

python tools/eval.py --data data/coco.yaml --batch 32 --weights yolov6s.pt --task val
                                                                yolov6n.pt

Resume

If your training process is corrupted, you can resume training by

# single GPU traning.
python tools/train.py --resume
# multi GPU training.
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --resume

Your can also specify a checkpoint path to --resume parameter by

# remember replace /path/to/your/checkpoint/path to the checkpoint path which you want to resume training.
--resume /path/to/your/checkpoint/path

Deployment

Tutorials

Benchmark

Model Size mAPval
0.5:0.95
SpeedV100
fp16 b32
(ms)
SpeedV100
fp32 b32
(ms)
SpeedT4
trt fp16 b1
(fps)
SpeedT4
trt fp16 b32
(fps)
Params
(M)
Flops
(G)
YOLOv6-n 416
640
30.8
35.0
0.3
0.5
0.4
0.7
1100
788
2716
1242
4.3
4.3
4.7
11.1
YOLOv6-tiny 640 41.3 0.9 1.5 425 602 15.0 36.7
YOLOv6-s 640 43.1 1.0 1.7 373 520 17.2 44.2
  • Comparisons of the mAP and speed of different object detectors are tested on COCO val2017 dataset.
  • Refer to Test speed tutorial to reproduce the speed results of YOLOv6.
  • Params and Flops of YOLOv6 are estimated on deployed model.
  • Speed results of other methods are tested in our environment using official codebase and model if not found from the corresponding official release.

Third-party resources

yolov6's People

Contributors

1chimarugin avatar alimustoofaa avatar chilicyy avatar czla avatar deftruth avatar haojieyuu avatar josehenriqueroveda avatar khwengxu avatar kku77 avatar laughing-q avatar leedewdew avatar lemonwang0110 avatar lry89757 avatar mahdilamb avatar meituan-gengyifei avatar mt-zlchen avatar mtchengmeng avatar mtjhl avatar nateraw avatar peterh0323 avatar qinhao14 avatar rx0-zed avatar shensheng272 avatar shisuiuzumaki avatar triple-mu avatar xiang-wuu avatar xingyueye avatar xizi avatar zhiqwang avatar zju-lyf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.