Single Shot Scene Text Retrieval

Lluís Gómez, Andrés Mafla, Marçal Rusiñol, Dimosthenis Karatzas

Abstract

This paper introduces a high-speed, single-shot framework for scene text retrieval that identifies and represents words in images simultaneously. By adapting the YOLOv2 object detector to predict Pyramidal Histogram of Characters (PHOC) vectors, the system achieves state-of-the-art accuracy while running significantly faster than traditional two-stage OCR pipelines. The proposed method is dictionary-free and capable of real-time indexing for large-scale image collections.

Introduction

Scene text retrieval is the task of finding all images in a database that contain a specific text query, such as searching for "Coffee" across thousands of street photos. Traditional approaches usually involve a two-step "detect-then-recognize" pipeline: first detecting text boxes and then running an OCR engine to recognize the characters.

Example of scene text retrieval for the query 'Tea' across diverse real-world environments.

This standard pipeline has two major flaws. First, speed: running heavy recognition models on every detected box is computationally expensive and slow. Second, vocabulary constraints: most OCR models are tied to a fixed dictionary, causing them to fail on out-of-dictionary words. The authors address these issues with a model that is dictionary-free and fast enough for real-time applications.

Methodology

The core innovation is the adaptation of the YOLOv2 (You Only Look Once) architecture. While standard YOLO predicts a class label for each bounding box, this model predicts a Pyramidal Histogram of Characters (PHOC) representation.

PHOC Representation

Instead of a single label, PHOC is a 604-dimensional binary vector that encodes which characters appear in which parts of a word. For example, it might encode whether an 'a' appears in the first half or a 'b' in the second quarter. This allows the model to represent any string, including those never seen during training.

Architecture and Training

The authors replaced the final softmax layer with a sigmoid activation and a binary cross-entropy loss, treating the task as a multi-label classification problem. Additionally, they optimized 13 anchor boxes specifically for the wider aspect ratios typical of text. At test time, a query word is converted into its PHOC vector, and retrieval is performed via a simple nearest-neighbor search between the query vector and the predicted vectors in the image database.

Experimental Setup

The model was trained on a synthetic dataset of 1 million images, supplemented with real images from ICDAR 2013 and 2015. Evaluation was conducted on three key datasets:

  • IIIT Scene Text Retrieval (STR): 10,000 images from Google/Flickr.
  • IIIT Sports-10K: 10,000 low-resolution, noisy frames from sports videos.
  • Street View Text (SVT): 249 test images from Google Street View.

Results and Discussion

The model demonstrates exceptional efficiency, reaching up to 53 FPS on a Titan X GPU. In contrast, many previous state-of-the-art methods operated at 0.1 to 1.0 FPS.

Performance Metrics

  • IIIT-STR: Achieved a Mean Average Precision (mAP) of 71.37%, outperforming the previous best of 66.5%.
  • Sports-10K: Reached 74.67% mAP, a significant improvement over the previous 67.5%.
  • SVT: Remained competitive with a mAP of 85.18%.

Key Insights

Because the model learns character attributes rather than whole words, it generalizes well to unseen words (zero-shot generalization), successfully retrieving brand names like "Castrol" and "Vodafone" not present in the training set. The single-shot approach avoids the overhead of cropping and re-processing regions, and the PHOC representation provides robustness to partial occlusions.

Conclusion and Future Work

While highly effective, the model faces challenges with highly stylized text (artistic fonts or logos) and very small or blurry text instances. Future research may explore alternative word embeddings beyond PHOC and diversify training data to handle more extreme font styles and computer-generated images.

Reference: Gómez, L., Mafla, A., Rusiñol, M., & Karatzas, D. (2018). Single Shot Scene Text Retrieval. Proceedings of the European Conference on Computer Vision (ECCV).

Summary updated

BibTeX
@inproceedings{gomez2018single,
  author = {Lluís Gómez and Andrés Mafla and Marçal Rusiñol and Dimosthenis Karatzas},
  title = {{Single Shot Scene Text Retrieval}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01264-9\_43},
}
Figure