# US 2021/0286946 A1 · Apparatus and method for learning text detection model

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

- Number: US 2021/0286946 A1
- Document ID: US20210286946A1
- Status: Published application
- Kind: A1
- Application number: 17/082,396
- Filed: 2020-10-28
- Published: 2021-09-16
- Earliest claimed: 2020-03-16
- Assignees: Samsung Sds Co., Ltd.
- Applicants: Samsung Sds Co., Ltd.
- Inventors: Kyu Sam OH; Eun Soo JUNG; Hyeong Gwan SON; Soon Hwan KWON; Yong Keun YUN
- Web page: https://patentgrep.com/patent/US20210286946A1

## CPC

- G06N 20/20: Ensemble learning
- G06F 40/279: Recognition of textual entities
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/09: Supervised learning
- G06N 20/00: Machine learning
- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

An apparatus according to an embodiment includes a first training module configured to perform a first training on a text detection model which receives a document image and outputs a text score map and a text mask for the document image by using first training data including text detection ground truth (GT) and text enhancement GT, and a second training module configured to perform a second training on the text detection model by using second training data including only the text detection GT.

## Claims

### Claim 1

An apparatus for training a text detection model, the apparatus comprising:
a first training module configured to perform a first training on the text detection model which receives a document image and outputs a text score map and a text mask for the document image by using first training data including text detection ground truth (GT) and text enhancement GT; and
a second training module configured to perform a second training on the text detection model by using second training data including only the text detection GT.

### Claim 2 (depends on 1)

The apparatus for training the text detection model of claim 1, wherein the first training module is further configured to:
input the first training data into the text detection model;
acquire a first text score map and a first text mask for the first training data from the text detection model; and
calculate a loss of the first training by comparing the acquired first text score map and first text mask with the text detection GT and the text enhancement GT of the first training data.

### Claim 3 (depends on 2)

The apparatus for training the text detection model of claim 2, wherein the first training module is further configured to calculate the loss of the first training using the following equation:
L1=λLD+(1−λ)LE
where L1 is a loss function of the first training, LD is a text detection loss between the first text score map and the text detection GT of the first training data, LE is a text enhancement loss between the first text mask and the text enhancement GT of the first training data, and λ is a weight.

### Claim 4 (depends on 1)

The apparatus for training the text detection model of claim 1, wherein the second training module is further configured to:
input the second training data into the text detection model;
acquire a second text score map and a second text mask for the second training data from the text detection model;
calculate a first text detection loss by comparing the acquired second text score map with the text detection GT of the second training data; and
calculate one or more of a text enhancement loss of the second training data and a second text detection loss by comparing the second text mask with the text detection GT of the second training data.

### Claim 5 (depends on 4)

The apparatus for training the text detection model of claim 4, wherein the second training module is further configured to calculate the text enhancement loss of the second training data by using a false positive loss when comparing the second text mask with a blank region of the text detection GT of the second training data.

### Claim 6 (depends on 4)

The apparatus for training the text detection model of claim 4, wherein the second training module is further configured to:
input the second text mask into the text detection model;
acquire a third text score map for the second text mask from the text detection model; and
calculate the second text detection loss by comparing the acquired third text score map with the text detection GT of the second training data.

### Claim 7 (depends on 4)

The apparatus for training the text detection model of claim 4, wherein the second training module is further configured to calculate the loss of the second training by using the first text detection loss, the text enhancement loss, and the second text detection loss.

### Claim 8 (depends on 7)

The apparatus for training the text detection model of claim 7, wherein the second training module is further configured to calculate the loss of the second training using the following equation:
L2=λ1LD+(1−λ1)(λ2LD′+(1−λ2)LFP)
where L2 is a loss function of the second training, LD is the first text detection loss, LD′ is the second text detection loss, LFP is the text enhancement loss of the second training data, and λ1 and λ2 are weights.

### Claim 9

A method for training a text detection model, which is performed by a computing device comprising one or more processors and a memory storing one or more programs executed by the one or more processors, the method comprising:
a first training step of training the text detection model which receives a document image and outputs a text score map and a text mask for the document image by using first training data including text detection ground truth (GT) and text enhancement GT; and
a second training step of training the text detection model by using second training data including only the text detection GT.

### Claim 10 (depends on 9)

The method of claim 9, wherein the first training step comprises:
inputting the first training data into the text detection model;
acquiring a first text score map and a first text mask for the first training data from the text detection model; and
calculating a loss of the first training step by comparing the acquired first text score map and first text mask with the text detection GT and the text enhancement GT of the first training data.

### Claim 11 (depends on 10)

The method of claim 10, wherein the calculating of the loss of the first training step comprises calculating the loss of the first training step using the following equation:
L1=λLD+(1−λ)LE
where L1 is a loss function of the first training step, LD is a text detection loss between the first text score map and the text detection GT of the first training data, LE is a text enhancement loss between the first text mask and the text enhancement GT of the first training data, and λ is a weight.

### Claim 12 (depends on 9)

The method of claim 9, wherein the second training step comprises:
inputting the second training data into the text detection model;
acquiring a second text score map and a second text mask for the second training data from the text detection model;
calculating a first text detection loss by comparing the acquired second text score map with the text detection GT of the second training data; and
calculating one or more of a text enhancement loss of the second training data and a second text detection loss by comparing the second text mask with the text detection GT of the second training data.

### Claim 13 (depends on 12)

The method of claim 12, wherein the calculating of the one or more of the text enhancement loss of the second training data and the second text detection loss comprises calculating the text enhancement loss of the second training data by using a false positive loss when comparing the second text mask with a blank region of the text detection GT of the second training data.

### Claim 14 (depends on 12)

The method of claim 12, wherein the calculating of the one or more of the text enhancement loss of the second training data and the second text detection loss comprises:
inputting the second text mask into the text detection model;
acquiring a third text score map for the second text mask from the text detection model; and
calculating the second text detection loss by comparing the acquired third text score map with the text detection GT of the second training data.

### Claim 15 (depends on 12)

The method of claim 12, wherein the second training step further comprises calculating the loss of the second training step by using the first text detection loss, the text enhancement loss, and the second text detection loss.

### Claim 16 (depends on 15)

The method of claim 15, wherein calculating of the loss of the second training step comprises calculating the loss of the second training step using the following equation:
L2=λ1LD+(1−λ1)(λ2LD′+(1−λ2)LFP)
where, L2 is a loss function of the second training step, LD is the first text detection loss, LD′ is the second text detection loss, Li is the text enhancement loss of the second training data, and λ1 and λ2 are weights.
