mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* fix sdk model's pipeline.json * resize INT64 mask * refactor unit tests * fix api in model.h * remove 'customs' from meta info * fix zip model * fix clang-format issue * put tc on each backend into a SECTION * change SECTION title * add DYNAMIC_SECTION for capi unit test * change 'devices' to 'device_names' * change trt to tensorrt * remove uncessary check * add color_type 'color_ignore_orientation' which is used in ocr * 'min_width', 'max_width' and 'backend' might be null in pipeline config * fix clang-format issue * remove useless code
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 |
---|---|
![]() |
![]() |