mmdeploy/demo
lvhan028 c3986cebe8
bump version to v0.12.0 (#1594)
2022-12-30 16:17:37 +08:00
..
csharp bump version to v0.12.0 (#1594) 2022-12-30 16:17:37 +08:00
csrc [Enhancement] Optimize pose tracker (#1460) 2022-12-29 19:12:55 +08:00
java Add java apis and demos (#563) 2022-06-29 11:02:08 +08:00
python Support mmaction master (#1183) 2022-11-04 14:15:36 +08:00
resources add more images for demos and user guides (#1339) 2022-11-09 21:06:32 +08:00
tutorials 【Docs】Add ipython notebook tutorial (#234) 2022-04-27 20:04:56 +08:00
README.md [Docs] Replace markdownlint with mdformat and configure myst-parser (#610) 2022-06-17 09:19:10 +08:00
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