SparseInst segments instances in real time without NMS
SparseInst is a fully convolutional real-time instance segmentation model that represents each object with an instance activation map instead of a box or a center, so it needs no non-maximum suppression. In Supervisely you train it on your own polygons and masks from COCO checkpoints and serve it in PyTorch, ONNX Runtime or TensorRT.

- 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.
Instance activation maps instead of boxes
SparseInst was introduced in "Sparse Instance Activation for Real-Time Instance Segmentation" by Tianheng Cheng, Xinggang Wang and co-authors at CVPR 2022 (code). Most instance segmentation methods lean on a detector and predict each mask from a box or a dense set of centers. SparseInst instead predicts a small, sparse set of instance activation maps, each highlighting the informative region of one object, and gathers the features under that region to classify and segment the object.
Training matches each map to one object by bipartite matching, so the model predicts objects one-to-one and needs no non-maximum suppression after inference. With no boxes, anchors or sorting in the way, the network stays fully convolutional and simple to deploy. The authors report 37.9 AP at 40 FPS on COCO with a 608-pixel input on an NVIDIA 2080Ti.
Five COCO checkpoints to start from
Both apps list five checkpoints trained on COCO train2017. G-IAM is the Group IAM version of the activation maps; DCN marks deformable convolutions in the backbone, and PVTv2-B2-li is a vision transformer backbone.
| Checkpoint | Input | COCO AP | FPS | ONNX and TensorRT |
|---|---|---|---|---|
| SparseInst (G-IAM) R-50 | 608 | 34.0 | 44.6 | Yes |
| SparseInst R-50-vd | 640 | 34.5 | 42.6 | Yes |
| SparseInst (G-IAM) R-50-DCN | 608 | 36.8 | 41.6 | No |
| SparseInst (G-IAM) R-50-vd-DCN | 640 | 38.1 | 39.3 | No |
| SparseInst (G-IAM) PVTv2-B2-li | 640 | 38.2 | 26.5 | No |
Figures from the official repository: mask AP on COCO test-dev2017, speed in PyTorch on one NVIDIA 2080Ti, and input as the shorter image side, with the longer side at most 864 pixels. The last column is what the apps' model list says about ONNX and TensorRT; the faster ResNet-50 checkpoints are the ones to pick when the model has to run in TensorRT.
Training on your classes
Label each object with a polygon or a bitmap mask; the app turns every label into a mask with its box, so a box alone does not teach the outline. Then run Train SparseInst from the project's context menu or from the Ecosystem, on an agent with a GPU:
- Use the cached project or download it again.
- Split it into train and validation, at random, by tags, by datasets or by collections.
- Choose the classes.
- Pick one of the five checkpoints, or a model you trained before.
- Set the hyperparameters, keep the model evaluation on and choose whether to convert the result to ONNX and TensorRT.
- Name the experiment, start it and follow its progress.
The hyperparameters are detectron2 solver settings: 5,000 iterations, a batch of 16 and the AdamW optimizer by default, with learning rate decay, checkpoint and evaluation intervals and optional FP16 training. With evaluation on, the run ends with an evaluation report of the trained model.
Serving and pre-labeling
Serve SparseInst deploys a pretrained checkpoint or one trained in Supervisely as a REST API service on a GPU. It runs the model in PyTorch, ONNX Runtime or TensorRT, returns a bitmap mask per object above the confidence threshold (0.5 by default) and can infer in FP16. Once it runs, Apply NN to Images Project pre-labels a whole project and NN Image Labeling adds masks to the image an annotator has open.
SparseInst or another instance segmentation model?
| You need | Use |
|---|---|
| Fast masks of your own classes, without NMS, exported to TensorRT | SparseInst |
| Fast masks plus detection or pose models from the same app, in many sizes | Ultralytics YOLO |
| Mask R-CNN that also serves on a CPU | Detectron2 |
| Many architectures, Cascade Mask R-CNN among them | MMDetection |
| Detailed masks of the 80 COCO classes with no training | Transfiner |
| A class for every pixel, not separate objects | STDC-Seg or MMSegmentation |
Training two of them on the same split and comparing their reports is the fair way to choose. Existing instance labels import from COCO, which stores them as polygons or RLE masks.
Frequently asked questions.
What is SparseInst?
SparseInst is a real-time instance segmentation model from CVPR 2022. It finds objects through a sparse set of instance activation maps instead of boxes or centers and matches them to objects one-to-one, so it needs no non-maximum suppression. The authors report 37.9 AP at 40 FPS on COCO.
SparseInst or YOLO for instance segmentation?
Both are real-time and both export to ONNX and TensorRT in Supervisely. SparseInst predicts masks without NMS from five COCO checkpoints; Ultralytics YOLO offers more model sizes and also covers detection and pose. Train both on the same split and compare the evaluation reports.
Do the SparseInst apps need a GPU?
Yes. Both Train SparseInst and Serve SparseInst require a GPU, according to their app configuration.
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.



