mmdeploy/docs/backends/openvino.md
Semyon Bevzyuk c5a87fb1bc
[Enhancement]: OpenVINO deployment support for some models (#117)
* Fix include and lib paths for onnxruntime.

* Fixes for SSD export test

* Add onnx2openvino and OpenVINODetector. Test models: ssd, retinanet, fcos, fsaf.

* Add support for two-stage models: faster_rcnn, cascade_rcnn

* Add doc

* Add strip_doc_string for openvino.

* Fix openvino preprocess.

* Add OpenVINO to test_wrapper.py.

* Fix

* Add openvino_execute.

* Removed preprocessing.

* Fix onnxruntime cmake.

* Rewrote postprocessing and forward, added docstrings and fixes.

* Added device type change to OpenVINOWrapper.

* Update forward_of_single_roi_extractor_dynamic_openvino and fix doc.

* Update docs.

* Add OpenVINODetector and onn2openvino tests.

* Add input_info to onnx2openvino.

* Add TestOpenVINOExporter and test_single_roi_extractor.

* Moved get_input_shape_from_cfg to openvino_utils.py and added test.

* Added test_cascade_roi_head.

* Add backend.check_env() to tests.

* Add OpenVINO to get_rewrite_outputs and to some tests in test_mmdet_models.

* Moved test_single_roi_extractor to test_mmdet_models.

* Removed TestOpenVINOExporter.
2021-10-21 16:07:35 +08:00

1.9 KiB

OpenVINO Support

This tutorial is based on Linux systems like Ubuntu-18.04.

Installation

  1. Install OpenVINO.
  2. Install MMdeploy following the instructions.

Usage

Example:

python tools/deploy.py \
    configs/mmdet/single-stage/single-stage_openvino_dynamic.py \
    /mmdetection_dir/mmdetection/configs/ssd/ssd300_coco.py \
    /tmp/snapshots/ssd300_coco_20210803_015428-d231a06e.pth \
    tests/data/tiger.jpeg \
    --work-dir ../deploy_result \
    --device cpu \
    --log-level INFO \

List of supported models exportable to OpenVINO from MMDetection

The table below lists the models that are guaranteed to be exportable to OpenVINO from MMDetection.

Model Config Dynamic Shape
FCOS configs/fcos/fcos_r50_caffe_fpn_gn-head_4x4_1x_coco.py Y
FSAF configs/fsaf/fsaf_r50_fpn_1x_coco.py Y
RetinaNet configs/retinanet/retinanet_r50_fpn_1x_coco.py Y
SSD configs/ssd/ssd300_coco.py Y
Faster R-CNN configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py Y
Cascade R-CNN configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py Y

Notes: