mmdeploy/demo
lvhan028 e10a1b7c9e
Add more demos (#305)
* add more examples

* change to restore's output image to BGR

* use BUILD_SHARED_LIBS

* update graph module's cmake

* add condition for spdlog package

* change cmakelists

* update cmakelists

* add device_name in each demo

* remove duplicate cmake function

* use palette to draw segmentation's result

* no need to find_package(pplnn) when use MMDeploy's static libs

* remove MMDeploy_LIBS' dependency on spdlog

* #include <opencv2/imgproc/imgproc.hpp>

* change from mmdeploy_core to mmdeploy::core
2021-12-21 21:32:39 +08:00
..
csrc Add more demos (#305) 2021-12-21 21:32:39 +08:00
resources add a demo for rewrite (#145) 2021-10-27 11:06:42 +08:00
README.md add a demo for rewrite (#145) 2021-10-27 11:06:42 +08:00
demo_rewrite.py add a demo for rewrite (#145) 2021-10-27 11:06:42 +08:00

README.md

Demo

We provide a demo showing what our mmdeploy can do for general model deployment.

In demo_rewrite.py, a resnet18 model from torchvision is rewritten through mmdeploy tool. In our rewritten model, the forward function of resnet gets modified to only down sample the original input to 4x. Original onnx model of resnet18 and its rewritten are visualized through netron.

Prerequisite

Before we run demp_rewrite.py, we need to install pyppeteer through:

pip install pyppeteer

Demo results

The original resnet18 model and its modified one are visualized as follows. The left model is the original resnet18 while the right model is exported after rewritten.

Original resnet18 Rewritten model