SeqCo-DETR: Sequence Consistency Training for Self-Supervised Object Detection with Transformers

Guoqiang Jin, Fan Yang, Mingshan Sun, Ruyi Zhao, Yakun Liu, Wei Li, Tianpeng Bao, Liwei Wu, Xingyu Zeng, Rui ZhaoBMVC 2023

Abstract

Self-supervised pre-training and transformer-based networks have significantly improved the performance of object detection. However, most current self-supervised object detection methods are built on convolutional-based architectures. We believe that the transformers' sequence characteristics should be considered when designing a transformer-based self-supervised method for the object detection task. To this end, we propose SeqCo-DETR, a novel Sequence Consistency-based self-supervised method for object DEtection with TRansformers. SeqCo-DETR defines a simple but effective pretext by minimizing the discrepancy of the output sequences of transformers with different image views as input and leverages bipartite matching to find the most relevant sequence pairs to improve the sequence-level self-supervised representation learning performance. Furthermore, we provide a mask-based augmentation strategy incorporated with the sequence consistency strategy to extract more representative contextual information about the object for the object detection task. Our method achieves state-of-the-art results on MS COCO (45.8 AP) and PASCAL VOC (64.1 AP), demonstrating the effectiveness of our approach.

Introduction

Self-supervised learning (SSL) has emerged as a powerful paradigm for computer vision, enabling models to learn robust representations from massive unlabeled datasets. This is particularly valuable for object detection, where the cost of manual bounding-box annotation is prohibitive. While SSL has seen great success with Convolutional Neural Networks (CNNs), these methods often rely on inductive biases like spatial locality.

Transformers, however, operate differently; they treat object detection as a sequence-to-sequence problem, utilizing global attention to capture long-range dependencies. Existing transformer pre-training methods often fail to exploit these unique sequence characteristics, relying instead on hand-crafted pseudo-labels or random patches. SeqCo-DETR addresses this gap by introducing a pre-training framework that speaks the "native language" of transformers: sequences.

Methodology

SeqCo-DETR (Sequence Consistency-based DEtection with TRansformers) utilizes a dual-branch architecture consisting of an Online branch, which learns via backpropagation, and a Momentum branch, which maintains a moving average of the online weights to provide stable targets.

Sequence Consistency Strategy

Unlike standard SSL methods that enforce consistency between global image-level feature vectors, SeqCo-DETR enforces consistency between the output sequences of the transformer decoders. Because each element in a transformer's output sequence represents a potential object, this strategy forces the model to learn fine-grained, object-level representations rather than just a holistic scene summary.

Bipartite Matching for SSL

A challenge in sequence-level consistency is that different views of the same image might result in objects being predicted in different orders. To resolve this, the authors employ bipartite matching (the Hungarian algorithm). This allows the model to find the most relevant pairs of sequences between the Online and Momentum branches before calculating the similarity loss, ensuring that the consistency constraint is applied to the correct semantic entities.

Complementary Masking

To further enhance contextual learning, the framework introduces a complementary masking strategy. Input images are masked such that the Online branch sees one set of patches while the Momentum branch sees the exact opposite set. To successfully predict the same object across these views, the model cannot rely on local pixel information; it must learn to leverage global context to "fill in the blanks," effectively learning the relationship between an object and its surroundings.

Objectness Proposals

To ensure the model focuses on meaningful content rather than background noise, SeqCo-DETR uses Selective Search—an unsupervised region proposal method—to guide the model toward potential foreground objects during the pre-training phase.

Experimental Results

The model was pre-trained on ImageNet-1K and ImageNet-100 and evaluated on standard benchmarks including MS COCO 2017 and PASCAL VOC.

Benchmark Performance

SeqCo-DETR achieves state-of-the-art (SOTA) performance across multiple metrics:

  • MS COCO: The model achieved 45.8 AP, outperforming previous leading methods like DETReg by 0.3 points.
  • PASCAL VOC: The model reached 64.1 AP, a 0.6-point improvement over previous benchmarks.
  • Efficiency: SeqCo-DETR surpasses standard Deformable DETR (trained with supervised CNN backbones) by 0.8 points on COCO, demonstrating that self-supervised transformer pre-training is now more effective than traditional supervised pre-training.

Robustness in Few-Shot Scenarios

In low-data regimes, such as 10-shot COCO detection, SeqCo-DETR outperformed DETReg by 2.0 AP. This suggests that the sequence-consistency pretext produces features that are significantly more robust and transferable when labeled data is scarce.

Discussion and Future Work

The success of SeqCo-DETR highlights that SSL methods should be tailored to the specific architecture of the model. While CNNs benefit from local consistency, Transformers thrive when forced to reconcile global sequences.

However, some limitations remain. The current bipartite matching requires both image views to share the same coordinate system (crop window), which limits the variety of augmentations. Additionally, while the method is largely self-supervised, it still relies on Selective Search for initial objectness proposals. Future research will focus on developing "purer" self-supervised approaches that generate internal proposals and exploring more complex augmentations that can maintain sequence consistency across varying coordinate systems.

Summary updated

BibTeX
@inproceedings{jin2023seqco,
  author = {Guoqiang Jin and Fan Yang and Mingshan Sun and Ruyi Zhao and Yakun Liu and Wei Li and Tianpeng Bao and Liwei Wu and Xingyu Zeng and Rui Zhao},
  title = {{SeqCo-DETR: Sequence Consistency Training for Self-Supervised Object Detection with Transformers}},
  booktitle = {BMVC},
  year = {2023},
  url = {https://openreview.net/forum?id=B28f0bEdjQ},
}
Figure