Multi-granularity Association Learning for On-the-fly Fine-grained Sketch-based Image Retrieval

Dawei Dai, Xiaoyu Tang, Yingge Liu, Shuyin Xia, Guoyin Wang

TL;DR

The Multi-granularity Association Learning (MGAL) framework enables "on-the-fly" image retrieval, allowing systems to identify a specific photo while a user is still drawing a sketch. By dividing the drawing process into stages and forcing early, incomplete sketches to "anticipate" their finished versions in the embedding space, the model achieves state-of-the-art retrieval accuracy with significantly fewer strokes.

What Problem Does This Paper Address?

Fine-Grained Sketch-Based Image Retrieval (FG-SBIR) is the task of finding a specific photo (e.g., a particular pair of Nike shoes) based on a hand-drawn sketch. While standard SBIR has improved, it usually assumes the user provides a complete, polished drawing.

In reality, most people aren't artists. Drawing a detailed sketch is slow and difficult. The "on-the-fly" setting (introduced by Bhunia et al. 2020) aims to retrieve the target photo as soon as the first few strokes are drawn. The challenge is that incomplete sketches are highly diverse and "noisy"—a few lines for a shoe sole look very different from a finished shoe. Traditional triplet networks often get "confused" by this diversity, failing to link the early stages of a drawing to the final target image.

Methods

The authors propose the Multi-granularity Association Learning (MGAL) framework. Instead of treating every stroke as an independent query, they recognize that sketches are progressive and highly correlated.

  1. Multi-Stage Division: They divide a complete sketch episode into $k$ stages based on the number of strokes.
  2. Independent Mapping Layers: While the backbone (Inception-V3) and attention modules are shared, each stage has its own learnable linear mapping layer ($f_{31}, f_{32}, \dots, f_{3k}$). This allows the model to specialize in different levels of sketch "integrity."
  3. Association Learning: This is the "secret sauce." The framework uses a dual-loss approach:
  4. Triplet Loss: Ensures the sketch embedding is close to the target photo and far from "negative" photos.
  5. MSE Loss (The Association): Forces the embedding of a current incomplete sketch to approximate the embedding of its later, more complete versions. Essentially, it teaches the model to "fill in the blanks" and project where the sketch is going.

Datasets

The model was evaluated on two standard benchmarks:

  • QMUL-Shoe-V2: 6,730 sketches and 2,000 photos.
  • QMUL-Chair-V2: 2,000 sketches and 400 photos.

Crucially, the authors also conducted a Practical Test by inviting 40 graduate students to provide 300 real-world sketch episodes. This "users' data" benchmark tested the model's robustness against varying drawing styles and stroke orders not found in the cleaned training sets.

Key Insights and Ideas

  • Temporal Correlation Matters: The most important insight is that an incomplete sketch isn't just a "bad" sketch; it's a precursor. By explicitly modeling the relationship between a 30% complete sketch and a 100% complete sketch, the model learns a more efficient joint embedding space.
  • Differentiable vs. Non-Differentiable: Unlike previous Reinforcement Learning (RL) approaches that are often hard to train and non-differentiable, MGAL uses a simple, differentiable linear mapping strategy that converges faster and performs better.
  • Mitigating Diversity Confusion: By using stage-specific layers, the model avoids the "confusion" that occurs when a single network tries to map vastly different levels of detail (from a single line to a full drawing) to the same photo embedding.

Key Results

  • Superior Early Retrieval: On the Chair-V2 dataset, MGAL achieved an m@A (ranking percentile) of 88.95, significantly outperforming the RL-based state-of-the-art (85.44).
  • Efficiency: In qualitative examples, the MGAL framework could often find the true match in the top-5 list with only 30% of the sketch completed, whereas baseline models required 50-60% completion.
  • Real-World Performance: In the practical user test, MGAL's performance actually improved compared to the test set (reaching 91.28 m@A on chairs), suggesting it handles the "information density" of real human strokes better than synthetic stroke orders.

Limitations and Future Work

  • Stroke Order Sensitivity: While the paper explores different starting positions, the model still relies somewhat on the "integrity" (number of strokes). If a user draws in a highly unconventional order (e.g., drawing the laces before the shoe outline), the stage-based mapping might struggle.
  • Super-parameter $k$: The number of stages ($k$) is a hyperparameter. The authors found that while more stages generally help, too many can lead to overfitting and a decline in performance.
  • Model Complexity: The authors acknowledge that their implementation uses a "simple way" (linear layers) and suggest that more advanced architectures could be integrated into the MGAL framework in the future to handle even greater user diversity.

Summary updated

BibTeX
@article{dai2022multi,
  author = {Dawei Dai and Xiaoyu Tang and Yingge Liu and Shuyin Xia and Guoyin Wang},
  title = {{Multi-granularity Association Learning for On-the-fly Fine-grained Sketch-based Image Retrieval}},
  journal = {Knowledge-Based Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=xLNYvA1OvdS},
}

Loading related content...

Figure