# US 2024/0193726 A1 · System and method for enhancing text in images based on super-resolution

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

- Number: US 2024/0193726 A1
- Document ID: US20240193726A1
- Status: Published application
- Kind: A1
- Application number: 18/079,225
- Filed: 2022-12-12
- Published: 2024-06-13
- Earliest claimed: 2022-12-12
- Assignees: Walmart Apollo, LLC
- Applicants: Walmart Apollo, LLC
- Inventors: Saptarshi Misra; Anirban Chatterjee; Pranay Dugar; Kunal Banerjee; Lalitdutt Parsai
- Web page: https://patentgrep.com/patent/US20240193726A1

## CPC

- G06T 3/4053: based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
- G06T 3/4007: based on interpolation, e.g. bilinear interpolation (image demosaicing G06T3/4015; edge-driven or edge-based scaling G06T3/403)
- G06T 3/4046: using neural networks
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 7/73: using feature-based methods
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 20/62: Text, e.g. of license plates, overlay texts or captions on TV images
- G06V 30/10: Character recognition
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06V 10/7715: {Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Systems and methods for enhancing text in images based on super-resolution are disclosed. A low resolution image is generated based on a high resolution image. A super resolution image is generated based on the low resolution image, using a super resolution model with a set of parameters. Based on the high resolution image and the super resolution image, a total loss function is computed based on: the set of parameters, a detection loss function, a recognition loss function, and a gradient loss function of the high resolution image and the super resolution image. A trained super resolution model is generated with an optimized set of the parameters that minimizes the total loss function. Text in at least one image is enhanced using the trained super resolution model.

## Claims

### Claim 1

A system for enhancing text in images, comprising:
a non-transitory memory having instructions stored thereon;
at least one processor operatively coupled to the non-transitory memory, and configured to read the instructions to:
obtain a high resolution image,
generate a low resolution image based on the high resolution image,
generate a super resolution image based on the low resolution image, using a super resolution model with a set of parameters,
based on the high resolution image and the super resolution image, compute a total loss function based on the set of parameters and at least one of: a detection loss function, a recognition loss function, and a gradient loss function,
generate a trained super resolution model with an optimized set of the parameters that minimizes the total loss function, and
enhance text in at least one image using the trained super resolution model.

### Claim 2 (depends on 1)

The system of claim 1, wherein the low resolution image is generated based on:
down-sampling, based on a first interpolation method, the high resolution image to one-fourth of a dimension of the high resolution image to generate an intermediate image; and
up-sampling, based on a second interpolation method, the intermediate image to one-half of the dimension of the high resolution image to generate the low resolution image.

### Claim 3 (depends on 1)

The system of claim 1, wherein the total loss function is computed based on:
computing the detection loss function representing a difference between text locations detected in the high resolution image and the super resolution image;
computing the recognition loss function representing a difference between texts recognized from the high resolution image and the super resolution image; and
computing the gradient loss function representing a difference between image gradients in the high resolution image and the super resolution image.

### Claim 4 (depends on 3)

The system of claim 3, wherein the trained super resolution model is generated based on:
generating an updated super resolution model with an updated set of the parameters based on a minimization of the total loss function;
obtaining a plurality of additional high resolution images, wherein the high resolution image and the additional high resolution images form a series of images, with the high resolution image being the first image in the series;
for each additional high resolution image in the series,
generating an additional low resolution image based on the additional high resolution image,
generating an additional super resolution image based on the additional low resolution image, using the updated super resolution model with the updated set of the parameters from preceding image in the series,
computing an additional detection loss function, an additional recognition loss function, an additional gradient loss function, and an additional total loss function, based on the additional high resolution image and the additional super resolution image, and
based on a minimization of the additional total loss function, generating an updated super resolution model with an updated set of the parameters to be used for next image in the series.

### Claim 5 (depends on 4)

The system of claim 4, wherein generating the additional low resolution image for each additional high resolution image in the series comprises:
down-sampling, based on a third interpolation method, the additional high resolution image to one-fourth of a dimension of the additional high resolution image to generate an intermediate image; and
up-sampling, based on a fourth interpolation method, the intermediate image to one-half of the dimension of the additional high resolution image to generate the additional low resolution image,
wherein each of the third interpolation method and the fourth interpolation method is based on an interpolation randomly selected from the group consisting of: linear interpolation, bicubic interpolation, nearest interpolation, box interpolation, Hamming interpolation, and Lanczos interpolation.

### Claim 6 (depends on 3)

The system of claim 3, wherein:
the set of parameters comprises: a first weight associated with the detection loss function, a second weight associated with the recognition loss function, and a third weight associated with the gradient loss function; and
the total loss function is computed based on a weight sum of the detection loss function, the recognition loss function, and the gradient loss function, with their respective associated weights.

### Claim 7 (depends on 6)

The system of claim 6, wherein:
the set of parameters further comprises: a fourth weight associated with a total variation loss function computed based merely on the super resolution image, a fifth weight associated with a perceptual loss function computed based on the high resolution image and the super resolution image, and a sixth weight associated with a mean square error loss function computed based on the high resolution image and the super resolution image; and
the total loss function is computed based on a weight sum of the detection loss function, the recognition loss function, the gradient loss function, the total variation loss function, the perceptual loss function, and the mean square error loss function, with their respective associated weights.

### Claim 8 (depends on 3)

The system of claim 3, wherein the detection loss function is computed based on:
generating coordinates of the high resolution image to create a first image mask, which includes detected text regions being masked out for each pixel of the high resolution image;
generating coordinates of the super resolution image to create a second image mask, which includes detected text regions being masked out for each pixel of the super resolution image; and
computing the detection loss function based on a pixel-wise mean square error between the first image mask and the second image mask.

### Claim 9 (depends on 3)

The system of claim 3, wherein the recognition loss function is computed based on:
generating a first feature map from the high resolution image based on a convolutional function;
generating a second feature map from the super resolution image based on the convolutional function; and
computing the recognition loss function based on a mean square error between the first feature map and the second feature map.

### Claim 10 (depends on 3)

The system of claim 3, wherein the gradient loss function is computed based on:
generating a first cumulative gradient averaged across all channels in the high resolution image;
generating a second cumulative gradient averaged across all channels in the super resolution image; and
computing the gradient loss function based on a mean absolute error between the first cumulative gradient and the second cumulative gradient.

### Claim 11 (depends on 1)

The system of claim 1, wherein the text in the at least one image is enhanced based on:
generating a super resolution version of the at least one image using the trained super resolution model via at least one of: an application programming interface, a workflow application, or a software library; and
extracting text from the super resolution version of the at least one image.

### Claim 12

A computer-implemented method, comprising:
obtaining a high resolution image;
generating a low resolution image based on the high resolution image;
generating a super resolution image based on the low resolution image, using a super resolution model with a set of parameters;
based on the high resolution image and the super resolution image, computing a total loss function based on the set of parameters and at least one of: a detection loss function, a recognition loss function, and a gradient loss function;
generating a trained super resolution model with an optimized set of the parameters that minimizes the total loss function; and
enhancing text in at least one image using the trained super resolution model.

### Claim 13 (depends on 12)

The computer-implemented method of claim 12, wherein computing the total loss function comprises:
computing the detection loss function representing a difference between text locations detected in the high resolution image and the super resolution image;
computing the recognition loss function representing a difference between texts recognized from the high resolution image and the super resolution image; and
computing the gradient loss function representing a difference between image gradients in the high resolution image and the super resolution image.

### Claim 14 (depends on 13)

The computer-implemented method of claim 13, wherein generating the trained super resolution model comprises:
generating an updated super resolution model with an updated set of the parameters based on a minimization of the total loss function;
obtaining a plurality of additional high resolution images, wherein the high resolution image and the additional high resolution images form a series of images, with the high resolution image being the first image in the series;
for each additional high resolution image in the series,
generating an additional low resolution image based on the additional high resolution image,
generating an additional super resolution image based on the additional low resolution image, using the updated super resolution model with the updated set of the parameters from preceding image in the series,
computing an additional detection loss function, an additional recognition loss function, an additional gradient loss function, and an additional total loss function, based on the additional high resolution image and the additional super resolution image, and
based on a minimization of the additional total loss function, generating an updated super resolution model with an updated set of the parameters to be used for next image in the series.

### Claim 15 (depends on 14)

The computer-implemented method of claim 14, wherein generating the additional low resolution image for each additional high resolution image in the series comprises:
down-sampling, based on a third interpolation method, the additional high resolution image to one-fourth of a dimension of the additional high resolution image to generate an intermediate image; and
up-sampling, based on a fourth interpolation method, the intermediate image to one-half of the dimension of the additional high resolution image to generate the additional low resolution image,
wherein each of the third interpolation method and the fourth interpolation method is based on an interpolation randomly selected from the group consisting of: linear interpolation, bicubic interpolation, nearest interpolation, box interpolation, Hamming interpolation, and Lanczos interpolation.

### Claim 16 (depends on 13)

The computer-implemented method of claim 13, wherein:
the set of parameters comprises: a first weight associated with the detection loss function, a second weight associated with the recognition loss function, and a third weight associated with the gradient loss function; and
the total loss function is computed based on a weight sum of the detection loss function, the recognition loss function, and the gradient loss function, with their respective associated weights.

### Claim 17 (depends on 13)

The computer-implemented method of claim 13, wherein computing the detection loss function comprises:
generating coordinates of the high resolution image to create a first image mask, which includes detected text regions being masked out for each pixel of the high resolution image;
generating coordinates of the super resolution image to create a second image mask, which includes detected text regions being masked out for each pixel of the super resolution image; and
computing the detection loss function based on a pixel-wise mean square error between the first image mask and the second image mask.

### Claim 18 (depends on 13)

The computer-implemented method of claim 13, wherein computing the recognition loss function comprises:
generating a first feature map from the high resolution image based on a convolutional function;
generating a second feature map from the super resolution image based on the convolutional function; and
computing the recognition loss function based on a mean square error between the first feature map and the second feature map.

### Claim 19

A non-transitory computer readable medium having instructions stored thereon, wherein the instructions, when executed by at least one processor, cause a device to perform operations comprising:
obtaining a high resolution image;
generating a low resolution image based on the high resolution image;
generating a super resolution image based on the low resolution image, using a super resolution model with a set of parameters;
based on the high resolution image and the super resolution image, computing a total loss function based on the set of parameters and at least one of: a detection loss function, a recognition loss function, and a gradient loss function;
generating a trained super resolution model with an optimized set of the parameters that minimizes the total loss function; and
enhancing text in at least one image using the trained super resolution model.

### Claim 20 (depends on 19)

The non-transitory computer readable medium of claim 19, wherein:
the set of parameters comprises: a first weight associated with the detection loss function, a second weight associated with the recognition loss function, a third weight associated with the gradient loss function, a fourth weight associated with a total variation loss function computed based merely on the super resolution image, a fifth weight associated with a perceptual loss function computed based on the high resolution image and the super resolution image, and a sixth weight associated with a mean square error loss function computed based on the high resolution image and the super resolution image; and
the total loss function is computed based on a weight sum of: the detection loss function, the recognition loss function, the gradient loss function, the total variation loss function, the perceptual loss function, and the mean square error loss function, with their respective associated weights.
