SpottingNet: Learning the Similarity of Word Images with Convolutional Neural Network for Word Spotting in Handwritten Historical Documents

Zhuoyao Zhong, Weishen Pan, Lianwen Jin, Harold Mouchère, Christian Viard-Gaudin

Introduction

In the field of digital humanities, "word spotting" is a critical task that enables researchers to locate specific words within vast collections of digitized historical manuscripts. This task is particularly challenging for handwritten archives where standard Optical Character Recognition (OCR) systems frequently fail due to ink bleed, varying calligraphic styles, and the physical degradation of paper over centuries.

This paper introduces SpottingNet, a deep learning framework designed for Query-by-Example (QBE) word spotting. In a QBE scenario, a user provides an image of a word, and the system retrieves all similar instances from a database. While traditional methods relied on hand-crafted features (such as SIFT or projection profiles) and sequence matching algorithms like Dynamic Time Warping (DTW), SpottingNet treats word spotting as a similarity learning problem solved through an end-to-end convolutional neural network (CNN).

The SpottingNet Framework

Similarity Score Fusion

A core innovation of SpottingNet is its dual-output approach to similarity. Rather than relying on a single metric, the researchers combined a classification model and a regression model. The classifier predicts a discrete label distribution (determining if a pair is "similar" or "dissimilar"), while the regressor predicts a continuous similarity score.

The similarity score fusion pipeline combining classification ($S_{cls}$) and regression ($S_{reg}$) outputs.

As illustrated in the fusion pipeline above, these two scores are combined ($S_{fuse}$) to produce a final ranking. This "complementary" effect allows the system to capture different nuances of visual similarity, leading to a more robust retrieval process than either model could achieve in isolation.

2-Channel DCNN Architecture

The authors explored several network configurations, including Siamese and Pseudo-Siamese architectures. However, they found that a 2-channel architecture yielded the best performance. In this setup, both word images are fed into a single Deep Convolutional Neural Network (DCNN) as different color channels at the very first layer. This allows the network to learn complex, joint features of the image pair from the outset.

Detailed architecture of the DCNN used in SpottingNet, showing the 2-channel input and layer configurations.

The DCNN structure consists of multiple convolutional and max-pooling layers, followed by fully connected (FC) layers. The input size of 2@40x100 (as seen in the figure) represents the two word images being processed together. The researchers also noted that using Softmax loss for the classification task significantly outperformed the standard Hinge loss.

Training and Data Augmentation

A major hurdle in training similarity models for word spotting is "data imbalance." While there are millions of ways two word images can differ, there are relatively few ways they can be identical. To address this, the authors implemented "location jitter" augmentation. By slightly shifting the cropping window around a word, they generated numerous "positive" examples, effectively balancing the training set and preventing the model from being overwhelmed by dissimilar pairs.

Experimental Evaluation

The system was evaluated using the George Washington (GW) dataset, a benchmark consisting of 20 pages (4,860 words) of letters. The model was tested in a "recognition-free" setting, meaning it relied purely on visual similarity without prior knowledge of the words' linguistic meanings.

Key Results

SpottingNet achieved a significant leap in performance over traditional baselines:

  • State-of-the-Art Accuracy: The model reached a mean Average Precision (mAP) of 80.03%.
  • Comparative Gains: This represents a massive improvement over previous best results on the same dataset, which sat at approximately 62.72% using SIFT and Fisher Vectors.
  • Robustness: Qualitative analysis showed that the model successfully retrieved words across varying handwriting styles, though it faced minor difficulties with very short words (e.g., "a" vs. "as").

Conclusion and Future Work

SpottingNet demonstrates that deep similarity learning can overcome the limitations of hand-crafted features in historical document analysis. By fusing classification and regression scores within a 2-channel CNN, the authors achieved a new state-of-the-art for the George Washington dataset.

Future work will focus on reducing the computational cost of the 2-channel forward pass and integrating text localization directly into the pipeline. This would move the field closer to a fully automated, segmentation-free search engine for historical archives.

Summary updated

BibTeX
@inproceedings{zhong2016spottingnet,
  author = {Zhuoyao Zhong and Weishen Pan and Lianwen Jin and Harold Mouchère and Christian Viard-Gaudin},
  title = {{SpottingNet: Learning the Similarity of Word Images with Convolutional Neural Network for Word Spotting in Handwritten Historical Documents}},
  booktitle = {ICFHR},
  year = {2016},
  doi = {10.1109/icfhr.2016.0063},
}
Figure