Learning Cross-Modal Deep Embeddings for Multi-Object Image Retrieval using Text and Sketch

Sounak Dey, Anjan Dutta, Suman K. Ghosh, Ernest Valveny, Josep Lladós, Umapada Pal · DOI

Introduction

Traditional image retrieval systems typically operate within a single modality: Content-Based Image Retrieval (CBIR) requires an example image, while Text-Based Retrieval (TBIR) relies on keywords. Hand-drawn sketches offer a compelling middle ground, capturing shape and pose more effectively than text. However, Sketch-Based Image Retrieval (SBIR) faces significant challenges due to the "domain gap" between abstract human drawings and realistic photographs.

Furthermore, most existing systems are limited to "single-object syndrome," performing well when searching for a single entity (e.g., "a dog") but struggling with complex scenes containing multiple specific objects (e.g., "a dog with an apple"). This research introduces a unified cross-modal retrieval system that bridges the gap between text, sketches, and images, specifically designed to handle multi-object queries.

The system supports multiple input modalities, including sketches, text, and combinations thereof, to retrieve images containing multiple objects.

Methodology: A Unified Embedding Space

The core of the proposed system is a deep learning architecture that maps text, sketches, and images into a single common embedding space. In this space, semantic concepts are represented as mathematical vectors, allowing a word like "dog," a sketch of a dog, and a photograph of a dog to reside in close proximity.

Architecture Components

The framework utilizes specialized encoders for each modality:

  • Sketch Encoder: A modified VGG-16 network pre-trained on the Sketchy dataset.
  • Text Encoder: Pre-trained Word2vec embeddings to capture semantic meaning.
  • Image Encoder with Attention: Convolutional layers of a VGG-16 extract spatial features from target images.

To address multi-object complexity, the researchers implemented a sequential attention mechanism powered by a Long Short-Term Memory (LSTM) network. When a user provides a multi-object query, the LSTM iteratively focuses on different spatial regions of the image to verify the presence of each requested object. The entire system is optimized using a cosine embedding loss, which minimizes the distance between matching query-image pairs while maximizing the distance between non-matching ones.

The architecture utilizes VGG-16 and Word2vec encoders, feeding into an LSTM-based attention mechanism to identify multiple objects within an image.

Datasets and Evaluation

The model was trained and evaluated using two primary sources:

  1. Sketchy Dataset: Comprising over 75,000 sketches and 12,500 photos across 125 classes, used for single-object training.
  2. COCO (Common Objects in Context): To evaluate multi-object retrieval, the authors created a custom benchmark from COCO images containing pairs of objects found in the Sketchy dataset, resulting in 365 combined object classes.

Performance Results

The proposed method significantly outperformed state-of-the-art (SOTA) models such as GN Triplet and Sketch-a-Net.

  • Single-Object Retrieval: The model achieved a Mean Average Precision (mAP) of 68.81, surpassing the previous best of 65.18.
  • Multi-Object Retrieval: The advantage was even more pronounced in complex scenarios. For two-object queries, the system reached an mAP of 12.06, nearly tripling the performance of the GN Triplet baseline (4.23).

Insights and Future Directions

A key finding of the study is the effectiveness of the sequential attention mechanism. Rather than attempting to process a complex scene as a single entity, the model mimics human visual search by focusing on specific parts of the image one after another. Interestingly, the system generally performed better with text queries than sketches, suggesting that the semantic gap between text and images is currently easier for models to bridge than the stylistic gap between rough sketches and photos.

While this work represents a major advancement, challenges remain. The scarcity of datasets containing multiple sketches corresponding to a single complex image limits training opportunities. Additionally, while the system excels at two-object queries, scaling to highly complex scenes with many objects is a target for future research. The authors also plan to explore "mixed-modality" queries, such as combining a specific sketch with a descriptive text string (e.g., a sketch of a chair + the word "red").

Summary updated

BibTeX
@inproceedings{dey2018learning,
  author = {Sounak Dey and Anjan Dutta and Suman K. Ghosh and Ernest Valveny and Josep Lladós and Umapada Pal},
  title = {{Learning Cross-Modal Deep Embeddings for Multi-Object Image Retrieval using Text and Sketch}},
  booktitle = {ICPR},
  year = {2018},
  doi = {10.1109/icpr.2018.8545452},
}
Figure