Source-linked AI summary

RegionCLIP: Region-based Language-Image Pretraining

Yiwu Zhong, Jianwei Yang, Pengchuan Zhang, Chunyuan Li, Noel Codella, Liunian Harold Li, Luowei Zhou, Xiyang Dai, Lu Yuan, Yin Li, Jianfeng Gao

arXiv:2112.09106v1cs.CVcs.AIcs.LG

TL;DR

Image-level CLIP lacks fine-grained alignment between image regions and text, limiting direct use for region recognition. RegionCLIP generates region-text pairs with a pretrained CLIP model and pretrains region-level visual representations, achieving strong open-vocabulary detection results and promising zero-shot inference.

  • Problem

    Image-level vision-language pretraining does not capture fine-grained alignment between image regions and text tokens, causing poor direct performance for image-region recognition.

  • Method

    RegionCLIP creates template-based region descriptions from parsed object concepts, uses pretrained CLIP to align them with candidate regions, and pretrains visual representations on the resulting pairs.

  • Results

    RegionCLIP establishes new state-of-the-art results on COCO and LVIS open-vocabulary object detection and outperforms baselines in zero-shot inference.

  • Takeaways & Limitations

    Region-level alignment enables visual representations that transfer to open-vocabulary object detection and support zero-shot object-region recognition.

  • Takeaways & Limitations

    The method focuses on object concepts without explicitly modeling object attributes and relationships, and it keeps the language encoder fixed.

Abstract

from arXiv · show

Contrastive language-image pretraining (CLIP) using image-text pairs has achieved impressive results on image classification in both zero-shot and transfer learning settings. However, we show that directly applying such models to recognize image regions for object detection leads to poor performance due to a domain shift: CLIP was trained to match an image as a whole to a text description, without capturing the fine-grained alignment between image regions and text spans. To mitigate this issue, we propose a new method called RegionCLIP that significantly extends CLIP to learn region-level visual representations, thus enabling fine-grained alignment between image regions and textual concepts. Our method leverages a CLIP model to match image regions with template captions and then pretrains our model to align these region-text pairs in the feature space. When transferring our pretrained model to the open-vocabulary object detection tasks, our method significantly outperforms the state of the art by 3.8 AP50 and 2.2 AP for novel categories on COCO and LVIS datasets, respectively. Moreoever, the learned region representations support zero-shot inference for object detection, showing promising results on both COCO and LVIS datasets. Our code is available at https://github.com/microsoft/RegionCLIP.

1. Introduction

Image-level vision-language models perform poorly when applied directly to image-region recognition because they lack fine-grained region–text alignment. RegionCLIP addresses this gap by generating region descriptions and pretraining visual representations for region-level alignment without manual annotation.

  • Motivation: Pretrained CLIP drops from 60% accuracy on ImageNet to 19% on LVIS when classifying image regions, despite similar class counts.Using object proposals also fails to capture localization quality.
  • Motivation: CLIP and related models match whole images to image-level descriptions, leaving alignment between local regions and text tokens unmodeled.This limits precise grounding of textual concepts to image regions.
  • Method: RegionCLIP explicitly aligns image regions with text tokens during vision-language pretraining, addressing missing fine-grained alignment and incomplete image descriptions.The method bootstraps from a pretrained vision-language model to fill missing region descriptions.
  • Method: The method creates region descriptions from parsed object concepts and templates, then uses pretrained CLIP to align them with candidate regions as pseudo labels.Both pseudo region-text pairs and ground-truth image-text pairs support contrastive learning and knowledge distillation.
  • Results: RegionCLIP establishes new state-of-the-art results on COCO and LVIS open-vocabulary object detection after transfer.It also supports zero-shot inference and outperforms baselines by a clear margin.
  • Contributions: The approach aligns image regions and descriptions without manual annotation and learns visual region representations for transfer to detection.Its scalable region-description generation extends beyond tokens present in paired text.

2. Related Work

Prior work established image-text pretraining and transfer learning for detection, while RegionCLIP extends this direction toward region-text pretraining for open-vocabulary detection.

  • Image-text pretraining: Image-text pretraining methods such as CLIP learn visual representations by matching images with their descriptions.These models support recognition of broad concepts and transfer to visual recognition tasks.
  • Region-text pretraining: Region-text pretraining is introduced as a distinct stage in RegionCLIP before transfer learning for detection.The pipeline separates image-text pretraining, region-text pretraining, and detection transfer.
  • RegionCLIP pipeline: RegionCLIP’s overview connects CLIP-based pretraining, region representation learning, and transfer to object detection.Its region-level stage aligns candidate regions with created text descriptions.
  • Open-vocabulary detection: Open-vocabulary object detectors commonly use semantic spaces from pretrained word embeddings or image-text models to recognize novel categories.Prior methods include feature synthesis and image-text pretraining followed by zero-shot detection.

