Abstract
Transformer-based object detectors (DETR) have revolutionized object detection by removing the need for hand-crafted components like anchor boxes. However, these models are notoriously data-hungry and slow to converge. We introduce Siamese DETR, a novel self-supervised pre-training framework designed specifically for the Transformer modules in DETR. By employing a Siamese architecture to process two different views of the same image, the model learns to locate and identify corresponding regions across views. This multi-view approach leads to faster convergence and state-of-the-art detection performance on COCO and PASCAL VOC benchmarks.
Introduction
While self-supervised learning (SSL) has been highly effective for pre-training backbones, translating these gains to the task-specific Transformer encoder-decoder modules in DETR remains challenging. Existing DETR-specific SSL methods, such as UP-DETR or DETReg, typically rely on a "single-view" paradigm, where the model predicts random patches within a single image. This approach limits the model's ability to learn view-invariant representations, which are essential for robust object detection. Siamese DETR addresses this by forcing the model to find and recognize the same objects across different augmented views.
Methodology
The core of Siamese DETR is a multi-view Siamese framework that utilizes two augmented versions of an unlabeled image.
Multi-View Cross-Attention (MVCA)
In a standard DETR, object queries interact with image features to identify objects. Siamese DETR introduces "conditioned" queries: region features from View A are used as queries to search the global context of View B. This mechanism forces the Transformer to learn spatial and semantic relationships between different perspectives of the same object.
Pretext Tasks
The framework employs two primary pretext tasks:
- Multi-View Region Detection: Given features from a region in View A, the model must predict the corresponding bounding box in View B, enhancing localization capabilities.
- Multi-View Semantic Discrimination: The model ensures semantic consistency for a region across both views. To avoid representation collapse, the authors compare image-level features against "crop-level" features—fine-grained details extracted from a tight crop of the object.
View Construction
To balance task difficulty, an "IoU-constrained policy" is used. Two random rectangles are generated with at least 50% overlap, ensuring shared content while providing sufficient variation in scale and perspective.
Experiments and Results
Siamese DETR was pre-trained on ImageNet-1K and COCO train2017, then fine-tuned on COCO and PASCAL VOC.
Performance and Convergence
Siamese DETR consistently outperforms previous methods like UP-DETR and DETReg across multiple DETR variants (Vanilla, Conditional, and Deformable). Notably, it shows a significant lead at stricter IoU thresholds (e.g., $AP_{75}$), indicating superior localization precision.
Data Efficiency
On PASCAL VOC, Siamese DETR achieves performance with only 30% of the training data that is comparable to a baseline model trained from scratch on 100% of the data. Furthermore, the pre-trained models reach high accuracy significantly faster during fine-tuning.
Key Insights
- Beyond the Backbone: Most SSL focuses on the feature extractor. Siamese DETR proves that pre-training the Transformer modules specifically for detection tasks (localization + discrimination) yields much higher gains for DETR-like architectures.
- The Power of Multi-View: Moving from single-view patch prediction to multi-view region matching provides a much richer supervisory signal, forcing the model to understand object constancy across scales and crops.
- Crop-level Supervision: A key finding was that features from a cropped image are more discriminative than features extracted via RoIAlign from a full-sized image. Using these "crop-level" features as a target helps the model learn better object-level representations.
Conclusion
Siamese DETR demonstrates that pre-training Transformer modules specifically for detection tasks yields substantial gains. By moving from single-view patch prediction to multi-view region matching, the model acquires a richer supervisory signal. Future work may focus on a unified paradigm that trains both the backbone and the Transformer together in an end-to-end self-supervised manner.
Summary updated