# Text Line Extraction in Historical Documents Using Mask R-CNN
## 5 Datasets  
We evaluate the performance of the method on three different datasets: the newly introduced dataset VML-AHTE, and the well-known historical documents datasets, DivA-HisDB and ICDAR2015-HTR.  
1. The VML-AHTE (Visual Media Lab--Arabic Historical Text line Extraction) dataset consists of 30 pages from several historical manuscripts collected from the Islamic manuscripts digitization project, the Leipzig University Library ([[https://www.islamic-manuscripts.net](https://www.islamic-manuscripts.net)]([https://www.islamic-manuscripts.net](https://www.islamic-manuscripts.net))). This project (accessed on 1 April 2019) provides digital access to a group of about 55 Arabic, Persian, and Turkish manuscripts acquired by the Leipzig University Library. The documents exhibit rich diacritics, and touching and overlapping characters. The dataset was split into training (20 pages) and test (10 pages) sets. For every page image we built a corresponding ground truth in four formats: PAGE xml format [26], pixels labels, Diva pixel labels [27], and bounding polygons, as illustrated in Figure 7. The PAGE xml files were created manually by native Arabic speakers using Aletheia tool [28], and the pixel labels and bounding polygons were generated automatically from the PAGE xml files. The dataset is available for downloading ([[https://www.cs.bgu.ac.il/~berat/](https://www.cs.bgu.ac.il/~berat/)]([https://www.cs.bgu.ac.il/~berat/](https://www.cs.bgu.ac.il/~berat/))) (accessed on 1 Augest 2022), together with the official train and test sets.
2. Diva-HisDB dataset [18] is a collection of three medieval manuscripts \(GB55\), \(CSG18\) and \(CSG863\), with complex layout structure, as shown in Figure 8. The dataset includes 150 pages (50 in each manuscript) with annotation for main text, comments  
Figure 5: The red and green masks will be combined, because the red mask is completely contained within the horizontal section of the green mask (the dashed red rectangle).  
Figure 6: Splitting combined lines: (**a**) the horizontal profile of an image patch, and (**b**) the mask is split at the minima closest to the center of the mask. The split line is shown in red.  
and decorations. Each manuscript is split into training, validation, public, and private test sets. The train set contains 20 pages and each one of the validation and the test sets contain 10 pages. In this paper, we train on the training set and test on the private test set to compare with the results of ICDAR2017 competition [27].
3. ICDAR2015-HTR dataset [19] was introduced and used in ICDAR 2015 Competition on Handwritten Text Recognition. It includes 796 pages from the Bentham collection, generated by the Scriptorium project. The dataset is split into training and test sets containing 746 and 50 pages, respectively. The dataset poses many difficulties for text line detection and extraction, such as varying quality of images, writing styles, and crossed out text (see Figure 9). Although this dataset is used for text recognition and its ground-truth quality and consistency is not ideal (we will discuss this in Section 7.2.2), it was chosen to demonstrate that the proposed method can deal with the significant variabilities and difficulties present in this dataset.  
Figure 8: An example of patch from each collection in the Diva-HisDb dataset.  
Figure 7: VML-AHTE dataset includes four ground truth formats: PAGE xml, pixel labels, DIVA, pixel labels, and bounding polygons.