Abstract
Recently, query-based object detection frameworks have achieved performance comparable to state-of-the-art detectors. However, leveraging these frameworks for instance segmentation remains an open challenge. We present QueryInst, a query-based instance segmentation method driven by parallel supervision on dynamic mask heads. The key insight is to leverage the intrinsic one-to-one correspondence in object queries across stages and between mask RoI features and queries within the same stage. This approach eliminates explicit multi-stage mask head connections and proposal distribution inconsistency issues. Evaluated on COCO, Cityscapes, and YouTube-VIS, QueryInst (with ResNet-101-FPN) achieves 42.8 mask AP on COCO test-dev—2 points higher than HTC while running 2.4 times faster.
The Challenge: Inconsistency and Complexity
Traditional multi-stage instance segmentation methods, such as Mask R-CNN and Hybrid Task Cascade (HTC), follow a "detect-then-segment" paradigm. While powerful, they face two primary hurdles:
- Proposal Inconsistency: Bounding box proposal distributions shift at each stage, making it difficult for mask heads to learn consistent features.
- Structural Complexity: High-accuracy models like HTC rely on complex, explicit "mask flow" connections between stages, which significantly increase computational overhead during training and inference.
Methodology: Parallel Supervision and Dynamic Heads
QueryInst builds upon the Sparse R-CNN detector, extending it with a novel Dynamic Mask Head. Unlike previous multi-stage models that pass mask features sequentially, QueryInst employs parallel supervision. This is made possible by the query-based architecture, where a specific object query (e.g., Query #N) consistently refers to the same potential object across all refinement stages.
Key Pillars of QueryInst:
- Dynamic Mask Convolution (DynConv$^{mask}$): Instead of static filters, the mask head uses the object query to generate weights for dynamic convolutions. The query acts as a "memory" carrying object-specific information used to process Region of Interest (RoI) features.
- Task-Joint Learning: The detection and segmentation branches share object queries and Multi-Head Self-Attention (MSA) layers. This synergy forces queries to learn a unified representation beneficial for both tasks.
- Queries as Implicit Connections: In QueryInst, queries act as the "wires" between stages. Gradient flow through the queries naturally embeds mask information for subsequent stages, removing the need for explicit feature-passing connections.
Experimental Results
QueryInst was evaluated across three major benchmarks: COCO (general instance segmentation), Cityscapes (urban scenes), and YouTube-VIS (video instance segmentation).
Performance Highlights:
- COCO: Using a ResNet-101 backbone, QueryInst achieved 42.8 mask AP, surpassing HTC (40.8 AP) while being significantly more efficient (6.1 FPS vs. 2.5 FPS).
- Video Instance Segmentation: QueryInst-VIS achieved 36.2 AP on YouTube-VIS, outperforming other online methods and even some offline transformer-based approaches like VisTR.
- Efficiency: During inference, intermediate mask heads can be discarded, allowing the model to maintain high speeds while producing high-quality final masks.
Conclusion
QueryInst demonstrates that parallel supervision on dynamic mask heads effectively adapts query-based detection for instance segmentation. By treating queries as the primary vehicle for cross-stage and cross-task communication, it achieves a superior speed-accuracy trade-off compared to traditional multi-stage architectures. Future work may explore reducing the number of refinement stages and extending this parallel query framework to panoptic or 3D segmentation tasks.
Summary updated