NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SOLQ: Segmenting Objects by Learning Queries

Bin Dong, Fangao Zeng, Tiancai Wang, Xiangyu Zhang, Yichen Wei

TL;DR

SOLQ (Segmenting Objects by Learning Queries) transforms instance segmentation into a unified vector regression problem built on DETR. By using Discrete Cosine Transform (DCT) to compress 2D spatial masks into compact 1D vector embeddings, SOLQ enables object queries to simultaneously predict category, bounding box, and mask vectors in parallel without RoI cropping or Non-Maximum Suppression (NMS). This joint query representation not only delivers state-of-the-art mask prediction but also boosts the baseline detector's box accuracy by up to 2.3% AP.

What Problem Does This Paper Address?

Traditional instance segmentation models typically rely on a "detect-then-segment" pipeline (like Mask R-CNN), which crops regional feature maps using predicted bounding boxes (RoIAlign) and passes them to convolutional mask heads. While effective, this creates a tight coupling where segmentation depends heavily on detection accuracy, hindering true joint multi-task learning.

Modern end-to-end set prediction models like DETR eliminate hand-crafted operations like NMS, but extending DETR to instance segmentation has been awkward: prior attempts reshaped query embeddings back into spatial feature maps with multi-head attention and heavy FPN-style CNN decoders. This separate query formulation loses the elegance of unified 1D query embeddings, incurs high computation, and often requires training detection and segmentation stages separately. SOLQ asks: Can an object query predict an instance mask directly as a vector, just like it predicts classes and bounding boxes?

Methods

SOLQ builds upon Deformable DETR and introduces the Unified Query Representation (UQR):

  • Vector-Form Mask Prediction: In SOLQ, each learned object query produces three parallel sub-task predictions from multi-layer perceptrons (MLPs): class confidences, normalized bounding box coordinates, and a fixed-length 1D mask vector ($\hat{v} \in \mathbb{R}^{n_k}$, with $n_k = 256$).
  • Mask Compression Coding: To train the mask branch via standard regression, ground-truth binary masks ($128 \times 128$) are converted into 1D frequency-domain vectors using the Discrete Cosine Transform (DCT). At inference time, the predicted mask vector is mapped back to a full 2D spatial mask via 2D inverse DCT. Unlike Sparse Coding or PCA, DCT requires no offline dataset-wide dictionary learning and preserves spatial structure with minimal reconstruction loss.
  • Loss and Bipartite Matching: The training loss combines focal classification loss, L1 box loss, GIoU loss, and an L1 mask vector loss ($\mathcal{L}_{vec}$). Crucially, mask loss is omitted from the bipartite matching cost to keep Hungarian matching stable.
  • Deep Supervision: Auxiliary mask losses are applied across all Transformer decoder layers, which significantly accelerates convergence and improves feature representations.

Datasets

  • MS COCO 2017: Evaluated on standard splits (115k training images, 5k validation images, and 20k test-dev images) across 80 object categories. Standard COCO metrics ($AP^{seg}$ and $AP^{box}$, split into small, medium, and large scales) were reported.
  • No new benchmarks were introduced.

Key Insights and Ideas

  • Mask Prediction as Vector Regression: Mask segmentation does not require 2D convolutional decoders or RoI pooling. Compressing masks into frequency space allows pure regression heads to handle segmentation seamlessly alongside classification and localization.
  • True Multi-Task Synergy: In traditional two-stage networks or DETR with separate spatial mask decoders (SQR), adding mask supervision yields negligible detection gains (+0.1% to +1.1% box AP). In contrast, SOLQ’s unified query representation improves detection by +2.0% to +2.3% $AP^{box}$, demonstrating that sharing query embeddings across all three tasks forces the model to learn richer, instance-aware representations.
  • Superiority on Small Objects: While anchor-free single-stage methods like SOLOv2 supervise masks at downsampled resolutions (e.g., $1/4$ scale) and struggle with small items, SOLQ encodes $128 \times 128$ masks into DCT vectors, outperforming SOLOv2 on small objects ($AP^{seg}_S$) by 5.2%.

Key Results

  • COCO 2017 test-dev:
  • ResNet-50: Achieves 39.7% $AP^{seg}$ and 47.8% $AP^{box}$, outperforming Mask R-CNN (37.5% mask / 41.3% box) and SOLOv2 (38.8% mask / 40.4% box).
  • ResNet-101: Achieves 40.9% $AP^{seg}$ and 48.7% $AP^{box}$, surpassing Cascade Mask R-CNN (40.0% mask / 46.2% box) and SOLOv2 (39.7% mask / 42.6% box).
  • Swin-L Backbone: Achieves 46.7% $AP^{seg}$ and 56.5% $AP^{box}$.
  • UQR vs. SQR (ResNet-50 on COCO val): UQR achieves 39.5% $AP^{seg}$ and 47.8% $AP^{box}$, drastically beating DETR's spatial FPN-style mask branch (SQR) which reached only 32.2% $AP^{seg}$ and 45.6% $AP^{box}$.

Limitations and Future Work

  • Heavily Occluded Scenes: The authors observe qualitative failure modes in cluttered or heavily occluded environments, where overlapping objects can distort the reconstructed DCT mask shapes.
  • Dimension vs. Optimization Trade-off: While higher mask vector dimensions ($n_k$) theoretically allow reconstructing sharper mask boundaries, expanding vector size too much (e.g., $n_k \ge 300$) enlarges the regression search space and degrades gradient optimization, causing mask quality to drop.

Summary updated

BibTeX
@inproceedings{dong2021solq,
  author = {Bin Dong and Fangao Zeng and Tiancai Wang and Xiangyu Zhang and Yichen Wei},
  title = {{SOLQ: Segmenting Objects by Learning Queries}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=TEUkWGGDRy},
}
Figure