mmdeploy/demo
q.yao 3f261e6d50
[Refactor] Refactor rewriter context for MMRazor (#1483)
* wip

* update rewriter

* Support all codebase

* update docs

* fix ssd

* rename qualname

* support torch.fx.wrap

* import by torch version

Co-authored-by: pppppM <gjf_mail@126.com>
2022-12-13 19:03:56 +08:00
..
csharp
csrc cherry-pick: Decouple preprocess operation and transformation (#1353) 2022-12-08 14:49:12 +08:00
java
python [Enhancement] MMRotate 1.x support (#1401) 2022-12-12 19:27:03 +08:00
resources update doc about codebase deployment (#1051) 2022-09-24 18:05:24 +08:00
tutorials [Enhancement]: add md link check github action (#1320) 2022-12-08 16:13:51 +08:00
README.md
demo_rewrite.py [Refactor] Refactor rewriter context for MMRazor (#1483) 2022-12-13 19:03:56 +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