# US 2023/0206674 A1 · Automatic generation of training data for hand-printed text recognition

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0206674 A1
- Document ID: US20230206674A1
- Status: Published application
- Kind: A1
- Application number: 17/562,344
- Filed: 2021-12-27
- Published: 2023-06-29
- Earliest claimed: 2021-12-27
- Assignees: Konica Minolta Business Solutions U.S.A., Inc.
- Applicants: Konica Minolta Business Solutions U.S.A., Inc.
- Inventors: Jason James Grams
- Web page: https://patentgrep.com/patent/US20230206674A1

## CPC

- G06V 30/32: Digital ink
- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06V 30/1613: {Interactive preprocessing or shape modelling, e.g. assignment of feature points by a user}
- G06V 30/1914: {Determining representative reference patterns, e.g. averaging or distorting patterns; Generating dictionaries, e.g. user dictionaries}
- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06V 30/2455: {Discrimination between machine-print, hand-print and cursive writing}
- G06V 30/22: characterised by the type of writing
- G06V 30/226: of cursive writing
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method for generating training data for hand-printed text recognition includes obtaining a structured document, obtaining a set of hand-printed character images and database metadata from a database, generating a modified document page image, and outputting a training file. The structured document includes a document page image that includes text characters and document metadata that associates each of the text characters to a document character label. The database metadata associates each of the set of hand-printed character images to a database character label. The modified document page image is generated by iteratively processing each of the text characters. The iterative processing includes determining whether an individual text character should be replaced, selecting a replacement hand-printed character image from the set of hand-printed character images, scaling the replacement hand-printed character image, and inserting the replacement hand-printed character image into the modified document page image.

## Claims

### Claim 1

A method for generating training data for hand-printed text recognition, the method comprising:
obtaining a structured document comprising:
a document page image that includes text characters, and
document metadata that associates each of the text characters to a document character label;
obtaining, from a database, a set of hand-printed character images and database metadata, wherein the database metadata associates each of the set of hand-printed character images to a database character label;
generating a modified document page image by iteratively processing each of the text characters, wherein the iterative processing comprises:
determining, based on a predefined condition, whether an individual text character should be replaced;
selecting a replacement hand-printed character image from the set of hand-printed character images, wherein the selecting is based on matching the document character label of the individual text character to the database character label of the replacement hand-printed character image;
scaling the replacement hand-printed character image to match a size of the individual text character in the document page image; and
inserting the replacement hand-printed character image into the modified document page image, at a location based on a position of the individual text character, wherein
the selecting, scaling, and inserting are each performed in response to determining that the individual text character should be replaced; and
outputting a training file comprising:
the modified document page image, and
modified document metadata that associates each of a set of inserted hand-printed character images to an inserted character label.

### Claim 2 (depends on 1)

The method of claim 1, wherein
the document metadata further associates each of the text characters into groups of text characters, and
the predefined condition is based on which of the groups includes the individual text character.

### Claim 3 (depends on 2)

The method of claim 2, wherein the groups of text characters are paragraphs.

### Claim 4 (depends on 2)

The method of claim 2, wherein
the database further includes subsets of the set of hand-printed character images, wherein the subsets are each associated, by the database metadata, to a different writer, and
the selecting of the replacement hand-printed character image is further based on excluding, from the selecting, all but one of the subsets for each of the groups of text characters.

### Claim 5 (depends on 1)

The method of claim 1, wherein
the set of hand-printed character images includes a list of two or more hand-printed character images that are each associated with an identical database character label, and
when the document character label of the individual text character is matched with the identical database character label, during the selecting of the replacement hand-printed character image, the selecting is further based on choosing one of the list of two or more hand-printed character images in accordance with a predefined redundant character rule.

### Claim 6 (depends on 1)

The method of claim 1, wherein when no database character label matches the document character label during the selecting of the replacement hand-printed character image, the selecting is further based on designating a substitute hand-printed character image in accordance with a predefined substitution rule.

### Claim 7 (depends on 1)

The method of claim 1, wherein the iterative processing further comprises:
erasing, in response to determining that the individual text character should be replaced, the individual text character from the document page image.

### Claim 8 (depends on 1)

The method of claim 1, wherein the iterative processing further comprises:
reshaping, in response to determining that the individual text character should be replaced, the replacement hand-printed character image to match a shape of the individual text character in the document page image.

### Claim 9

