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

SOTR: Segmenting Objects with Transformers

Ruohao Guo, Dantong Niu, Liao Qu, Zhenbo Li · DOI

Abstract

Instance segmentation has traditionally been dominated by CNN-based "detect-then-segment" or "bottom-up" paradigms. While effective, these methods often struggle with global context and complex object boundaries. We present SOTR (Segmenting Objects with TRansformers), a novel box-free instance segmentation framework. By leveraging a "Twin Attention" mechanism that decomposes spatial attention into row and column components, SOTR efficiently captures global dependencies. Combined with a multi-level upsampling module and dynamic convolution kernels, SOTR produces high-quality masks, particularly for large and overlapping objects, achieving state-of-the-art performance on the MS COCO dataset.

Introduction

The task of instance segmentation requires both high-level semantic understanding and low-level spatial precision. Traditional top-down approaches like Mask R-CNN rely on bounding box detectors, which can be limited by the detector's accuracy and the restricted receptive field of CNNs. Conversely, bottom-up methods often involve complex post-processing. SOTR addresses these limitations by introducing a Transformer-based architecture that operates in a box-free manner, bridging the gap between the local feature extraction of CNNs and the global reasoning capabilities of Transformers.

Methodology

The SOTR architecture is composed of three primary modules: a CNN backbone with a Feature Pyramid Network (FPN), a Twin Transformer, and a Multi-level Upsampling module with a Dynamic Head.

Twin Transformer and Twin Attention

To mitigate the quadratic computational cost of standard self-attention, SOTR employs Twin Attention. This mechanism decomposes the attention process into sequential row and column operations, reducing complexity from $O((H \times W)^2)$ to $O(H \times W^2 + W \times H^2)$. This efficiency allows the model to process dense feature maps while maintaining a global receptive field.

Hybrid Twin Transformer

To better capture local textures and spatial correlations—areas where pure Transformers often struggle—the authors propose the Hybrid Twin Transformer. This variant integrates $3 \times 3$ convolutions into the attention layers, providing a beneficial inductive bias for visual data. This hybridization leads to a measurable performance boost over pure Transformer implementations.

The SOTR architecture overview, illustrating the flow from the CNN backbone through the Twin Transformer to the dynamic mask generation.

Multi-level Upsampling and Dynamic Head

Instead of utilizing a bounding box detector, the Transformer predicts category labels and dynamic convolution kernels. These kernels are applied to a high-resolution feature map, fused from multiple FPN levels via the Multi-level Upsampling module, to generate final instance-specific masks.

Experiments and Results

SOTR was evaluated on the MS COCO dataset (train2017/test-dev).

Quantitative Performance

With a ResNet-101 backbone, SOTR achieves 40.2% Average Precision (AP), outperforming established models like Mask R-CNN (35.7%) and SOLOv2 (39.7%). Notably, SOTR excels at segmenting large objects, reaching 73.0% AP compared to Mask R-CNN's 52.4%. A real-time variant, SOTR-RT, maintains competitive accuracy (30.7% AP) at 25.2 FPS.

Qualitative Analysis

Qualitative results demonstrate SOTR's ability to handle overlapping instances and intricate shapes more effectively than traditional methods. The model's position sensitivity allows it to distinguish between multiple instances of the same class with high precision, producing cleaner boundaries for complex objects like bench legs or thin frames.

Qualitative comparison of SOTR segmentation masks on complex scenes involving overlapping objects and fine details.

Conclusion

SOTR demonstrates the power of Transformers in instance segmentation by providing an efficient, box-free alternative to CNN-based models. By decomposing attention and incorporating local convolutions, it achieves superior performance on large objects and complex scenes. While the model faces challenges such as "attention collapse" in deeper layers and lower performance on very small objects, it represents a significant step forward in unifying CNN and Transformer architectures for dense prediction tasks.

Summary updated

BibTeX
@inproceedings{guo2021sotr,
  author = {Ruohao Guo and Dantong Niu and Liao Qu and Zhenbo Li},
  title = {{SOTR: Segmenting Objects with Transformers}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00707},
}
Figure