Abstract
Sketch-Based Image Retrieval (SBIR) faces a significant "domain gap" between sparse, abstract sketches and dense, multi-channel photographic images. This paper introduces a novel benchmark for Zero-Shot Sketch-Based Image Retrieval (ZS-SBIR), requiring models to retrieve images from object classes not seen during training. Moving beyond traditional discriminative models that rely on label-matching, we propose a generative approach using Conditional Variational Autoencoders (CVAE). By "imagining" missing photographic details, our model learns latent alignments between hand-drawn shapes and photographic structures, significantly outperforming existing state-of-the-art methods in the zero-shot setting.
Introduction
The primary challenge in SBIR is the inherent abstraction of sketches compared to the rich information in photos. While traditional SBIR models perform well on seen classes, they often fail to generalize to new categories. This failure stems from a reliance on discriminative training, where models learn to map specific sketches to specific labels rather than understanding the fundamental relationship between shape and structure.
To address this, we define the Zero-Shot SBIR task and introduce a generative framework that bridges the domain gap by synthesizing photographic features from sketch inputs.
Methodology: A Generative Approach
Instead of simple classification, our framework utilizes Deep Conditional Generative Models to bridge the gap between sketches and photos. The core idea is that a model capable of generating likely photographic features from a sketch must have a deeper understanding of visual alignment than one that simply predicts a label.
Generative Architectures
We explored two primary architectures:
- Conditional Variational Autoencoder (CVAE): Maps a sketch to a latent distribution, allowing the model to sample multiple potential photographic feature vectors.
- Conditional Adversarial Autoencoder (CAAE): Employs a GAN-style discriminator to ensure that generated features are indistinguishable from real photographic features.
Reconstruction Regularization
To maintain the structural integrity of the original sketch, we implemented a reconstruction loss. This forces the model to be capable of reconstructing the original sketch features from the generated photographic features, ensuring the "imagined" details remain grounded in the input shape.
Retrieval Strategy
During retrieval, the model generates multiple possible image feature vectors for a single sketch, accounting for the inherent ambiguity of hand-drawn outlines. We use K-Means clustering to identify the central representation of these generated features, followed by a nearest-neighbor search within the image database.
Dataset and Benchmark
We utilize the Sketchy dataset, comprising over 75,000 sketches and 12,500 photos across 125 classes. To rigorously test zero-shot capabilities, we established a new benchmark split:
- Training: 104 classes.
- Testing: 21 classes (entirely unseen during training).
- Leakage Prevention: Test classes were selected to ensure they do not overlap with the 1,000 classes in ImageNet-1K, preventing models from relying on pre-trained photographic knowledge.
Experimental Results
Our generative models demonstrate a clear advantage over traditional discriminative baselines. While models like Deep Sketch Hashing (DSH) perform exceptionally well in traditional settings, their performance collapses in the zero-shot scenario.
As shown in the table above, traditional methods struggle significantly when faced with unseen classes. Our proposed CVAE model achieved a mAP@200 of 0.225 and a Precision@200 of 0.333, substantially outperforming the Siamese baseline (mAP 0.149) and DSH (mAP 0.059) in the zero-shot setting.
Key Insights
- Latent Alignment: Generative models are forced to learn how sketch lines correspond to photographic edges to successfully "hallucinate" missing information, whereas discriminative models often take "shortcuts" based on class labels.
- Stochasticity: The ability of the CVAE to sample from a distribution handles the ambiguity of sketches better than deterministic mappings.
- Shape-Based Retrieval: Qualitative analysis shows that even when the model misidentifies a class (e.g., retrieving a rhino for a cow sketch), the retrieved images share a very similar physical silhouette, indicating a strong grasp of shape-based alignment rather than just label-matching.
Conclusion
This work highlights the limitations of discriminative models in zero-shot scenarios and demonstrates the power of generative modeling for cross-domain retrieval. While the current approach relies on fixed feature extractors and involves higher computational complexity during retrieval, it sets a new standard for ZS-SBIR. Future research will focus on end-to-end feature learning and incorporating auxiliary information like textual attributes to further refine the retrieval process.
Summary updated