Semantics-Guided Contrastive Network for Zero-Shot Object detection

Caixia Yan, Xiaojun Chang, Minnan Luo, Huan Liu, Xiaoqin Zhang, Qinghua Zheng · DOI

Introduction

Zero-Shot Object Detection (ZSD) represents a significant frontier in computer vision, aiming to detect and localize objects from categories that were never seen during training. Traditional object detection relies on exhaustive manual labeling, which is often impractical for rare or niche categories. ZSD bridges this gap by leveraging semantic descriptions—such as word embeddings—to transfer knowledge from "seen" classes to "unseen" ones.

Despite its potential, ZSD faces two critical challenges: seen-class bias and an unstructured feature space. Most existing models are trained exclusively on seen classes, causing them to incorrectly classify unseen objects as seen categories at test time. Furthermore, raw visual features extracted by standard CNNs are not naturally aligned with abstract semantic vectors, making the visual-semantic mapping task inherently difficult. This paper introduces ContrastZSD, a novel framework that addresses these issues through a dual-contrastive learning strategy.

The ContrastZSD Framework

ContrastZSD departs from the conventional "mapping-transfer" approach, which typically projects visual features directly into a fixed semantic space (like Word2Vec). Instead, the authors propose a mapping-contrastive strategy. This method projects both visual features and semantic embeddings into a shared, common intermediate embedding space, allowing for the simultaneous optimization of both modalities.

Built upon a Faster R-CNN backbone, the framework introduces two specialized subnets designed to structure the embedding space and mitigate bias.

1. Region-Category Contrastive Learning (RCCL)

The RCCL subnet is designed to align region proposals with their corresponding semantic concepts. To address the lack of unseen class data during training, the authors utilize a "class similarity matrix" derived from linguistic word vectors. This matrix provides pseudo-supervision, allowing the model to learn the relationships between seen and unseen categories early in the training process. By accounting for the distribution of unseen classes, RCCL significantly reduces the model's inherent bias toward seen categories.

2. Region-Region Contrastive Learning (RRCL)

While RCCL focuses on visual-semantic alignment, the RRCL subnet focuses on the structure of the visual features themselves. It applies a supervised contrastive loss to the visual regions, ensuring that features belonging to the same class are clustered together in the embedding space, while features from different classes are pushed apart. This creates a more discriminative and organized feature space, which simplifies the subsequent task of matching visual regions to semantic labels.

Experimental Evaluation

The authors evaluated ContrastZSD on two major benchmarks: PASCAL VOC and MS COCO. The latter is particularly challenging due to its scale and the complexity of its object categories.

Performance Metrics

ContrastZSD achieved state-of-the-art (SOTA) results across multiple metrics:

  • PASCAL VOC: The model reached a mean Average Precision (mAP) of 65.7%, surpassing the previous best of 62.1%.
  • MS COCO (48/17 split): The framework improved mAP from 10.6% to 12.5% and increased Recall@100 from 48.8% to 52.4%.
  • Generalized ZSD (GZSD): In GZSD scenarios—where both seen and unseen objects are present during testing—ContrastZSD demonstrated a superior Harmonic Mean (HM) score. This indicates that the model effectively detects unseen objects without degrading its performance on seen classes.

Qualitative analysis using t-SNE visualizations confirmed that ContrastZSD produces tighter, more distinct clusters for both seen and unseen categories compared to baseline ZSD methods.

Discussion and Future Directions

The success of ContrastZSD highlights two key insights: first, that accounting for unseen class distributions during training is vital for overcoming seen-class bias; and second, that the quality of the visual feature structure is just as important as the visual-semantic mapping itself.

However, some challenges remain. The model still faces ambiguity when distinguishing between "unseen" objects and the generic background. Additionally, the system's performance is heavily dependent on the quality of the underlying semantic embeddings (e.g., Word2Vec or GloVe). Future research may explore more sophisticated contrastive architectures or the integration of external knowledge bases to further refine the model's transferable logic and reduce its reliance on specific linguistic models.

Conclusion

ContrastZSD represents a significant step forward in Zero-Shot Object Detection. By integrating supervised contrastive learning and semantic guidance into a unified framework, the authors have created a model that is both more discriminative and less biased, setting a new benchmark for the field.

Summary updated

BibTeX
@article{yan2021semantics,
  author = {Caixia Yan and Xiaojun Chang and Minnan Luo and Huan Liu and Xiaoqin Zhang and Qinghua Zheng},
  title = {{Semantics-Guided Contrastive Network for Zero-Shot Object detection}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2021},
  doi = {10.1109/tpami.2021.3140070},
}
Figure