Zero-Shot Sketch Based Image Retrieval Using Graph Transformer

Sumrit Gupta, Ushasi Chaudhuri, Biplab Banerjee, Saurabh KumarICPR 2022 · DOI

TL;DR

This paper introduces GTZSR, a novel framework for Zero-Shot Sketch-Based Image Retrieval (ZS-SBIR) that tackles the significant domain gap between sketches and images. By employing a graph transformer to preserve semantic relationships and a Wasserstein distance with a new compatibility loss to align visual features, GTZSR achieves state-of-the-art performance on challenging ZS-SBIR and generalized ZS-SBIR tasks.

What Problem Does This Paper Address?

Sketch-Based Image Retrieval (SBIR) systems allow users to search for images using hand-drawn sketches. A major hurdle in this field is the "domain gap" – the stark difference in appearance between a user's sketch and a real-world photograph of the same object. This gap is further exacerbated in Zero-Shot SBIR (ZS-SBIR), where the system must retrieve images of object categories it has never seen during training. This requires leveraging auxiliary "side information," typically semantic descriptions of the classes. However, existing methods struggle to effectively bridge the visual domain gap while simultaneously utilizing semantic information to generalize to unseen classes. Furthermore, the performance of ZS-SBIR models is highly sensitive to the choice of semantic information, and a lack of standardized evaluation metrics makes direct comparison difficult.

Methods

The GTZSR framework introduces several key innovations:

  • Graph Transformer for Semantic Topology: Instead of treating semantic information as mere labels, GTZSR uses a graph transformer. This component models the relationships between class names (e.g., how "cat" is related to "dog" semantically) and preserves this topological structure within the learned embedding space. This helps the model generalize better to unseen classes by understanding their relationships to known classes.
  • Wasserstein Distance for Domain Alignment: To bridge the visual domain gap between sketches and images, the authors employ the Wasserstein distance. This metric is particularly well-suited for aligning probability distributions, making it effective for matching the underlying feature distributions of sketches and images, even when their appearances differ significantly.
  • Novel Compatibility Loss: A new "compatibility loss" is introduced to further align the sketch and image modalities. This loss encourages the feature embeddings of a sketch from one class to be closer to images of the same class than to images of any other class, effectively enforcing cross-modal alignment at a finer-grained level.
  • Dual Encoding Networks: Separate encoding networks are used for images and sketches to capture their unique characteristics, while the learned embedding space is designed to be modality-agnostic.

Datasets

The paper evaluates GTZSR on three standard benchmark datasets:

  • Extended Sketchy: A widely used dataset for sketch-based retrieval.
  • TU-Berlin-Extended: Another established dataset for sketch and image retrieval.
  • QuickDraw-Extended: A large-scale dataset that includes amateur sketches, making it more representative of real-world scenarios.

The authors also note that the train/test splits are carefully managed to ensure that testing categories do not appear in the training set, crucial for evaluating zero-shot capabilities.

Key Insights and Ideas

  • Semantic Topology Matters: The paper strongly advocates for preserving the relational structure of semantic information, not just the individual semantic embeddings. The graph transformer's success highlights that understanding how concepts relate to each other is key for generalization.
  • Wasserstein Distance is Powerful for Domain Bridging: The choice of Wasserstein distance is justified by its ability to align feature distributions, which is more crucial than exact likelihood matching when dealing with visually dissimilar modalities like sketches and photos.
  • Cross-Class Compatibility is Crucial: The novel compatibility loss demonstrates that aligning individual sketch-image pairs isn't enough; aligning the relationships between classes across modalities is vital for robust zero-shot performance.
  • Standardization is Needed: The authors implicitly highlight the need for standardized evaluation metrics (mAP, P@100, P@200) to enable fair comparisons across different ZS-SBIR methods.

Key Results

GTZSR achieves significant improvements over existing state-of-the-art methods on both ZS-SBIR and generalized ZS-SBIR tasks across all three datasets. For instance, on the QuickDraw-extended dataset, GTZSR achieves a mAP of 51.8%, a substantial leap from previous methods. The ablation studies also confirm the importance of each proposed component: removing the graph transformer leads to a significant performance drop (around 22% in mAP), underscoring its critical role.

Limitations and Future Work

The authors acknowledge that the current framework is designed for single-label retrieval. They suggest that future work could extend this to multi-label scenarios (e.g., an image containing both a car and a dog) by exploring modified loss functions like cross-triplet or quadruplet losses to handle multi-class classification more effectively. They also mention the potential for using more sophisticated attention mechanisms and exploring different graph structures.

Summary updated

BibTeX
@inproceedings{gupta2022zero,
  author = {Sumrit Gupta and Ushasi Chaudhuri and Biplab Banerjee and Saurabh Kumar},
  title = {{Zero-Shot Sketch Based Image Retrieval Using Graph Transformer}},
  booktitle = {ICPR},
  year = {2022},
  doi = {10.1109/icpr56361.2022.9956095},
}
Figure