Weakly-Supervised Conditional Embedding for Referred Visual Search

Simon Lepage, Jérémie Mary, David PicardarXiv 2023 · OpenReview

Abstract: This paper presents a new approach to image similarity search in the context of fashion, a domain with inherent ambiguity due to the multiple ways in which images can be considered similar. We introduce the concept of Referred Visual Search (RVS), where users provide additional information to define the desired similarity. We present a new dataset, LAION-RVS-Fashion, consisting of 272K fashion products with 842K images extracted from LAION, designed explicitly for this task. We then propose an innovative method for learning conditional embeddings using weakly-supervised training, achieving a 6% increase in Recall at one (R@1) against a gallery with 2M distractors, compared to classical approaches based on explicit attention and filtering. The proposed method demonstrates robustness, maintaining similar R@1 when dealing with 2.5 times as many distractors as the baseline methods. We believe this is a step forward in the emerging field of Referred Visual Search both in terms of accessible data and approach.

Introduction

In the world of e-commerce, visual search is a standard feature. However, traditional image retrieval is often "global," assuming the entire image represents the query. In fashion, a single street-style photo typically contains multiple items: a jacket, pants, shoes, and accessories. If a user wants to find only the jacket, a standard search might be distracted by other elements in the scene.

This challenge is addressed through Referred Visual Search (RVS), where the search engine is guided by a secondary signal—such as a category or a text prompt—to isolate the item of interest within a complex image.

Overview of the Referred Visual Search (RVS) task, where a query image is combined with categorical or textual conditioning to retrieve specific items.

The LAION-RVS-Fashion Dataset

To support this research, the authors introduced LAION-RVS-Fashion, a large-scale public dataset derived from LAION-5B. The dataset contains 272,000 unique fashion products and 842,000 images. Its core structure relies on pairing "complex" images (products worn by models in various settings) with "simple" images (the same product isolated on a neutral background). The dataset includes synthetic captions generated by BLIP-2 and 11 coarse fashion categories, providing the necessary metadata for conditional learning.

Examples from the LAION-RVS-Fashion dataset showing the pairing of complex scene images with isolated product shots and associated metadata.

Methodology: CondViT

The proposed solution, CondViT (Conditional Vision Transformer), moves away from traditional "detect-then-retrieve" pipelines. Instead of using a separate object detector to crop the image—a process that is computationally expensive and prone to error—CondViT learns to "focus" on specific objects directly from the full image.

Key features of the architecture include:

  1. Conditioning Tokens: An "instruction token" representing the user's intent (category or text embedding) is prepended to the image patches.
  2. Early Fusion: Injecting this instruction at the first layer allows the model's attention mechanism to filter out irrelevant parts of the scene as data flows through the network.
  3. Weakly-Supervised Contrastive Learning: The model is trained using an InfoNCE loss to align the embedding of a complex scene (with instructions) with the embedding of a simple catalog image of the same product. Crucially, the model never requires bounding boxes during training.

Key Results and Insights

CondViT demonstrates remarkable robustness and efficiency:

  • Performance at Scale: Against a gallery of 2 million distractor images, the categorical CondViT-B/16 achieved a Recall@1 of 68.4%. Textual conditioning (e.g., "Same handbag") further improved this to 69.3%.
  • Detection is Optional: CondViT outperforms strong detection-based baselines (like Grounding DINO + Segment Anything) by approximately 6% in R@1. By maintaining the full image context, the model avoids the pitfalls of poor cropping.
  • Efficiency: The method adds negligible overhead—only ~7.7k extra parameters—compared to a standard ViT, whereas detection-based alternatives require hundreds of millions of additional parameters.

Conclusion

CondViT offers a surprisingly elegant and scalable solution to the ambiguity of fashion search. By bypassing explicit detection in favor of weakly-supervised conditional embeddings, the model achieves state-of-the-art performance while remaining computationally efficient. Future work may extend this referred search approach to other complex domains like home decor or electronics.

Reference: Lepage, S., Mary, J., & Picard, D. (2024). LRVS-Fashion: Extending Visual Search with Referring Instructions. arXiv:2306.02928v3.

Summary updated

BibTeX
@misc{lepage2023weakly,
  author = {Simon Lepage and Jérémie Mary and David Picard},
  title = {{Weakly-Supervised Conditional Embedding for Referred Visual Search}},
  year = {2023},
  eprint = {2306.02928},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.02928},
}

Loading related content...

Figure