# US 12,602,920 B2 · Image recognition method and apparatus, electronic device, and computer-readable medium

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

- Number: US 12,602,920 B2
- Document ID: US12602920B2
- Status: Granted
- Kind: B2
- Application number: 18/019,050
- Filed: 2021-09-06
- Published: 2023-09-07
- Granted: 2026-04-14
- Earliest claimed: 2020-09-10
- Assignees: Beijing Bytedance Network Technology Co., Ltd.
- Applicants: Beijing Bytedance Network Technology Co., Ltd.
- Inventors: Qili Deng
- Web page: https://patentgrep.com/patent/US12602920B2

## CPC

- G06V 10/84: using probabilistic graphical models from image or video features, e.g. Markov models or Bayesian networks
- G06V 10/758: {Involving statistics of pixels or of feature values, e.g. histogram matching}
- G06V 10/764: using classification, e.g. of video objects
- G06V 40/171: {Local features and components; Facial parts (eye characteristics G06V40/18); Occluding parts, e.g. glasses; Geometrical relationships}
- G06V 20/70: Labelling scene content, e.g. deriving syntactic or semantic representations
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Disclosed in embodiments of the present invention are an image recognition method and apparatus, an electronic device, and a computer-readable medium. One specific embodiment of the method comprises: obtaining a target image with a mouth displayed; for each of preset at least three target categories, determining a probability that each pixel point in the target image is the target category, and obtaining at least three probability maps; and determining the category of each pixel point in the target image on the basis of the at least three probability maps. According to the embodiment, the target image with the mouth displayed is classified into at least three target categories, so that the pixel points have more accurate categories, and the recognition of the edge of a target area in the image is more accurate.

## Claims

### Claim 1

A method of improving an accuracy of recognizing an edge of a mouth in a target image, comprising:
obtaining the target image;
determining a probability that each pixel point in the target image belongs to each of at least three target categories, wherein the at least three target categories comprise a category of face region, a category of mouth region, and a category of non-face background, and wherein the determining a probability that each pixel point in the target image belongs to each of at least three target categories comprises:
determining a first probability of each pixel point in the target image belonging to the category of face region,
determining a second probability of each pixel point in the target image belonging to the category of mouth region, and
determining a third probability of each pixel in the target image belonging to the category of non-face background;
generating at least three probability graphs based on the first probability, the second probability, and the third probability of each pixel point in the target image belonging to the category of face region, the category of mouth region, and the category of non-face background, respectively; and
determining a category of each pixel point in the target image based on the at least three probability graphs to improve the accuracy of recognizing the edge of the mouth in the target image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the at least three target categories further comprise a category of mouth internal region.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining the category of each pixel point in the target image based on the at least three probability graphs comprises:
determining, for each pixel point in the target image, at least three probability values of the pixel point in the at least three probability graphs;
determining a first quantity of probability values from the at least three probability values according to an order from large to small; and
determining the target category corresponding to the first quantity of probability values to be the category of the pixel point.

### Claim 4 (depends on 2)

The method according to claim 2, further comprising:
determining an image region displaying the mouth in the target image based on the category of each pixel point in the target image; and
performing image processing on the image region.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the determining a probability that each pixel point in the target image belongs to each of at least three target categories comprises:
inputting the target image into a pre-trained image recognition network to obtain the probability that each pixel point in the target image belongs to each of at least three target categories.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the determining the category of each pixel point in the target image based on the at least three probability graphs comprises:
determining, for each pixel point in the target image, at least three probability values of the pixel point in the at least three probability graphs;
determining a first quantity of probability values from the at least three probability values according to an order from large to small; and
determining the target category corresponding to the first quantity of probability values to be the category of the pixel point.

### Claim 7 (depends on 5)

The method according to claim 5, further comprising:
determining an image region displaying the mouth in the target image based on the category of each pixel point in the target image; and
performing image processing on the image region.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the determining the category of each pixel point in the target image based on the at least three probability graphs comprises:
determining, for each pixel point in the target image, at least three probability values of the pixel point in the at least three probability graphs;
determining a first quantity of probability values from the at least three probability values according to an order from large to small; and
determining the target category corresponding to the first quantity of probability values to be the category of the pixel point.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
determining an image region displaying the mouth in the target image based on the category of each pixel point in the target image; and
performing image processing on the image region.

