SOLOv2

SOLOv2 is a box-free instance segmentation architecture that refines the original SOLO (“Segmenting Objects by LOcations”) formulation, which reduces instance segmentation to two per-pixel classification subtasks solvable by a plain FCN.

  • Paper: Xinlong Wang, Rufeng Zhang, Tao Kong, Lei Li and Chunhua Shen, SOLOv2: Dynamic and Fast Instance Segmentation, NeurIPS 2020, arXiv:2003.10152.
  • Dynamic convolution: replaces SOLO’s memory-heavy dense mask tensor with a mask kernel branch and a mask feature branch, combined by convolution at inference time.
  • Matrix NMS: a new NMS that makes mask NMS parallel rather than sequential.
  • Headline result: Res-50-FPN SOLOv2 reaches 38.8% mask AP at 18 FPS on COCO test-dev, outperforming SOLO by 1.9 AP while being 33% faster.
  • Box byproduct: the bounding box of the predicted mask, with no detection training at all, reaches 44.9 box AP, ahead of many purpose-built detectors.

Core idea: segment objects by grid location

SOLO’s original insight, which SOLOv2 keeps: an instance can be identified purely by which grid cell its center falls into, with no anchor boxes, no region proposals, and no embedding-based grouping. The input image is conceptually divided into an grid; if an object’s center lands in cell , that cell is responsible for predicting a binary mask for that entire object. This gives possible instance “slots” per FPN level, output as an -channel mask tensor , where channel contains the mask for whichever instance (if any) is centered in cell :

where is a single level of backbone/FPN features and is, in the original SOLO, simply the corresponding slice of a normal convolution’s learned, static weight tensor — i.e. the final layer of an ordinary FCN, with output channels standing in for per-location mask predictors.

Why SOLO needed fixing

Three bottlenecks in this direct formulation motivate SOLOv2:

  1. Inefficient mask representation. Outputting the full tensor is expensive in both memory and compute, and — because differs per FPN level — the final layer producing it cannot be shared across levels, which wastes training signal. Most of is empty on any given image anyway (objects are sparse), so densely predicting and storing all channels is wasteful redundancy.
  2. Inaccurate mask predictions. Finer boundary detail needs higher mask resolution, which further inflates the cost of a dense -channel output.
  3. Slow mask NMS. Computing pairwise mask IoU for standard sequential NMS is much more expensive for masks than for boxes, and the sequential dependency is the same latency bottleneck YOLACT’s Fast NMS also targets.

Dynamic convolution: decoupling kernel and feature

SOLO (top) vs. SOLOv2 (bottom): SOLOv2 splits mask generation into a kernel branch predicting per-grid-cell dynamic kernels G, and a feature branch producing a shared mask feature map F, convolved together at inference
Fig. 2 (paper): SOLO’s single static final conv layer (top) is replaced by two decoupled branches (bottom) — a kernel branch predicting dynamic convolution kernels , and a feature branch producing one shared mask feature map — convolved together () only for the grid cells that actually contain an instance.

SOLOv2’s central change: separate what SOLO’s single conv layer conflated. Instead of one static layer whose weights double as “the mask predictor,” predict the convolution kernel and the feature map it will be convolved with as two independent outputs of two branches, then perform the convolution only at inference/training time, for however many grid cells actually contain an object center:

Mask kernel branch

Given a backbone+FPN feature map, resized to (via CoordConv — concatenating two extra channels of pixel coordinates normalized to , which the paper finds important for location-conditioned prediction), four convs followed by a final conv produce the kernel tensor . is the number of parameters of the dynamic conv kernel each grid cell predicts: for a dynamic conv, for (the paper finds performs equivalently to and uses it by default with input channels). No activation function is applied to ‘s output — these are raw convolution weights, generated fresh per image, per grid cell, conditioned on that cell’s local features.

Mask feature branch

Rather than predicting mask features per-FPN-level as SOLO effectively did, SOLOv2 predicts one unified, high-resolution mask feature representation shared across the whole image: each FPN level – is processed by repeated conv + group norm + ReLU + bilinear upsample stages (with ‘s deepest level additionally fed normalized pixel coordinates before its convolutions, matching the kernel branch’s positional conditioning), fused by element-wise sum into a single output at input resolution, followed by one more conv + group norm + ReLU. An ablation confirms the unified representation beats predicting mask features separately per level, especially for medium/large objects — in the separate scheme, large objects get assigned to low-resolution feature-pyramid levels, giving them coarser boundary prediction than they need.

Forming the mask and Matrix NMS

For each grid cell with a high enough classification confidence, its predicted kernel is convolved with the shared feature map to produce that instance’s mask — the dynamic part of “dynamic convolution”: the kernel is generated per-image and per-location rather than being a fixed, learned weight. This decoupling means the kernel branch only has to output values (small) instead of the full dense mask tensor, and the convolution itself is only ever computed for grid cells that survive a confidence threshold (0.1) — most of the locations are skipped entirely at inference.

