Neural Ctrl-F: Segmentation-Free Query-by-String Word Spotting in Handwritten Manuscript Collections

Tomas Wilkinson, Jonas Lindström, Anders BrunICCV 2017

Introduction

Searching through vast collections of historical handwritten documents is a significant challenge for researchers. Traditional Optical Character Recognition (OCR) systems often struggle with the inherent variability of cursive scripts, inconsistent spellings, and degraded document quality found in 17th-century court records or 18th-century correspondence. This paper presents Neural Ctrl-F, a deep learning framework designed to enable efficient "Find" functionality within digitized manuscript collections.

The Word Spotting Challenge

The primary objective is Word Spotting: identifying all instances of a specific query string (e.g., "hustru" or "the") across a corpus of images. Historically, this task has been approached in two ways:

  1. Query-by-Example (QbE): Searching using an image of the target word.
  2. Query-by-String (QbS): Searching using a typed text string.

Most existing systems require a pre-segmentation step, where pages are manually or automatically cropped into individual word images. This process is error-prone; if segmentation fails, the search fails. Neural Ctrl-F addresses this by proposing a segmentation-free approach that processes full-page images directly.

Methodology: Ctrl-F-Net

The proposed architecture, Ctrl-F-Net, treats word spotting as a joint object detection and embedding task, building upon the Faster R-CNN framework.

Architecture of the Ctrl-F-Net for segmentation-free word spotting.

1. Backbone and Region Proposals

The model utilizes a ResNet-34 backbone to extract high-level features from full-page manuscript images. To identify potential word locations, it employs a dual-proposal strategy:

  • Region Proposal Network (RPN): A standard component that suggests bounding boxes based on learned features.
  • Dilated Text Proposals (DTP): A complementary method based on connected components in the image, designed to ensure high recall in the dense text environments typical of historical manuscripts.

2. Joint Embedding Space

The core innovation lies in the embedding layer. Instead of simple classification, the network maps image regions into a high-dimensional vector space. Simultaneously, the query string is mapped into the same space using representations like PHOC (Pyramidal Histogram of Characters) or DCToW (Discrete Cosine Transform of Words). Word spotting is then performed by calculating the cosine similarity between the query embedding and the proposed region embeddings.

Experimental Evaluation

The model was evaluated on three benchmark datasets: the George Washington (GW) collection of 18th-century English correspondence, the IAM Offline dataset of modern English cursive, and the Linköping Court Records containing 17th-century Swedish legal documents.

Example of word spotting results on the George Washington dataset, highlighting occurrences of 'the' and 'that'.

Results and Discussion

Ctrl-F-Net achieved state-of-the-art results across all datasets. On the George Washington dataset, it reached a Mean Average Precision (MAP) of 96.3%, a substantial improvement over previous segmentation-free methods which typically scored between 73% and 80%. Notably, the model outperformed several segmentation-based methods, even when those methods were provided with ground-truth word boundaries.

In a real-world application involving Swedish court records, the system successfully assisted historians in tracking the term "hustru" (wife) to analyze women's labor history, achieving a MAP of 97.9% for that specific query.

Conclusion

Neural Ctrl-F demonstrates that a segmentation-free, end-to-end neural approach is highly effective for searching historical manuscripts. By bypassing the need for perfect word-level cropping and leveraging joint image-text embeddings, the system provides a robust and scalable solution for digitizing and exploring our written heritage.

Summary updated

BibTeX
@inproceedings{wilkinson2017neural,
  author = {Tomas Wilkinson and Jonas Lindström and Anders Brun},
  title = {{Neural Ctrl-F: Segmentation-Free Query-by-String Word Spotting in Handwritten Manuscript Collections}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2017},
  doi = {10.1109/iccv.2017.475},
}
Figure