Update readme intro image and docs (#2175)
* update logo
* update
* update
* update
* fix ci
* Revert "update logo"
This reverts commit 6935ff0bce
.
* update intro
* fix
pull/2186/head
parent
f6a116894b
commit
a8775d2cf1
|
@ -203,14 +203,14 @@ jobs:
|
||||||
build_cuda113:
|
build_cuda113:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container:
|
container:
|
||||||
image: pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel
|
image: pytorch/pytorch:1.12.0-cuda11.3-cudnn8-devel
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
torch: [1.10.0+cu113]
|
torch: [1.12.0+cu113]
|
||||||
include:
|
include:
|
||||||
- torch: 1.10.0+cu113
|
- torch: 1.12.0+cu113
|
||||||
torch_version: torch1.10
|
torch_version: torch1.12
|
||||||
torchvision: 0.11.0+cu113
|
torchvision: 0.13.0+cu113
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
|
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo $MMDEPLOY_VERSION
|
echo $MMDEPLOY_VERSION
|
||||||
echo $TAG
|
echo $TAG
|
||||||
docker build docker/Release/ -t ${TAG} --build-arg MMDEPLOY_VERSION=${MMDEPLOY_VERSION}
|
docker build docker/Release/ -t ${TAG} --no-cache --build-arg MMDEPLOY_VERSION=${MMDEPLOY_VERSION}
|
||||||
- name: Push Docker image
|
- name: Push Docker image
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
_base_ = ['./pose-detection_static.py', '../_base_/backends/openvino.py']
|
||||||
|
|
||||||
|
backend_config = dict(
|
||||||
|
model_inputs=[dict(opt_shapes=dict(input=[1, 3, 256, 192]))])
|
||||||
|
onnx_config = dict(
|
||||||
|
input_shape=[192, 256],
|
||||||
|
output_names=['simcc_x', 'simcc_y'],
|
||||||
|
dynamic_axes={
|
||||||
|
'input': {
|
||||||
|
0: 'batch',
|
||||||
|
},
|
||||||
|
'simcc_x': {
|
||||||
|
0: 'batch'
|
||||||
|
},
|
||||||
|
'simcc_y': {
|
||||||
|
0: 'batch'
|
||||||
|
}
|
||||||
|
})
|
|
@ -17,11 +17,11 @@ The table below lists the models that are guaranteed to be exportable to other b
|
||||||
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | MMDetection | N | Y | Y | N | ? | Y | N | N |
|
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | MMDetection | N | Y | Y | N | ? | Y | N | N |
|
||||||
| [Cascade R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | Y | Y | N | N |
|
| [Cascade R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | Y | Y | N | N |
|
||||||
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | N | Y | N | N |
|
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | N | Y | N | N |
|
||||||
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin)[\*](#note) | MMDetection | N | Y | Y | N | N | N | N | N |
|
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin)[\*](#note) | MMDetection | N | Y | Y | N | N | Y | N | N |
|
||||||
| [VFNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/vfnet) | MMDetection | N | N | N | N | N | Y | N | N |
|
| [VFNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/vfnet) | MMDetection | N | N | N | N | N | Y | N | N |
|
||||||
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | MMDetection | N | N | Y | N | ? | Y | N | N |
|
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | MMDetection | N | N | Y | N | ? | Y | N | N |
|
||||||
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | MMDetection | N | Y | Y | N | ? | N | N | N |
|
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | MMDetection | N | Y | Y | N | ? | N | N | N |
|
||||||
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | MMDetection | N | Y | Y | N | ? | N | N | N |
|
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | MMDetection | N | Y | Y | N | ? | Y | N | N |
|
||||||
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | MMDetection | N | Y | N | N | N | Y | N | N |
|
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | MMDetection | N | Y | N | N | N | Y | N | N |
|
||||||
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | MMDetection | N | Y | N | N | N | Y | N | N |
|
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | MMDetection | N | Y | N | N | N | Y | N | N |
|
||||||
| [ResNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/resnet) | MMPretrain | Y | Y | Y | Y | Y | Y | Y | Y |
|
| [ResNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/resnet) | MMPretrain | Y | Y | Y | Y | Y | Y | Y | Y |
|
||||||
|
|
|
@ -206,10 +206,10 @@ Besides python API, mmdeploy SDK also provides other FFI (Foreign Function Inter
|
||||||
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | Object Detection | Y | Y | N | ? | Y |
|
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | Object Detection | N | Y | N | ? | Y |
|
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | Object Detection | N | Y | N | ? | Y |
|
||||||
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | Object Detection | Y | Y | N | ? | Y |
|
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | Object Detection | Y | Y | N | ? | ? |
|
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [RTMDet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/rtmdet) | Object Detection | Y | Y | N | ? | ? |
|
| [RTMDet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/rtmdet) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | Instance Segmentation | Y | Y | N | N | Y |
|
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | Instance Segmentation | Y | Y | N | N | Y |
|
||||||
| [Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/mask_rcnn) | Instance Segmentation | Y | Y | N | N | Y |
|
| [Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/mask_rcnn) | Instance Segmentation | Y | Y | N | N | Y |
|
||||||
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin) | Instance Segmentation | Y | Y | N | N | N |
|
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin) | Instance Segmentation | Y | Y | N | N | Y |
|
||||||
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | Instance Segmentation | Y | N | N | N | Y |
|
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | Instance Segmentation | Y | N | N | N | Y |
|
||||||
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | Instance Segmentation | Y | N | N | N | Y |
|
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | Instance Segmentation | Y | N | N | N | Y |
|
||||||
|
|
|
@ -158,5 +158,5 @@ TODO
|
||||||
| [MSPN](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#mspn-arxiv-2019) | PoseDetection | Y | Y | Y | N | Y |
|
| [MSPN](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#mspn-arxiv-2019) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [LiteHRNet](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#litehrnet-cvpr-2021) | PoseDetection | Y | Y | Y | N | Y |
|
| [LiteHRNet](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#litehrnet-cvpr-2021) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [Hourglass](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#hourglass-eccv-2016) | PoseDetection | Y | Y | Y | N | Y |
|
| [Hourglass](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#hourglass-eccv-2016) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [SimCC](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#simcc-eccv-2022) | PoseDetection | Y | Y | Y | N | N |
|
| [SimCC](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#simcc-eccv-2022) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [RTMPose](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmpose) | PoseDetection | Y | Y | Y | N | Y |
|
| [RTMPose](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmpose) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
|
|
|
@ -181,8 +181,8 @@ Besides python API, mmdeploy SDK also provides other FFI (Foreign Function Inter
|
||||||
| [ShuffleNetV1](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v1) | Y | Y | Y | Y | Y | Y |
|
| [ShuffleNetV1](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v1) | Y | Y | Y | Y | Y | Y |
|
||||||
| [ShuffleNetV2](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v2) | Y | Y | Y | Y | Y | Y |
|
| [ShuffleNetV2](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v2) | Y | Y | Y | Y | Y | Y |
|
||||||
| [VisionTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/vision_transformer) | Y | Y | Y | Y | ? | Y |
|
| [VisionTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/vision_transformer) | Y | Y | Y | Y | ? | Y |
|
||||||
| [SwinTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/swin_transformer) | Y | Y | Y | N | ? | N |
|
| [SwinTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/swin_transformer) | Y | Y | Y | N | ? | Y |
|
||||||
| [MobileOne](https://github.com/open-mmlab/mmpretrain/tree/main/configs/mobileone) | Y | Y | N | N | ? | N |
|
| [MobileOne](https://github.com/open-mmlab/mmpretrain/tree/main/configs/mobileone) | Y | Y | Y | Y | ? | Y |
|
||||||
| [EfficientNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientnet) | Y | Y | N | N | ? | N |
|
| [EfficientNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientnet) | Y | Y | Y | N | ? | Y |
|
||||||
| [Conformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/conformer) | Y | Y | N | N | ? | N |
|
| [Conformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/conformer) | Y | Y | Y | N | ? | Y |
|
||||||
| [EfficientFormer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientformer) | Y | Y | Y | N | ? | Y |
|
| [EfficientFormer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientformer) | Y | Y | Y | N | ? | Y |
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# ONNX Runtime Support
|
# onnxruntime 支持情况
|
||||||
|
|
||||||
## Introduction of ONNX Runtime
|
## Introduction of ONNX Runtime
|
||||||
|
|
||||||
|
@ -6,19 +6,29 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
*Please note that only **onnxruntime>=1.8.1** of CPU version on Linux platform is supported by now.*
|
*Please note that only **onnxruntime>=1.8.1** of on Linux platform is supported by now.*
|
||||||
|
|
||||||
- Install ONNX Runtime python package
|
### Install ONNX Runtime python package
|
||||||
|
|
||||||
|
- CPU Version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install onnxruntime==1.8.1
|
pip install onnxruntime==1.8.1 # if you want to use cpu version
|
||||||
|
```
|
||||||
|
|
||||||
|
- GPU Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install onnxruntime-gpu==1.8.1 # if you want to use gpu version
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build custom ops
|
## Build custom ops
|
||||||
|
|
||||||
### Prerequisite
|
### Download ONNXRuntime Library
|
||||||
|
|
||||||
- Download `onnxruntime-linux` from ONNX Runtime [releases](https://github.com/microsoft/onnxruntime/releases/tag/v1.8.1), extract it, expose `ONNXRUNTIME_DIR` and finally add the lib path to `LD_LIBRARY_PATH` as below:
|
Download `onnxruntime-linux-*.tgz` library from ONNX Runtime [releases](https://github.com/microsoft/onnxruntime/releases/tag/v1.8.1), extract it, expose `ONNXRUNTIME_DIR` and finally add the lib path to `LD_LIBRARY_PATH` as below:
|
||||||
|
|
||||||
|
- CPU Version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
|
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
|
||||||
|
@ -29,12 +39,34 @@ export ONNXRUNTIME_DIR=$(pwd)
|
||||||
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- GPU Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-gpu-1.8.1.tgz
|
||||||
|
|
||||||
|
tar -zxvf onnxruntime-linux-x64-gpu-1.8.1.tgz
|
||||||
|
cd onnxruntime-linux-x64-gpu-1.8.1
|
||||||
|
export ONNXRUNTIME_DIR=$(pwd)
|
||||||
|
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
||||||
|
```
|
||||||
|
|
||||||
### Build on Linux
|
### Build on Linux
|
||||||
|
|
||||||
|
- CPU Version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
|
cmake -DMMDEPLOY_TARGET_DEVICES='cpu' -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
|
||||||
|
make -j$(nproc) && make install
|
||||||
|
```
|
||||||
|
|
||||||
|
- GPU Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake -DMMDEPLOY_TARGET_DEVICES='cuda' -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
|
||||||
make -j$(nproc) && make install
|
make -j$(nproc) && make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -6,21 +6,45 @@ This tutorial is based on Linux systems like Ubuntu-18.04.
|
||||||
|
|
||||||
It is recommended to create a virtual environment for the project.
|
It is recommended to create a virtual environment for the project.
|
||||||
|
|
||||||
1. Install [OpenVINO](https://docs.openvino.ai/2021.4/get_started.html). It is recommended to use the installer or install using pip.
|
### Install python package
|
||||||
Installation example using [pip](https://pypi.org/project/openvino-dev/):
|
|
||||||
|
Install [OpenVINO](https://docs.openvino.ai/2022.3/get_started.html). It is recommended to use the installer or install using pip.
|
||||||
|
Installation example using [pip](https://pypi.org/project/openvino-dev/):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install openvino-dev
|
pip install openvino-dev[onnx]==2022.3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
2. \*`Optional` If you want to use OpenVINO in SDK, you need install OpenVINO with [install_guides](https://docs.openvino.ai/2021.4/openvino_docs_install_guides_installing_openvino_linux.html#install-openvino).
|
### Download OpenVINO runtime for SDK (Optional)
|
||||||
|
|
||||||
3. Install MMDeploy following the [instructions](../01-how-to-build/build_from_source.md).
|
If you want to use OpenVINO in SDK, you need install OpenVINO with [install_guides](https://docs.openvino.ai/2022.3/openvino_docs_install_guides_installing_openvino_from_archive_linux.html#installing-openvino-runtime).
|
||||||
|
Take `openvino==2022.3.0` as example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64.tgz
|
||||||
|
tar xzf ./l_openvino_toolkit*.tgz
|
||||||
|
cd l_openvino*
|
||||||
|
export InferenceEngine_DIR=$pwd/runtime/cmake
|
||||||
|
bash ./install_dependencies/install_openvino_dependencies.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build mmdeploy SDK with OpenVINO (Optional)
|
||||||
|
|
||||||
|
Install MMDeploy following the [instructions](../01-how-to-build/build_from_source.md).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake -DMMDEPLOY_TARGET_DEVICES='cpu' -DMMDEPLOY_TARGET_BACKENDS=openvino -DInferenceEngine_DIR=${InferenceEngine_DIR} ..
|
||||||
|
make -j$(nproc) && make install
|
||||||
|
```
|
||||||
|
|
||||||
To work with models from [MMDetection](https://mmdetection.readthedocs.io/en/3.x/get_started.html), you may need to install it additionally.
|
To work with models from [MMDetection](https://mmdetection.readthedocs.io/en/3.x/get_started.html), you may need to install it additionally.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
You could follow the instructions of tutorial [How to convert model](../02-how-to-run/convert_model.md)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | MMDetection | N | Y | Y | N | ? | Y | N | N |
|
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | MMDetection | N | Y | Y | N | ? | Y | N | N |
|
||||||
| [Cascade R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | Y | Y | N | N |
|
| [Cascade R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | Y | Y | N | N |
|
||||||
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | N | Y | N | N |
|
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | MMDetection | N | Y | Y | N | N | Y | N | N |
|
||||||
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin)[\*](#note) | MMDetection | N | Y | Y | N | N | N | N | N |
|
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin)[\*](#note) | MMDetection | N | Y | Y | N | N | Y | N | N |
|
||||||
| [VFNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/vfnet) | MMDetection | N | N | N | N | N | Y | N | N |
|
| [VFNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/vfnet) | MMDetection | N | N | N | N | N | Y | N | N |
|
||||||
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | MMDetection | N | N | Y | N | ? | Y | N | N |
|
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | MMDetection | N | N | Y | N | ? | Y | N | N |
|
||||||
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | MMDetection | N | Y | Y | N | ? | N | N | N |
|
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | MMDetection | N | Y | Y | N | ? | N | N | N |
|
||||||
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | MMDetection | N | Y | Y | N | ? | N | N | N |
|
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | MMDetection | N | Y | Y | N | ? | Y | N | N |
|
||||||
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | MMDetection | N | Y | N | N | N | Y | N | N |
|
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | MMDetection | N | Y | N | N | N | Y | N | N |
|
||||||
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | MMDetection | N | Y | N | N | N | Y | N | N |
|
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | MMDetection | N | Y | N | N | N | Y | N | N |
|
||||||
| [ResNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/resnet) | MMPretrain | Y | Y | Y | Y | Y | Y | Y | Y |
|
| [ResNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/resnet) | MMPretrain | Y | Y | Y | Y | Y | Y | Y | Y |
|
||||||
|
@ -85,9 +85,9 @@
|
||||||
| [SimCC](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#simcc-eccv-2022) | MMPose | N | Y | Y | Y | N | N | N | N |
|
| [SimCC](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#simcc-eccv-2022) | MMPose | N | Y | Y | Y | N | N | N | N |
|
||||||
| [PointPillars](https://github.com/open-mmlab/mmdetection3d/tree/main/configs/pointpillars) | MMDetection3d | ? | Y | Y | N | N | Y | N | N |
|
| [PointPillars](https://github.com/open-mmlab/mmdetection3d/tree/main/configs/pointpillars) | MMDetection3d | ? | Y | Y | N | N | Y | N | N |
|
||||||
| [CenterPoint (pillar)](https://github.com/open-mmlab/mmdetection3d/tree/main/configs/centerpoint) | MMDetection3d | ? | Y | Y | N | N | Y | N | N |
|
| [CenterPoint (pillar)](https://github.com/open-mmlab/mmdetection3d/tree/main/configs/centerpoint) | MMDetection3d | ? | Y | Y | N | N | Y | N | N |
|
||||||
| [RotatedRetinaNet](https://github.com/open-mmlab/mmrotate/blob/1.x/configs/rotated_retinanet/README.md) | RotatedDetection | N | Y | Y | N | N | N | N | N |
|
| [RotatedRetinaNet](https://github.com/open-mmlab/mmrotate/blob/main/configs/rotated_retinanet/README.md) | RotatedDetection | N | Y | Y | N | N | N | N | N |
|
||||||
| [Oriented RCNN](https://github.com/open-mmlab/mmrotate/blob/1.x/configs/oriented_rcnn/README.md) | RotatedDetection | N | Y | Y | N | N | N | N | N |
|
| [Oriented RCNN](https://github.com/open-mmlab/mmrotate/blob/main/configs/oriented_rcnn/README.md) | RotatedDetection | N | Y | Y | N | N | N | N | N |
|
||||||
| [Gliding Vertex](https://github.com/open-mmlab/mmrotate/blob/1.x/configs/gliding_vertex/README.md) | RotatedDetection | N | N | Y | N | N | N | N | N |
|
| [Gliding Vertex](https://github.com/open-mmlab/mmrotate/blob/main/configs/gliding_vertex/README.md) | RotatedDetection | N | N | Y | N | N | N | N | N |
|
||||||
|
|
||||||
## Note
|
## Note
|
||||||
|
|
||||||
|
|
|
@ -192,27 +192,27 @@ cv2.imwrite('output_detection.png', img)
|
||||||
|
|
||||||
## 模型支持列表
|
## 模型支持列表
|
||||||
|
|
||||||
| Model | Task | OnnxRuntime | TensorRT | ncnn | PPLNN | OpenVINO |
|
| Model | Task | OnnxRuntime | TensorRT | ncnn | PPLNN | OpenVINO |
|
||||||
| :-------------------------------------------------------------------------------------------: | :------------------: | :---------: | :------: | :--: | :---: | :------: |
|
| :-------------------------------------------------------------------------------------------: | :-------------------: | :---------: | :------: | :--: | :---: | :------: |
|
||||||
| [ATSS](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/atss) | ObjectDetection | Y | Y | N | N | Y |
|
| [ATSS](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/atss) | Object Detection | Y | Y | N | N | Y |
|
||||||
| [FCOS](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/fcos) | ObjectDetection | Y | Y | Y | N | Y |
|
| [FCOS](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/fcos) | Object Detection | Y | Y | Y | N | Y |
|
||||||
| [FoveaBox](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/foveabox) | ObjectDetection | Y | N | N | N | Y |
|
| [FoveaBox](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/foveabox) | Object Detection | Y | N | N | N | Y |
|
||||||
| [FSAF](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/fsaf) | ObjectDetection | Y | Y | Y | Y | Y |
|
| [FSAF](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/fsaf) | Object Detection | Y | Y | Y | Y | Y |
|
||||||
| [RetinaNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/retinanet) | ObjectDetection | Y | Y | Y | Y | Y |
|
| [RetinaNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/retinanet) | Object Detection | Y | Y | Y | Y | Y |
|
||||||
| [SSD](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/ssd) | ObjectDetection | Y | Y | Y | N | Y |
|
| [SSD](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/ssd) | Object Detection | Y | Y | Y | N | Y |
|
||||||
| [VFNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/vfnet) | ObjectDetection | N | N | N | N | Y |
|
| [VFNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/vfnet) | Object Detection | N | N | N | N | Y |
|
||||||
| [YOLOv3](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/yolo) | ObjectDetection | Y | Y | Y | N | Y |
|
| [YOLOv3](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/yolo) | Object Detection | Y | Y | Y | N | Y |
|
||||||
| [YOLOX](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/yolox) | ObjectDetection | Y | Y | Y | N | Y |
|
| [YOLOX](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/yolox) | Object Detection | Y | Y | Y | N | Y |
|
||||||
| [Cascade R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | ObjectDetection | Y | Y | N | Y | Y |
|
| [Cascade R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | Object Detection | Y | Y | N | Y | Y |
|
||||||
| [Faster R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/faster_rcnn) | ObjectDetection | Y | Y | Y | Y | Y |
|
| [Faster R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/faster_rcnn) | Object Detection | Y | Y | Y | Y | Y |
|
||||||
| [Faster R-CNN + DCN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/faster_rcnn) | ObjectDetection | Y | Y | Y | Y | Y |
|
| [Faster R-CNN + DCN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/faster_rcnn) | Object Detection | Y | Y | Y | Y | Y |
|
||||||
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | ObjectDetection | Y | Y | N | ? | Y |
|
| [GFL](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/gfl) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | ObjectDetection | N | Y | N | ? | Y |
|
| [RepPoints](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/reppoints) | Object Detection | N | Y | N | ? | Y |
|
||||||
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | ObjectDetection | Y | Y | N | ? | Y |
|
| [DETR](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/detr) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | Object Detection | Y | Y | N | ? | ? |
|
| [CenterNet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/centernet) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [RTMDet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/rtmdet) | Object Detection | Y | Y | N | ? | ? |
|
| [RTMDet](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/rtmdet) | Object Detection | Y | Y | N | ? | Y |
|
||||||
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | InstanceSegmentation | Y | Y | N | N | Y |
|
| [Cascade Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/cascade_rcnn) | Instance Segmentation | Y | Y | N | N | Y |
|
||||||
| [Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/mask_rcnn) | InstanceSegmentation | Y | Y | N | N | Y |
|
| [Mask R-CNN](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/mask_rcnn) | Instance Segmentation | Y | Y | N | N | Y |
|
||||||
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin) | InstanceSegmentation | Y | Y | N | N | N |
|
| [Swin Transformer](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/swin) | Instance Segmentation | Y | Y | N | N | Y |
|
||||||
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | InstanceSegmentation | Y | N | N | N | Y |
|
| [SOLO](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solo) | Instance Segmentation | Y | N | N | N | Y |
|
||||||
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | InstanceSegmentation | Y | N | N | N | Y |
|
| [SOLOv2](https://github.com/open-mmlab/mmdetection/tree/3.x/configs/solov2) | Instance Segmentation | Y | N | N | N | Y |
|
||||||
|
|
|
@ -162,5 +162,5 @@ task_processor.visualize(
|
||||||
| [MSPN](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#mspn-arxiv-2019) | PoseDetection | Y | Y | Y | N | Y |
|
| [MSPN](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#mspn-arxiv-2019) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [LiteHRNet](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#litehrnet-cvpr-2021) | PoseDetection | Y | Y | Y | N | Y |
|
| [LiteHRNet](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/backbones.html#litehrnet-cvpr-2021) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [Hourglass](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#hourglass-eccv-2016) | PoseDetection | Y | Y | Y | N | Y |
|
| [Hourglass](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#hourglass-eccv-2016) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [SimCC](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#simcc-eccv-2022) | PoseDetection | Y | Y | Y | N | N |
|
| [SimCC](https://mmpose.readthedocs.io/en/latest/model_zoo_papers/algorithms.html#simcc-eccv-2022) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
| [RTMPose](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmpose) | PoseDetection | Y | Y | Y | N | Y |
|
| [RTMPose](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmpose) | PoseDetection | Y | Y | Y | N | Y |
|
||||||
|
|
|
@ -186,8 +186,8 @@ for label_id, score in result:
|
||||||
| [ShuffleNetV1](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v1) | Y | Y | Y | Y | Y | Y |
|
| [ShuffleNetV1](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v1) | Y | Y | Y | Y | Y | Y |
|
||||||
| [ShuffleNetV2](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v2) | Y | Y | Y | Y | Y | Y |
|
| [ShuffleNetV2](https://github.com/open-mmlab/mmpretrain/tree/main/configs/shufflenet_v2) | Y | Y | Y | Y | Y | Y |
|
||||||
| [VisionTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/vision_transformer) | Y | Y | Y | Y | ? | Y |
|
| [VisionTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/vision_transformer) | Y | Y | Y | Y | ? | Y |
|
||||||
| [SwinTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/swin_transformer) | Y | Y | Y | N | ? | N |
|
| [SwinTransformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/swin_transformer) | Y | Y | Y | N | ? | Y |
|
||||||
| [MobileOne](https://github.com/open-mmlab/mmpretrain/tree/main/configs/mobileone) | Y | Y | N | N | ? | N |
|
| [MobileOne](https://github.com/open-mmlab/mmpretrain/tree/main/configs/mobileone) | Y | Y | Y | Y | ? | Y |
|
||||||
| [EfficientNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientnet) | Y | Y | N | N | ? | N |
|
| [EfficientNet](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientnet) | Y | Y | Y | N | ? | Y |
|
||||||
| [Conformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/conformer) | Y | Y | N | N | ? | N |
|
| [Conformer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/conformer) | Y | Y | Y | N | ? | Y |
|
||||||
| [EfficientFormer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientformer) | Y | Y | Y | N | ? | Y |
|
| [EfficientFormer](https://github.com/open-mmlab/mmpretrain/tree/main/configs/efficientformer) | Y | Y | Y | N | ? | Y |
|
||||||
|
|
|
@ -6,19 +6,29 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
*Please note that only **onnxruntime>=1.8.1** of CPU version on Linux platform is supported by now.*
|
*Please note that only **onnxruntime>=1.8.1** of on Linux platform is supported by now.*
|
||||||
|
|
||||||
- Install ONNX Runtime python package
|
### Install ONNX Runtime python package
|
||||||
|
|
||||||
|
- CPU Version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install onnxruntime==1.8.1
|
pip install onnxruntime==1.8.1 # if you want to use cpu version
|
||||||
|
```
|
||||||
|
|
||||||
|
- GPU Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install onnxruntime-gpu==1.8.1 # if you want to use gpu version
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build custom ops
|
## Build custom ops
|
||||||
|
|
||||||
### Prerequisite
|
### Download ONNXRuntime Library
|
||||||
|
|
||||||
- Download `onnxruntime-linux` from ONNX Runtime [releases](https://github.com/microsoft/onnxruntime/releases/tag/v1.8.1), extract it, expose `ONNXRUNTIME_DIR` and finally add the lib path to `LD_LIBRARY_PATH` as below:
|
Download `onnxruntime-linux-*.tgz` library from ONNX Runtime [releases](https://github.com/microsoft/onnxruntime/releases/tag/v1.8.1), extract it, expose `ONNXRUNTIME_DIR` and finally add the lib path to `LD_LIBRARY_PATH` as below:
|
||||||
|
|
||||||
|
- CPU Version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
|
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
|
||||||
|
@ -29,12 +39,34 @@ export ONNXRUNTIME_DIR=$(pwd)
|
||||||
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- GPU Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-gpu-1.8.1.tgz
|
||||||
|
|
||||||
|
tar -zxvf onnxruntime-linux-x64-gpu-1.8.1.tgz
|
||||||
|
cd onnxruntime-linux-x64-gpu-1.8.1
|
||||||
|
export ONNXRUNTIME_DIR=$(pwd)
|
||||||
|
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
|
||||||
|
```
|
||||||
|
|
||||||
### Build on Linux
|
### Build on Linux
|
||||||
|
|
||||||
|
- CPU Version
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
|
cmake -DMMDEPLOY_TARGET_DEVICES='cpu' -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
|
||||||
|
make -j$(nproc) && make install
|
||||||
|
```
|
||||||
|
|
||||||
|
- GPU Version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake -DMMDEPLOY_TARGET_DEVICES='cuda' -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
|
||||||
make -j$(nproc) && make install
|
make -j$(nproc) && make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# OpenVINO 支持情况
|
# OpenVINO Support
|
||||||
|
|
||||||
This tutorial is based on Linux systems like Ubuntu-18.04.
|
This tutorial is based on Linux systems like Ubuntu-18.04.
|
||||||
|
|
||||||
|
@ -6,21 +6,45 @@ This tutorial is based on Linux systems like Ubuntu-18.04.
|
||||||
|
|
||||||
It is recommended to create a virtual environment for the project.
|
It is recommended to create a virtual environment for the project.
|
||||||
|
|
||||||
1. Install [OpenVINO](https://docs.openvino.ai/2021.4/get_started.html). It is recommended to use the installer or install using pip.
|
### Install python package
|
||||||
Installation example using [pip](https://pypi.org/project/openvino-dev/):
|
|
||||||
|
Install [OpenVINO](https://docs.openvino.ai/2022.3/get_started.html). It is recommended to use the installer or install using pip.
|
||||||
|
Installation example using [pip](https://pypi.org/project/openvino-dev/):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install openvino-dev
|
pip install openvino-dev[onnx]==2022.3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
2. \*`Optional` If you want to use OpenVINO in SDK, you need install OpenVINO with [install_guides](https://docs.openvino.ai/2021.4/openvino_docs_install_guides_installing_openvino_linux.html#install-openvino).
|
### Download OpenVINO runtime for SDK (Optional)
|
||||||
|
|
||||||
3. Install MMDeploy following the [instructions](../01-how-to-build/build_from_source.md).
|
If you want to use OpenVINO in SDK, you need install OpenVINO with [install_guides](https://docs.openvino.ai/2022.3/openvino_docs_install_guides_installing_openvino_from_archive_linux.html#installing-openvino-runtime).
|
||||||
|
Take `openvino==2022.3.0` as example:
|
||||||
|
|
||||||
To work with models from [MMDetection](https://github.com/open-mmlab/mmdetection/blob/3.x/docs/en/get_started.md), you may need to install it additionally.
|
```bash
|
||||||
|
wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64.tgz
|
||||||
|
tar xzf ./l_openvino_toolkit*.tgz
|
||||||
|
cd l_openvino*
|
||||||
|
export InferenceEngine_DIR=$pwd/runtime/cmake
|
||||||
|
bash ./install_dependencies/install_openvino_dependencies.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build mmdeploy SDK with OpenVINO (Optional)
|
||||||
|
|
||||||
|
Install MMDeploy following the [instructions](../01-how-to-build/build_from_source.md).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake -DMMDEPLOY_TARGET_DEVICES='cpu' -DMMDEPLOY_TARGET_BACKENDS=openvino -DInferenceEngine_DIR=${InferenceEngine_DIR} ..
|
||||||
|
make -j$(nproc) && make install
|
||||||
|
```
|
||||||
|
|
||||||
|
To work with models from [MMDetection](https://mmdetection.readthedocs.io/en/3.x/get_started.html), you may need to install it additionally.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
You could follow the instructions of tutorial [How to convert model](../02-how-to-run/convert_model.md)
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 701 KiB |
|
@ -164,7 +164,7 @@ def test_flatten_cls_head():
|
||||||
batch = x.size(0)
|
batch = x.size(0)
|
||||||
gap = nn.functional.adaptive_avg_pool2d(x, (1, 1))
|
gap = nn.functional.adaptive_avg_pool2d(x, (1, 1))
|
||||||
gap = gap.reshape(batch, -1)
|
gap = gap.reshape(batch, -1)
|
||||||
return gap + 0 # gap should not be the output
|
return gap + 1 # gap should not be the output
|
||||||
|
|
||||||
model = TestModel()
|
model = TestModel()
|
||||||
x = torch.rand(1, 4, 8, 8)
|
x = torch.rand(1, 4, 8, 8)
|
||||||
|
|
Loading…
Reference in New Issue