[Paper Review] CLIPSelf: Vision Transformer Distills Itself for Open-Vocabulary Dense Prediction
CLIPSelf fine-tunes CLIP Vision Transformers via self-distillation on dense features, aligning region representations with image-level representations without region-text pairs, to improve open-vocabulary object detection and segmentation.
Open-vocabulary dense prediction tasks including object detection and image segmentation have been advanced by the success of Contrastive Language-Image Pre-training (CLIP). CLIP models, particularly those incorporating vision transformers (ViTs), have exhibited remarkable generalization ability in zero-shot image classification. However, when transferring the vision-language alignment of CLIP from global image representation to local region representation for the open-vocabulary dense prediction tasks, CLIP ViTs suffer from the domain shift from full images to local image regions. In this paper, we embark on an in-depth analysis of the region-language alignment in CLIP models, which is essential for downstream open-vocabulary dense prediction tasks. Subsequently, we propose an approach named CLIPSelf, which adapts the image-level recognition ability of CLIP ViT to local image regions without needing any region-text pairs. CLIPSelf empowers ViTs to distill itself by aligning a region representation extracted from its dense feature map with the image-level representation of the corresponding image crop. With the enhanced CLIP ViTs, we achieve new state-of-the-art performance on open-vocabulary object detection, semantic segmentation, and panoptic segmentation across various benchmarks. Models and code are released at https://github.com/wusize/CLIPSelf.
Motivation & Objective
- Motivate open-vocabulary dense prediction tasks (detection and segmentation) and analyze region-language alignment in CLIP ViTs.
- Investigate why CLIP ViT dense features underperform region recognition and propose a region-to-image self-distillation solution.
- Develop CLIPSelf to align region representations from dense maps with image crops without region-text pairs.
- Demonstrate state-of-the-art results on OV-COCO, OV-LVIS, and open-vocabulary segmentation benchmarks.
Proposed method
- Extract dense feature maps from the last ViT block by discarding the self-attention in the final block, producing a spatial feature map for regions.
- Partition an image into a random grid of m x n patches and use these patches as regions for self-distillation.
- Fine-tune a Student CLIPViT while keeping a fixed Teacher CLIPViT; train by maximizing cosine similarity between Student region embeddings and Teacher image representations of the corresponding patches.
- Compute region embeddings via pooling from the dense map (RoIAlign) and align to Teacher image representations using a cosine-similarity loss.
- Update all attention layers in the ViT to maximize region-to-image alignment, with larger input sizes for the Student improving region recognition.
- Apply the fine-tuned CLIPViTs to open-vocabulary detection (two-stage detector on frozen backbones), semantic segmentation (Cat-Seg initialization), and panoptic segmentation (ODISE inference stage).
Experimental results
Research questions
- RQ1How well do ViT-based CLIP models align local region representations with language for open-vocabulary dense tasks?
- RQ2Can self-distillation from image-level CLIP representations improve dense region representations without region-text pairs?
- RQ3Does aligning dense-region embeddings to image crops enhance open-vocabulary object detection and segmentation performance?
- RQ4Is CLIPSelf robust across different ViT sizes and training data (e.g., CC3M) and compatible with window-attention variants?
- RQ5What is the relative benefit of using region proposals versus patch-based regions for open-vocabulary detection and segmentation?
Key findings
- CLIPViT dense representations underperform region-level recognition compared to image crops, motivating region-to-image alignment.
- CLIPSelf, a self-distillation method using random m x n image patches, significantly improves region and panoptic mask classification accuracy over the baseline ViT CLIP model.
- Using the Teacher’s image representations as guidance, the Student ViT learns to produce region embeddings that align with the corresponding image crops, boosting Open-Vocabulary detection and segmentation performance.
- Replacing the backbone with CLIPSelf-augmented ViTs yields state-of-the-art results on OV-COCO and OV-LVIS in open-vocabulary object detection, and improves open-vocabulary segmentation and panoptic segmentation benchmarks.
- CLIPSelf outperforms region-text-pair approaches (noisy region-to-text matching) and remains effective with local-window attention variants, and even when trained on CC3M data.
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.