MMSegmentation brings semantic segmentation models to your labels

MMSegmentation is OpenMMLab's open-source semantic segmentation toolbox. In Supervisely you train its models on polygons and bitmap masks, from SegFormer and DeepLabV3+ to UPerNet on a Swin backbone, follow IoU and Dice charts while they train, and serve them to label every pixel of new images.

The Train MMSegmentation dashboard with loss, IoU and Dice charts
Publisher
OpenMMLab
Labels
  • Polygons
  • Bitmaps
Apps
Train, Serve

Apps in the Supervisely Ecosystem

Every model in Supervisely comes as a Supervisely App: a module from the Ecosystem that plugs into the platform and runs on your own GPU, with no code to install. A Serve App puts the model behind the labeling tools, and where the model can be trained, a Train App fits it to your labeled project. All Apps work on the same projects, so you add a model, update it or swap it for another without changing anything else.

Every pixel gets a class

MMSegmentation is an open-source semantic segmentation toolbox on PyTorch. A semantic segmentation model assigns a class to each pixel, road, sky, crack or tumor, without separating one object of a class from the next. That suits surfaces and regions better than countable things.

The Train MMSegmentation app supports the semantic segmentation models of the toolbox, combining methods and backbones:

KindExamples in the app
MethodsFCN, PSPNet, DeepLabV3 and DeepLabV3+, UPerNet, OCRNet, PointRend, BiSeNetV1 and V2, STDC, SETR, Segmenter, SegFormer, K-Net, UNet
BackbonesResNet, ResNeXt, HRNet, ResNeSt, MobileNetV2 and V3, Vision Transformer, Swin Transformer, Twins, BEiT, ConvNeXt

Labeling for semantic segmentation

The app reads both polygons and bitmap masks and trains only on projects labeled with them; boxes and points are not used. Two habits make the masks worth training on:

  • Label every region of the classes you train, not only the obvious ones, because unlabeled pixels teach the model that a region is background.
  • Where classes touch, let their outlines share one border. The polygon tools of the image labeling toolbox keep shared borders without gaps or overlaps.

Masks you already have come in as PNG masks with a class-to-color map, or as Cityscapes polygons; PNG masks to Supervisely JSON describes the import step by step.

In the training dashboard

Add the app to your team and run it from the project's context menu. You define the train and validation split, select the classes, set the augmentations, choose a pretrained model and tune the hyperparameters, then follow the metrics charts as it trains. Training artifacts go to Team Files. Like the MMDetection apps, the result is a regular MMSegmentation config and .pth file that loads in the toolbox outside the platform.

Served on a project with ground truth, the model can be evaluated like any other: for semantic segmentation the evaluation report measures pixel accuracy, IoU and boundary IoU and splits the errors into boundary, extent and segment errors. The Dice coefficient is the other overlap score you will meet in papers.

Serving and alternatives

Serve MMSegmentation deploys a pretrained or custom model on a GPU and predicts on a full image or a region of interest.

For a lighter baseline with fewer choices, UNet trains in its own app. If you need to tell apart neighboring objects of one class, cars in a parking lot rather than "car" pixels, switch to instance segmentation with Detectron2 or MMDetection.

Frequently asked questions.

Can MMSegmentation train on bounding boxes?

No. The app trains on polygons and bitmap masks only, since a semantic segmentation model learns which pixels belong to each class. Turn boxes into masks first, for example with the Smart Tool, or train a detector instead.

Can I use the trained model without Supervisely?

Yes. Download the config file and the `.pth` weights from Team Files and load them in MMSegmentation; the app repository has a notebook that shows how.

What is MMSegmentation?

MMSegmentation is OpenMMLab's open-source toolbox for semantic segmentation, with methods such as SegFormer, DeepLabV3+, UPerNet and PSPNet. In Supervisely you train them on polygon and mask labels and serve the result to label every pixel of new images.

Train and serve models on your own data.

Label a project in a free account, train a model on it from the browser and deploy it on your own GPU. Or book a demo to run Supervisely on your servers.