How to Get Started Deploying a Model with MMDeploy

Updated

To deploy a model with MMDeploy, follow the workflow laid out in the official 1.3.1 documentation: check prerequisites and install MMDeploy, convert your OpenMMLab model to a deployable format, then run inference and evaluate the converted model. The docs organize these as Get Started (Introduction, Prerequisites, Installation, Convert Model, Inference Model, Evaluate Model), followed by Build, Run & Test, and per-codebase and per-backend guides. The exact commands depend on your model codebase (MMDetection, MMSegmentation, MMPose, etc.) and target backend (TensorRT, ONNX Runtime, ncnn, OpenVINO, PPLNN, SNPE, RKNN, TVM, Core ML, TorchScript), so use the matching pages rather than a single universal recipe.

1. Confirm prerequisites and install

Start with the Get Started → Prerequisites and Installation pages in the documentation. These are the authoritative source for supported environments and install methods; the docs also offer a language switch (English/简体中文) in the lower-left corner of the layout if you prefer the Chinese version.

If you need to build from source rather than use a prebuilt setup, the Build section covers:

  • Build from Source
  • Use Docker Image
  • Build from Script
  • CMake Build Option Spec

Choose the build path that matches your environment (native build, Docker, or script-driven build), and consult the CMake option spec when you need to tune the build.

2. Convert your model

The core step is Get Started → Convert Model, supported by the how-to page How to convert model and How to write config. In practice you will:

  1. Select the deployment config for your model and target backend.
  2. Run the conversion tool described in the docs to produce the deployable artifact (for example an ONNX model, and backend-specific engines where applicable).
  3. Check the output against the expected files described on the conversion page.

Model-specific deployment guides exist for each supported codebase, so use the one that matches your model:

Codebase Deployment guide
MMPretrain MMPretrain Deployment
MMDetection MMDetection Deployment
MMSegmentation MMSegmentation Deployment
MMagic MMagic Deployment
MMOCR MMOCR Deployment
MMPose MMPose Deployment
MMDetection3d MMDetection3d Deployment
MMRotate MMRotate Deployment
MMAction2 MMAction2 Deployment

3. Run inference and evaluate

After conversion, use Get Started → Inference Model and Evaluate Model, plus the how-to How to evaluate model. These pages describe how to run the converted model and how to check that its results are consistent with expectations. For performance and accuracy checks, the docs also provide Benchmark, Quantization test result, and Test on embedded device / Test on TVM pages, and a Quantize model guide if you intend to quantize.

4. Match your backend

Backend behavior differs, so read the page for your target backend before committing to a pipeline. The documentation lists:

  • ncnn (supported feature list) and ONNX Runtime (including ONNX Runtime Ops)
  • OpenVINO, PPLNN, SNPE (feature support), TensorRT (including TensorRT Ops), TorchScript
  • RKNN (feature), TVM (feature support), Core ML (feature)

Custom operators are documented separately under Custom Ops (ONNX Runtime Ops, TensorRT Ops, ncnn Ops), which matters when a model contains ops that a backend does not natively support.

5. Use the SDK and tools when deploying to an application

For integration beyond the Python workflow, see Useful Tools → SDK Usage and SDK Documentation. The API Reference covers apis, apis/tensorrt, apis/onnxruntime, apis/ncnn, and apis/pplnn.

Common sticking points

  • Wrong guide for your model or backend. Conversion and inference steps are documented per codebase and per backend; mixing pages is the most common source of confusion.
  • Unsupported operators. Check the backend feature pages and the Custom Ops section before assuming a model will convert cleanly.
  • Build configuration. If a source build fails, revisit CMake Build Option Spec and the build-from-script instructions rather than guessing flags.
  • Regression checking. The Developer Guide includes How to do regression test and How to test rewritten models, useful when you modify the pipeline.

For anything not covered above, the documentation's FAQ page and the index/search are the intended next stops.