Abstract
Bengali is the sixth most spoken language globally, yet it remains underserved by modern Document AI tools. We present bbOCR, a comprehensive, open-source OCR pipeline designed to transform complex Bengali documents into structured, searchable HTML. By integrating advanced preprocessing, layout analysis, and a novel recognition model (APSIS-Net), bbOCR significantly outperforms existing solutions like Tesseract in character and word accuracy across diverse document domains.
Introduction
Despite its vast speaker base of over 330 million, Bengali is categorized as a "low-resource" language in the Document AI field. The script's complex alphasyllabary nature poses significant challenges for standard OCR engines. Furthermore, real-world digitization requires more than simple text recognition; it must account for physical document degradation, such as warping from book spines, poor lighting, and intricate multi-column layouts. Existing open-source tools often fail to provide a holistic solution that preserves document structure while maintaining high recognition accuracy.
Methodology
The bbOCR (Bengali.AI-BRACU OCR) pipeline decomposes the digitization process into five specialized stages:
- Preprocessing: To handle physical artifacts, the system employs PaperEdge for geometric unwarping and DocTr for illumination correction and shadow removal.
- Document Layout Analysis (DLA): A YOLOv8-based model identifies and classifies regions of interest, such as paragraphs, images, and tables.
- Line and Word Detection: Utilizing a Differentiable Binarization Network (DBNet), the pipeline precisely locates text lines and individual words within the identified regions.
- Word Recognition (APSIS-Net): A novel CNN-based attention encoder with a positional alignment branch predicts Unicode text from word-level images.
- HTML Reconstruction: A rule-based module synthesizes the coordinates and recognized text into a structured HTML format, preserving the original visual flow.
Experimental Setup and Datasets
To train and evaluate bbOCR, the authors developed several key resources:
- Synthetic Datasets: Bengali SynthTIGER (10.2M samples) and Bengali SynthINDIC (700k samples) were created to provide high-volume training data across diverse fonts and augmentations.
- BCD3 Benchmark: The Bengali Complete Document Decomposition Dataset contains 228 scanned pages from nine domains, including magazines and historical newspapers, featuring 88.5k manually annotated words.
- BaDLAD: This large-scale dataset was utilized for training the layout analysis module.
Results and Discussion
Comparative analysis against Tesseract demonstrates the superior performance of bbOCR. The system achieved a Character Error Rate (CER) of 0.59 and a Word Error Rate (WER) of 0.80, significantly lower than Tesseract's 0.78 CER and 0.97 WER.
Key insights from the development process include:
- Preprocessing Impact: Accuracy improves dramatically when geometric and illumination corrections are applied prior to recognition.
- Synthetic Data Utility: Adapting synthetic generation tools for Bengali ligatures allows for effective model generalization without the need for massive manual annotation.
- Structural Preservation: The focus on HTML reconstruction ensures that digitized documents remain useful for archival and search applications by maintaining their original layout.
Conclusion and Future Work
While bbOCR represents a significant advancement for Bengali digitization, limitations remain. The current pipeline is optimized for printed text and struggles with handwriting or extremely low-resolution images. Additionally, while table regions are identified, internal cell structure extraction is not yet supported. Future work will focus on expanding language support, improving handwriting recognition, and enhancing the intelligence of the layout reconstruction module.
Summary updated