Introduction
Cross-Domain Image Retrieval (CDIR) is a fundamental task in computer vision that involves matching queries from one domain (e.g., a hand-drawn sketch) to targets in another (e.g., a natural photograph). Traditional approaches typically fall into two categories: supervised methods, which require labor-intensive manual labeling of cross-domain pairs, and unsupervised methods, which often struggle to generalize to unseen object categories at test time.
In this work, the authors introduce a new paradigm: Weakly Supervised Zero-Shot CDIR (WSZS-CDIR). This setting leverages the zero-shot capabilities of large-scale foundation models like CLIP to generate automated, albeit noisy, "weak" labels. The goal is to train a robust model that can generalize to entirely new classes without any human-annotated data.
Methodology
The CLAIR framework introduces several key innovations to handle noisy labels and bridge domain gaps effectively:
1. Pseudo-Label Refinement
Rather than accepting CLIP's initial predictions as ground truth, CLAIR implements an iterative refinement process. It computes confidence scores based on the alignment between CLIP's text and image features. A KL-divergence loss is then used to update these labels, specifically targeting and correcting ambiguous assignments where the model is least certain.
2. Multi-Granular Contrastive Losses
To learn semantically rich and domain-invariant features, CLAIR employs a three-tiered contrastive learning strategy:
- Inter-instance: Standard alignment of different augmented views of the same image.
- Inter-cluster: Alignment of different images within the same domain that share the same pseudo-label.
- Inter-domain: Alignment of images representing the same category across different domains (e.g., matching a sketch of a bear to a photograph of a bear).
3. Closed-Form Cross-Domain Mapping
A novel aspect of CLAIR is its use of text-based domain alignment. By assuming that the semantic gap between text prompts (e.g., "a photo of a dog" vs. "a sketch of a dog") mirrors the gap in image space, the authors solve a Procrustes problem in closed-form. This produces a transformation matrix ($\Omega$) that aligns domains before training begins, providing a strong initialization without needing image pairs.
4. Efficient Prompt Learning
To preserve CLIP's broad generalization capabilities, CLAIR freezes most of the backbone parameters. It only trains the Layer Normalization layers and a small set of learnable prompt tokens, preventing catastrophic forgetting while specializing the model for the retrieval task.
Experimental Evaluation
The framework was evaluated on standard sketch-to-photo benchmarks (Sketchy, TUBerlin, and Quickdraw) and a new, more challenging split called DomainNet Zero-Shot, which spans six diverse domains and 345 categories.
Key Results
- State-of-the-Art Performance: CLAIR consistently outperformed existing unsupervised and weakly supervised methods. On the Sketchy dataset, it achieved a 65.74% P@200, a significant improvement over the previous best unsupervised method, AMA (58.50%).
- Zero-Shot Generalization: On the DomainNet Zero-Shot benchmark, CLAIR improved upon Vanilla CLIP by an average of 15.89% across all domain pairings.
- Efficiency: Due to its parameter-efficient tuning strategy, training is remarkably fast, requiring only about 21 minutes for complex DomainNet pairings.
Discussion and Limitations
While CLAIR sets a new benchmark for WSZS-CDIR, it faces certain challenges. The model's performance is tied to the underlying foundation model; for instance, it still struggles with highly abstract domains like Quickdraw. Additionally, current evaluation metrics often penalize the model for retrieving contextually relevant but "incorrectly" labeled images (e.g., retrieving a tree when the query is a monkey in a tree).
Future work may explore handling multi-object scenes and extending this framework to more diverse modalities beyond sketches and photos.
Summary updated