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:
- Query-by-Example (QbE): Searching using an image of the target word.
- 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.
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.
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