# US 2025/0157237 A1 · Method, apparatus, readable storage medium and electronic device for image processing

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

- Number: US 2025/0157237 A1
- Document ID: US20250157237A1
- Status: Published application
- Kind: A1
- Application number: 18/730,493
- Filed: 2023-01-04
- Published: 2025-05-15
- Earliest claimed: 2022-01-21
- Assignees: Beijing Youzhuju Network Technology Co., Ltd.
- Applicants: Beijing Youzhuju Network Technology Co., Ltd.
- Inventors: Xiaofei MAO; Can HUANG
- Web page: https://patentgrep.com/patent/US20250157237A1

## CPC

- G06V 30/12: Detection or correction of errors, e.g. by rescanning the pattern
- G06F 18/00: Pattern recognition
- G06V 10/82: using neural networks
- G06V 20/62: Text, e.g. of license plates, overlay texts or captions on TV images
- G06V 30/148: Segmentation of character regions
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The disclosure relates to a method, apparatus, readable storage medium and electronic device of image processing. The method includes: performing text recognition on a target image, to obtain a recognized text; performing segmentation processing on the recognized text; and obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model.

## Claims

### Claim 1

A method of image processing, comprising:
performing text recognition on a target image, to obtain a recognized text;
performing segmentation processing on the recognized text; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model.

### Claim 2 (depends on 1)

The method of claim 1, wherein performing segmentation processing on the recognized text comprises at least one of three segmentation modes:
performing segmentation on the recognized text by characters;
performing segmentation on the recognized text by a first predetermined length, wherein the first predetermined length is greater than 1; and
performing segmentation on the recognized text by a sliding window of a second predetermined length, wherein the second predetermined length is greater than 1.

### Claim 3 (depends on 2)

The method of claim 2, wherein performing segmentation processing on the recognized text comprises at least two of the three segmentation modes; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model comprises:
for each first target segmentation mode, inputting a text segment obtained from segmentation in the first target segmentation mode into the pre-trained language model, to obtain a first corrected text corresponding to the recognized text, wherein the first target segmentation mode is a segmentation mode adopted in the segmentation processing of the recognized text; and
generating the target text based on each of the first corrected texts.

### Claim 4 (depends on 3)

The method of claim 3, wherein generating the target text based on each of the first corrected texts comprises any of:
determining a first corrected text with a highest confidence among respective ones of the first corrected texts as the target text;
inputting the first corrected text with the highest confidence among the respective ones of the first corrected texts into the language model to obtain the target text; and
inputting each of the first corrected texts into the language model to obtain the target text.

### Claim 5 (depends on 1)

The method of claim 1, wherein obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model comprises:
inputting the text segment obtained from the segmentation processing into the pre-trained language model, to correct the recognized text and obtain the target text.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
performing named entity recognition on the recognized text, to obtain at least one named entity; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model comprises:
obtaining, based on the text segment obtained from the segmentation processing and the at least one named entity, the target text by correcting the recognized text through the pre-trained language model.

### Claim 7 (depends on 6)

The method of claim 6, wherein performing segmentation processing on the recognized text comprises:
performing segmentation on the recognized text by characters; and
performing segmentation on the recognized text by a first predetermined length, and/or by a sliding window of a second predetermined length, wherein the first predetermined length and the second predetermined length are each greater than 1; and
obtaining, based on the text segment obtained from the segmentation processing and the at least one named entity, the target text by correcting the recognized text through the pre-trained language model comprises:
obtaining a second corrected text corresponding to the recognized text by inputting the text segments obtained from the segmentation by characters and the at least one named entity into the pre-trained language model;
for each second target segmentation mode, inputting a text segment obtained from segmentation in the second target segmentation mode into the language model to obtain a third corrected text corresponding to the recognized text, wherein the second target segmentation mode is a segmentation mode adopted in the segmentation processing of the recognized text other than the mode for segmenting the recognized text by characters; and
generating the target text based on the second corrected text and each of the third corrected texts.

### Claim 8 (depends on 6)

The method of claim 6, wherein obtaining the target text by correcting the recognized text through the pre-trained language model based on the text segment obtained from the segmentation processing and the at least one named entity comprises:
correcting the recognized text and obtaining the target text, by inputting the text segment obtained from the segmentation processing and the at least one named entity into the pre-trained language model.

### Claim 9 (depends on 2)

