Zero-shot Object Detection Through Vision-Language Embedding Alignment

Johnathan Xie, Shuai Zheng

TL;DR

This paper introduces ZSD-YOLO, a novel method for zero-shot object detection that aligns pre-trained vision-language models (like CLIP) with a YOLOv5 detector. This approach achieves state-of-the-art performance on several benchmarks by effectively transferring knowledge to detect objects from classes not seen during training, without requiring additional data or retraining.

What Problem Does This Paper Address?

Traditional object detection models are trained on datasets with a fixed set of object categories. This means they can only detect objects belonging to those specific categories. However, in many real-world scenarios, we need detectors that can identify objects from categories they haven't been explicitly trained on – this is known as zero-shot object detection (ZSD). The challenge lies in bridging the gap between visual features and semantic understanding, especially when the task involves not just classifying an object but also localizing it within an image. Existing methods often struggle to generalize well to unseen classes, particularly when dealing with the long-tailed distribution of real-world objects or when labeled data is scarce and expensive to collect.

Methods

The core of ZSD-YOLO is vision-language embedding alignment. The authors adapt the YOLOv5 architecture to output semantic embeddings instead of traditional class probabilities. These embeddings are then aligned with embeddings generated by a pre-trained vision-language model, specifically CLIP.

Key methodological contributions include:

  • Dual Loss Function: They propose a novel loss function that combines alignment losses for both image embeddings (using cropped ground-truth bounding boxes fed through CLIP's image encoder) and text embeddings (using class names prompted with "A photo of {class} in the scene" fed through CLIP's text encoder). This dual approach is crucial for improving performance.
  • Self-Labeling Data Augmentation: To further enhance the model's ability to learn from unseen data without additional labels, they introduce a self-labeling technique. This involves using the model's own predictions on training data to generate new training examples, which are then used to refine the model's localization and objectness losses.
  • ZSD-Tailored Post-processing: They develop a specialized post-processing pipeline for YOLO-style detectors that prioritizes unseen classes and reduces the bias towards seen objects, which often have higher objectness scores. This includes a low objectness cutoff and a confidence score calculation that favors class similarity.
  • Model Scaling: The authors demonstrate that standard object detection scaling techniques (using different YOLOv5 model sizes) transfer well to their ZSD method, allowing for flexible deployment across various computational constraints.

Datasets

  • COCO: Used extensively for training and evaluation, with specific splits for ZSD (48/17 and 65/15) and a newly proposed validation set.
  • ILSVRC: Used for evaluating ZSD performance.
  • Visual Genome: Used for evaluating ZSD performance, particularly on a large number of classes.

Key Insights and Ideas

  • Image Embeddings Matter: Aligning both image and text embeddings from CLIP, not just text, significantly boosts zero-shot detection performance. This suggests that leveraging the visual context of unseen objects directly is critical.
  • Self-Labeling for Free Data: The self-labeling technique is a powerful way to augment training data for ZSD without requiring any new human annotations or images, leading to substantial performance gains.
  • Post-processing is Key for Unseen Classes: A carefully designed post-processing step is essential to overcome the inherent biases in standard detectors and effectively recall unseen objects.
  • CLIP's Generalization Power: The success of ZSD-YOLO highlights CLIP's remarkable ability to generalize its learned visual-semantic representations to the challenging task of object detection.

Key Results

  • State-of-the-Art Performance: ZSD-YOLO achieves state-of-the-art results on the COCO (48/17 and 65/15 splits), ILSVRC, and Visual Genome ZSD benchmarks.
  • Significant Improvements:
    • On COCO 65/15 ZSD, it improves over the previous best by 4.7 mAP (approx. 34.6%).
  • On COCO 48/17 ZSD, it improves by 2.0 mAP (approx. 17.6%).
  • For GZSD on COCO 48/17, it achieves an 8.7% mAP improvement on unseen classes.
  • Self-labeling Gains: The self-labeling method provides an improvement of 0.8 mAP and 1.7 mAP on the 48/17 and 65/15 splits, respectively.
  • Post-processing Gains: The ZSD-tailored post-processing yields a 1.6 mAP and 3.6 mAP improvement on the 48/17 and 65/15 splits.
  • Efficiency: The ZSD-YOLOv5x model is over 3x faster than the previous state-of-the-art approach while achieving higher mAP.
  • Scalability: The method scales well with different YOLOv5 model sizes, showing consistent improvements.

Limitations and Future Work

  • Ambiguous Class Names: The paper notes that CLIP can sometimes embed ambiguous class names incorrectly (e.g., "mouse" for computer mouse vs. animal mouse). While they propose using definitions to mitigate this, it's an ongoing challenge.
  • False Positives of Seen as Unseen: A qualitative analysis reveals that the model sometimes misclassifies seen objects as unseen. This is attributed to the softmax-based class prediction, and future work could explore sigmoid-based activations or other methods to better filter out irrelevant objects.
  • Prompt Engineering: While the authors used simple prompts, they acknowledge that more sophisticated prompt engineering (like using definitions or manual tuning) can further improve performance, but they avoided this to adhere to strict ZSD benchmarking rules.
  • Future Directions: The authors suggest that ZSD is a promising research area with many applications and hope their work establishes a strong baseline for future research. They also highlight the potential for further exploration of model scaling and prompt engineering.

Summary updated

BibTeX
@inproceedings{xie2022zero,
  author = {Johnathan Xie and Shuai Zheng},
  title = {{Zero-shot Object Detection Through Vision-Language Embedding Alignment}},
  booktitle = {Workshops @ ICDM},
  year = {2022},
  url = {https://openreview.net/forum?id=aTCt1pnyRR},
}
Figure