### Claim 10

An electronic device, comprising:
one or more processors; and
a storage apparatus storing one or more programs; wherein
when the one or more programs are executed by the one or more processors, the one or more processors implement operations comprising:
obtaining a target image;
determining a probability that each pixel point in the target image belongs to each of at least three target categories, wherein the at least three target categories comprise a category of face region, a category of mouth region, and a category of non-face background, and wherein the determining a probability that each pixel point in the target image belongs to each of at least three target categories comprises:
determining a first probability of each pixel point in the target image belonging to the category of face region,
determining a second probability of each pixel point in the target image belonging to the category of mouth region, and
determining a third probability of each pixel in the target image belonging to the category of non-face background;
generating at least three probability graphs based on the first probability, the second probability, and the third probability of each pixel point in the target image belonging to the category of face region, the category of mouth region, and the category of non-face background, respectively; and
determining a category of each pixel point in the target image based on the at least three probability graphs to improve an accuracy of recognizing an edge of a mouth in the target image.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein the at least three target categories further comprise a category of mouth internal region.

### Claim 12 (depends on 10)

The electronic device according to claim 10, wherein the determining a probability that each pixel point in the target image belongs to each of at least three target categories comprises:
inputting the target image into a pre-trained image recognition network to obtain the probability that each pixel point in the target image belongs to each of at least three target categories.

### Claim 13 (depends on 10)

The electronic device according to claim 10, wherein the determining the category of each pixel point in the target image based on the at least three probability graphs comprises:
determining, for each pixel point in the target image, at least three probability values of the pixel point in the at least three probability graphs;
determining a first quantity of probability values from the at least three probability values according to an order from large to small; and
determining the target category corresponding to the first quantity of probability values to be the category of the pixel point.

### Claim 14 (depends on 10)

The electronic device according to claim 10, the operations further comprising:
determining an image region displaying the mouth in the target image based on the category of each pixel point in the target image; and
performing image processing on the image region.

### Claim 15

A non-transitory computer-readable medium storing computer programs, wherein the programs implement operations when executed by the processors, the operations comprising:
obtaining a target image;
determining a probability that each pixel point in the target image belongs to each of at least three target categories, wherein the at least three target categories comprise a category of face region, a category of mouth region, and a category of non-face background, and wherein the determining a probability that each pixel point in the target image belongs to each of at least three target categories comprises:
determining a first probability of each pixel point in the target image belonging to the category of face region,
determining a second probability of each pixel point in the target image belonging to the category of mouth region, and
determining a third probability of each pixel in the target image belonging to the category of non-face background;
generating at least three probability graphs based on the first probability, the second probability, and the third probability of each pixel point in the target image belonging to the category of face region, the category of mouth region, and the category of non-face background, respectively; and
determining a category of each pixel point in the target image based on the at least three probability graphs to improve an accuracy of recognizing an edge of a mouth in the target image.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium according to claim 15, wherein the at least three target categories further comprise a category of mouth internal region.

### Claim 17 (depends on 15)

The non-transitory computer-readable medium according to claim 15, wherein the determining a probability that each pixel point in the target image belongs to each of at least three target categories comprises:
inputting the target image into a pre-trained image recognition network to obtain the probability that each pixel point in the target image belongs to each of at least three target categories.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium according to claim 15, wherein the determining the category of each pixel point in the target image based on the at least three probability graphs comprises:
determining, for each pixel point in the target image, at least three probability values of the pixel point in the at least three probability graphs;
determining a first quantity of probability values from the at least three probability values according to an order from large to small; and
determining the target category corresponding to the first quantity of probability values to be the category of the pixel point.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium according to claim 15, the operations further comprising:
determining an image region displaying the mouth in the target image based on the category of each pixel point in the target image; and
performing image processing on the image region.
