OCR Annotation Alignment Using Weak Labels and Token Costs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing optical character recognition (OCR) technologies rely heavily on costly and time-consuming human-generated strong annotations for bounding boxes, limiting the availability of training data, while weak annotations from ERP systems are abundant but lack bounding boxes, necessitating a method to generate bounding boxes automatically.

Innovation Solution

A computer-implemented method aligns OCR tokens with weak annotations using a stepwise search algorithm that calculates alignment costs based on string similarity and positional distance, generating bounding boxes without human intervention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If strong annotations are created by human annotators manually generating bounding boxes, then annotation accuracy is improved, but annotation cost and time consumption increase

Engineering Contradiction:
Improveannotation accuracyVSAvoidannotation time consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent creates synthetic strong annotations by copying and transforming existing weak annotations. It generates artificial bounding boxes and text content that mimic real document structures, then uses these synthetic annotations to train OCR models, eliminating the need for manual strong annotation while preserving annotation quality

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The system performs self-annotation by automatically generating strong annotations from weak annotations without human intervention. The annotation generation module creates bounding boxes, text content, and structural information autonomously, allowing the system to serve its own annotation needs without external human resources

Inventive Principle:
Principle #25Self-service

2Measurement precision

If strong annotations are used for training, then model training quality is improved, but the quantity of available training data decreases

Engineering Contradiction:
Improvemodel training qualityVSAvoidquantity of training data
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent performs preliminary action by pre-processing weak annotations into strong annotations before model training. It transforms unstructured weak annotations into structured strong annotations with bounding boxes and text content in advance, creating a ready-to-use training dataset that combines the advantages of both weak and strong annotation formats

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system changes the parameters of weak annotations by adding bounding box coordinates, text content, and structural information to transform them into strong annotations. This parameter enrichment allows the same underlying data to serve dual purposes: maintaining the abundance of weak annotation data while gaining the quality benefits of strong annotation formats

Inventive Principle:
Principle #35Parameter changes

3Quantity of substance

If weak annotations without bounding boxes are used, then data availability increases, but annotation alignment capability deteriorates

Engineering Contradiction:
Improvedata availabilityVSAvoidannotation alignment capability
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent segments the annotation alignment process into multiple independent modules: weak annotation parsing, strong annotation generation, alignment computation, and cost calculation. Each segment handles specific aspects of the alignment problem, allowing the system to process large volumes of weak annotations while maintaining precise alignment through specialized sub-routines

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12541986B2Annotation alignment for character recognition in documents
Publication Date: 2026.02.03 SAP SE
  • US12541986B2 patent drawing
  • US12541986B2 patent drawing
  • US12541986B2 patent drawing

AI summary

Systems and processes for aligning weakly-annotated data to recognized characters in a document are provided. In a method for aligning annotation data to recognized characters, annotation words and character recognition tokens are received, and a search algorithm is performed to align the annotation words to the tokens in a stepwise manner. At each step, an annotation word is aligned to one or more tokens, and a cost of each respective alignment is calculated. Once all annotation words are aligned, a full set of annotation word-token pairs corresponding to the annotation is selected based on a total cost of alignment for that set. A bounding box enclosing the tokens in the selected full set is generated and output to a target application.