diff --git a/README.md b/README.md index de1d7e5d..5c57ae6e 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,14 @@ For different parts from MMDetection, we have also prepared user guides and adva Results and models are available in the [model zoo](docs/en/model_zoo.md). +
+Supported Tasks + +- [x] Object detection +- [x] Rotated object detection + +
+
Supported Algorithms @@ -272,6 +280,16 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
+
+Supported Datasets + +- [x] COCO Dataset +- [x] VOC Dataset +- [x] CrowdHuman Dataset +- [x] DOTA 1.0 Dataset + +
+
Module Components diff --git a/README_zh-CN.md b/README_zh-CN.md index ca65a944..3c5d70bf 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -281,6 +281,14 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也 测试结果和模型可以在 [模型库](docs/zh_cn/model_zoo.md) 中找到。 +
+支持的任务 + +- [x] 目标检测 +- [x] 旋转框目标检测 + +
+
支持的算法 @@ -294,6 +302,16 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也
+
+支持的数据集 + +- [x] COCO Dataset +- [x] VOC Dataset +- [x] CrowdHuman Dataset +- [x] DOTA 1.0 Dataset + +
+
模块组件 diff --git a/configs/razor/subnets/README.md b/configs/razor/subnets/README.md index 692492d3..ad7a716b 100644 --- a/configs/razor/subnets/README.md +++ b/configs/razor/subnets/README.md @@ -62,7 +62,7 @@ CUDA_VISIBLE_DEVICES=0 PORT=29500 ./tools/dist_test.sh configs/razor/subnets/yol Here we provide the baseline version of YOLO Series with NAS backbone. -| Model | size | box AP | Params(M) | FLOPS(G) | Config | Download | +| Model | size | box AP | Params(M) | FLOPs(G) | Config | Download | | :------------------------: | :--: | :----: | :----------: | :------: | :----------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | yolov5-s | 640 | 37.7 | 7.235 | 8.265 | [config](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5/yolov5_s-v61_syncbn_fast_8xb16-300e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov5/yolov5_s-v61_syncbn_fast_8xb16-300e_coco/yolov5_s-v61_syncbn_fast_8xb16-300e_coco_20220918_084700-86e02187.pth) | | yolov5_s_spos_shufflenetv2 | 640 | 37.9 | 7.04(-2.7%) | 7.03 | [config](https://github.com/open-mmlab/mmyolo/tree/dev/configs/razor/subnets/yolov5_s_spos_shufflenetv2_syncbn_8xb16-300e_coco.py) | [model](https://download.openmmlab.com/mmrazor/v1/spos/yolov5/yolov5_s_spos_shufflenetv2_syncbn_8xb16-300e_coco_20230109_155302-777fd6f1.pth) | diff --git a/configs/rtmdet/README.md b/configs/rtmdet/README.md index 302e366a..ddcd52ba 100644 --- a/configs/rtmdet/README.md +++ b/configs/rtmdet/README.md @@ -23,7 +23,7 @@ RTMDet-l model structure ## Object Detection -| Model | size | Params(M) | FLOPS(G) | TRT-FP16-Latency(ms) | box AP | TTA box AP | Config | Download | +| Model | size | Params(M) | FLOPs(G) | TRT-FP16-Latency(ms) | box AP | TTA box AP | Config | Download | | :------------: | :--: | :-------: | :------: | :------------------: | :---------: | :---------: | :---------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | RTMDet-tiny | 640 | 4.8 | 8.1 | 0.98 | 41.0 | 42.7 | [config](./rtmdet_tiny_syncbn_fast_8xb32-300e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/rtmdet/rtmdet_tiny_syncbn_fast_8xb32-300e_coco/rtmdet_tiny_syncbn_fast_8xb32-300e_coco_20230102_140117-dbb1dc83.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/rtmdet/rtmdet_tiny_syncbn_fast_8xb32-300e_coco/rtmdet_tiny_syncbn_fast_8xb32-300e_coco_20230102_140117.log.json) | | RTMDet-tiny \* | 640 | 4.8 | 8.1 | 0.98 | 41.8 (+0.8) | 43.2 (+0.5) | [config](./distillation/kd_tiny_rtmdet_s_neck_300e_coco.py) | [model](https://download.openmmlab.com/mmrazor/v1/rtmdet_distillation/kd_tiny_rtmdet_s_neck_300e_coco/kd_tiny_rtmdet_s_neck_300e_coco_20230213_104240-e1e4197c.pth) \| [log](https://download.openmmlab.com/mmrazor/v1/rtmdet_distillation/kd_tiny_rtmdet_s_neck_300e_coco/kd_tiny_rtmdet_s_neck_300e_coco_20230213_104240-176901d8.json) | diff --git a/configs/yolov6/README.md b/configs/yolov6/README.md index 603ba555..4dac37f4 100644 --- a/configs/yolov6/README.md +++ b/configs/yolov6/README.md @@ -31,7 +31,7 @@ YOLOv6-l model structure | YOLOv6-n | P5 | 640 | 400 | Yes | Yes | 6.04 | 36.2 | [config](../yolov6/yolov6_n_syncbn_fast_8xb32-400e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_n_syncbn_fast_8xb32-400e_coco/yolov6_n_syncbn_fast_8xb32-400e_coco_20221030_202726-d99b2e82.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_n_syncbn_fast_8xb32-400e_coco/yolov6_n_syncbn_fast_8xb32-400e_coco_20221030_202726.log.json) | | YOLOv6-t | P5 | 640 | 400 | Yes | Yes | 8.13 | 41.0 | [config](../yolov6/yolov6_t_syncbn_fast_8xb32-400e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_t_syncbn_fast_8xb32-400e_coco/yolov6_t_syncbn_fast_8xb32-400e_coco_20221030_143755-cf0d278f.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_t_syncbn_fast_8xb32-400e_coco/yolov6_t_syncbn_fast_8xb32-400e_coco_20221030_143755.log.json) | | YOLOv6-s | P5 | 640 | 400 | Yes | Yes | 8.88 | 44.0 | [config](../yolov6/yolov6_s_syncbn_fast_8xb32-400e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_s_syncbn_fast_8xb32-400e_coco/yolov6_s_syncbn_fast_8xb32-400e_coco_20221102_203035-932e1d91.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_s_syncbn_fast_8xb32-400e_coco/yolov6_s_syncbn_fast_8xb32-400e_coco_20221102_203035.log.json) | -| YOLOv6-m | P5 | 640 | 300 | Yes | Yes | 16.69 | 48.4 | [config](../yolov6/yolov6_m_syncbn_fast_8xb32-400e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_m_syncbn_fast_8xb32-300e_coco/yolov6_m_syncbn_fast_8xb32-300e_coco_20221109_182658-85bda3f4.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_m_syncbn_fast_8xb32-300e_coco/yolov6_m_syncbn_fast_8xb32-300e_coco_20221109_182658.log.json) | +| YOLOv6-m | P5 | 640 | 300 | Yes | Yes | 16.69 | 48.4 | [config](../yolov6/yolov6_m_syncbn_fast_8xb32-300e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_m_syncbn_fast_8xb32-300e_coco/yolov6_m_syncbn_fast_8xb32-300e_coco_20221109_182658-85bda3f4.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_m_syncbn_fast_8xb32-300e_coco/yolov6_m_syncbn_fast_8xb32-300e_coco_20221109_182658.log.json) | | YOLOv6-l | P5 | 640 | 300 | Yes | Yes | 20.86 | 51.0 | [config](../yolov6/yolov6_l_syncbn_fast_8xb32-300e_coco.py) | [model](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_l_syncbn_fast_8xb32-300e_coco/yolov6_l_syncbn_fast_8xb32-300e_coco_20221109_183156-91e3c447.pth) \| [log](https://download.openmmlab.com/mmyolo/v0/yolov6/yolov6_l_syncbn_fast_8xb32-300e_coco/yolov6_l_syncbn_fast_8xb32-300e_coco_20221109_183156.log.json) | **Note**: diff --git a/docs/en/get_started/overview.md b/docs/en/get_started/overview.md index 36ff7778..0af5ab62 100644 --- a/docs/en/get_started/overview.md +++ b/docs/en/get_started/overview.md @@ -12,6 +12,16 @@ MMYOLO is an open-source algorithms toolkit of YOLO based on PyTorch and MMDetec vision diagram
+The following tasks are currently supported: + +
+Tasks currently supported + +- object detection +- rotated object detection + +
+ The YOLO series of algorithms currently supported are as follows:
@@ -27,13 +37,15 @@ The YOLO series of algorithms currently supported are as follows:
-The following tasks are currently supported: +The datasets currently supported are as follows:
-Tasks currently supported +Datasets currently supported -- object detection -- rotated object detection +- COCO Dataset +- VOC Dataset +- CrowdHuman Dataset +- DOTA 1.0 Dataset
diff --git a/docs/en/index.rst b/docs/en/index.rst index b609da21..a4edc8ef 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -78,19 +78,14 @@ You can switch between Chinese and English documents in the top-right corner of .. toctree:: - :maxdepth: 1 + :maxdepth: 2 :caption: Advanced Tutorials advanced_guides/cross-library_application.md -.. toctree:: - :maxdepth: 1 - :caption: API Reference - - api.rst .. toctree:: - :maxdepth: 1 + :maxdepth: 2 :caption: Model Zoo model_zoo.md @@ -104,6 +99,11 @@ You can switch between Chinese and English documents in the top-right corner of notes/conventions.md notes/code_style.md +.. toctree:: + :maxdepth: 1 + :caption: API Reference + + api.rst .. toctree:: :caption: Switch Language diff --git a/docs/en/model_zoo.md b/docs/en/model_zoo.md index ea55875e..5934821e 100644 --- a/docs/en/model_zoo.md +++ b/docs/en/model_zoo.md @@ -1,36 +1,90 @@ -# Benchmark and Model Zoo +# Model Zoo and Benchmark -## Common settings +This page is used to summarize the performance and related evaluation metrics of various models supported in MMYOLO for users to compare and analyze. -- All models were trained on `coco_2017_train`, and tested on the `coco_2017_val`. -- We use distributed training. +## COCO dataset -## Baselines +| Model | Arch | Size | Batch Size | Epoch | SyncBN | AMP | Mem (GB) | Params(M) | FLOPs(G) | TRT-FP16-GPU-Latency(ms) | Box AP | TTA Box AP | +| :--------------: | :--: | :--: | :--------: | :---: | :----: | :-: | :------: | :-------: | :------: | :----------------------: | :----: | :--------: | +| YOLOv5-n | P5 | 640 | 8xb16 | 300 | Yes | Yes | 1.5 | 1.87 | 2.26 | 1.14 | 28.0 | 30.7 | +| YOLOv6-v2.0-n | P5 | 640 | 8xb32 | 400 | Yes | Yes | 6.04 | 4.32 | 5.52 | 1.37 | 36.2 | | +| YOLOv8-n | P5 | 640 | 8xb16 | 500 | Yes | Yes | 2.5 | 3.16 | 4.4 | 1.53 | 37.4 | 39.9 | +| RTMDet-tiny | P5 | 640 | 8xb32 | 300 | Yes | No | 11.9 | 4.90 | 8.09 | 2.31 | 41.8 | 43.2 | +| YOLOv6-v2.0-tiny | P5 | 640 | 8xb32 | 400 | Yes | Yes | 8.13 | 9.70 | 12.37 | 2.19 | 41.0 | | +| YOLOv7-tiny | P5 | 640 | 8xb16 | 300 | Yes | Yes | 2.7 | 6.23 | 6.89 | 1.88 | 37.5 | | +| YOLOX-tiny | P5 | 416 | 8xb32 | 300 | No | Yes | 4.9 | 5.06 | 7.63 | 1.19 | 34.3 | | +| RTMDet-s | P5 | 640 | 8xb32 | 300 | Yes | No | 16.3 | 8.89 | 14.84 | 2.89 | 45.7 | 47.3 | +| YOLOv5-s | P5 | 640 | 8xb16 | 300 | Yes | Yes | 2.7 | 7.24 | 8.27 | 1.89 | 37.7 | 40.2 | +| YOLOv6-v2.0-s | P5 | 640 | 8xb32 | 400 | Yes | Yes | 8.88 | 17.22 | 21.94 | 2.67 | 44.0 | | +| YOLOv8-s | P5 | 640 | 8xb16 | 500 | Yes | Yes | 4.0 | 11.17 | 14.36 | 2.61 | 45.1 | 46.8 | +| YOLOX-s | P5 | 640 | 8xb32 | 300 | No | Yes | 9.8 | 8.97 | 13.40 | 2.38 | 41.9 | | +| PPYOLOE+ -s | P5 | 640 | 8xb8 | 80 | Yes | No | 4.7 | 7.93 | 8.68 | 2.54 | 43.5 | | +| RTMDet-m | P5 | 640 | 8xb32 | 300 | Yes | No | 29.0 | 24.71 | 39.21 | 6.23 | 50.2 | 51.9 | +| YOLOv5-m | P5 | 640 | 8xb16 | 300 | Yes | Yes | 5.0 | 21.19 | 24.53 | 4.28 | 45.3 | 46.9 | +| YOLOv6-v2.0-m | P5 | 640 | 8xb32 | 300 | Yes | Yes | 16.69 | 34.25 | 40.7 | 5.12 | 48.4 | | +| YOLOv8-m | P5 | 640 | 8xb16 | 500 | Yes | Yes | 7.0 | 25.9 | 39.57 | 5.78 | 50.6 | 52.3 | +| YOLOX-m | P5 | 640 | 8xb32 | 300 | No | Yes | 17.6 | 25.33 | 36.88 | 5.31 | 47.5 | | +| PPYOLOE+ -m | P5 | 640 | 8xb8 | 80 | Yes | No | 8.4 | 23.43 | 24.97 | 5.47 | 49.5 | | +| RTMDet-l | P5 | 640 | 8xb32 | 300 | Yes | No | 45.2 | 52.32 | 80.12 | 10.13 | 52.3 | 53.7 | +| YOLOv5-l | P5 | 640 | 8xb16 | 300 | Yes | Yes | 8.1 | 46.56 | 54.65 | 6.8 | 48.8 | 49.9 | +| YOLOv6-v2.0-l | P5 | 640 | 8xb32 | 300 | Yes | Yes | 20.86 | 58.53 | 71.43 | 8.78 | 51.0 | | +| YOLOv7-l | P5 | 640 | 8xb16 | 300 | Yes | Yes | 10.3 | 36.93 | 52.42 | 6.63 | 50.9 | | +| YOLOv8-l | P5 | 640 | 8xb16 | 500 | Yes | Yes | 9.1 | 43.69 | 82.73 | 8.97 | 53.0 | 54.4 | +| YOLOX-l | P5 | 640 | 8xb8 | 300 | No | Yes | 8.0 | 54.21 | 77.83 | 9.23 | 50.1 | | +| PPYOLOE+ -l | P5 | 640 | 8xb8 | 80 | Yes | No | 13.2 | 52.20 | 55.05 | 8.2 | 52.6 | | +| RTMDet-x | P5 | 640 | 8xb32 | 300 | Yes | No | 63.4 | 94.86 | 145.41 | 17.89 | 52.8 | 54.2 | +| YOLOv7-x | P5 | 640 | 8xb16 | 300 | Yes | Yes | 13.7 | 71.35 | 95.06 | 11.63 | 52.8 | | +| YOLOv8-x | P5 | 640 | 8xb16 | 500 | Yes | Yes | 12.4 | 68.23 | 132.10 | 14.22 | 54.0 | 55.0 | +| YOLOX-x | P5 | 640 | 8xb8 | 300 | No | Yes | 9.8 | 99.07 | 144.39 | 15.35 | 51.4 | | +| PPYOLOE+ -x | P5 | 640 | 8xb8 | 80 | Yes | No | 19.1 | 98.42 | 105.48 | 14.02 | 54.2 | | +| YOLOv5-n | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 5.8 | 3.25 | 2.30 | | 35.9 | | +| YOLOv5-s | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 10.5 | 12.63 | 8.45 | | 44.4 | | +| YOLOv5-m | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 19.1 | 35.73 | 25.05 | | 51.3 | | +| YOLOv5-l | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 30.5 | 76.77 | 55.77 | | 53.7 | | +| YOLOv7-w | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 27.0 | 82.31 | 45.07 | | 54.1 | | +| YOLOv7-e | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 42.5 | 114.69 | 64.48 | | 55.1 | | -### YOLOv5 +- All the models are trained on COCO train2017 dataset and evaluated on val2017 dataset. +- TRT-FP16-GPU-Latency(ms) is the GPU Compute time on NVIDIA Tesla T4 device with TensorRT 8.4, a batch size of 1, a test shape of 640x640 and only model forward (The test shape for YOLOX-tiny is 416x416) +- The number of model parameters and FLOPs are obtained using the [get_flops](https://github.com/open-mmlab/mmyolo/blob/dev/tools/analysis_tools/get_flops.py) script. Different calculation methods may vary slightly +- RTMDet performance is the result of training with [MMRazor Knowledge Distillation](https://github.com/open-mmlab/mmyolo/blob/dev/configs/rtmdet/distillation/README.md) +- Only YOLOv6 version 2.0 is implemented in MMYOLO for now, and L and M are the results without knowledge distillation +- YOLOv8 results are optimized using mask instance annotation, but YOLOv5, YOLOv6 and YOLOv7 do not use +- PPYOLOE+ uses Obj365 as pre-training weights, so the number of epochs for COCO training only needs 80 +- YOLOX-tiny, YOLOX-s and YOLOX-m are trained with the optimizer parameters proposed in RTMDet, with different degrees of performance improvement compared to the original implementation. -Please refer to [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5)。 +Please see below items for more details -### YOLOv6 +- [RTMDet](https://github.com/open-mmlab/mmyolo/blob/main/configs/rtmdet) +- [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5) +- [YOLOv6](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov6) +- [YOLOv7](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov7) +- [YOLOv8](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov8) +- [YOLOX](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolox) +- [PPYOLO-E](https://github.com/open-mmlab/mmyolo/blob/main/configs/ppyoloe) -Please refer to [YOLOv6](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov6)。 +## VOC dataset -### YOLOv7 +| Backbone | size | Batchsize | AMP | Mem (GB) | box AP(COCO metric) | +| :------: | :--: | :-------: | :-: | :------: | :-----------------: | +| YOLOv5-n | 512 | 64 | Yes | 3.5 | 51.2 | +| YOLOv5-s | 512 | 64 | Yes | 6.5 | 62.7 | +| YOLOv5-m | 512 | 64 | Yes | 12.0 | 70.1 | +| YOLOv5-l | 512 | 32 | Yes | 10.0 | 73.1 | -Please refer to [YOLOv7](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov7)。 +Please see below items for more details -### YOLOv8 +- [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5) -Please refer to [YOLOv8](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov8)。 +## CrowdHuman dataset -### YOLOX +| Backbone | size | SyncBN | AMP | Mem (GB) | ignore_iof_thr | box AP50(CrowDHuman Metric) | MR | JI | +| :------: | :--: | :----: | :-: | :------: | :------------: | :-------------------------: | :--: | :---: | +| YOLOv5-s | 640 | Yes | Yes | 2.6 | -1 | 85.79 | 48.7 | 75.33 | +| YOLOv5-s | 640 | Yes | Yes | 2.6 | 0.5 | 86.17 | 48.8 | 75.87 | -Please refer to [YOLOX](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolox)。 +Please see below items for more details -### PPYOLO-E +- [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5) -Please refer to [PPYOLO-E](https://github.com/open-mmlab/mmyolo/blob/main/configs/ppyoloe)。 - -### RTMDet - -Please refer to [RTMDet](https://github.com/open-mmlab/mmyolo/blob/main/configs/rtmdet)。 +## DOTA 1.0 dataset diff --git a/docs/zh_cn/get_started/overview.md b/docs/zh_cn/get_started/overview.md index c87454ba..81a9c436 100644 --- a/docs/zh_cn/get_started/overview.md +++ b/docs/zh_cn/get_started/overview.md @@ -12,6 +12,16 @@ MMYOLO 是一个基于 PyTorch 和 MMDetection 的 YOLO 系列算法开源工具 愿景图
+目前支持的任务如下: + +
+支持的任务 + +- 目标检测 +- 旋转框目标检测 + +
+ 目前支持的 YOLO 系列算法如下:
@@ -27,13 +37,15 @@ MMYOLO 是一个基于 PyTorch 和 MMDetection 的 YOLO 系列算法开源工具
-目前支持的任务如下: +目前支持的数据集如下:
-支持的任务 +支持的数据集 -- 目标检测 -- 旋转框目标检测 +- COCO Dataset +- VOC Dataset +- CrowdHuman Dataset +- DOTA 1.0 Dataset
diff --git a/docs/zh_cn/index.rst b/docs/zh_cn/index.rst index da36bb3f..b7b022f7 100644 --- a/docs/zh_cn/index.rst +++ b/docs/zh_cn/index.rst @@ -79,19 +79,14 @@ .. toctree:: - :maxdepth: 1 + :maxdepth: 2 :caption: 进阶教程 advanced_guides/cross-library_application.md -.. toctree:: - :maxdepth: 1 - :caption: 接口文档(英文) - - api.rst .. toctree:: - :maxdepth: 1 + :maxdepth: 2 :caption: 模型仓库 model_zoo.md @@ -105,6 +100,11 @@ notes/conventions.md notes/code_style.md +.. toctree:: + :maxdepth: 1 + :caption: 接口文档(英文) + + api.rst .. toctree:: :caption: 语言切换 diff --git a/docs/zh_cn/model_zoo.md b/docs/zh_cn/model_zoo.md index c42cbf7a..9f52585d 100644 --- a/docs/zh_cn/model_zoo.md +++ b/docs/zh_cn/model_zoo.md @@ -1,36 +1,90 @@ -# 模型库 +# 模型库和评测 -## 共同设置 +本页面用于汇总 MMYOLO 中支持的各类模型性能和相关评测指标,方便用户对比分析。 -- 所有模型都是在 `coco_2017_train` 上训练,在 `coco_2017_val` 上测试。 -- 我们使用分布式训练。 +## COCO 数据集 -## Baselines +| Model | Arch | Size | Batch Size | Epoch | SyncBN | AMP | Mem (GB) | Params(M) | FLOPs(G) | TRT-FP16-GPU-Latency(ms) | Box AP | TTA Box AP | +| :--------------: | :--: | :--: | :--------: | :---: | :----: | :-: | :------: | :-------: | :------: | :----------------------: | :----: | :--------: | +| YOLOv5-n | P5 | 640 | 8xb16 | 300 | Yes | Yes | 1.5 | 1.87 | 2.26 | 1.14 | 28.0 | 30.7 | +| YOLOv6-v2.0-n | P5 | 640 | 8xb32 | 400 | Yes | Yes | 6.04 | 4.32 | 5.52 | 1.37 | 36.2 | | +| YOLOv8-n | P5 | 640 | 8xb16 | 500 | Yes | Yes | 2.5 | 3.16 | 4.4 | 1.53 | 37.4 | 39.9 | +| RTMDet-tiny | P5 | 640 | 8xb32 | 300 | Yes | No | 11.9 | 4.90 | 8.09 | 2.31 | 41.8 | 43.2 | +| YOLOv6-v2.0-tiny | P5 | 640 | 8xb32 | 400 | Yes | Yes | 8.13 | 9.70 | 12.37 | 2.19 | 41.0 | | +| YOLOv7-tiny | P5 | 640 | 8xb16 | 300 | Yes | Yes | 2.7 | 6.23 | 6.89 | 1.88 | 37.5 | | +| YOLOX-tiny | P5 | 416 | 8xb32 | 300 | No | Yes | 4.9 | 5.06 | 7.63 | 1.19 | 34.3 | | +| RTMDet-s | P5 | 640 | 8xb32 | 300 | Yes | No | 16.3 | 8.89 | 14.84 | 2.89 | 45.7 | 47.3 | +| YOLOv5-s | P5 | 640 | 8xb16 | 300 | Yes | Yes | 2.7 | 7.24 | 8.27 | 1.89 | 37.7 | 40.2 | +| YOLOv6-v2.0-s | P5 | 640 | 8xb32 | 400 | Yes | Yes | 8.88 | 17.22 | 21.94 | 2.67 | 44.0 | | +| YOLOv8-s | P5 | 640 | 8xb16 | 500 | Yes | Yes | 4.0 | 11.17 | 14.36 | 2.61 | 45.1 | 46.8 | +| YOLOX-s | P5 | 640 | 8xb32 | 300 | No | Yes | 9.8 | 8.97 | 13.40 | 2.38 | 41.9 | | +| PPYOLOE+ -s | P5 | 640 | 8xb8 | 80 | Yes | No | 4.7 | 7.93 | 8.68 | 2.54 | 43.5 | | +| RTMDet-m | P5 | 640 | 8xb32 | 300 | Yes | No | 29.0 | 24.71 | 39.21 | 6.23 | 50.2 | 51.9 | +| YOLOv5-m | P5 | 640 | 8xb16 | 300 | Yes | Yes | 5.0 | 21.19 | 24.53 | 4.28 | 45.3 | 46.9 | +| YOLOv6-v2.0-m | P5 | 640 | 8xb32 | 300 | Yes | Yes | 16.69 | 34.25 | 40.7 | 5.12 | 48.4 | | +| YOLOv8-m | P5 | 640 | 8xb16 | 500 | Yes | Yes | 7.0 | 25.9 | 39.57 | 5.78 | 50.6 | 52.3 | +| YOLOX-m | P5 | 640 | 8xb32 | 300 | No | Yes | 17.6 | 25.33 | 36.88 | 5.31 | 47.5 | | +| PPYOLOE+ -m | P5 | 640 | 8xb8 | 80 | Yes | No | 8.4 | 23.43 | 24.97 | 5.47 | 49.5 | | +| RTMDet-l | P5 | 640 | 8xb32 | 300 | Yes | No | 45.2 | 52.32 | 80.12 | 10.13 | 52.3 | 53.7 | +| YOLOv5-l | P5 | 640 | 8xb16 | 300 | Yes | Yes | 8.1 | 46.56 | 54.65 | 6.8 | 48.8 | 49.9 | +| YOLOv6-v2.0-l | P5 | 640 | 8xb32 | 300 | Yes | Yes | 20.86 | 58.53 | 71.43 | 8.78 | 51.0 | | +| YOLOv7-l | P5 | 640 | 8xb16 | 300 | Yes | Yes | 10.3 | 36.93 | 52.42 | 6.63 | 50.9 | | +| YOLOv8-l | P5 | 640 | 8xb16 | 500 | Yes | Yes | 9.1 | 43.69 | 82.73 | 8.97 | 53.0 | 54.4 | +| YOLOX-l | P5 | 640 | 8xb8 | 300 | No | Yes | 8.0 | 54.21 | 77.83 | 9.23 | 50.1 | | +| PPYOLOE+ -l | P5 | 640 | 8xb8 | 80 | Yes | No | 13.2 | 52.20 | 55.05 | 8.2 | 52.6 | | +| RTMDet-x | P5 | 640 | 8xb32 | 300 | Yes | No | 63.4 | 94.86 | 145.41 | 17.89 | 52.8 | 54.2 | +| YOLOv7-x | P5 | 640 | 8xb16 | 300 | Yes | Yes | 13.7 | 71.35 | 95.06 | 11.63 | 52.8 | | +| YOLOv8-x | P5 | 640 | 8xb16 | 500 | Yes | Yes | 12.4 | 68.23 | 132.10 | 14.22 | 54.0 | 55.0 | +| YOLOX-x | P5 | 640 | 8xb8 | 300 | No | Yes | 9.8 | 99.07 | 144.39 | 15.35 | 51.4 | | +| PPYOLOE+ -x | P5 | 640 | 8xb8 | 80 | Yes | No | 19.1 | 98.42 | 105.48 | 14.02 | 54.2 | | +| YOLOv5-n | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 5.8 | 3.25 | 2.30 | | 35.9 | | +| YOLOv5-s | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 10.5 | 12.63 | 8.45 | | 44.4 | | +| YOLOv5-m | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 19.1 | 35.73 | 25.05 | | 51.3 | | +| YOLOv5-l | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 30.5 | 76.77 | 55.77 | | 53.7 | | +| YOLOv7-w | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 27.0 | 82.31 | 45.07 | | 54.1 | | +| YOLOv7-e | P6 | 1280 | 8xb16 | 300 | Yes | Yes | 42.5 | 114.69 | 64.48 | | 55.1 | | -### YOLOv5 +- 所有模型均使用 COCO train2017 作为训练集,在 COCO val2017 上验证精度 +- TRT-FP16-GPU-Latency(ms) 是指在 NVIDIA Tesla T4 设备上采用 TensorRT 8.4,batch size 为 1, 测试 shape 为 640x640 且仅包括模型 forward 的 GPU Compute time (YOLOX-tiny 测试 shape 是 416x416) +- 模型参数量和 FLOPs 是采用 [get_flops](https://github.com/open-mmlab/mmyolo/blob/dev/tools/analysis_tools/get_flops.py) 脚本得到,不同的运算方式可能略有不同 +- RTMDet 性能是通过 [MMRazor 知识蒸馏](https://github.com/open-mmlab/mmyolo/blob/dev/configs/rtmdet/distillation/README.md) 训练后的结果 +- MMYOLO 中暂时只实现了 YOLOv6 2.0 版本,并且 L 和 M 为没有经过知识蒸馏的结果 +- YOLOv8 是引入了实例分割标注优化后的结果,YOLOv5、YOLOv6 和 YOLOv7 没有采用实例分割标注优化 +- PPYOLOE+ 使用 Obj365 作为预训练权重,因此 COCO 训练的 epoch 数只需要 80 +- YOLOX-tiny、YOLOX-s 和 YOLOX-m 为采用了 RTMDet 中所提优化器参数训练所得,性能相比原始实现有不同程度提升 -请参考 [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5)。 +详情见如下内容 -### YOLOv6 +- [RTMDet](https://github.com/open-mmlab/mmyolo/blob/main/configs/rtmdet) +- [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5) +- [YOLOv6](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov6) +- [YOLOv7](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov7) +- [YOLOv8](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov8) +- [YOLOX](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolox) +- [PPYOLO-E](https://github.com/open-mmlab/mmyolo/blob/main/configs/ppyoloe) -请参考 [YOLOv6](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov6)。 +## VOC 数据集 -### YOLOv7 +| Backbone | size | Batchsize | AMP | Mem (GB) | box AP(COCO metric) | +| :------: | :--: | :-------: | :-: | :------: | :-----------------: | +| YOLOv5-n | 512 | 64 | Yes | 3.5 | 51.2 | +| YOLOv5-s | 512 | 64 | Yes | 6.5 | 62.7 | +| YOLOv5-m | 512 | 64 | Yes | 12.0 | 70.1 | +| YOLOv5-l | 512 | 32 | Yes | 10.0 | 73.1 | -请参考 [YOLOv7](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov7)。 +详情见如下内容 -### YOLOv8 +- [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5) -请参考 [YOLOv8](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov8)。 +## CrowdHuman 数据集 -### YOLOX +| Backbone | size | SyncBN | AMP | Mem (GB) | ignore_iof_thr | box AP50(CrowDHuman Metric) | MR | JI | +| :------: | :--: | :----: | :-: | :------: | :------------: | :-------------------------: | :--: | :---: | +| YOLOv5-s | 640 | Yes | Yes | 2.6 | -1 | 85.79 | 48.7 | 75.33 | +| YOLOv5-s | 640 | Yes | Yes | 2.6 | 0.5 | 86.17 | 48.8 | 75.87 | -请参考 [YOLOX](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolox)。 +详情见如下内容 -### PPYOLO-E +- [YOLOv5](https://github.com/open-mmlab/mmyolo/blob/main/configs/yolov5) -请参考 [PPYOLO-E](https://github.com/open-mmlab/mmyolo/blob/main/configs/ppyoloe)。 - -### RTMDet - -请参考 [RTMDet](https://github.com/open-mmlab/mmyolo/blob/main/configs/rtmdet)。 +## DOTA 1.0 数据集 diff --git a/tools/analysis_tools/get_flops.py b/tools/analysis_tools/get_flops.py index 3e86bc57..965660f7 100644 --- a/tools/analysis_tools/get_flops.py +++ b/tools/analysis_tools/get_flops.py @@ -11,6 +11,8 @@ from mmengine.logging import MMLogger from mmengine.model import revert_sync_batchnorm from mmengine.registry import init_default_scope +from mmyolo.utils import switch_to_deploy + def parse_args(): parser = argparse.ArgumentParser(description='Get a detector flops') @@ -68,6 +70,7 @@ def inference(args, logger): model.cuda() model = revert_sync_batchnorm(model) model.eval() + switch_to_deploy(model) # input tensor # automatically generate a input tensor with the given input_shape.