OpenMMLab object-detection toolbox · config-driven, PyTorch · verified against MMDetection 3.3

MMDetection cheat sheet

MMDetection (mmdet) is OpenMMLab's PyTorch detection toolbox: a huge model zoo (Faster/Mask R-CNN, RetinaNet, YOLOX, RTMDet, DINO…) behind a single config-driven workflow. You don't write training loops — you compose a Python config and run tools/train.py; MMEngine's Runner does the rest. The 3.x line is built on MMEngine + MMCV 2.x. This sheet targets MMDetection 3.3. (Distinct from Meta's detectron2 — different framework, config style, and model zoo.)

setup & config inference train & test datasets runtime & deploy gotcha most common

Verified 2026-08-24 against the official docs at mmdetection.readthedocs.io (v3.3.0) and the open-mmlab/mmdetection repo. Built on MMEngine + MMCV 2.x; PyTorch 2.0+ & torch.compile supported. Note: 3.3.0 (Jan 2024) is the current release and the project is in low-activity maintenance — verify wheel compatibility with your PyTorch/CUDA.

Outline

Install via mim, run a pretrained model with DetInferencer, then it's all configs: point one at your data, tools/train.py, tools/test.py. MMEngine runs the loop.

Set up & infer

  1. 1 · Install (mim)
  2. 2 · Inference
  3. 3 · The config system

Train & customize

  1. 4 · Train & test CLI
  2. 5 · Custom dataset
  3. 6 · Model zoo

Runtime & ship

  1. 7 · MMEngine runtime
  2. 8 · Deploy & export
  3. 9 · Gotchas
  4. Worth memorizing

Set up & infer

Install the OpenMMLab stack and run a pretrained detector.

1Install (mim)3.3
2Inferencerun a pretrained model
3The config systemeverything is a config

Train & customize

Run training/testing and point the model at your own data.

4Train & test CLItools/
5Custom datasetCOCO is the easy path
6Model zoowhat to pick

Runtime & ship

Tune the training loop, then export for production.

7MMEngine runtimethe Runner drives it
8Deploy & exportMMDeploy
!Common gotchasread before shipping

Worth memorizing

pip install -U openmimthen mim install mmengine mmcv mmdet
use mim, not pip, for mmcvwheel must match torch + CUDA
DetInferencer("model_name")(img)high-level inference, auto weights
init_detector + inference_detectorlow-level; result.pred_instances
_base_ = "config.py"inherit + deep-merge overrides
model = dict(bbox_head=dict(num_classes=N))set your class count in every head
tools/train.py cfg --work-dir--amp, --resume; dist_train.sh N
tools/test.py cfg ckpt --outCOCO mAP; --show-dir to visualize
COCO JSON + metainfo.classeseasiest custom-dataset path
RTMDet / DINO / Mask R-CNNfast / transformer SoTA / instance seg
MMEngine Runner + hooksno training loop; declarative config
MMDeploy -> ONNX/TensorRTor torch.compile for a quick win