Abstract
Sketch-prompted CLIP (SpLIP) is a novel multi-modal prompt learning framework designed to significantly enhance zero-shot sketch-based image retrieval (ZS-SBIR). By enabling bi-directional knowledge exchange between CLIP’s visual and textual encoders, SpLIP bridges the domain gap between abstract sketches and realistic photos. Combined with an adaptive margin loss and a unique cross-modal jigsaw task, SpLIP achieves state-of-the-art performance across major categorical and fine-grained retrieval benchmarks.
Introduction
Sketch-Based Image Retrieval (SBIR) involves finding a specific photo in a database using a hand-drawn sketch as the query. This task is inherently difficult because sketches are iconic, sparse, and abstract, while photos are dense and pixel-rich. The challenge intensifies in Zero-Shot (ZS) settings, where the model must retrieve images for categories it never encountered during training.
While vision-language models like CLIP provide a strong foundation, existing methods typically rely on "uni-modal" prompting—modifying either the text or image side independently. This approach fails to capture the deep, synergistic relationship between how an object is described and how it is drawn. SpLIP addresses this by moving toward a dynamic, bi-directional learning scheme.
The SpLIP Framework
SpLIP introduces three key components to improve cross-modal alignment and fine-grained matching:
1. Bi-directional Prompt Sharing
Unlike previous methods that treat text and vision as separate silos, SpLIP implements a layer-wise exchange. Visual patch embeddings from the image encoder are used to generate textual tokens ($B_t$), and textual features guide visual prompts ($B_v$ and $B_{vt}$). This "mutual guidance" ensures both encoders are aware of the other's domain-specific nuances at every layer of the transformer.
2. Adaptive Margin Triplet Loss
Standard triplet loss uses a fixed margin to separate "positive" matches from "negative" ones. SpLIP utilizes CLIP’s own textual embeddings to calculate a dynamic margin. If two classes are semantically similar (e.g., "leopard" and "cheetah"), the model applies a larger margin to force the embedding space to learn finer, more discriminative distinctions.
3. Conditional Cross-Modal Jigsaw
To improve fine-grained (instance-level) matching, the authors propose a "jigsaw" task. The model is presented with a shuffled version of a sketch and must predict the correct patch arrangement. Crucially, this task is conditioned on the intact photo from the other modality, forcing the model to align local sketch details with global photo structures.
Experimental Results
The model was evaluated on three major benchmarks: Sketchy-Ext (125 classes), TU-Berlin-Ext (250 categories), and QuickDraw-Ext (highly abstract sketches). SpLIP consistently outperformed existing state-of-the-art (SOTA) methods across various scenarios:
- Zero-Shot SBIR: On the challenging QuickDraw-Ext dataset, SpLIP achieved a 34.2% mAP, a significant improvement over the previous best CLIP-based model (MARL at 32.7%) and nearly double the performance of non-CLIP models.
- Generalized Zero-Shot (GZS-SBIR): SpLIP demonstrated superior robustness when the search gallery contained both seen and unseen classes, outperforming the next best method by 4.8% on Sketchy-Ext.
- Fine-Grained Retrieval: In instance-level matching, SpLIP reached an Acc@1 of 33.45%, surpassing the previous SOTA (CLIP-AT) by nearly 5%.
Key Insights and Conclusion
The success of SpLIP highlights that visuals can effectively ground text; initializing textual prompts with visual distribution information significantly boosts generalization to unseen classes. The "secret sauce" is the bi-directional sharing, which narrows the semantic gap between abstract sketches and realistic photos more effectively than one-way prompting.
While SpLIP relies on computationally expensive backbones like ViT-B/32, its ability to master the sketch-photo-text triad sets a new standard for retrieval tasks. Future work may extend this multi-modal prompting strategy to broader domains such as 3D shapes or video-based retrieval, potentially streamlining the training pipeline while maintaining high performance.
Summary updated