A non-transitory computer readable medium (CRM) storing computer readable program code for generating training data for hand-printed text recognition, the computer readable program code causes a computer to:
obtain a structured document comprising:
a document page image that includes text characters, and
document metadata that associates each of the text characters to a document character label;
obtain, from a database, a set of hand-printed character images and database metadata, wherein the database metadata associates each of the set of hand-printed character images to a database character label;
generate a modified document page image by iteratively processing each of the text characters, wherein the iterative processing comprises:
determining, based on a predefined condition, whether an individual text character should be replaced;
selecting a replacement hand-printed character image from the set of hand-printed character images, wherein the selecting is based on matching the document character label of the individual text character to the database character label of the replacement hand-printed character image;
scaling the replacement hand-printed character image to match a size of the individual text character in the document page image; and
inserting the replacement hand-printed character image into the modified document page image, at a location based on a position of the individual text character, wherein
the selecting, scaling, and inserting are each performed in response to
determining that the individual text character should be replaced; and output a training file comprising:
the modified document page image, and
modified document metadata that associates each of a set of inserted hand-printed character images to an inserted character label.

### Claim 10 (depends on 9)

The non-transitory CRM of claim 9, wherein
the document metadata further associates each of the text characters into groups of text characters, and
the predefined condition is based on which of the groups includes the individual text character.

### Claim 11 (depends on 10)

The non-transitory CRM of claim 10, wherein the groups of text characters are paragraphs.

### Claim 12 (depends on 10)

The non-transitory CRM of claim 10, wherein
the database further includes subsets of the set of hand-printed character images, wherein the subsets are each associated, by the database metadata, to a different writer, and
the selecting of the replacement hand-printed character image is further based on excluding, from the selecting, all but one of the subsets for each of the groups of text characters.

### Claim 13 (depends on 9)

The non-transitory CRM of claim 9, wherein
the set of hand-printed character images includes a list of two or more hand-printed character images that are each associated with an identical database character label, and
when the document character label of the individual text character is matched with the identical database character label, during the selecting of the replacement hand-printed character image, the selecting is further based on choosing one of the list of two or more hand-printed character images in accordance with a predefined redundant character rule.

### Claim 14 (depends on 9)

The non-transitory CRM of claim 9, wherein when no database character label matches the document character label during the selecting of the replacement hand-printed character image, the selecting is further based on designating a substitute hand-printed character image in accordance with a predefined substitution rule.

### Claim 15

A system for generating training data for hand-printed text recognition, the system comprising:
a memory;
a processor coupled to the memory, wherein the processor:
obtains a structured document comprising:
a document page image that includes text characters, and
document metadata that associates each of the text characters to a document character label;
obtains, from a database, a set of hand-printed character images and database metadata, wherein the database metadata associates each of the set of hand-printed character images to a database character label;
generates a modified document page image by iteratively processing each of the text characters, wherein the iterative processing comprises:
determining, based on a predefined condition, whether an individual text character should be replaced;
selecting a replacement hand-printed character image from the set of hand-printed character images, wherein the selecting is based on matching the document character label of the individual text character to the database character label of the replacement hand-printed character image;
scaling the replacement hand-printed character image to match a size of the individual text character in the document page image; and
inserting the replacement hand-printed character image into the modified document page image, at a location based on a position of the individual text character, wherein
the selecting, scaling, and inserting are each performed in response to determining that the individual text character should be replaced; and
outputs a training file comprising:
the modified document page image, and
modified document metadata that associates each of a set of inserted hand-printed character images to an inserted character label.

### Claim 16 (depends on 15)

The system of claim 15, wherein
the document metadata further associates each of the text characters into groups of text characters, and
the predefined condition is based on which of the groups includes the individual text character.

### Claim 17 (depends on 16)

The system of claim 16, wherein the groups of text characters are paragraphs.

### Claim 18 (depends on 16)

The system of claim 16, wherein
the database further includes subsets of the set of hand-printed character images, wherein the subsets are each associated, by the database metadata, to a different writer, and
the selecting of the replacement hand-printed character image is further based on excluding, from the selecting, all but one of the subsets for each of the groups of text characters.

### Claim 19 (depends on 15)

The system of claim 15, wherein
the set of hand-printed character images includes a list of two or more hand-printed character images that are each associated with an identical database character label, and
when the document character label of the individual text character is matched with the identical database character label, during the selecting of the replacement hand-printed character image, the selecting is further based on choosing one of the list of two or more hand-printed character images in accordance with a predefined redundant character rule.

### Claim 20 (depends on 15)

The system of claim 15, wherein when no database character label matches the document character label during the selecting of the replacement hand-printed character image, the selecting is further based on designating a substitute hand-printed character image in accordance with a predefined substitution rule.
