mmdeploy/demo
Chen Xin ccc21289d1
[Feature] Sync mmaction2-sdk(master) to dev1.x (#1307)
* sync mmaction sdk

* pipeline.json

* fix docs

* replace topk when make regression for mmaction2

* add python api

* add missing file

* add missing test file

* remove cudnn dep for formatshape

* add sample arg for input
2022-11-10 15:13:24 +08:00
..
csharp
csrc [Feature] Sync mmaction2-sdk(master) to dev1.x (#1307) 2022-11-10 15:13:24 +08:00
java Sync v0.7.0 to dev-1.x (#907) 2022-08-19 09:30:13 +08:00
python [Feature] Sync mmaction2-sdk(master) to dev1.x (#1307) 2022-11-10 15:13:24 +08:00
resources update doc about codebase deployment (#1051) 2022-09-24 18:05:24 +08:00
tutorials
README.md
demo_rewrite.py

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