# US 2021/0279883 A1 · Image processing method, apparatus, electronic device, and storage medium

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

- Number: US 2021/0279883 A1
- Document ID: US20210279883A1
- Status: Published application
- Kind: A1
- Application number: 17/181,510
- Filed: 2021-02-22
- Published: 2021-09-09
- Earliest claimed: 2020-03-05
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Jinlin LIU; Yuan YAO
- Web page: https://patentgrep.com/patent/US20210279883A1

## CPC

- G06T 7/12: Edge-based segmentation
- G06T 3/40: Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T 7/174: involving the use of two or more images
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/30168: Image quality inspection
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Image processing methods, devices, and storage media are provided. One of the image processing methods includes: obtaining an image comprising a target object; inputting the image into a mask prediction model to obtain a first mask image corresponding to the target object in the image; inputting the first mask image and the image comprising the target object into a mask quality unification model to obtain a second mask image, wherein the mask quality unification model is configured to adjust a fineness associated with the first mask image to a target fineness to obtain the second mask image, and wherein the second mask image has image semantic information consistent with image semantic information of the image comprising the target object; and inputting the image comprising the target object and the second mask image into a target image obtaining model to obtain a target image corresponding to the target object.

## Claims

### Claim 1

An image processing method, comprising:
obtaining an image comprising a target object;
inputting the image into a mask prediction model to obtain a first mask image corresponding to the target object in the image;
inputting the first mask image and the image comprising the target object into a mask quality unification model to obtain a second mask image, wherein the mask quality unification model is configured to adjust a fineness associated with the first mask image to a target fineness to obtain the second mask image, and wherein the second mask image has image semantic information consistent with image semantic information of the image comprising the target object; and
inputting the image comprising the target object and the second mask image into a target image obtaining model to obtain a target image corresponding to the target object.

### Claim 2 (depends on 1)

The image processing method according to claim 1, wherein inputting the image into a mask prediction model to obtain a first mask image corresponding to the target object in the image comprises:
obtaining image contour data of the target object; and
obtaining the first mask image according to the image contour data of the target object.

### Claim 3 (depends on 2)

The image processing method according to claim 2, wherein obtaining image contour data of the target object comprises:
downsampling the image comprising the target object to obtain a downsampled image; and
obtaining the image contour data of the target object according to the downsampled image.

### Claim 4 (depends on 3)

The image processing method according to claim 3, wherein downsampling the image comprising the target object to obtain a downsampled image comprises:
obtaining a downsampling factor for the image comprising the target object; and
downsampling the image comprising the target object according to the downsampling factor to obtain the downsampled image.

### Claim 5 (depends on 3)

The image processing method according to claim 3, wherein obtaining the image contour data of the target object according to the downsampled image comprises:
performing image contour extraction on the target object in the downsampled image to obtain the image contour data of the target object.

### Claim 6 (depends on 1)

The image processing method according to claim 1, further comprising:
providing the target image corresponding to the target object to a client.

### Claim 7 (depends on 6)

The image processing method according to claim 6, further comprising:
obtaining, from the client, a request message for requesting to obtain the target image corresponding to the target object; wherein providing the target image corresponding to the target object to a client comprises: providing, in response to the request message, the image corresponding to the target object to the client.

### Claim 8 (depends on 1)

The image processing method according to claim 1, further comprising:
displaying the target image corresponding to the target object.

### Claim 9 (depends on 1)

The image processing method according to claim 1, wherein the fineness associated with the first mask image is a fineness of image contour data of the target object, and wherein the image processing method further comprises:
obtaining the fineness of the image contour data of the target object; and
comparing the fineness of the image contour data of the target object with the target fineness.

### Claim 10 (depends on 9)

The image processing method according to claim 9, wherein inputting the first mask image and the image comprising the target object into a mask quality unification model to obtain a second mask image comprises:
in response to the fineness of the image contour data of the target object being less than the target fineness, increasing the fineness of the image contour data of the target object to the target fineness to obtain the second mask image.

### Claim 11 (depends on 9)

The image processing method according to claim 9, wherein inputting the first mask image and the image comprising the target object into a mask quality unification model to obtain a second mask image comprises:
in response to the fineness of the image contour data of the target object being greater than the target fineness, reducing the fineness of the image contour data of the target object to the target fineness to obtain the second mask image.

### Claim 12 (depends on 1)

The image processing method according to claim 1, further comprising:
obtaining a sample image comprising a sample target object;
obtaining a sample first mask image corresponding to the sample target object in the sample image;
obtaining a target second mask image for the sample image and the sample first mask image; and
obtaining the mask quality unification model according to the sample image, the sample first mask image, and the target second mask image.

### Claim 13 (depends on 1)

The image processing method according to claim 1, further comprising:
obtaining a sample image comprising a sample target object;
obtaining a sample mask image corresponding to the sample target object in the sample image;
obtaining, for the sample image and the sample mask image, a sample target image corresponding to the sample target object in the sample image; and
obtaining a target image obtaining model according to the sample image, the sample mask image, and the sample target image.

### Claim 14

An image processing apparatus, comprising: one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the apparatus to perform operations comprising:
obtaining an image comprising a target object;
inputting the image into a mask prediction model to obtain a first mask image corresponding to the target object in the image;
inputting the first mask image and the image comprising the target object into a mask quality unification model to obtain a second mask image, wherein the mask quality unification model is configured to adjust a fineness associated with the first mask image to a target fineness to obtain the second mask image, and wherein the second mask image has image semantic information consistent with image semantic information of the image comprising the target object; and
inputting the image comprising the target object and the second mask image into a target image obtaining model to obtain a target image corresponding to the target object.

### Claim 15 (depends on 14)

The image processing apparatus according to claim 14, wherein inputting the image into a mask prediction model to obtain a first mask image corresponding to the target object in the image comprises:
obtaining image contour data of the target object; and
obtaining the first mask image according to the image contour data of the target object.

### Claim 16 (depends on 15)

The image processing apparatus according to claim 15, wherein obtaining image contour data of the target object comprises:
downsampling the image comprising the target object to obtain a downsampled image; and
obtaining the image contour data of the target object according to the downsampled image.

### Claim 17

A method for image processing, comprising:
obtaining a sample image comprising a target object;
obtaining first image contour data and second image contour data that correspond to the target object in the sample image, wherein the first image contour data has a fineness below a fineness threshold, and the second image contour data has a fineness equal to or higher than the fineness threshold;
obtaining a first mask image corresponding to the target object based on the first image contour data, and obtaining a second mask image corresponding to the target object based on the second image contour data; and
obtaining a mask prediction model according to the first image contour data, the second image contour data, the first mask image corresponding to the target object, and the second mask image corresponding to the target object, wherein the mask prediction model is configured to obtain image contour data of another target object in another image and obtaining another first mask image corresponding to the another target object according to the image contour data of the another target object.

### Claim 18 (depends on 17)

The method for image processing according to claim 17, wherein obtaining first image contour data and second image contour data that correspond to the target object in the sample image comprises:
downsampling the sample image to obtain a downsampled sample image; and
obtaining the first image contour data and the second image contour data according to the downsampled sample image.

### Claim 19 (depends on 18)

The method for image processing according to claim 18, wherein downsampling the sample image to obtain a downsampled sample image comprises:
obtaining a downsampling factor for the sample image; and
downsampling the sample image according to the downsampling factor to obtain the downsampled sample image.

### Claim 20 (depends on 18)

The method for image processing according to claim 18, wherein obtaining the first image contour data and the second image contour data according to the downsampled sample image comprises:
performing image contour extraction on the target object in the downsampled sample image to obtain the first image contour data and the second image contour data.
