SketchMate: Deep Hashing for Million-Scale Human Sketch Retrieval

Peng Xu, Yongye Huang, Tongtong Yuan, Kaiyue Pang, Yi-Zhe Song, Tao Xiang, Timothy M. Hospedales, Zhanyu Ma, Jun Guo

TL;DR

This paper introduces "SketchMate," a novel deep hashing framework for large-scale sketch retrieval, tackling the challenge of millions of sketches with varying abstraction levels and temporal stroke information. By combining CNNs for visual features and RNNs for stroke order, and introducing a new "sketch center loss," SketchMate significantly outperforms existing methods and generalizes well to other tasks like sketch recognition.

What Problem Does This Paper Address?

Sketch-based image retrieval (SBIR) aims to find matching images or sketches given a query sketch. While significant progress has been made, a major bottleneck has been the lack of large-scale, diverse sketch datasets. Existing research often relies on smaller datasets (tens of thousands of sketches) and treats sketches as static images, overlooking two crucial characteristics:

  1. High Abstraction: Sketches are inherently more abstract and iconic than photos, leading to greater variations in style and representation for the same object.
  2. Temporal Nature: Sketching is a dynamic process involving a sequence of strokes, where the order and timing of these strokes convey important information.

These factors make it challenging to learn discriminative features for accurate retrieval, especially at scale. Furthermore, traditional hashing methods, designed for static images, struggle to adapt to these sketch-specific traits.

Methods

The authors propose a deep hashing framework called SketchMate, which addresses the aforementioned challenges through several key innovations:

  • Two-Branch CNN-RNN Architecture: To capture both static visual features and dynamic temporal information, SketchMate employs a dual-branch network.
  • A CNN branch processes the sketch as a raster image to extract abstract visual concepts.
  • An RNN branch processes the sketch as a sequence of strokes (vector data) to model the temporal ordering.
  • These branches are late-fused via concatenation to combine their learned representations.
  • Novel Hashing Loss (Sketch Center Loss): To handle the high abstraction and potential noise in large-scale sketch datasets, a new loss function is introduced.
  • It builds upon standard cross-entropy loss (for classification) and quantization loss (to enforce binary codes).
  • The Sketch Center Loss aims to create more compact feature clusters for each sketch category in Hamming space. It achieves this by learning fixed, representative centers for each class, which is more robust and efficient for large datasets than traditional common center losses.
  • A noise removal technique using image entropy is employed to filter out overly abstract or messy sketches before computing class centers, further improving the robustness of the sketch center loss.
  • Quantization Encoding Layer: A final layer transforms the fused deep features into low-dimensional binary hash codes.

The training process involves a staged pretraining approach, starting with individual CNN and RNN training, followed by joint fine-tuning with different loss combinations.

Datasets

  • QuickDraw-3.8M: The authors construct a new dataset by randomly sampling 3.8 million sketches from the Google QuickDraw dataset [5]. This dataset is significantly larger than previous sketch datasets and is characterized by its noisiness and abstraction due to the drawing constraints (20 seconds per sketch, no post-processing).
  • TU-Berlin: Used for visual comparison of sketch characteristics.

Key Insights and Ideas

  • Temporal Information is Crucial for Sketches: The paper strongly demonstrates that ignoring the sequential nature of sketches leads to suboptimal performance. The RNN branch, capturing stroke order, significantly boosts retrieval accuracy, even outperforming CNN features alone.
  • Abstraction Demands Specialized Hashing: Standard hashing methods struggle with the high degree of visual abstraction in sketches. The proposed "Sketch Center Loss" is specifically designed to create tighter, more discriminative clusters in Hamming space, overcoming the limitations of traditional methods.
  • Large-Scale Data Enables New Discoveries: Working with a million-scale dataset allowed the authors to identify and address sketch-specific traits that were previously under-studied due to data limitations.
  • SketchMate's Versatility: The framework not only excels at sketch hashing but also shows strong generalization capabilities when repurposed for sketch recognition and zero-shot learning.

Key Results

  • State-of-the-Art Retrieval Performance: SketchMate achieves state-of-the-art performance on the QuickDraw-3.8M dataset, outperforming existing deep hashing methods (DLBHC, DSH-Sketch) by significant margins across various bit lengths (e.g., 6.11% MAP improvement at 16 bits, 5.50% at 64 bits).
  • Superiority over Static Image Hashing: Models designed for static images perform poorly on temporal sketch data, highlighting the need for sketch-specific approaches.
  • Improved Sketch Recognition: When adapted for sketch recognition, SketchMate achieves high accuracy (79.49%), surpassing other methods and demonstrating the benefit of its temporal and sketch-specific design.
  • Robust Zero-Shot Performance: The model demonstrates strong generalization to unseen categories in a zero-shot sketch hashing setting.
  • Efficient Retrieval: Despite operating on a million-scale dataset, SketchMate achieves real-time retrieval performance.

Limitations and Future Work

  • Noise in QuickDraw-3.8M: While the authors employ a noise removal technique, the QuickDraw-3.8M dataset is inherently noisy, which can still impact performance.
  • Computational Cost of Pretraining: The staged pretraining approach, while beneficial, adds to the overall training time.
  • Future Work: The paper suggests that further exploration of sketch-specific traits and the development of more sophisticated hashing losses for abstract data could lead to even greater improvements. The authors also plan to release their code and dataset.

Summary updated

BibTeX
@inproceedings{xu2018sketchmate,
  author = {Peng Xu and Yongye Huang and Tongtong Yuan and Kaiyue Pang and Yi-Zhe Song and Tao Xiang and Timothy M. Hospedales and Zhanyu Ma and Jun Guo},
  title = {{SketchMate: Deep Hashing for Million-Scale Human Sketch Retrieval}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00844},
}
Figure