Skip to main content
QUICK REVIEW

[Paper Review] You Actually Look Twice At it (YALTAi): using an object detection approach instead of region segmentation within the Kraken engine

Thibault Clérice|arXiv (Cornell University)|Jul 19, 2022
Infrared Target Detection MethodologiesEngineering2 citations
TL;DR

This paper proposes YALTAi, a method that replaces Kraken's pixel-based layout segmentation with YOLOv5 object detection using isothetic bounding boxes, significantly improving accuracy and speed on small historical document datasets. It achieves up to 100× better column detection and doubles main body detection scores compared to Kraken, while providing a new open-source package and two benchmark datasets for historical documents.

ABSTRACT

Layout Analysis (the identification of zones and their classification) is the first step along line segmentation in Optical Character Recognition and similar tasks. The ability of identifying main body of text from marginal text or running titles makes the difference between extracting the work full text of a digitized book and noisy outputs. We show that most segmenters focus on pixel classification and that polygonization of this output has not been used as a target for the latest competition on historical document (ICDAR 2017 and onwards), despite being the focus in the early 2010s. We propose to shift, for efficiency, the task from a pixel classification-based polygonization to an object detection using isothetic rectangles. We compare the output of Kraken and YOLOv5 in terms of segmentation and show that the later severely outperforms the first on small datasets (1110 samples and below). We release two datasets for training and evaluation on historical documents as well as a new package, YALTAi, which injects YOLOv5 in the segmentation pipeline of Kraken 4.1.

Motivation & Objective

  • To address Kraken’s poor performance on small datasets (≤1110 samples), especially in distinguishing adjacent text regions like columns and marginalia.
  • To overcome the limitations of pixel-wise classification and polygonization in layout analysis, which hinder accurate main body text extraction.
  • To propose a shift from polygon and pixel labeling to object detection using bounding boxes for improved efficiency and accuracy.
  • To release two new datasets—YALTAi-Tables and YALTAi-MSS-EPB—for training and evaluating layout segmentation on historical documents.
  • To develop YALTAi, a plug-in package that integrates YOLOv5 into Kraken’s pipeline, enabling YOLO-based region detection with a Kraken-like CLI.

Proposed method

  • Reframe layout segmentation as an object detection task using YOLOv5, predicting isothetic bounding boxes instead of pixel-level segmentation.
  • Convert ALTO XML annotations into YOLOv5-compatible label formats (e.g., class ID, normalized center, width, height) for training.
  • Train YOLOv5n and YOLOv5x models on two new datasets: YALTAi-Tables (16th–early 20th c. tabular documents) and YALTAi-MSS-EPB (9th–16th c. manuscripts and early printed books).
  • Integrate YOLOv5 detection into Kraken’s pipeline via the YALTAi package, replacing Kraken’s segmenter with YOLOv5 while preserving Kraken’s line serialization and OCR workflow.
  • Use the Segmonto ontology for consistent labeling of document zones (e.g., Main, DropCapital, MarginText) across both datasets.
  • Enable model inference and conversion between ALTO and YOLOv5 formats via a command-line interface that mirrors Kraken’s interface.

Experimental results

Research questions

  • RQ1Can object detection with YOLOv5 outperform Kraken’s pixel-based segmentation in layout analysis for small historical document datasets?
  • RQ2How does the shift from polygonization and pixel classification to bounding box detection affect accuracy and inference speed in document layout segmentation?
  • RQ3To what extent can YOLOv5 generalize to unseen historical document layouts, especially in complex multi-column or tabular formats?
  • RQ4What is the impact of model size and architecture (YOLOv5n vs. YOLOv5x) on performance and efficiency in small-data scenarios?
  • RQ5Can the integration of YOLOv5 into Kraken’s pipeline preserve compatibility with existing HTR and OCR workflows while improving segmentation quality?

Key findings

  • YOLOv5x achieved a mean Average Precision (mAP) of 47.75% on the Main zone in the Segmonto dataset, compared to Kraken’s 6.98%, representing a more than 6-fold improvement.
  • On the YALTAi-Tables dataset, YOLOv5x achieved 4.77% mAP for the Col zone and 12.9% for Header, while Kraken scored only 0.09% and 0.1%, respectively.
  • YOLOv5n outperformed Kraken on all zones except RunningTitle, with a 34.63% mAP on the Main zone versus Kraken’s 6.98%.
  • YOLOv5 models showed significantly better inference speed, with a median prediction time of 0.004s for YOLOv5n and 0.025s for YOLOv5x per image, compared to Kraken’s lack of batch processing and longer training times.
  • YOLOv5 demonstrated superior generalization on unseen tabular documents, correctly detecting and separating multiple columns where Kraken merged them into a single zone.
  • The YALTAi package reduced GPU memory usage by up to 50% and peak power consumption by 30% compared to Kraken, while maintaining high accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.