MMDetection MMSeg Kits Guide
Modular OpenMMLab toolboxes where configs snap backbones, necks and heads together for detection and segmentation.
Why Does This Exist?
Detection and segmentation papers each ship bespoke code, so rerunning a baseline means archaeology. The OpenMMLab toolboxes fix the interfaces: backbones, necks, heads, losses and schedulers as registered parts, with configs composing them and a model zoo pinning weights. MMDetection covers boxes, MMSegmentation covers masks, and both report with shared evaluators so object detection and semantic segmentation numbers compare. Scoring follows mAP practice.
This page covers the snap-together contract, one precision-recall fixture, and appropriate use. Docs line 3.x was the current major verified in-session.
Think of It Like This
A stereo rack with standard plugs
Amplifiers, tuners and speakers from many brands share the same plugs and rack width. You swap one shelf without rewiring the room, and the manual lists every compatible unit.
These toolboxes are the rack. Configs are the shelf order, the registry is the plug standard. The analogy stops at sound: mismatched stereo parts still play quietly, while mismatched detector parts fail loudly at shape time.
How It Actually Works
Input is a config naming dataset, model parts, optimizer and schedule. Output is checkpoints plus predictions in standard formats for boxes or masks. Purpose is comparable research baselines with one training entry point. Appropriate use is benchmarking many detectors or segmenters on shared data. Version pairing matters: configs, weights and the installed toolbox release must match, because registries rename parts across majors.
Toy scoring fixture
Take 24 true objects. The detector returns 20 boxes and 18 match truth. Precision is and recall is . High precision with lower recall names the failure: mostly misses rather than false alarms, the same split the diagram labels.
Code
Precision and recall from three counts:
def pr_counts(matched: int, returned: int, total: int) -> tuple[float, float]: prec = matched / max(returned, 1) # of returned, how much was right rec = matched / max(total, 1) # of existing, how much was found return round(prec, 3), round(rec, 3)
print(pr_counts(18, 20, 24)) # -> (0.9, 0.75)0.9 precision with 0.75 recall points at misses first.
Watch Out For
Mixing configs and weights across major versions
A 2.x config on a 3.x install loads until the registry lookup fails mid-run, or worse, trains with a silently substituted head. The symptom is hours lost to shape errors or shifted numbers. Fix it by pinning config, checkpoint and toolbox release together in one locked environment.
The Quick Version
- MMDetection and MMSegmentation compose registered parts into detectors and segmenters by config.
- Toy 18 matched of 20 returned with 24 total gives 0.9 precision and 0.75 recall.
- The gap names misses as the failure, not false alarms.
- Use them for comparable baselines on shared benchmarks.
- Pin config, weights and toolbox release together always.