Feature overview
Form and receipt information extraction for fixed-layout documents is a task that uses a self-learning model based on deep learning. It performs well on documents with consistent layouts, such as forms, certificates, and vouchers. You can define custom extraction fields. The platform provides visual tools for data annotation and model training.
With good image quality and annotations for over 100 training samples, a fine-tuned model can achieve a recognition accuracy of over 95%.
The Toolbox also provides a classifier management tool and a field type management tool. These tools allow you to automatically classify, route, and recognize data from different layouts with high precision using a single API operation.
Benefits
High precision: Based on Alibaba Cloud's powerful pre-trained models, a fine-tuned multi-layout model can achieve an accuracy of over 95%.
Few-shot learning: You only need to annotate a small amount of data to optimize and iterate the model. The model also has good generalization capabilities.
Low barrier to entry: This feature is out-of-the-box and requires no code development. You can configure rules independently through a user-friendly and controllable interface.
High efficiency: The intelligent pre-annotation feature and support for collaborative annotation save time.
Scenarios
This feature is suitable for images or single-page PDF files where layouts are relatively fixed or enumerable (up to 50 types) and you need to extract key-value information in a structured way.
It is also ideal for scenarios involving forms and receipts where the model requires continuous optimization and many data samples are available for training. Examples include financial and tax reimbursement using business licenses and medical invoices, qualification verification, and structured recognition of internal business documents.
Related links
OCR Document AutoML: Console Logon
User guide for the form and receipt information extraction model task: Online Debugging, API Reference, and SDK Reference
User guide
For a video tutorial on using form and receipt information extraction, see the following video:
The process of creating a form and receipt information extraction model is shown in the following figure. You need more than 20 images for training to create a model.

Step 1: Data preparation
In the Data Center, go to Datasets to upload and manage the data for your model task. Click Add Dataset to open the upload page. Enter a Dataset Name and upload your fixed-layout business data.
A custom model for form and receipt information extraction requires at least 20 training images to achieve good recognition and extraction performance.
Step 2: Data annotation
Data annotation consists of three main steps: creating an annotation task, annotating the data, and performing a quality inspection.
Create an annotation task

On the Annotation Tasks page in the Data Center, click Create Annotation Task. On the creation page, enter a Task Name. In the Upload Data section, select a dataset or upload files from your local machine. Then, proceed to Field settings.
Layout analysis: If the forms or receipts in the images are rotated or distorted, or if the document area covers less than 70% of the image, select this option. You will then need to draw a bounding box around the document in the annotation step.
Pre-annotation: If you enable OCR pre-annotation, the text inside a box you draw will be automatically recognized. This improves annotation efficiency.
Question Bank: You can browse and select existing questions to create an annotation task.
Field Name: The name of the field that is exposed externally, which corresponds to the name in the API operation. The field name must be globally unique.
Field Type: The property definition for the field. Selecting an appropriate field type can improve the end-to-end recognition performance. You can choose from common fields or add your own custom fields. If no post-processing is needed, select the Regular field type.
Annotation
On the Annotation Tasks page in the Data Center, select the task you created and click Annotate to go to the Data Annotation interface. In the annotation tool, use the Bounding Box button to draw boxes around the fields you want to recognize. Select the corresponding field name and carefully check the automatically recognized text. After you have annotated all fields on all images, click Submit Task to complete this part of the annotation.
The quality of the annotated data, including text and position, directly affects the model training performance and evaluation metrics.

If you encounter incorrect or unannotatable data, you can Skip that image.
Quality inspection
Go to the Annotation Tasks page in the Data Center and select a completed annotation task to inspect its quality. The quality inspector can modify or reject annotations. After the inspection is complete, submit the task. Make sure that all fields have been annotated.

Step 3: Model training and evaluation
Go to the Model Hub and click Create Model to open the model creation page. Select the annotated results for the training set and test set, and enter the basic information. After the model is created, training starts automatically.

Training set: The data source used to train the model. You can only select datasets that have been annotated and passed quality inspection. A dataset selected as a test set cannot be used as a training set. We recommend using more than 20 valid images for model training.
Test set: The data source used to test the model. You can only select datasets that have been annotated and passed quality inspection. A dataset selected as a training set cannot be used as a test set.
Automatically use 1/10 of the training set as the test set: If you enable this option, you do not need to manually select a test set. The system automatically partitions 1/10 of the training set to use as the test set. If you have already uploaded a test set before enabling this option, the system will ignore the manually uploaded data.


Model training fees and estimated duration. The cost and time vary based on the task type and data volume. For more information, see Billing of OCR Document AutoML.
Training duration: This depends on multiple factors, such as data volume, annotation quality, and machine resources. For example, on a V100 instance, training on 20 images takes about 1.5 hours, while 200 images take about 3 hours.

Algorithm evaluation metrics: These include the model's overall accuracy, single-field accuracy, and detection F1-score.
Overall accuracy: The accuracy of the algorithm model before rule-based post-processing corrections. It is the ratio of correctly recognized fields to the total number of fields in the test set, including content and position.

Single-field - Detection F1-score: A comprehensive evaluation metric (F1-Measure) before rule-based post-processing corrections. It is the weighted harmonic mean of the precision and recall rate of the field detection box. It is often used to evaluate the performance of a detection model.

Single-field - Accuracy: The field recognition accuracy of the algorithm model before rule-based post-processing corrections. It is the ratio of the number of correctly recognized instances of a field to the total number of instances in the test set (the union of annotated boxes and predicted boxes, including content and position).

Step 4: Model deployment
After model training is complete, go to the model details page in the Model Hub. Click the Deploy button at the bottom of the page to start model deployment. Deployment takes some time. After the model is successfully deployed, you can test its performance visually in the online experience or call the service directly using the API.

After you publish and deploy the model service, refer to the API overview document to use the service. You can also go to the Online Test page to test the model's performance.
The OCR self-learning feature was fully commercialized on August 23, 2023. Model training is billed based on duration, and model inference is billed based on the number of calls. For more information, see OCR Self-learning Billing.
Tools - Question Bank
A field template library is used in the Field settings step. You can pre-create fields for an annotation task and reuse the template multiple times. If multiple annotation tasks require the same fields, you can select a template from the library. This reduces the manual effort of editing fields and lowers the chance of errors.
Modifications to the question library do not affect annotation tasks or models that are in progress.


