OpenMMLab Model Deployment Framework
 
 
 
 
 
 
Go to file
q.yao e73d9fb50b
[Feature] Add mmocr ncnn support (#53)
* first

* fix0

* fix1

* dirty work

* wip

* add allocator

* finally done!

* lint

* fix lint

* better gather

* better onnx2ncnn

* fix expand

* [Fix] NCNN TensorSlice op bugs (#42)

* fix custom ops support, fix multiple mark bug, add name mapping

* check if the value_info need to be added

* remove unnecessary print

* add nms implement

* two stage split wip

* add two stage split

* add split retinanet visualize

* add two stage split (wip)

* finish two stage split

* fix lint

* move parse string to mmdeploy.utils

* add calib data generator

* create calib dataset

* finish end2end int8

* add split two stage tensorrt visualize

* fix tensorslice bugs

* fix lint

* fix clang-format

* remove comments

* int param

* fix lint

Co-authored-by: grimoire <yaoqian@sensetime.com>

* add two stage ncnn support

* remove unused ops

* git unused config

* remove no_grad, should add in refactor

* add ncnn wrapper

* fix lint

* size return tuple

* Resolve grammar error

* Fix lint

* Trim Trailing Whitespace

* fix trim

* update wrapper

* remove logs

* remove

* csrc optimize

* add ncnn dbnet support

* finish crnn support

* add comment

Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com>
2021-09-03 15:16:20 +08:00
.github/workflows remove unused flag, fix lint 2021-06-29 10:23:52 +08:00
backend_ops [Feature] Add mmocr ncnn support (#53) 2021-09-03 15:16:20 +08:00
configs [Feature] Add mmocr ncnn support (#53) 2021-09-03 15:16:20 +08:00
docker add docker (#15) 2021-07-13 08:45:42 +00:00
docs [Feature] Refactor v1 (#56) 2021-09-01 15:43:49 +08:00
mmdeploy [Feature] Add mmocr ncnn support (#53) 2021-09-03 15:16:20 +08:00
tests [Feature] Refactor v1 (#56) 2021-09-01 15:43:49 +08:00
third_party [Feature] Add TensorRT batched NMS support (#3) 2021-06-25 19:31:16 +08:00
tools [Feature] Refactor v1 (#56) 2021-09-01 15:43:49 +08:00
.gitignore
.gitmodules [Feature] Add TensorRT batched NMS support (#3) 2021-06-25 19:31:16 +08:00
.isort.cfg [Feature] Refactor v1 (#56) 2021-09-01 15:43:49 +08:00
.pre-commit-config.yaml
CMakeLists.txt [Feature] Merge NCNN deployment to grimoire based on mmcls - revert [#25](https://github.com/grimoire/deploy_prototype/pull/25) (#30) 2021-08-05 14:06:47 +08:00
LICENSE
README.md [Docs] Add docs of ncnn deployment (#33) 2021-08-10 17:04:58 +08:00
setup.cfg
setup.py

README.md

MMDeployment

Installation

  • Build backend ops

    • update submodule

      git submodule update --init
      
    • Build with onnxruntime support

      mkdir build
      cd build
      cmake -DBUILD_ONNXRUNTIME_OPS=ON -DONNXRUNTIME_DIR=${PATH_TO_ONNXRUNTIME} ..
      make -j10
      
    • Build with tensorrt support

      mkdir build
      cd build
      cmake -DBUILD_TENSORRT_OPS=ON -DTENSORRT_DIR=${PATH_TO_TENSORRT} ..
      make -j10
      
    • Build with ncnn support

      mkdir build
      cd build
      cmake -DBUILD_NCNN_OPS=ON -DNCNN_DIR=${PATH_TO_NCNN} ..
      make -j10
      
    • Or you can add multiple flags to build multiple backend ops.

  • Setup project

    python setup.py develop
    

Usage

python ./tools/deploy.py \
    ${DEPLOY_CFG_PATH} \
    ${MODEL_CFG_PATH} \
    ${MODEL_CHECKPOINT_PATH} \
    ${INPUT_IMG} \
    --work-dir ${WORK_DIR} \
    --device ${DEVICE} \
    --log-level INFO