The method of claim 2, wherein performing segmentation on the recognized text by a first predetermined length comprises:
performing segmentation on the recognized text with an N-gram model, wherein N is the first predetermined length.

### Claim 10

(canceled)

### Claim 11

A non-transitory computer-readable medium storing a computer program thereon, wherein the program, when executed by a processing device, implements acts comprising:
performing text recognition on a target image, to obtain a recognized text;
performing segmentation processing on the recognized text; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model.

### Claim 12

An electronic device, comprising:
a storage device having a computer program stored thereon; and
a processing device configured to execute the computer program in the storage device to implement acts comprising:
performing text recognition on a target image, to obtain a recognized text;
performing segmentation processing on the recognized text; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model.

### Claim 13 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein performing segmentation processing on the recognized text comprises at least one of three segmentation modes:
performing segmentation on the recognized text by characters;
performing segmentation on the recognized text by a first predetermined length, wherein the first predetermined length is greater than 1; and
performing segmentation on the recognized text by a sliding window of a second predetermined length, wherein the second predetermined length is greater than 1.

### Claim 14 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein performing segmentation processing on the recognized text comprises at least two of the three segmentation modes; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model comprises:
for each first target segmentation mode, inputting a text segment obtained from segmentation in the first target segmentation mode into the pre-trained language model, to obtain a first corrected text corresponding to the recognized text, wherein the first target segmentation mode is a segmentation mode adopted in the segmentation processing of the recognized text; and
generating the target text based on each of the first corrected texts.

### Claim 15 (depends on 14)

The non-transitory computer-readable medium of claim 14, wherein generating the target text based on each of the first corrected texts comprises any of:
determining a first corrected text with a highest confidence among respective ones of the first corrected texts as the target text;
inputting the first corrected text with the highest confidence among the respective ones of the first corrected texts into the language model to obtain the target text; and
inputting each of the first corrected texts into the language model to obtain the target text.

### Claim 16 (depends on 11)

The non-transitory computer-readable medium of claim 11, wherein obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model comprises:
inputting the text segment obtained from the segmentation processing into the pre-trained language model, to correct the recognized text and obtain the target text.

### Claim 17 (depends on 11)

The non-transitory computer-readable medium of claim 11, further comprising:
performing named entity recognition on the recognized text, to obtain at least one named entity; and
obtaining, based on a text segment obtained from the segmentation processing, a target text by correcting the recognized text through a pre-trained language model comprises:
obtaining, based on the text segment obtained from the segmentation processing and the at least one named entity, the target text by correcting the recognized text through the pre-trained language model.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein performing segmentation processing on the recognized text comprises:
performing segmentation on the recognized text by characters; and
performing segmentation on the recognized text by a first predetermined length, and/or by a sliding window of a second predetermined length, wherein the first predetermined length and the second predetermined length are each greater than 1; and
obtaining, based on the text segment obtained from the segmentation processing and the at least one named entity, the target text by correcting the recognized text through the pre-trained language model comprises:
obtaining a second corrected text corresponding to the recognized text by inputting the text segments obtained from the segmentation by characters and the at least one named entity into the pre-trained language model;
for each second target segmentation mode, inputting a text segment obtained from segmentation in the second target segmentation mode into the language model to obtain a third corrected text corresponding to the recognized text, wherein the second target segmentation mode is a segmentation mode adopted in the segmentation processing of the recognized text other than the mode for segmenting the recognized text by characters; and
generating the target text based on the second corrected text and each of the third corrected texts.

### Claim 19 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein obtaining the target text by correcting the recognized text through the pre-trained language model based on the text segment obtained from the segmentation processing and the at least one named entity comprises:
correcting the recognized text and obtaining the target text, by inputting the text segment obtained from the segmentation processing and the at least one named entity into the pre-trained language model.

### Claim 20 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein performing segmentation on the recognized text by a first predetermined length comprises:
performing segmentation on the recognized text with an N-gram model, wherein N is the first predetermined length.

### Claim 21 (depends on 12)

The device of claim 12, wherein performing segmentation processing on the recognized text comprises at least one of three segmentation modes:
performing segmentation on the recognized text by characters;
performing segmentation on the recognized text by a first predetermined length, wherein the first predetermined length is greater than 1; and
performing segmentation on the recognized text by a sliding window of a second predetermined length, wherein the second predetermined length is greater than 1.
