Supported OpenMMLab codebases
mainMMDeploy provides a unified deployment experience for a wide range of OpenMMLab algorithm libraries, including:
mmpretrainmmdetmmsegmmagicmmocrmmposemmdet3dmmrotatemmaction2
repository·main·Indexed 25 days ago
https://github.com/open-mmlab/mmdeployAn open-source deep learning model deployment toolset within the OpenMMLab ecosystem. MMDeploy enables efficient deployment of models across various hardware platforms and inference backends, including TensorRT and ONNXRuntime. It provides SDKs and APIs for C/C++, C# (via NuGet), and Java, along with guides for model conversion, configuration, profiling, quantization, and extending backend support.
MMDeploy provides a unified deployment experience for a wide range of OpenMMLab algorithm libraries, including:
mmpretrainmmdetmmsegmmagicmmocrmmposemmdet3dmmrotatemmaction2MMDeploy provides a comprehensive set of guides for model deployment. The documentation is organized into several key areas:
ncnn, onnxruntime, and tensorrt.MMDeploy is divided into two primary functional parts: Model Conversion and the SDK.
tools/, mmdeploy/, and parts of csrc/.csrc/, third_party/, and demo/.Key directories:
configs/: Algorithm library configurations for model conversion.csrc/: Source code for the SDK and custom operators.demo/: FFI interface application examples (C#, Java, Python, etc.).mmdeploy/: Python package used for model conversion.service/: Server implementations for Client/Server mode (used when target frameworks like SNPE do not support Python).tools/: Entry points for all functionalities, including deploy.py, onnx2xx.py, profiler.py, and test.py.MMDeploy integrates TVM into both its model conversion tools and its SDK. The following TVM features are supported:
When deploying deep learning models, developers typically encounter three main categories of difficulties:
Model deployment is the process of running a trained model in a specific environment, addressing issues like framework incompatibility and slow execution speeds. The standard deployment pipeline follows this flow:
Key concepts:
The MMDeploy SDK is highly customizable and allows developers to control three main stages of the inference pipeline:
MMDeploy facilitates the deployment of OpenMMLab algorithms through a three-stage pipeline:
ONNX models are stored using Protobuf (Protocol Buffers), a serialization mechanism by Google. The .onnx file is a binary instance of the data definitions (Protobuf files) that specify the types for models, nodes, and tensors.
An ONNX model is structured as a computational graph where:
graph.ModelProto, it defines the computational structure, including inputs, outputs, and nodes.op_type), and the names of its input and output tensors.MMDeploy is divided into two independent parts: Model Conversion and the SDK.
tools, mmdeploy (Python package), and parts of csrc. It is used to rewrite model code (e.g., forward methods) and convert models to specific inference backends (like ncnn or TensorRT).csrc, third_party, and demo. It is a C++ based framework designed to execute converted models on various platforms, providing abstractions for preprocessing, inference, and postprocessing, along with FFI (Foreign Function Interface) for multiple languages.