Abstract
Panoptic segmentation requires a model to simultaneously perform instance segmentation for "things" (countable objects) and semantic segmentation for "stuff" (amorphous regions). Existing transformer-based approaches often struggle with suboptimal query handling, slow convergence, and inference artifacts. We present Panoptic SegFormer, a framework that addresses these challenges through a decoupled query strategy, a deeply supervised mask decoder, and a novel mask-wise merging mechanism. Our approach achieves state-of-the-art performance on COCO and ADE20K benchmarks while significantly reducing training time.
Introduction
Panoptic segmentation is often considered the "holy grail" of scene understanding. However, current transformer-based models like DETR face three major hurdles identified by the authors:
- Suboptimal Query Handling: Treating "things" and "stuff" identically leads to mutual interference, as things have distinct centers while stuff is amorphous.
- Slow Convergence: Learning where to focus attention in a transformer can take hundreds of epochs, leading to massive computational costs.
- Inference Artifacts: Standard pixel-wise argmax post-processing ignores global mask quality, leading to overlaps and noise.
Proposed Method: Panoptic SegFormer
Panoptic SegFormer introduces a refined architecture consisting of a backbone, a transformer encoder, and two specialized decoders designed to handle the nuances of panoptic tasks.
Query Decoupling and Location Decoding
Instead of a single query pool, the model utilizes a Thing Query set (optimized via bipartite matching) and a Stuff Query set (using fixed assignment). This allows the model to cater to the unique spatial properties of each category. A Location Decoder further assists thing queries by predicting object centers and bounding boxes, providing spatial anchors for segmentation.
Deeply-Supervised Mask Decoder
To accelerate convergence, the attention modules in the mask decoder are supervised at every layer. This forces the model to focus on meaningful semantic regions early in training, effectively providing a "shortcut" for the transformer to learn the scene layout. This supervision allows the model to reach high performance levels in a fraction of the time required by previous baselines.
Mask-Wise Merging
During inference, the model moves beyond local pixel-wise decisions. It calculates a confidence score for each entire mask by combining classification probability and predicted mask quality. Masks are then merged in order of confidence, which naturally resolves overlaps and reduces noise compared to traditional argmax approaches.
Experimental Results
The model was evaluated on the COCO 2017 and ADE20K benchmarks, as well as the COCO-C variant for robustness testing.
Performance and Efficiency
Panoptic SegFormer achieved a state-of-the-art 56.2% PQ on COCO test-dev, surpassing previous leaders like MaskFormer and K-Net. Notably, it reached 48.0% PQ in just 12 epochs—a massive improvement over earlier models that required 300+ epochs. The PVTv2-B5 variant demonstrated high parameter efficiency, achieving 55.4% PQ with significantly fewer parameters than competing high-end models.
Robustness
On the COCO-C benchmark, Panoptic SegFormer outperformed MaskFormer by 5.5% PQ, indicating that its transformer-based mask decoder is significantly more resilient to natural image corruptions like noise, blur, and weather effects.
Conclusion and Future Work
Panoptic SegFormer demonstrates that decoupling task-specific queries and employing deep supervision can drastically improve both the accuracy and training efficiency of panoptic segmentation models. While inference speed remains a challenge due to the complexity of multi-scale feature processing, the framework sets a new standard for holistic scene understanding. Future work will focus on further unifying the pipeline while maintaining the necessary distinctions between "thing" and "stuff" processing.
Summary updated