Zero-Shot Sketch-Image Hashing

Yuming Shen, Li Liu, Fumin Shen, Ling Shao

Introduction

Sketch-Based Image Retrieval (SBIR) is a powerful tool that allows users to find photographs by simply drawing a query. However, traditional SBIR systems face two significant challenges: the Zero-Shot Gap and the Efficiency Bottleneck. Most existing models are restricted to categories seen during training; if a user draws an object from an "unseen" category, the model typically fails. Furthermore, searching through millions of high-dimensional image features is computationally expensive.

Comparison of conventional SBIR and the proposed Zero-Shot SBIR with hashing.

To address these issues, the Zero-Shot Sketch-Image Hashing (ZSIH) framework is introduced. ZSIH is the first framework to enable the retrieval of images from unseen categories using hand-drawn sketches while maintaining high efficiency through binary hashing. By mapping sketches and images into a shared Hamming space, the model generalizes to concepts never encountered during training.

Methodology

The ZSIH architecture is an end-to-end system composed of three primary sub-networks designed to bridge the gap between sketches and photographs.

The ZSIH architecture featuring encoding networks, multi-modal Kronecker fusion, and a semantic decoder.

Encoding Networks

Separate Convolutional Neural Networks (CNNs), based on AlexNet, are employed for sketches and images. These networks incorporate an Attention Mechanism to focus on informative regions—such as the silhouette of an object rather than its background—producing a 256-D feature vector for each modality.

Multi-Modal Code Learner

During training, a multi-modal network bridges the visual gap using two key innovations:

  • Kronecker Fusion Layer: Instead of simple concatenation, a Kronecker product models complex, high-dimensional interactions between sketch and image features. This captures the heterogeneity between messy sketches and detailed photos more effectively.
  • Graph Convolutional Networks (GCNs): The GCN utilizes word embeddings of category labels to model relationships between classes. By learning the structure of the semantic space (e.g., that a "tiger" is similar to a "cat"), the model can generalize to new categories at test time.

Generative Hashing

To ensure that the binary hash codes carry semantic meaning, a Semantic Decoder is integrated. This component attempts to reconstruct the original category's word embedding from the binary code. If the code can "rebuild" the concept, it serves as a robust representation for zero-shot tasks.

Experimental Setup

The model was evaluated on "Extended" versions of two benchmark datasets using a strict zero-shot split where training and test categories are disjoint:

  • Sketchy (Extended): 75,471 sketches and 73,002 images across 125 categories (25 reserved for testing).
  • TU-Berlin (Extended): 20,000 sketches and over 200,000 images across 250 categories (30 reserved for testing).

Key Results

ZSIH significantly outperforms existing cross-modal hashing and zero-shot methods across several metrics:

  • Accuracy: On the Sketchy dataset with 64-bit codes, ZSIH achieved a Mean Average Precision (mAP) of 0.254, nearly doubling the performance of the previous state-of-the-art (ZSH at 0.165).
  • Generalization: Performance steadily improved as the number of "seen" training classes increased, indicating the model effectively learns to generalize to new shapes.
  • Efficiency: Retrieval is extremely fast due to the binary nature of the codes. The retrieval time for a 64-bit code is approximately 0.000065 seconds, making it ideal for real-time, large-scale applications.

Discussion and Future Work

While ZSIH marks a significant step forward, its performance is tied to the diversity of the "seen" training classes. A narrow training set can limit zero-shot generalization. Additionally, the model's reliance on pre-trained word embeddings (e.g., Word2Vec) means that flaws in the semantic space can impact hashing performance. Future research may explore more advanced attention models or generative architectures, such as GANs, to further refine hash code quality.

Summary updated

BibTeX
@inproceedings{shen2018zero,
  author = {Yuming Shen and Li Liu and Fumin Shen and Ling Shao},
  title = {{Zero-Shot Sketch-Image Hashing}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00379},
}
Figure