Skip to main content
QUICK REVIEW

[Paper Review] CLIP for All Things Zero-Shot Sketch-Based Image Retrieval, Fine-Grained or Not

Aneeshan Sain, Ayan Kumar Bhunia|arXiv (Cornell University)|Mar 23, 2023
Advanced Image and Video Retrieval TechniquesComputer Science5 citations
TL;DR

This paper proposes a novel prompt-based CLIP adaptation for zero-shot sketch-based image retrieval (ZS-SBIR), achieving state-of-the-art performance on both category-level and fine-grained ZS-SBIR. By introducing sketch-specific visual prompts, a regularization loss to unify sketch-photo feature distances across categories, and a patch-shuffling technique for structural correspondence, the method improves accuracy by 24.8% and 26.9% over prior SOTA, respectively.

ABSTRACT

In this paper, we leverage CLIP for zero-shot sketch based image retrieval (ZS-SBIR). We are largely inspired by recent advances on foundation models and the unparalleled generalisation ability they seem to offer, but for the first time tailor it to benefit the sketch community. We put forward novel designs on how best to achieve this synergy, for both the category setting and the fine-grained setting ("all"). At the very core of our solution is a prompt learning setup. First we show just via factoring in sketch-specific prompts, we already have a category-level ZS-SBIR system that overshoots all prior arts, by a large margin (24.8%) - a great testimony on studying the CLIP and ZS-SBIR synergy. Moving onto the fine-grained setup is however trickier, and requires a deeper dive into this synergy. For that, we come up with two specific designs to tackle the fine-grained matching nature of the problem: (i) an additional regularisation loss to ensure the relative separation between sketches and photos is uniform across categories, which is not the case for the gold standard standalone triplet loss, and (ii) a clever patch shuffling technique to help establishing instance-level structural correspondences between sketch-photo pairs. With these designs, we again observe significant performance gains in the region of 26.9% over previous state-of-the-art. The take-home message, if any, is the proposed CLIP and prompt learning paradigm carries great promise in tackling other sketch-related tasks (not limited to ZS-SBIR) where data scarcity remains a great challenge. Project page: https://aneeshan95.github.io/Sketch_LVM/

Motivation & Objective

  • To address data scarcity in sketch-based image retrieval by leveraging CLIP's zero-shot generalization capability.
  • To enable effective zero-shot sketch-based image retrieval across both category-level and fine-grained settings using CLIP.
  • To design a prompt learning framework that preserves CLIP's generalization while adapting it to sketch-photo alignment.
  • To overcome challenges in fine-grained ZS-SBIR, including non-uniform feature distances and the need for instance-level structural correspondence.
  • To demonstrate the broader potential of foundation models like CLIP for low-resource sketch-related vision tasks.

Proposed method

  • Introduces modality-specific visual prompts (for sketch and photo) injected into CLIP's image encoder, trained via triplet loss while keeping CLIP weights frozen.
  • Applies a novel regularization loss based on KL-divergence between relative sketch-photo distance distributions across categories to enforce uniformity in feature distances.
  • Proposes a patch-shuffling technique that trains the model to recognize correspondence between shuffled sketch and photo patches under the same permutation, enabling instance-level structural alignment.
  • Fine-tunes a small subset of Layer Normalization parameters in CLIP for additional performance gain.
  • Uses CLIP’s text encoder with handcrafted prompts (e.g., 'a photo of a [category]') to enhance semantic transfer, replacing word2vec embeddings.
  • Employs ablation studies to validate the contribution of each component, including prompt length and prompt learning vs. handcrafted prompts.

Experimental results

Research questions

  • RQ1Can CLIP be effectively adapted for zero-shot sketch-based image retrieval using prompt learning, and does it outperform prior methods?
  • RQ2How can CLIP’s generalization be leveraged to improve cross-category semantic transfer in ZS-SBIR?
  • RQ3What challenges arise in fine-grained ZS-SBIR that are not present in category-level ZS-SBIR, and how can they be addressed?
  • RQ4Does learning text prompts improve performance over handcrafted prompts in this zero-shot sketch retrieval setup?
  • RQ5How does sketch-based retrieval compare to keyword-based retrieval in terms of fine-grained detail modeling?

Key findings

  • The proposed method achieves a 24.8% relative improvement in mAP@all on the Sketchy dataset for category-level ZS-SBIR, surpassing prior SOTA.
  • For fine-grained ZS-SBIR, the method achieves a 26.9% relative improvement in Top-1 accuracy on Sketchy, setting a new SOTA.
  • Removing the f-divergence regularization loss (Lδ) reduces Top-1 accuracy by 3.75% on FG-ZS-SBIR, confirming its importance in balancing inter-category feature distances.
  • The patch-shuffling loss (LPS) contributes 3.15% to Top-1 accuracy on FG-ZS-SBIR, demonstrating its effectiveness in learning structural correspondences.
  • Using CLIP’s text encoder with handcrafted prompts yields 4.57% higher Top-1 accuracy than word2vec embeddings, proving the value of vision-language pre-training.
  • Learning text prompts instead of using handcrafted ones reduces performance by 2.36% in Top-1 accuracy, indicating that handcrafted natural language prompts generalize better in this context.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.