Layout Analysis and Content Classification in Digitized Books

Andrea Corbelli, Lorenzo Baraldi, Fabrizio Balducci, Costantino Grana, Rita Cucchiara

TL;DR

This paper presents a novel pipeline for automatically analyzing the layout and classifying the content of digitized books. By combining a robust layout segmentation method with a sophisticated content classification approach, the system generates structured JSON descriptions that can be used for enhanced visualization and annotation of historical documents.

What Problem Does This Paper Address?

Digitizing historical books is crucial for preservation and accessibility, but simply creating digital copies isn't enough. To make these archives truly useful, we need to go beyond basic text recognition (OCR) and automatically understand the structure and content of each page. This includes identifying and categorizing elements like text blocks, images, tables, and charts. The challenge lies in the high variability of document layouts and content, making it difficult to create a general-purpose solution. Existing methods often struggle with complex layouts or require significant manual intervention.

Methods

The proposed pipeline consists of two main stages:

  • Page Layout Segmentation: This stage builds upon the well-known Recursive XY-Cut algorithm, an iterative top-down method that segments pages into rectangular regions based on white space. To overcome its limitations, especially with complex shapes or elements surrounded by text, the authors introduce an SVM-aided detector for illustrations. This detector uses local autocorrelation statistics to distinguish between text and illustration blocks, feeding the resulting features into a Support Vector Machine (SVM) classifier. After identifying illustrations, XY-Cut is reapplied on a temporary image with illustrations removed, and the final segmentation is the union of detected illustrations and the regions from the second XY-Cut pass.
  • Content Classification: Once regions are segmented, their content is classified into one of seven categories: text, images, charts/graphs, tables, borderless tables, formulas, and scores. For table detection, a method based on the Hough transform is employed to detect lines, followed by heuristic rules to group them into table structures. For other content types, dense SIFT descriptors are extracted using the Harris-Laplace detector. These descriptors are then summarized using a Bag-of-Words technique, and combined with spatial information (position, dimensions, aspect ratio) to form a feature vector. A SVM classifier with an RBF kernel is trained on these feature vectors to assign a class to each region.

The final output is a structured JSON description of the page, linking OCR results with identified graphical elements and their types.

Datasets

The authors evaluated their algorithm on the first volume of the "Enciclopedia Treccani," a dataset comprising 999 pages published in 1929. This dataset was used for both training and evaluation. No new benchmark datasets were introduced.

Key Insights and Ideas

  • Hybrid Approach for Layout Analysis: Combining a traditional top-down segmentation method (XY-Cut) with a machine learning-based illustration detector (SVM) effectively handles complex layouts that pure XY-Cut struggles with.
  • Autocorrelation for Illustration Detection: The insight that local autocorrelation statistics can effectively differentiate between the repetitive patterns of text and the more varied nature of illustrations is key to their SVM-based illustration detection.
  • Hough Transform for Tables: Leveraging the Hough transform for line detection is a natural fit for identifying the structured nature of tables, which are characterized by horizontal and vertical lines.
  • Bag-of-Words for SIFT Descriptors: Summarizing dense SIFT descriptors with Bag-of-Words provides a fixed-size representation for regions, making them suitable for SVM classification, while incorporating spatial information further enhances accuracy.
  • JSON as a Unified Output: The JSON format serves as a versatile and structured output, enabling seamless integration with downstream tools for annotation and visualization.

Key Results

  • Page Segmentation: The proposed method achieved an accuracy of 93.8% in page segmentation, significantly outperforming the standard XY-Cut (71.4%) and Whitespace Analysis (61.8%) algorithms.
  • Classification Accuracies: The overall classification accuracy was 92%. Individual class accuracies varied, with "Text" and "Tables" achieving high accuracies (96% and 99% respectively), while "Scores" and "Borderless Tables" had lower accuracies (8% and 10% respectively). The confusion matrix (Table 3) provides a detailed breakdown of classification performance, showing good discrimination between most classes.

Limitations and Future Work

  • Classification of Certain Classes: The paper acknowledges that some classes, particularly "Scores" and "Borderless Tables," exhibit lower classification accuracies. This suggests that the current feature sets or classification models might not be optimal for these specific categories.
  • Empirical Parameter Tuning: The parameters for the table detection algorithm (Hough Transform and heuristic rules) were set empirically through tests on the first 20 tables. This suggests that further systematic optimization or adaptive parameter selection could be beneficial.
  • Future Work: The authors developed two tools, an annotation tool and a visualization interface, which leverage the JSON output. These tools facilitate corrections and provide a rich browsing experience, indicating potential future work in refining these interfaces and exploring their use in user studies. The success of the SVM-based approach also opens avenues for exploring other machine learning models or feature sets for improved classification of challenging content types.

Summary updated

Abstract

Automatic layout analysis has proven to be extremely important in the process of digitization of large amounts of documents. In this paper we present a mixed approach to layout analysis, introducing a SVM-aided layout segmentation process and a classification process based on local and geometrical features. The final output of the automatic analysis algorithm is a complete and structured annotation in JSON format, containing the digitalized text as well as all the references to the illustrations of the input page, and which can be used by visualization interfaces as well as annotation interfaces. We evaluate our algorithm on a large dataset built upon the first volume of the “Enciclopedia Treccani”.
BibTeX
@inproceedings{corbelli2016layout,
  author = {Andrea Corbelli and Lorenzo Baraldi and Fabrizio Balducci and Costantino Grana and Rita Cucchiara},
  title = {{Layout Analysis and Content Classification in Digitized Books}},
  booktitle = {IRCDL},
  year = {2016},
  doi = {10.1007/978-3-319-56300-8\_14},
}
Figure