AutoDocSegmenter: A Geometric Approach towards Self-Supervised Document Segmentation

Ankita Chatterjee, Anjali Raj, Soumyadeep Dey, Pratik Jawanpuria, Jayanta Mukhopadhyay, Partha Pratim DasTMLR 2024

Abstract

Document segmentation, the process of dividing a document into coherent and significant regions, plays a crucial role for diverse applications that require parsing, retrieval, and categorization. However, most existing methods rely on supervised learning, which requires large-scale labeled datasets that are costly and time-consuming to obtain. In this work, we propose a novel self-supervised framework for document segmentation that does not require labeled data. Our framework consists of two components: (1) an unsupervised isothetic covers based pseudo mask generator which approximately segments document objects, and (2) an encoder-decoder network that learns to refine the pseudo masks and segments the document objects accurately. Our approach can handle diverse and intricate document layouts by leveraging the rich information from unlabeled datasets. We demonstrate the effectiveness of our approach on several benchmarks, where it outperforms state-of-the-art document segmentation methods.

Introduction

Document Layout Analysis (DLA) is a fundamental step in digitizing diverse document types, from historical archives to modern financial forms. While identifying text blocks may seem straightforward, achieving high accuracy requires precise polygonal boundaries rather than simple bounding boxes. The primary bottleneck in current DLA research is the reliance on supervised learning, which necessitates thousands of manually labeled examples. These models often prove "brittle," performing well on training distributions (like scientific papers) but failing on complex layouts like magazines or intricate tables.

AutoDocSegmenter addresses this by introducing a fully self-supervised framework. It eliminates the need for human-labeled polygons by using a geometric approach to generate high-quality pseudo-masks from unlabeled data. This allows the model to generalize across complex, unseen layouts more effectively than many supervised counterparts.

Methodology: The Two-Stage Pipeline

The AutoDocSegmenter framework replaces human annotators with a two-stage geometric and deep learning pipeline:

1. Unsupervised Pseudo-Mask Generation

The system utilizes "isothetic covers"—axis-aligned polygons that wrap tightly around foreground objects. To ensure robustness across varying document qualities, the authors implement a Dual Binarization strategy. This processes images using both global thresholding (to capture overall structure) and local thresholding (to preserve faint text or details in dark regions). A merging algorithm then combines these results into a clean set of polygonal pseudo-masks.

Figure 1: Pseudo-mask generation using isothetic covers on a complex magazine layout.

2. Self-Supervised Refinement

These geometric pseudo-masks serve as the "ground truth" for training an encoder-decoder network. The architecture employs a Feature Pyramid Network (FPN) decoder, which is backbone-agnostic. It can be paired with lightweight CNNs like MobileNetV3 for edge efficiency or powerful Transformers like MiT-B0 for maximum performance. During training, the model learns to "clean up" the initial geometric approximations, resulting in final segmentation masks that are more accurate than the rules that created them.

Experimental Evaluation

The researchers evaluated the framework across four major benchmarks representing diverse document types:

  • PRImA: Complex magazine layouts with non-rectangular boundaries.
  • PubLayNet: Large-scale scientific research papers.
  • DocLayNet: Real-world financial reports and legal documents.
  • $M^6$-Doc: Multi-format, multi-language documents including books and newspapers.
Figure 2: Successful segmentation of structured document objects, including tables and multi-column text.

Key Results and Insights

  • Cross-Domain Generalization: AutoDocSegmenter demonstrates remarkable zero-shot capabilities. When trained on scientific papers (PubLayNet) and tested on magazines (PRImA), it achieved 89.65 mAP (mean Average Precision). In contrast, the supervised LayoutLMv3 model collapsed to 4.35 mAP, highlighting the severe overfitting inherent in supervised DLA.
  • Geometric Integrity: By prioritizing geometry over pixel-level morphological operations (like erosion), the model preserves the structural alignment of document entities, avoiding the shape distortion common in previous self-supervised attempts.
  • Efficiency: The framework is highly scalable. A lightweight version using MobileNetV3-small achieves competitive results with only 4.1 million parameters, making it suitable for real-time processing on mobile or edge devices.

Conclusion and Future Work

AutoDocSegmenter proves that high-quality document segmentation can be achieved without human labels by leveraging geometric priors. While the current iteration is a binary segmenter—identifying where objects are without classifying what they are (e.g., distinguishing a table from a paragraph)—it sets a new standard for self-supervised DLA. Future research will focus on integrating unsupervised classification to create a fully autonomous system capable of both outlining and semantically labeling document regions.

Summary updated

BibTeX
@article{chatterjee2024autodocsegmenter,
  author = {Ankita Chatterjee and Anjali Raj and Soumyadeep Dey and Pratik Jawanpuria and Jayanta Mukhopadhyay and Partha Pratim Das},
  title = {{AutoDocSegmenter: A Geometric Approach towards Self-Supervised Document Segmentation}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=JBveijn2OO},
}
Figure