# US 2021/0279928 A1 · Method and apparatus 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 2021/0279928 A1
- Document ID: US20210279928A1
- Status: Published application
- Kind: A1
- Application number: 17/330,507
- Filed: 2021-05-26
- Published: 2021-09-09
- Earliest claimed: 2020-04-29
- Assignees: Baidu Online Network Technology (Beijing) Co., Ltd.
- Applicants: Baidu Online Network Technology (Beijing) Co., Ltd.
- Inventors: Xunchang WANG; Weichai HUANG; Huan LI; Wenjie PANG; Wenbo MA
- Web page: https://patentgrep.com/patent/US20210279928A1

## CPC

- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 3/00: Geometric image transformations in the plane of the image
- G06T 3/18: Image warping, e.g. rearranging pixels individually
- G06T 7/73: using feature-based methods
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 11/40: Filling planar surfaces by adding surface attributes, e.g. adding colours or textures
- G06T 11/60: Creating or editing images; Combining images with text
- G06T 2207/10004: Still image; Photographic image
- G06T 2207/20012: Locally adaptive
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/30201: Face
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Embodiments of the present disclosure provides a method and an apparatus for image processing, which relates to the field of artificial intelligence of image processing, and specifically includes: acquiring an image including a face; receiving a selection operation of a beautifying material on a target object in the face, where the target object is an organ in the face; identifying a position of a key point of the target object in the face by using a pre-trained target key point model; adjusting a shape of the target object in the face by using the position of the key point and a shape of the beautifying material; dividing an area of an adjusted target object in the image to obtain divided areas; and filling the divided areas according to the beautifying material to obtain a target image.

## Claims

### Claim 1

A method for image processing, comprising:
acquiring an image, wherein the image comprises a face;
receiving a selection operation of a beautifying material on a target object in the face, wherein the target object is an organ in the face;
identifying a position of a key point of the target object in the face by using a pre-trained target key point model;
adjusting a shape of the target object in the face by using the position of the key point and a shape of the beautifying material;
dividing an area of an adjusted target object in the image to obtain divided areas; and
filling the divided areas according to the beautifying material to obtain a target image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the adjusting a shape of the target object in the face by using the position of the key point and a shape of the beautifying material comprises:
obtaining a source area of the target object in the face by using the position of the key point; and
adjusting a shape of the source area to a shape similar to the shape of the beautifying material.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the dividing an area of the adjusted target object in the image comprises:
triangulating an area of the adjusted target object in the image.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the filling the divided areas according to the beautifying material to obtain a target image comprises:
performing texture mapping on the divided areas according to the beautifying material to obtain the target image.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the acquiring an image comprises:
receiving a photographing operation; and
photographing and obtaining the image in response to the photographing operation.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the target object is eyebrows, and the beautifying material is an eyebrow material.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
in the case of receiving a sharing operation on the target image, sharing the target image based on a path of the sharing operation.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising:
in the case of receiving a storing operation on the target image, storing the target image.

### Claim 9

An apparatus for image processing, comprising:
at least one processor;
a communication interface connected with the at least one processor; and
a memory communicated and connected with the at least one processor;
wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to:
acquire an image, wherein the image comprises a face;
receive, through the communication interface, a selection operation of a beautifying material on a target object in the face, wherein the target object is an organ in the face;
identify a position of a key point of the target object in the face by using a pre-trained target key point model;
adjust a shape of the target object in the face by using the position of the key point and a shape of the beautifying material;
divide an area of an adjusted target object in the image to obtain divided areas; and
fill the divided areas according to the beautifying material to obtain a target image.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the instructions further cause the at least one processor to:
obtain a source area of the target object in the face by using the position of the key point; and
adjust a shape of the source area to a shape similar to the shape of the beautifying material.

### Claim 11 (depends on 9)

The apparatus according to claim 9, wherein the instructions further cause the at least one processor to:
triangulate an area of the adjusted target object in the image.

### Claim 12 (depends on 9)

The apparatus according to claim 9, wherein the instructions further cause the at least one processor to:
perform texture mapping on the divided areas according to the beautifying material to obtain the target image.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein the instructions further cause the at least one processor to
receive, through the communication interface, a photographing operation; and
photograph and obtain the image in response to the photographing operation.

### Claim 14 (depends on 9)

The apparatus according to claim 9, wherein the target object is eyebrows, and the beautifying material is an eyebrow material.

### Claim 15 (depends on 9)

The apparatus according to claim 9, wherein the instructions further cause the at least one processor to:
in the case of receiving a sharing operation on the target image, share the target image based on a path of the sharing operation.

### Claim 16 (depends on 9)

The apparatus according to claim 9, wherein the instructions further cause the at least one processor to:
in the case of receiving a storing operation on the target image, store the target image.

### Claim 17 (depends on 1)

A non-transitory computer-readable storage medium storing computer instructions therein, wherein the computer instructions are used to cause a computer to execute the method according to claim 1.

### Claim 18 (depends on 2)

A non-transitory computer-readable storage medium storing computer instructions therein, wherein the computer instructions are used to cause a computer to execute the method according to claim 2.

### Claim 19 (depends on 3)

A non-transitory computer-readable storage medium storing computer instructions therein, wherein the computer instructions are used to cause a computer to execute the method according to claim 3.

### Claim 20 (depends on 4)

A non-transitory computer-readable storage medium storing computer instructions therein, wherein the computer instructions are used to cause a computer to execute the method according to claim 4.
