From 15bdafed1f69dbce5892938178f638d844c5b06e Mon Sep 17 00:00:00 2001 From: VVsssssk <88368822+VVsssssk@users.noreply.github.com> Date: Fri, 24 Dec 2021 17:20:06 +0800 Subject: [PATCH] [Docs]Add a support model list. (#333) * add docs about support model * fix docs * fix support list * fix docs * fix format * fix how to convert model * fix en and cn docs about convert model * fix bash * fix docs format * fix readme * fix benchmark * fix cn docs link * rename support models * rename * fix docs * fix cn benchmark * fix benchmark --- README.md | 2 +- README_zh-CN.md | 2 +- docs/en/benchmark.md | 16 ++++++- docs/en/codebases/mmocr.md | 10 ++--- docs/en/codebases/mmseg.md | 14 +++--- docs/en/index.rst | 1 + docs/en/support_model.md | 46 +++++++++++++++++++ docs/en/supported_models.md | 46 +++++++++++++++++++ docs/en/tutorials/how_to_convert_model.md | 45 +++---------------- docs/zh_cn/benchmark.md | 16 ++++++- docs/zh_cn/tutorials/how_to_convert_model.md | 47 ++++++-------------- 11 files changed, 158 insertions(+), 87 deletions(-) create mode 100644 docs/en/support_model.md create mode 100644 docs/en/supported_models.md diff --git a/README.md b/README.md index 501572d54..b4b6c1fff 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Please refer to [FAQ](docs/en/faq.md) for frequently asked questions. ## Benchmark and model zoo -Results and supported model list are available in the [benchmark](docs/en/benchmark.md) and [model list](docs/en/tutorials/how_to_convert_model.md). +Results and supported model list are available in the [benchmark](docs/en/benchmark.md) and [model list](docs/en/supported_models.md). ## Contributing diff --git a/README_zh-CN.md b/README_zh-CN.md index 8a83ef6d3..70d29cc1f 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -58,7 +58,7 @@ MMDeploy 是一个开源深度学习模型部署工具箱,它是 [OpenMMLab](h ## 基准与模型库 -基准和支持的模型列表可以在[基准](docs/zh_cn/benchmark.md)和[模型列表](docs/zh_cn/tutorials/how_to_convert_model.md)中获得。 +基准和支持的模型列表可以在[基准](docs/zh_cn/benchmark.md)和[模型列表](docs/en/supported_models.md)中获得。 ## 贡献指南 diff --git a/docs/en/benchmark.md b/docs/en/benchmark.md index 4092ee717..0ac0164b9 100644 --- a/docs/en/benchmark.md +++ b/docs/en/benchmark.md @@ -866,6 +866,20 @@ Users can directly test the performance through [how_to_evaluate_a_model.md](tut - $MMDET_DIR/configs/atss/atss_r50_fpn_1x_coco.py + + Cascade R-CNN + Object Detection + COCO2017 + box AP + 40.4 + - + 40.4 + 40.4 + - + 40.4 + - + $MMDET_DIR/configs/cascade_rcnn/cascade_rcnn_r50_caffe_fpn_1x_coco.py + Mask R-CNN Instance Segmentation @@ -878,7 +892,7 @@ Users can directly test the performance through [how_to_evaluate_a_model.md](tut - 38.0 - - $MMDET_DIR/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py + $MMDET_DIR/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py mask AP diff --git a/docs/en/codebases/mmocr.md b/docs/en/codebases/mmocr.md index 0adc25348..713e5df03 100644 --- a/docs/en/codebases/mmocr.md +++ b/docs/en/codebases/mmocr.md @@ -8,11 +8,11 @@ Please refer to [install.md](https://mmocr.readthedocs.io/en/latest/install.html ### List of MMOCR models supported by MMDeploy -| model | task | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVINO | model config file(example) | -|-------|:----------------:|:-----------:|:--------:|:----:|:---:|:--------:|---------------------------------------------------------------------------| -| DBNet | text-detection | Y | Y | Y | Y | Y | $PATH_TO_MMOCR/configs/textdet/dbnet/dbnet_r18_fpnc_1200e_icdar2015.py | -| CRNN | text-recognition | Y | Y | Y | Y | N | $PATH_TO_MMOCR/configs/textrecog/crnn/crnn_academic_dataset.py | -| SAR | text-recognition | Y | N | N | N | N | $PATH_TO_MMOCR/configs/textrecog/sar/sar_r31_parallel_decoder_academic.py | +| model | task | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVINO | model config file(example) | +| :---- | :--------------- | :---------: | :------: | :---: | :---: | :------: | :------------------------------------------------------------------------ | +| DBNet | text-detection | Y | Y | Y | Y | Y | $PATH_TO_MMOCR/configs/textdet/dbnet/dbnet_r18_fpnc_1200e_icdar2015.py | +| CRNN | text-recognition | Y | Y | Y | Y | N | $PATH_TO_MMOCR/configs/textrecog/crnn/crnn_academic_dataset.py | +| SAR | text-recognition | Y | N | N | N | N | $PATH_TO_MMOCR/configs/textrecog/sar/sar_r31_parallel_decoder_academic.py | ### Reminder diff --git a/docs/en/codebases/mmseg.md b/docs/en/codebases/mmseg.md index 346ab0549..3400d563a 100644 --- a/docs/en/codebases/mmseg.md +++ b/docs/en/codebases/mmseg.md @@ -8,13 +8,13 @@ Please refer to [get_started.md](https://github.com/open-mmlab/mmsegmentation/bl ### List of MMSegmentation models supported by MMDeploy -| model | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVino | model config file(example) | -|:----------------------------|:-----------:|:--------:|:----:|:-----:|:--------:|:-----------------------------------------------------------------------------------| -| FCN | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/fcn/fcn_r50-d8_512x1024_40k_cityscapes.py | -| PSPNet[*](#static_shape) | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py | -| DeepLabV3 | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/deeplabv3/deeplabv3_r50-d8_512x1024_40k_cityscapes.py | -| DeepLabV3+ | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_40k_cityscapes.py | -| Fast-SCNN[*](#static_shape) | Y | Y | N | Y | Y | ${MMSEG_DIR}/configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py | +| model | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVino | model config file(example) | +| :-------------------------- | :---------: | :------: | :---: | :---: | :------: | :--------------------------------------------------------------------------------- | +| FCN | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/fcn/fcn_r50-d8_512x1024_40k_cityscapes.py | +| PSPNet[*](#static_shape) | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py | +| DeepLabV3 | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/deeplabv3/deeplabv3_r50-d8_512x1024_40k_cityscapes.py | +| DeepLabV3+ | Y | Y | Y | Y | Y | ${MMSEG_DIR}/configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_40k_cityscapes.py | +| Fast-SCNN[*](#static_shape) | Y | Y | N | Y | Y | ${MMSEG_DIR}/configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py | ### Reminder diff --git a/docs/en/index.rst b/docs/en/index.rst index 0c52b596a..e97e6d848 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -8,6 +8,7 @@ You can switch between Chinese and English documents in the lower-left corner of :caption: Get Started build.md + supported_models.md get_started.md .. toctree:: diff --git a/docs/en/support_model.md b/docs/en/support_model.md new file mode 100644 index 000000000..cea3bba08 --- /dev/null +++ b/docs/en/support_model.md @@ -0,0 +1,46 @@ +## List of supported models exportable to other backends + +The table below lists the models that are guaranteed to be exportable to other backends. + +| Model | Codebase | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVINO | Model config | +| :------------------------ | :--------------- | :---------: | :------: | :---: | :---: | :------: | :--------------------------------------------------------------------------------------------: | +| RetinaNet | MMDetection | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/retinanet) | +| Faster R-CNN | MMDetection | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/faster_rcnn) | +| YOLOv3 | MMDetection | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/yolo) | +| YOLOX | MMDetection | Y | Y | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/yolox) | +| FCOS | MMDetection | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/fcos) | +| FSAF | MMDetection | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/fsaf) | +| Mask R-CNN | MMDetection | Y | Y | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/mask_rcnn) | +| SSD[*](#note) | MMDetection | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/ssd) | +| FoveaBox | MMDetection | Y | N | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/foveabox) | +| ATSS | MMDetection | Y | Y | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/atss) | +| Cascade R-CNN | MMDetection | Y | Y | N | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/cascade_rcnn) | +| Cascade Mask R-CNN | MMDetection | Y | N | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/cascade_rcnn) | +| VFNet | MMDetection | N | N | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/vfnet) | +| ResNet | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnet) | +| ResNeXt | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnext) | +| SE-ResNet | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/seresnet) | +| MobileNetV2 | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/mobilenet_v2) | +| ShuffleNetV1 | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v1) | +| ShuffleNetV2 | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v2) | +| FCN | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/fcn) | +| PSPNet[*static](#note) | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/pspnet) | +| DeepLabV3 | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/deeplabv3) | +| DeepLabV3+ | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/deeplabv3plus) | +| Fast-SCNN[*static](#note) | MMSegmentation | Y | Y | N | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/fastscnn) | +| SRCNN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/srcnn) | +| ESRGAN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/esrgan) | +| SRGAN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/srresnet_srgan) | +| SRResNet | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/srresnet_srgan) | +| Real-ESRGAN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/real_esrgan) | +| EDSR | MMEditing | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/edsr) | +| RDN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/rdn) | +| DBNet | MMOCR | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/dbnet) | +| CRNN | MMOCR | Y | Y | Y | Y | N | [config](https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/crnn) | +| SAR | MMOCR | Y | N | N | N | N | [config](https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/sar) | + +### Note + +- Tag: + - static: This model only supports conversion with static shape. Please use the deployment config with static field. For instance, for TensorRT, try $MMDEPLOY_DIR/configs/mmseg/segmentation_tensorrt_static-1024x2048.py. +- SSD: When you convert SSD model for TensorRT, you need to use the deployment config: $MMDEPLOY_DIR/configs/mmdet/detection/detection_tensorrt_dynamic-300x300-512x512.py. diff --git a/docs/en/supported_models.md b/docs/en/supported_models.md new file mode 100644 index 000000000..467cd6ca2 --- /dev/null +++ b/docs/en/supported_models.md @@ -0,0 +1,46 @@ +## List of supported models exportable to other backends + +The table below lists the models that are guaranteed to be exportable to other backends. + +| Model | Codebase | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVINO | Model config | +| :------------------------ | :--------------- | :---------: | :------: | :---: | :---: | :------: | :--------------------------------------------------------------------------------------------: | +| RetinaNet | MMDetection | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/retinanet) | +| Faster R-CNN | MMDetection | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/faster_rcnn) | +| YOLOv3 | MMDetection | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/yolo) | +| YOLOX | MMDetection | Y | Y | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/yolox) | +| FCOS | MMDetection | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/fcos) | +| FSAF | MMDetection | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/fsaf) | +| Mask R-CNN | MMDetection | Y | Y | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/mask_rcnn) | +| SSD[*](#note) | MMDetection | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/ssd) | +| FoveaBox | MMDetection | Y | N | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/foveabox) | +| ATSS | MMDetection | Y | Y | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/atss) | +| Cascade R-CNN | MMDetection | Y | Y | N | Y | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/cascade_rcnn) | +| Cascade Mask R-CNN | MMDetection | Y | N | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/cascade_rcnn) | +| VFNet | MMDetection | N | N | N | N | Y | [config](https://github.com/open-mmlab/mmdetection/tree/master/configs/vfnet) | +| ResNet | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnet) | +| ResNeXt | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/resnext) | +| SE-ResNet | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/seresnet) | +| MobileNetV2 | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/mobilenet_v2) | +| ShuffleNetV1 | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v1) | +| ShuffleNetV2 | MMClassification | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmclassification/tree/master/configs/shufflenet_v2) | +| FCN | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/fcn) | +| PSPNet[*static](#note) | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/pspnet) | +| DeepLabV3 | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/deeplabv3) | +| DeepLabV3+ | MMSegmentation | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/deeplabv3plus) | +| Fast-SCNN[*static](#note) | MMSegmentation | Y | Y | N | Y | Y | [config](https://github.com/open-mmlab/mmsegmentation/tree/master/configs/fastscnn) | +| SRCNN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/srcnn) | +| ESRGAN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/esrgan) | +| SRGAN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/srresnet_srgan) | +| SRResNet | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/srresnet_srgan) | +| Real-ESRGAN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/real_esrgan) | +| EDSR | MMEditing | Y | Y | Y | N | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/edsr) | +| RDN | MMEditing | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmediting/tree/master/configs/restorers/rdn) | +| DBNet | MMOCR | Y | Y | Y | Y | Y | [config](https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/dbnet) | +| CRNN | MMOCR | Y | Y | Y | Y | N | [config](https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/crnn) | +| SAR | MMOCR | Y | N | N | N | N | [config](https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/sar) | + +### Note + +- Tag: + - static: This model only support static export. Please use `static` deploy config, just like $MMDEPLOY_DIR/configs/mmseg/segmentation_tensorrt_static-1024x2048.py. +- SSD: When you convert SSD model, you need to use min shape deploy config just like 300x300-512x512 rather than 320x320-1344x1344, for example $MMDEPLOY_DIR/configs/mmdet/detection/detection_tensorrt_dynamic-300x300-512x512.py. diff --git a/docs/en/tutorials/how_to_convert_model.md b/docs/en/tutorials/how_to_convert_model.md index 46cdefe8e..c84d24dd2 100644 --- a/docs/en/tutorials/how_to_convert_model.md +++ b/docs/en/tutorials/how_to_convert_model.md @@ -18,6 +18,7 @@ This tutorial briefly introduces how to export an OpenMMlab model to a specific backend using MMDeploy tools. Notes: + - Supported backends are [ONNXRuntime](../backends/onnxruntime.md), [TensorRT](../backends/tensorrt.md), [NCNN](../backends/ncnn.md), [PPLNN](../backends/pplnn.md), [OpenVINO](../backends/openvino.md). - Supported codebases are [MMClassification](../codebases/mmcls.md), [MMDetection](../codebases/mmdet.md), [MMSegmentation](../codebases/mmseg.md), [MMOCR](../codebases/mmocr.md), [MMEditing](../codebases/mmedit.md). @@ -26,7 +27,7 @@ Notes: #### Prerequisite 1. Install and build your target backend. You could refer to [ONNXRuntime-install](../backends/onnxruntime.md), [TensorRT-install](../backends/tensorrt.md), [NCNN-install](../backends/ncnn.md), [PPLNN-install](../backends/pplnn.md), [OpenVINO-install](../backends/openvino.md) for more information. -2. Install and build your target codebase. You could refer to [MMClassification-install](https://github.com/open-mmlab/mmclassification/blob/master/docs/install.md), [MMDetection-install](https://github.com/open-mmlab/mmdetection/blob/master/docs/get_started.md), [MMSegmentation-install](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/get_started.md#installation), [MMOCR-install](https://github.com/open-mmlab/mmocr/blob/main/docs/install.md), [MMEditing-install](https://github.com/open-mmlab/mmediting/blob/master/docs/install.md). +2. Install and build your target codebase. You could refer to [MMClassification-install](https://github.com/open-mmlab/mmclassification/blob/master/docs/en/install.md), [MMDetection-install](https://github.com/open-mmlab/mmdetection/blob/master/docs/en/get_started.md), [MMSegmentation-install](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/get_started.md#installation), [MMOCR-install](https://mmocr.readthedocs.io/en/latest/install.html), [MMEditing-install](https://github.com/open-mmlab/mmediting/blob/master/docs/en/install.md). #### Usage @@ -61,15 +62,15 @@ python ./tools/deploy.py \ #### How to find the corresponding deployment config of a PyTorch model -1. Find model's codebase folder in `configs/ `. Example, convert a yolov3 model you need to find `configs/mmdet` folder. -2. Find model's task folder in `configs/codebase_folder/ `. Just like yolov3 model, you need to find `configs/mmdet/single-stage` folder. -3. Find deployment config file in `configs/codebase_folder/task_folder/ `. Just like deploy yolov3 model you can use `configs/mmdet/single-stage/single-stage_onnxruntime_dynamic.py`. +1. Find model's codebase folder in `configs/`. Example, convert a yolov3 model you need to find `configs/mmdet` folder. +2. Find model's task folder in `configs/codebase_folder/`. Just like yolov3 model, you need to find `configs/mmdet/detection` folder. +3. Find deployment config file in `configs/codebase_folder/task_folder/`. Just like deploy yolov3 model you can use `configs/mmdet/detection/detection_onnxruntime_dynamic.py`. #### Example ```bash python ./tools/deploy.py \ - configs/mmdet/single-stage/single-stage_tensorrt_dynamic-320x320-1344x1344.py \ + configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \ $PATH_TO_MMDET/configs/yolo/yolov3_d53_mstrain-608_273e_coco.py \ $PATH_TO_MMDET/checkpoints/yolo/yolov3_d53_mstrain-608_273e_coco.pth \ $PATH_TO_MMDET/demo/demo.jpg \ @@ -84,39 +85,7 @@ You can try to evaluate model, referring to [how_to_evaluate_a_model](./how_to_e ### List of supported models exportable to other backends -The table below lists the models that are guaranteed to be exportable to other backends. - -| Model | codebase | OnnxRuntime | TensorRT | NCNN | PPLNN | OpenVINO | model config file(example) | -| ------------------ | ---------------- | :---------: | :------: | :---: | :---: | :------: | :------------------------------------------------------------------------------------ | -| RetinaNet | MMDetection | Y | Y | Y | Y | Y | $MMDET_DIR/configs/retinanet/retinanet_r50_fpn_1x_coco.py | -| Faster R-CNN | MMDetection | Y | Y | Y | Y | Y | $MMDET_DIR/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py | -| YOLOv3 | MMDetection | Y | Y | Y | Y | Y | $MMDET_DIR/configs/yolo/yolov3_d53_mstrain-608_273e_coco.py | -| YOLOX | MMDetection | Y | Y | ? | ? | Y | $MMDET_DIR/configs/yolox/yolox_tiny_8x8_300e_coco.py | -| FCOS | MMDetection | Y | Y | Y | N | Y | $MMDET_DIR/configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_1x_coco. | -| FSAF | MMDetection | Y | Y | Y | Y | Y | $MMDET_DIR/configs/fsaf/fsaf_r50_fpn_1x_coco.py | -| Mask R-CNN | MMDetection | Y | Y | N | Y | Y | $MMDET_DIR/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py | -| SSD | MMDetection | Y | Y | Y | Y | Y | $MMDET_DIR/configs/ssd/ssd300_coco.py | -| FoveaBox | MMDetection | Y | ? | ? | ? | Y | $MMDET_DIR/configs/foveabox/fovea_r50_fpn_4x4_1x_coco.py | -| ATSS | MMDetection | Y | Y | ? | ? | Y | $MMDET_DIR/configs/atss/atss_r50_fpn_1x_coco.py | -| Cascade R-CNN | MMDetection | Y | ? | ? | Y | Y | $MMDET_DIR/configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py | -| Cascade Mask R-CNN | MMDetection | Y | ? | ? | Y | Y | $MMDET_DIR/configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py | -| VFNet | MMDetection | N | ? | ? | ? | Y | $MMDET_DIR/configs/vfnet/vfnet_r50_fpn_1x_coco.py | -| ResNet | MMClassification | Y | Y | Y | Y | Y | $MMCLS_DIR/configs/resnet/resnet18_b32x8_imagenet.py | -| ResNeXt | MMClassification | Y | Y | Y | Y | Y | $MMCLS_DIR/configs/resnext/resnext50_32x4d_b32x8_imagenet.py | -| SE-ResNet | MMClassification | Y | Y | Y | Y | Y | $MMCLS_DIR/configs/seresnet/seresnet50_b32x8_imagenet.py | -| MobileNetV2 | MMClassification | Y | Y | Y | Y | Y | $MMCLS_DIR/configs/mobilenet_v2/mobilenet_v2_b32x8_imagenet.py | -| ShuffleNetV1 | MMClassification | Y | Y | Y | Y | Y | $MMCLS_DIR/configs/shufflenet_v1/shufflenet_v1_1x_b64x16_linearlr_bn_nowd_imagenet.py | -| ShuffleNetV2 | MMClassification | Y | Y | Y | Y | Y | $MMCLS_DIR/configs/shufflenet_v2/shufflenet_v2_1x_b64x16_linearlr_bn_nowd_imagenet.py | -| FCN | MMSegmentation | Y | Y | Y | Y | Y | $MMSEG_DIR/configs/fcn/fcn_r50-d8_512x1024_40k_cityscapes.py | -| PSPNet | MMSegmentation | Y | Y | N | Y | Y | $MMSEG_DIR/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py | -| DeepLabV3 | MMSegmentation | Y | Y | Y | Y | Y | $MMSEG_DIR/configs/deeplabv3/deeplabv3_r50-d8_512x1024_40k_cityscapes.py | -| DeepLabV3+ | MMSegmentation | Y | Y | Y | Y | Y | $MMSEG_DIR/configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_40k_cityscapes.py | -| Fast-SCNN | MMSegmentation | Y | Y | N | Y | Y | ${MMSEG_DIR}/configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py | -| SRCNN | MMEditing | Y | Y | Y | Y | Y | $MMSEG_DIR/configs/restorers/srcnn/srcnn_x4k915_g1_1000k_div2k.py | -| ESRGAN | MMEditing | Y | Y | Y | Y | Y | $MMSEG_DIR/configs/restorers/esrgan/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py | -| DBNet | MMOCR | Y | Y | Y | Y | Y | $MMOCR_DIR/configs/textdet/dbnet/dbnet_r18_fpnc_1200e_icdar2015.py | -| CRNN | MMOCR | Y | Y | Y | Y | N | $MMOCR_DIR/configs/textrecog/crnn/crnn_academic_dataset.py | - +Refer to [Support model list](../supported_models.md) ### Reminders diff --git a/docs/zh_cn/benchmark.md b/docs/zh_cn/benchmark.md index 67ab9c3a8..dfbdf7a72 100644 --- a/docs/zh_cn/benchmark.md +++ b/docs/zh_cn/benchmark.md @@ -854,6 +854,20 @@ GPU: TensorRT, PPLNN - $MMDET_DIR/configs/atss/atss_r50_fpn_1x_coco.py + + Cascade R-CNN + Object Detection + COCO2017 + box AP + 40.4 + - + 40.4 + 40.4 + - + 40.4 + - + $MMDET_DIR/configs/cascade_rcnn/cascade_rcnn_r50_caffe_fpn_1x_coco.py + Mask R-CNN Instance Segmentation @@ -866,7 +880,7 @@ GPU: TensorRT, PPLNN - 38.0 - - $MMDET_DIR/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py + $MMDET_DIR/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py mask AP diff --git a/docs/zh_cn/tutorials/how_to_convert_model.md b/docs/zh_cn/tutorials/how_to_convert_model.md index 745404456..9f88d527d 100644 --- a/docs/zh_cn/tutorials/how_to_convert_model.md +++ b/docs/zh_cn/tutorials/how_to_convert_model.md @@ -7,6 +7,7 @@ - [准备工作](#准备工作) - [使用方法](#使用方法) - [参数描述](#参数描述) + - [如何查找pytorch模型对应的部署配置文件](#如何查找pytorch模型对应的部署配置文件) - [示例](#示例) - [如何评测模型](#如何评测模型) - [各后端已支持导出的模型列表](#各后端已支持导出的模型列表) @@ -18,15 +19,16 @@ 这篇教程介绍了如何使用 MMDeploy 的工具将一个 OpenMMlab 模型转换成某个后端的模型文件。 注意: -- 现在已支持的后端包括 [ONNX Runtime](../backends/onnxruntime.md) ,[TensorRT](../backends/tensorrt.md) ,[NCNN](../backends/ncnn.md) ,[PPLNN](../backends/pplnn.md)。 -- 现在已支持的代码库包括 [MMClassification](../codebases/mmcls.md) ,[MMDetection](../codebases/mmdet.md) ,[MMSegmentation](../codebases/mmseg.md) ,[MMOCR](../codebases/mmocr.md) ,[MMEditing](../codebases/mmedit.md)。 + +- 现在已支持的后端包括 [ONNX Runtime](../../en/backends/onnxruntime.md) ,[TensorRT](../../en/backends/tensorrt.md) ,[NCNN](../../en/backends/ncnn.md) ,[PPLNN](../../en/backends/pplnn.md)。 +- 现在已支持的代码库包括 [MMClassification](../../en/codebases/mmcls.md) ,[MMDetection](../../en/codebases/mmdet.md) ,[MMSegmentation](../../en/codebases/mmseg.md) ,[MMOCR](../../en/codebases/mmocr.md) ,[MMEditing](../../codebases/mmedit.md)。 ### 如何将模型从pytorch形式转换成其他后端形式 #### 准备工作 -1. 安装你的目标后端。 你可以参考 [ONNXRuntime-install](../backends/onnxruntime.md) ,[TensorRT-install](../backends/tensorrt.md) ,[NCNN-install](../backends/ncnn.md) ,[PPLNN-install](../backends/pplnn.md)。 -2. 安装你的目标代码库。 你可以参考 [MMClassification-install](https://github.com/open-mmlab/mmclassification/blob/master/docs/install.md) ,[MMDetection-install](https://github.com/open-mmlab/mmdetection/blob/master/docs/get_started.md) ,[MMSegmentation-install](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/get_started.md#installation) ,[MMOCR-install](https://github.com/open-mmlab/mmocr/blob/main/docs/install.md) ,[MMEditing-install](https://github.com/open-mmlab/mmediting/blob/master/docs/install.md) 。 +1. 安装你的目标后端。 你可以参考 [ONNXRuntime-install](../../en/backends/onnxruntime.md) ,[TensorRT-install](../../en/backends/tensorrt.md) ,[NCNN-install](../../en/backends/ncnn.md) ,[PPLNN-install](../../en/backends/pplnn.md)。 +2. 安装你的目标代码库。 你可以参考 [MMClassification-install](https://github.com/open-mmlab/mmclassification/blob/master/docs/zh_CN/install.md), [MMDetection-install](https://github.com/open-mmlab/mmdetection/blob/master/docs/zh_cn/get_started.md), [MMSegmentation-install](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/get_started.md#installation), [MMOCR-install](https://mmocr.readthedocs.io/en/latest/install.html), [MMEditing-install](https://github.com/open-mmlab/mmediting/blob/master/docs/zh_cn/install.md)。 #### 使用方法 @@ -59,11 +61,17 @@ python ./tools/deploy.py \ - `--show` : 是否显示检测的结果。 - `--dump-info` : 是否输出 SDK 信息。 +#### 如何查找pytorch模型对应的部署配置文件 + +1. 在 `configs/` 文件夹中找到模型对应的代码库文件夹。 例如,转换一个yolov3模型你可以查找到 `configs/mmdet` 文件夹。 +2. 根据模型的任务类型在 `configs/codebase_folder/` 下查找对应的文件夹。 例如yolov3模型,你可以查找到 `configs/mmdet/detection` 文件夹。 +3. 在 `configs/codebase_folder/task_folder/` 下找到模型的部署配置文件。 例如部署yolov3你可以使用 `configs/mmdet/detection/detection_onnxruntime_dynamic.py`。 + #### 示例 ```bash python ./tools/deploy.py \ - configs/mmdet/single-stage/single-stage_tensorrt_dynamic-320x320-1344x1344.py \ + configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \ $PATH_TO_MMDET/configs/yolo/yolov3_d53_mstrain-608_273e_coco.py \ $PATH_TO_MMDET/checkpoints/yolo/yolov3_d53_mstrain-608_273e_coco.pth \ $PATH_TO_MMDET/demo/demo.jpg \ @@ -78,34 +86,7 @@ python ./tools/deploy.py \ ### 各后端已支持导出的模型列表 -下列列表显示了目前哪些模型是可以导出的以及其支持的后端。 - -| 模型 | 代码库 | 模型配置文件(示例) | OnnxRuntime | TensorRT | NCNN | PPLNN | -| :----------: | :--------------: | :---------------------------------------------------------------------------------------: | :---------: | :-----------: | :---:| :---: | -| RetinaNet | MMDetection | $PATH_TO_MMDET/configs/retinanet/retinanet_r50_fpn_1x_coco.py | Y | Y | Y | Y | -| Faster R-CNN | MMDetection | $PATH_TO_MMDET/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py | Y | Y | Y | Y | -| YOLOv3 | MMDetection | $PATH_TO_MMDET/configs/yolo/yolov3_d53_mstrain-608_273e_coco.py | Y | Y | N | Y | -| FCOS | MMDetection | $PATH_TO_MMDET/configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_1x_coco.py | Y | Y | Y | N | -| FSAF | MMDetection | $PATH_TO_MMDET/configs/fsaf/fsaf_r50_fpn_1x_coco.py | Y | Y | Y | Y | -| Mask R-CNN | MMDetection | $PATH_TO_MMDET/configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py | Y | Y | N | Y | -| ResNet | MMClassification | $PATH_TO_MMCLS/configs/resnet/resnet18_b32x8_imagenet.py | Y | Y | Y | Y | -| ResNeXt | MMClassification | $PATH_TO_MMCLS/configs/resnext/resnext50_32x4d_b32x8_imagenet.py | Y | Y | Y | Y | -| SE-ResNet | MMClassification | $PATH_TO_MMCLS/configs/seresnet/seresnet50_b32x8_imagenet.py | Y | Y | Y | Y | -| MobileNetV2 | MMClassification | $PATH_TO_MMCLS/configs/mobilenet_v2/mobilenet_v2_b32x8_imagenet.py | Y | Y | Y | Y | -| ShuffleNetV1 | MMClassification | $PATH_TO_MMCLS/configs/shufflenet_v1/shufflenet_v1_1x_b64x16_linearlr_bn_nowd_imagenet.py | Y | Y | N | Y | -| ShuffleNetV2 | MMClassification | $PATH_TO_MMCLS/configs/shufflenet_v2/shufflenet_v2_1x_b64x16_linearlr_bn_nowd_imagenet.py | Y | Y | N | Y | -| FCN | MMSegmentatio -- Some dependencies are optional. Simply running `pip install -e .` will only install the minimum runtime requirements. -To use optional dependencies, install them manually with `pip install -r requirements/optional.txt` or specify desired extras when calling `pip` (e.g. `pip install -e . [optional]`). -Valid keys for the extras field are: `all`, `tests`, `build`, `optional`. -Valid keys for the extras field are: `all`, `tests`, `build`, `optional`.n | $PATH_TO_MMSEG/configs/fcn/fcn_r50-d8_512x1024_40k_cityscapes.py | Y | Y | Y | Y | -| PSPNet | MMSegmentation | $PATH_TO_MMSEG/configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py | Y | Y | N | Y | -| DeepLabV3 | MMSegmentation | $PATH_TO_MMSEG/configs/deeplabv3/deeplabv3_r50-d8_512x1024_40k_cityscapes.py | Y | Y | Y | Y | -| DeepLabV3+ | MMSegmentation | $PATH_TO_MMSEG/configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_40k_cityscapes.py | Y | Y | Y | Y | -| SRCNN | MMEditing | $PATH_TO_MMSEG/configs/restorers/srcnn/srcnn_x4k915_g1_1000k_div2k.py | Y | Y | N | Y | -| ESRGAN | MMEditing | $PATH_TO_MMSEG/configs/restorers/esrgan/esrgan_psnr_x4c64b23g32_g1_1000k_div2k.py | Y | Y | N | Y | -| DBNet | MMOCR | $PATH_TO_MMOCR/configs/textdet/dbnet/dbnet_r50dcnv2_fpnc_1200e_icdar2015.py | Y | Y | Y | Y | -| CRNN | MMOCR | $PATH_TO_MMOCR/configs/textrecog/tps/crnn_tps_academic_dataset.py | Y | Y | Y | N | +参考[已支持的模型列表](../../en/supported_models.md)。 ### 注意事项