Matrix NMS replaces the sequential IoU-then-remove loop of standard/soft-NMS with a parallel formulation motivated by Soft-NMS’s score-decay idea. For a prediction , its suppression is modeled as depending on (a) the confidence penalty from any higher-scoring prediction that overlaps it, and (b) the probability that itself would already have been suppressed by something even higher-scoring — approximated by that most-overlapped higher-scoring prediction’s own decay:

with the updated score, and either linear () or gaussian (). Because both the pairwise IoU matrix and these column-wise min/max reductions are ordinary matrix operations, Matrix NMS needs no recursion and no sequential score sorting loop — it processes 500 masks in under 1 ms in plain Python, 9× faster than the paper’s own traditional-NMS baseline and 0.4 AP better than YOLACT’s Fast NMS.

Loss

is Focal Loss for the per-grid-cell semantic category classification (does this cell contain an instance center, and of which class); is Dice Loss on the assembled mask, following SOLO.

Hyperparameters

  • Training: synchronous SGD, 8 GPUs, 16 images/batch total, 36 epochs (3×) by default, initial LR 0.01 divided by 10 at epochs 27 and 33; scale jitter with the shorter image side sampled from .
  • Kernel shape: conv, 256 input channels (found stable beyond 256; equivalent to ).
  • Mask feature branch: fuses –, unified representation, final output at resolution.
  • Real-time variants: speed-priority (2 conv layers in the prediction head, 448px shorter side) at 46.5 FPS / 34.0 AP; accuracy-priority (3 conv layers, 512px shorter side, deformable conv in the backbone’s last layer) at 31.3 FPS / 37.1 AP — both trained with the 3× schedule and scale jitter from .
  • Matrix NMS: applied post-hoc on masks already thresholded at sigmoid 0.5; confidence pre-filter at 0.1 before ranking.

Results

Mask AP on COCO test-dev, single model:

MethodBackboneAPAPAPAPAPAP
Mask R-CNNResNet-101-FPN35.758.037.815.538.152.4
TensorMaskResNet-101-FPN37.159.339.417.439.151.6
YOLACTResNet-101-FPN31.250.632.812.133.347.1
BlendMaskResNet-101-FPN38.460.741.318.241.553.3
SOLOResNet-101-FPN37.859.540.416.440.654.2
SOLOv2ResNet-50-FPN38.859.941.716.541.756.2
SOLOv2ResNet-101-FPN39.760.742.917.342.957.4
SOLOv2ResNet-DCN-101-FPN41.763.245.118.045.061.6

The gap over Mask R-CNN is largest on large objects (AP: 56.2 vs. 52.4 for the ResNet-50 SOLOv2 vs. ResNet-101 Mask R-CNN) — direct evidence that Mask R-CNN’s RoI-relative, resolution-capped mask head loses detail on big objects that SOLOv2’s unified high-resolution mask-feature representation does not.

Detail comparison: SOLOv2 masks follow object boundaries more closely than Mask R-CNN's, whose 28×28 mask head resolution blurs fine structure
Fig. 1b (paper): Mask R-CNN’s mask head is capped at resolution before its output is resized back up, visibly blurring fine boundary detail (feather edges, fingers) that SOLOv2’s mask-feature-branch output preserves.

SOLOv2 also extends to object detection (44.9 box AP, computed by taking the bounding box of the predicted mask — no box-specific training at all) and panoptic segmentation (state of the art among box-free methods at the time, 42.1 PQ on COCO val2017 with a ResNet-50-FPN backbone), both without architectural changes to the core dynamic-segmentation mechanism.

Limitations

  • Grid resolution is a hard assignment. Like SOLO, an object is only ever assigned to the grid cell containing its center; two same-class instances whose centers collide in the same cell at the same FPN level are unrecoverable ambiguity by construction, though multi-scale FPN assignment (larger objects to coarser levels) makes this rare in practice.
  • Confidence-threshold pre-filtering (0.1) before Matrix NMS means the parallel formulation still depends on a reasonably well-calibrated per-cell classification score; Matrix NMS suppresses duplicates among survivors, but it does not fix a poorly calibrated category head.
  • Unlike YOLACT’s prototype dictionary (shared, fixed-size, reused identically for every image), SOLOv2’s mask feature map is still recomputed per image, and the dynamic kernel — while cheap to predict — still requires one convolution per surviving instance; the saving over Mask R-CNN is in not needing per-instance RoI feature re-extraction, not in avoiding per-instance computation altogether.

See also

  • Mask R-CNN — the RoI-based two-stage baseline SOLOv2 explicitly compares its mask detail against (Fig. 1b) and outperforms on large-object AP
  • YOLACT — the other prominent box-free-adjacent real-time head; both decouple mask generation into two components (SOLOv2: kernel + feature map; YOLACT: coefficients + prototypes) combined by a cheap operation, but YOLACT still crops to a predicted box while SOLOv2 has no box dependency at all
  • Segmentation Head Comparison — this head placed side by side with Mask R-CNN’s, YOLACT’s, DETR’s and Mask2Former’s
  • DETR — a contemporaneous move away from anchors/RPNs on the detection side, arriving at a different (set-prediction) solution to the same “stop depending on box proposals” motivation