Registry / ai-ml / mmsegmentation

mmsegmentation

JSON →
library1.2.2pypypiunverified

MMSegmentation is an open-source semantic segmentation toolbox based on PyTorch, part of the OpenMMLab project. It provides a unified framework for training, testing, and deploying segmentation models, supporting a wide range of architectures (e.g., DeepLabV3+, PSPNet, U-Net) and datasets. Current version is 1.2.2 (Dec 2023), with a major v1.0.0 release marking a structural overhaul from v0.x. Release cadence is irregular, with minor patches every few months.

pip install mmsegmentation==1.2.2
INSTALL
IMPORT
SIG · MMSEGMENTATION
M
mmsegmentation
ai-mlpythonv1.2.2
Install
12.5s avg
Import
Disk
340MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 339.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 12.5s · import 0.000s · 327MB
340MB installed
● package 340MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MMSegInferencer
from mmseg.apis import MMSegInferencer
from mmseg.apis import MMSegInferencer

Perform semantic segmentation inference using the high-level inferencer API.

from mmseg.apis import MMSegInferencer import os # Initialize the inferencer with a pretrained model inferencer = MMSegInferencer( model='deeplabv3plus_r18-d8_4xb2-80k_cityscapes-512x1024', device='cuda' if os.environ.get('CUDA_VISIBLE_DEVICES') else 'cpu' ) # Run inference on an image result = inferencer('demo/demo.png') print(result['predictions'].shape)
mim --version
Debug
Known issues
breakingMMSegmentation v1.0.0 is a major rewrite from v0.x. Configs, APIs, and model definitions are not backward-compatible. Do not mix mmseg v1.x with mmcv<2.0.0.
fix
Migrate configs to the new format using mmseg's migration tools or rewrite for v1.x. Use mmcv>=2.0.0.
affects: >=1.0.0
gotchaThe 'inference_model' and 'init_model' functions are imported from 'mmseg.apis', not 'mmseg.models' or 'mmseg.core'. Common mistake leads to ImportError.
fix
Use 'from mmseg.apis import init_model, inference_model'.
affects: >=1.0.0
deprecatedThe 'mmseg.core' module is deprecated in v1.x. Functions like 'inference' and 'segmentation' were moved to mmseg.apis.
fix
Update imports to use mmseg.apis instead of mmseg.core.
affects: >=1.0.0
gotchaWhen using custom datasets, the class palette must be defined correctly in the config. Missing or misordered palette can cause silent mislabeling.
fix
Always define 'palette' in the dataset config and ensure it matches the order of classes in 'classes'.
affects: >=1.0.0
Upgrade
Version history
1.2.2latest on PyPI · released Dec 14, 2023
Audit
Dependencies
mmcvrequiredCore dependency; must match mmsegmentation version (mmcv>=2.0.0 for v1.x)
mmenginerequiredRequired for config and runner infrastructure in mmseg v1.x
Agent activity
9 hits · last 30 days
node
6
Resources
mmsegmentation — pip install mmsegmentation · libregistry