Abstract
UIFormer is the first unified Transformer-based framework designed to address the dual challenges of incremental few-shot object detection (iFSOD) and instance segmentation (iFSIS). By extending the Mask-DINO architecture, UIFormer introduces a specialized classifier selection strategy and a two-stage training process incorporating knowledge distillation. This approach achieves state-of-the-art performance on benchmarks like MS COCO and LVIS while effectively mitigating the "catastrophic forgetting" of previously learned base classes during novel class adaptation.
Introduction
In the field of computer vision, developing models that can learn from minimal data (few-shot learning) while retaining knowledge of prior tasks (incremental learning) remains a significant hurdle. Existing solutions for Incremental Few-Shot Object Detection (iFSOD) and Instance Segmentation (iFSIS) have traditionally relied on CNN-based architectures like Mask R-CNN. While effective, these models often lack the semantic processing power of modern Transformer architectures.
However, transitioning to Transformers like Mask-DINO introduces new difficulties: standard uniform classifiers in these models tend to overfit on novel classes, leading to the rapid forgetting of original "base" classes. UIFormer bridges this gap by providing a unified, Transformer-based approach that handles both detection and segmentation tasks simultaneously in an incremental setting.
Methodology
Architecture and Classifier Selection
UIFormer builds upon the Mask-DINO architecture, but introduces a critical innovation in its classifier selection strategy to decouple foreground detection from semantic classification.
As shown in the architecture diagram, the framework employs different roles for its components:
- Encoder: Utilizes a class-agnostic foreground predictor. By focusing solely on whether a token belongs to an object or the background, the encoder avoids overfitting to specific base classes, maintaining flexibility for future novel classes.
- Decoder: Employs a cosine-similarity classifier for precise semantic discrimination. This method is significantly more robust in few-shot scenarios than standard linear classifiers, as it focuses on feature orientation rather than magnitude.
Two-Stage Training Strategy
The framework operates through a dual-phase learning strategy designed to solidify base knowledge before adapting to new categories.
- Stage 1: Base Model Training:
- Pre-training: The model is trained on a large-scale base dataset.
- Fine-tuning with Pseudo-Labels: To enhance generalization, the authors implement an attention-driven pseudo ground-truth search. This technique identifies and labels previously unrecognized objects in base images, expanding the model's foundational class diversity.
- Stage 2: Novel Model Fine-tuning:
- The model is fine-tuned on novel classes using a limited number of examples (e.g., 1, 5, or 10 shots).
- Knowledge Distillation (KD): To prevent catastrophic forgetting, KD is applied to the projection layer. This ensures that the features extracted for novel classes remain aligned with the foundational feature space learned during Stage 1.
Key Insights
- Decoupling Semantics: Making the encoder class-agnostic allows the model to learn where objects are independently of what they are, facilitating easier adaptation to new categories.
- Pseudo-Labeling Benefits: Actively searching for unlabeled objects during base training builds a more robust feature space, smoothing the transition to novel class learning.
- Transformer Context: The global context provided by the Transformer architecture allows for superior alignment between region-level detection and pixel-level segmentation compared to traditional CNNs.
Experimental Results
UIFormer was evaluated on MS COCO 2014 and the long-tailed LVIS dataset, demonstrating significant improvements over previous state-of-the-art (SOTA) models such as iFS-RCNN and iMTFA.
- MS COCO (10-shot): UIFormer achieved 35.49 AP for detection and 32.23 AP for segmentation, notably outperforming iFS-RCNN's 33.02 and 30.41 AP, respectively.
- LVIS Performance: On novel classes in the LVIS dataset, UIFormer surpassed iFS-RCNN by +4.076 AP in detection and +3.478 AP in segmentation.
- Ablation Studies: Testing confirmed that the "Binary+Cosine" classifier strategy was the most effective, boosting novel class performance by nearly 2 AP points compared to standard linear alternatives.
Limitations and Future Work
Despite its success, UIFormer faces challenges in extreme low-shot settings (e.g., 1-shot), where CNN-based models remain competitive due to the high data requirements of Transformer attention mechanisms. Additionally, performance on "common" classes in long-tailed datasets like LVIS was slightly lower than some CNN counterparts, likely because Transformers require higher image counts to reach peak efficiency. Future research will focus on refining the framework for extreme low-data regimes and improving efficiency in long-tailed incremental scenarios.
Summary updated