Shortcuts

Introduction

MMEngine is a foundational library for training deep learning models based on PyTorch. It supports running on Linux, Windows, and macOS. It has the following three features:

  1. Universal and powerful executor:

    • Supports training different tasks with minimal code, such as training ImageNet with just 80 lines of code (original PyTorch examples require 400 lines).

    • Easily compatible with models from popular algorithm libraries like TIMM, TorchVision, and Detectron2.

  2. Open architecture with unified interfaces:

    • Handles different tasks with a unified API: you can implement a method once and apply it to all compatible models.

    • Supports various backend devices through a simple, high-level abstraction. Currently, MMEngine supports model training on Nvidia CUDA, Mac MPS, AMD, MLU, and other devices.

  3. Customizable training process:

    • Defines a highly modular training engine with “Lego”-like composability.

    • Offers a rich set of components and strategies.

    • Total control over the training process with different levels of APIs.

Architecture

openmmlab-2.0-arch

The above diagram illustrates the hierarchy of MMEngine in OpenMMLab 2.0. MMEngine implements a next-generation training architecture for the OpenMMLab algorithm library, providing a unified execution foundation for over 30 algorithm libraries within OpenMMLab. Its core components include the training engine, evaluation engine, and module management.

Module Introduction

MMEngine abstracts the components involved in the training process and their relationships. Components of the same type in different algorithm libraries share the same interface definition.

Common Base Modules

MMEngine also implements various common base modules required during the execution of algorithmic models, including:

  • Config: In the OpenMMLab algorithm library, users can configure the training, testing process, and related components by writing a configuration file (config).

  • Registry: Responsible for managing modules within the algorithm library that have similar functionality. Based on the abstraction of algorithm library modules, MMEngine defines a set of root registries. Registries within the algorithm library can inherit from these root registries, enabling cross-algorithm library module invocations and interactions. This allows for seamless integration and utilization of modules across different algorithms within the OpenMMLab framework.

  • File I/O: Provides a unified interface for file read/write operations in various modules, supporting multiple file backend systems and formats in a consistent manner, with extensibility.

  • Distributed Communication Primitives: Handles communication between different processes during distributed program execution. This interface abstracts the differences between distributed and non-distributed environments and automatically handles data devices and communication backends.

  • Other Utilities: There are also utility modules, such as ManagerMixin, which implements a way to create and access global variables. The base class for many globally accessible objects within the Runner is ManagerMixin.

Users can further read the tutorials to understand the advanced usage of these modules or refer to the design documents to understand their design principles and details.

Read the Docs v: stable
Versions
latest
stable
v0.10.2
v0.10.1
v0.10.0
v0.9.1
v0.9.0
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.