[Paper Review] Visual Transformer for Object Detection
This paper proposes DetTransNet, a vision transformer-based object detector that uses overlapping image patches to improve global context modeling and object localization. By replacing conventional convolutional layers with self-attention mechanisms and optimizing patching for feature richness, DetTransNet achieves state-of-the-art performance on COCO, with a 45.4 mAP, outperforming prior methods including De-DETR by 1.6 mAP.
Convolutional Neural networks (CNN) have been the first choice of paradigm in many computer vision applications. The convolution operation however has a significant weakness which is it only operates on a local neighborhood of pixels, thus it misses global information of the surrounding neighbors. Transformers, or Self-attention networks to be more specific, on the other hand, have emerged as a recent advance to capture long range interactions of the input, but they have mostly been applied to sequence modeling tasks such as Neural Machine Translation, Image captioning and other Natural Language Processing tasks. Transformers has been applied to natural language related tasks and achieved promising results. However, its applications in visual related tasks are far from being satisfying. Taking into consideration of both the weaknesses of Convolutional Neural Networks and those of the Transformers, in this paper, we consider the use of self-attention for discriminative visual tasks, object detection, as an alternative to convolutions. In this paper, we propose our model: DetTransNet. Extensive experiments show that our model leads to consistent improvements in object detection on COCO across many different models and scales, including ResNets, while keeping the number of parameters similar. In particular, our method achieves a 1.2% Average Precision improvement on COCO object detection task over other baseline models.
Motivation & Objective
- To address the limitation of CNNs in capturing global image context by replacing convolutional operations with self-attention mechanisms.
- To overcome the poor performance of standard Vision Transformers in object detection, especially on small objects, by redesigning the patching strategy.
- To develop a vision transformer-based object detector that matches or exceeds the accuracy of CNN-based detectors while maintaining similar parameter counts.
- To improve training efficiency and generalization by leveraging overlapping patches for richer local and global feature representation.
Proposed method
- Introduces overlapping image patches where each patch shares m pixels with neighboring patches to enhance local structure modeling and feature continuity.
- Employs a Vision Transformer backbone with learnable positional embeddings to process the overlapping patch sequence, enabling long-range attention across the image.
- Uses a Region Proposal Network (RPN) with fully convolutional layers to generate object proposals, similar to Faster R-CNN, but fed features from the ViT encoder.
- Applies a hybrid training strategy: first pretraining the RPN, then jointly fine-tuning the ViT and RPN with Adam optimizer and weight decay.
- Utilizes large-scale pretraining on ImageNet and JFT to improve generalization on the smaller COCO dataset.
- Employs a patch projection head that flattens spatial dimensions and projects to the model’s hidden dimension, forming the input sequence for the transformer.
Experimental results
Research questions
- RQ1Can a vision transformer-based object detector outperform CNN-based detectors like Faster R-CNN in object detection accuracy?
- RQ2Does using overlapping patches in vision transformers improve feature representation and detection performance, especially for small objects?
- RQ3Can a pure transformer architecture achieve strong performance on object detection without relying on convolutional inductive biases?
- RQ4How does the proposed overlapping patching method compare to standard non-overlapping patching in terms of training efficiency and generalization?
Key findings
- DetTransNet achieves a 45.4 mAP on the COCO 2017 object detection dataset, setting a new state-of-the-art result.
- The model improves mAP by 1.2% over De-DETR and 1.6% over the previous best baseline, De-DETR.
- The overlapping patching method improves detection of small objects, increasing AP_small from 21.2 (De-DETR) to 22.5.
- The model maintains a parameter count similar to ResNet-based detectors, indicating efficiency without sacrificing performance.
- Pretraining on ImageNet and JFT significantly boosts performance, demonstrating the importance of large-scale pretraining for vision transformers.
- The ablation study confirms that overlapping patches enhance feature richness and reduce training instability compared to standard patching.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.