3. Method

RegionCLIP learns a regional visual-semantic space by aligning image regions with text concepts without requiring region-level human annotations. It combines teacher-generated region-text alignment with contrastive learning, distillation, image-text pretraining, and transfer to object detection.

  • Method overview: RegionCLIP disentangles localization from recognition, using existing region localizers while learning regional visual-semantic representations without heavy human annotation.Candidate regions can come from object proposals or dense sliding windows.
  • Method overview: The student visual encoder extracts region features with RoIAlign, initializes from the teacher encoder, and learns from pseudo region-text pairs using contrastive loss and knowledge distillation.Distillation uses teacher soft targets over all object concepts, while contrastive learning uses positive and negative region-text pairs.
  • Method overview: Semantic region representations are built from a large parsed concept pool by inserting object concepts into prompt templates and encoding the resulting descriptions with a pretrained language encoder.For example, the concept “kite” becomes “A photo of a kite.”
  • Method overview: A pretrained teacher visual encoder creates region-text correspondences by matching pooled region features with embeddings of synthesized object descriptions.The highest-scoring concept is selected as the pseudo label for each region.
  • Method overview: Image-level contrastive learning is incorporated as a special case using whole-image regions, paired captions, and captions from other images as negatives.The overall objective combines region contrastive, distillation, and image-text contrastive losses.
  • Transfer learning: The pretrained encoder supports zero-shot region recognition and initializes object detectors that match region representations with target-class semantic embeddings.When human region annotations are available, the model can be fine-tuned by replacing pseudo descriptions with annotated region descriptions.

4. Experiments

Experiments evaluate RegionCLIP on COCO and LVIS for transfer learning, zero-shot inference, supervised detection, and ablations. The method consistently improves detection performance, while ablations examine supervision, region quality, datasets, losses, model capacity, and focal scaling; the paper also notes limitations in language coverage.

  • Experimental setup: RegionCLIP is evaluated on COCO and LVIS for transfer learning and zero-shot inference, using AP and AP50 under standard open-vocabulary protocols.COCO uses Novel, Base, and generalized evaluation settings; LVIS is also evaluated for open-vocabulary detection.
  • Fully supervised detection: +2.4 mAP on COCO and +2.8 mAP on LVIS, RegionCLIP initialization outperforms ImageNet- and CLIP-initialized fully supervised detectors at a 1x schedule.The results also indicate faster convergence under this schedule.
  • Zero-shot inference: 61.4 versus 58.3 All AP50 on COCO and 44.4 versus 42.2 mAP on LVIS, RegionCLIP outperforms CLIP with ideal region proposals.With RPN proposals, it also exceeds CLIP and OVR, supporting zero-shot inference across both datasets.
  • Ablation study: +2.4 AP50 with ground-truth boxes and +5.4 Novel AP50 with transfer learning, adding image-text supervision improves region-text-pair pretraining.Random regions reduce zero-shot inference by 2.0 AP50 with ground-truth boxes but produce comparable transfer-learning performance.
  • Ablation study: The strongest teacher improves zero-shot inference by +4.2 AP50, whereas replacing the student with a stronger model boosts transfer learning by +5.3 AP50.These results suggest different capacity dependencies for zero-shot alignment and transfer learning.
  • Discussion: RegionCLIP recognizes image regions more precisely than CLIP in qualitative examples, including a teddy bear prediction with 99.5% confidence.Its top-three predictions also include visually similar or fine-grained concepts in some failure cases.
  • Limitations: The method focuses on object concepts, omits explicit object attributes and relationships, relies on CLIP’s visual-semantic space, and does not update the language encoder.The authors identify comprehensive region representations as future work.

5. Conclusion

The paper proposes region-based vision-language pretraining to match image regions with descriptions, achieving strong transfer results for open-vocabulary and zero-shot object detection.

  • Region-based vision-language pretraining learns to match image regions with their descriptions.
  • The method associates region-text pairs beyond paired-text tokens without human annotation.
  • The pretrained model establishes new state-of-the-art results for open-vocabulary object detection on COCO and LVIS.
  • The learned region representations also show promising results for zero-shot object detection.
Loading 2112.09106v1…