UPTI 1.0: Urdu Printed Text Image Database for Line, Ligature and Degraded Nastaleeq OCR Evaluation
Authors: Shafait, Faisal
Type: Dataset
Published: 2013-02-04
Keywords: UPTI, Urdu Printed Text Image Database, Urdu Nastaleeq, Synthetic document images, Line recognition, Ligature recognition, Degraded text images, Nabocr, Shape Context, Jitter, k nearest neighbour, Thresholding, Elastic elongation, Sensitivity variation, Cursive script benchmarking, Segmentation-free recognition, Arabic script OCR, Computer and Information Sciences, Artificial Intelligence, Pattern Recognition, Image Processing, Computational Linguistics, Language Resources, Document Engineering, Digital Humanities, Information Systems, Software Evaluation, Human Language Technologies, Data Science

<h2 class="PDq2pG_selectionAnchorContainer"><span><strong>Dataset Overview</strong></span></h2>
<p>UPTI, the Urdu Printed Text Image Database, is a synthetic dataset developed for the evaluation of optical character recognition systems for printed Urdu text. The dataset focuses on Urdu written in the Nastaleeq style, which is one of the most widely used writing styles for Urdu newspapers, books and other printed material.</p>
<p>The dataset was introduced as part of the Nabocr research project. Nabocr is an optical character recognition system designed for languages that use the Arabic script. The system was initially trained for Urdu Nastaleeq and Arabic Naskh, while its training process was designed so that it could also be adapted to other Arabic script languages.</p>
<p>UPTI was created to provide a controlled evaluation resource for Urdu OCR. It contains more than 10,000 synthetic images of Urdu text rendered in the Nastaleeq font. The dataset includes multiple versions that evaluate different parts of an OCR system, including complete text line recognition, individual ligature recognition and recognition under simulated image degradation.</p>
<h2><span><strong>Purpose of the Dataset</strong></span></h2>
<p>The main purpose of UPTI is to support the development, testing and comparison of OCR systems for Urdu printed text.</p>
<p>Urdu OCR presents several technical challenges because Nastaleeq is a cursive and context-sensitive writing style. Letters can connect to form ligatures, and the appearance of a letter may change according to its position within a word. Dots and diacritics may appear above or below the main body of the text. Ligatures may also overlap horizontally, which makes line and ligature segmentation difficult.</p>
<p>UPTI allows researchers to evaluate these challenges separately. It provides line-level images for testing complete recognition pipelines and ligature-level images for testing recognition with reduced segmentation uncertainty. It also provides degraded images for measuring how recognition performance changes when text images contain common document imaging defects.</p>
<h2><span><strong>Dataset Generation</strong></span></h2>
<p>The dataset was produced using electronic Urdu text collected from books that were available online as text files.</p>
<p>The generation process begins by identifying and extracting Urdu ligatures from the source text. Their frequency of occurrence is also calculated. Orthographic rules are used to identify the boundaries between ligatures.</p>
<p>Synthetic images are then rendered for the extracted ligatures using a text rendering engine. Nastaleeq is used for the Urdu images. The paper reports that more than 10,000 Urdu ligatures of different sizes were extracted from the source material used to train the recognition system.</p>
<p>The dataset therefore consists of synthetically rendered printed text rather than scanned handwritten material or photographs of physical documents.</p>
<h2><span><strong>Dataset Versions</strong></span></h2>
<p>UPTI contains three main dataset versions.</p>
<h3><span><strong>Line-Level UPTI</strong></span></h3>
<p>The line-level version contains synthetic images of complete Urdu text lines.</p>
<p>This version is intended for evaluating a complete OCR workflow. The recognition process must identify text lines, separate the lines into their constituent ligatures, extract visual features and classify the detected ligatures.</p>
<p>Because segmentation is required, the final recognition score reflects both segmentation errors and classification errors.</p>
<h3><span><strong>Ligature-Level UPTI</strong></span></h3>
<p>The ligature-level version contains synthetic text line images in which each ligature is represented using a different colour.</p>
<p>The colour information makes the boundaries between neighbouring ligatures available to the evaluation system. This allows researchers to test recognition accuracy with less influence from ligature segmentation errors.</p>
<p>This version is useful for separating errors caused by visual classification from errors caused by incorrect segmentation.</p>
<h3><span><strong>Degraded UPTI</strong></span></h3>
<p>The degraded version contains modified copies of the line-level and ligature-level datasets.</p>
<p>The purpose of this version is to test the robustness of an OCR system against image defects that can appear during document scanning, printing, image conversion or digital reproduction.</p>
<p>Four degradation parameters are used:</p>
<ol>
<li>Elastic elongation</li>
<li>Jitter</li>
<li>Sensitivity variation</li>
<li>Thresholding variation</li>
</ol>
<p>Each degradation parameter is changed gradually while the remaining parameters are kept at their default values. This creates controlled variations that can be used to measure how each defect affects recognition accuracy.</p>
<p>Figure 14 on page 9 of the paper visually demonstrates the four degradation types applied to UPTI.</p>
<h2><span><strong>Language and Script</strong></span></h2>
<p>The dataset language is Urdu.</p>
<p>The text is rendered using the Nastaleeq writing style. Nastaleeq is visually more complex than Naskh because ligatures may overlap and the text does not always follow a simple horizontal baseline.</p>
<p>Urdu is written from right to left, while numbers may be written from left to right. Letters may contain dots and diacritics that are spatially separated from the main body. These characteristics make the dataset relevant to recognition systems designed for complex cursive scripts.</p>
<h2><span><strong>Recognition Units</strong></span></h2>
<p>The principal recognition unit used by the proposed system is the ligature.</p>
<p>A ligature is a connected shape formed when two or more characters join together. An Urdu word may contain one ligature or several ligatures.</p>
<p>Using ligatures as recognition units reduces the need to separate every connected shape into individual characters. This approach is particularly relevant to Nastaleeq, where character-level segmentation can be unreliable because of overlapping shapes and context-sensitive character forms.</p>
<h2><span><strong>Feature Representation</strong></span></h2>
<p>The associated Nabocr system represents ligature shapes using the Shape Context descriptor.</p>
<p>Each image is first normalized to a fixed width and height while preserving its aspect ratio. Contour points are then extracted from the normalized binary image.</p>
<p>A logical grid is applied to the ligature image. Transitions between black and white pixels along the grid lines are treated as contour points. Points that are very close to one another are removed during postprocessing.</p>
<p>The contour points are described using log polar histograms. The ligature is divided into regions, the Shape Context descriptors are calculated within each region and the regional histograms are combined to form a complete representation of the ligature.</p>
<h2><span><strong>Associated OCR Workflow</strong></span></h2>
<p>The recognition workflow described in the paper performs the following main operations:</p>
<ol>
<li>Segment the document page into text lines</li>
<li>Segment each text line into ligatures</li>
<li>Extract a Shape Context representation for each detected ligature</li>
<li>Compare the unknown ligature with the training dataset</li>
<li>Classify the ligature using k nearest neighbour</li>
<li>Combine the recognised ligatures into editable text</li>
</ol>
<p>The recognition process is illustrated in Figure 11 on page 8 of the paper.</p>
<h2><span><strong>Page and Line Segmentation</strong></span></h2>
<p>Page segmentation is performed using horizontal projection. The number of black pixels is calculated for each row, and areas with low horizontal projection are used as possible line boundaries.</p>
<p>Additional processing is needed because dots and diacritics may occur above or below the main text line. Small regions that appear to be false lines are merged with the nearest valid line.</p>
<p>Line segmentation identifies the main baseline, extracts connected components, separates dots and diacritics from the main character bodies and reconnects them with their associated ligatures.</p>
<h2><span><strong>Evaluation Results Reported in the Paper</strong></span></h2>
<p>For undegraded line-level UPTI, the paper reports a ligature error rate of 13.3 percent and a letter error rate of 11.2 percent.</p>
<p>When unsupported foreign symbols, punctuation marks and foreign numbers are excluded, the ligature error rate decreases to 9.1 percent and the letter error rate decreases to 8.5 percent.</p>
<p>For the ligature-level version, the reported ligature error rate is 0.4 percent and the reported letter error rate is 2.6 percent.</p>
<p>The lower error rates for the ligature-level dataset show that a significant portion of the line-level recognition error is caused by segmentation rather than ligature classification.</p>
<p>These results should be treated as baseline results associated with the Nabocr system. They do not represent a universal accuracy level for every model trained or evaluated on UPTI.</p>
<h2><span><strong>Potential Applications</strong></span></h2>
<p>UPTI may be used for research involving:</p>
<ol>
<li>Urdu printed text recognition</li>
<li>Nastaleeq recognition</li>
<li>Ligature classification</li>
<li>Text line recognition</li>
<li>Segmentation-free recognition methods</li>
<li>OCR robustness testing</li>
<li>Document degradation analysis</li>
<li>Feature descriptor evaluation</li>
<li>Cursive script processing</li>
<li>Recognition error analysis</li>
<li>Training and evaluation of machine learning models</li>
<li>Comparison of line-level and ligature-level OCR</li>
<li>Evaluation of document preprocessing methods</li>
<li>Research involving related Arabic script languages</li>
</ol>
<h2><span><strong>Limitations</strong></span></h2>
<p>UPTI contains synthetic printed text images. It does not represent all defects, layout variations or typography found in scanned historical documents, newspapers or books.</p>
<p>The paper does not report the exact source books used to create the Urdu text corpus.</p>
<p>The paper does not provide a formal data collection period.</p>
<p>The exact number of samples in each UPTI version is not reported. The paper only states that the database contains more than 10,000 synthetic text images.</p>
<p>The paper does not report the exact font file, font size distribution, image resolution, image dimensions, colour format or file naming structure used in the released dataset.</p>
<p>The paper does not describe a predefined training, validation and test split.</p>
<p>The dataset may contain punctuation marks, foreign numbers or symbols that were not supported by the original Nabocr recognition system.</p>
<p>The degraded versions cover four controlled degradation models. They do not represent every type of noise that can occur in physical or scanned documents.</p>
<h2><span><strong>Personal Data and Ethical Considerations</strong></span></h2>
<p>UPTI is a synthetically generated printed text image dataset. The paper does not describe the collection of handwriting, photographs, biometric information or personally identifiable information from human participants.</p>
<p>The source text was taken from online Urdu books. Users should still verify the copyright and redistribution conditions attached to the original source material and to the released dataset.</p>
<h2><span><strong>Recommended Citation</strong></span></h2>
<p>Nazly Sabbour and Faisal Shafait. A Segmentation Free Approach to Arabic and Urdu OCR. Document Recognition and Retrieval XX, Proceedings of SPIE, Volume 8658, Article 86580N, 2013.</p>
<p>DOI: 10.1117/12.2003731</p>