# US 2021/0343065 A1 · Cartoonlization processing method for image, 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/0343065 A1
- Document ID: US20210343065A1
- Status: Published application
- Kind: A1
- Application number: 17/373,420
- Filed: 2021-07-12
- Published: 2021-11-04
- Earliest claimed: 2020-08-20
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Tianwei LIN; Fu LI; Xin LI; Henan ZHANG; Hao SUN
- Web page: https://patentgrep.com/patent/US20210343065A1

## CPC

- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 7/11: Region-based segmentation
- G06T 7/90: Determination of colour characteristics
- G06T 15/02: Non-photorealistic rendering
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 40/16: Human faces, e.g. facial parts, sketches or expressions
- G06V 40/171: {Local features and components; Facial parts (eye characteristics G06V40/18); Occluding parts, e.g. glasses; Geometrical relationships}
- G06T 2207/20221: Image fusion; Image merging
- G06T 2207/30201: Face
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

The disclosure discloses a cartoonlization processing method for an image, and relates to a field of computational vision, image processing, face recognition, deep learning technologies. The method includes: performing skin color recognition on a facial image to be processed to determine a target skin color of a face in the facial image; processing the facial image by utilizing any cartoonizing model in a cartoonizing model set to obtain a reference cartoonized image corresponding to the facial image in a case that the cartoonizing model set does not contain a cartoonizing model corresponding to the target skin color; determining a pixel adjustment parameter based on the target skin color and a reference skin color corresponding to the any cartoonizing model; and adjusting a pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter, to obtain a target cartoonized image corresponding to the facial image.

## Claims

### Claim 1

A cartoonlization processing method for an image, comprising:
performing skin color recognition on a facial image to be processed to determine a target skin color of a face in the facial image;
processing the facial image by utilizing any cartoonizing model in a cartoonizing model set to obtain a reference cartoonized image corresponding to the facial image in a case that the cartoonizing model set does not contain a cartoonizing model corresponding to the target skin color;
determining a pixel adjustment parameter based on the target skin color and a reference skin color corresponding to the any cartoonizing model; and
adjusting a pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter, to obtain a target cartoonized image corresponding to the facial image.

### Claim 2 (depends on 1)

The method of claim 1, before determining the pixel adjustment parameter based on the target skin color and the reference skin color corresponding to the any cartoonizing model, further comprising:
performing feature recognition on the facial image to determine a feature of the facial image; and
updating the pixel adjustment parameter based on the feature of the facial image.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the pixel adjustment parameter based on the target skin color and the reference skin color corresponding to the any cartoonizing model comprising:
determining the pixel adjustment parameter based on a difference degree between the target skin color and the reference skin color.

### Claim 4 (depends on 1)

The method of claim 1, wherein adjusting the pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter comprises:
determining a first variable corresponding to each pixel point in the reference cartoonized image, the first variable being a ratio of a current pixel value of the pixel point to a set coefficient; and
determining an adjusted pixel value of each pixel point based on a power function of each first variable and the pixel adjustment parameter.

### Claim 5 (depends on 1)

The method of claim 1, after obtaining the target cartoonized image corresponding to the facial image, further comprising:
obtaining a facial image set and a cartoonized image set corresponding to the target skin color in a case that a number of target cartoonized images matching the target skin color is greater than a first threshold; and
performing training on an initial cartoonizing model based on the facial image set and the cartoonized image set to obtain the target cartoonizing model corresponding to the target skin color.

### Claim 6 (depends on 1)

The method of claim 1, before performing skin color recognition on the facial image to be processed, further comprising:
performing face segmentation on an image to be processed by utilizing a face segmentation model to obtain the facial image to be processed.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
performing background cartoonlization processing on the image to be processed to obtain a background-cartoonized image; and
merging the target cartoonized image and the background-cartoonized image to obtain a cartoonized image corresponding to the image to be processed.

### Claim 8

An electronic device, comprising:
at least one processor; and
a memory, communicatively coupled to the at least one processor,
wherein the memory is configured to store instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is caused to execute a cartoonlization processing method for an image, the method comprising:
performing skin color recognition on a facial image to be processed to determine a target skin color of a face in the facial image;
processing the facial image by utilizing any cartoonizing model in a cartoonizing model set to obtain a reference cartoonized image corresponding to the facial image in a case that the cartoonizing model set does not contain a cartoonizing model corresponding to the target skin color;
determining a pixel adjustment parameter based on the target skin color and a reference skin color corresponding to the any cartoonizing model; and
adjusting a pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter, to obtain a target cartoonized image corresponding to the facial image.

### Claim 9 (depends on 8)

The electronic device of claim 8, wherein, before determining the pixel adjustment parameter based on the target skin color and the reference skin color corresponding to the any cartoonizing model, the method further comprises:
performing feature recognition on the facial image to determine a feature of the facial image: and
updating the pixel adjustment parameter based on the feature of the facial image,

### Claim 10 (depends on 8)

The electronic device of claim 8, wherein determining the pixel adjustment parameter based on the target skin color and the reference skin color corresponding to the any cartoonizing model comprising:
determining the pixel adjustment parameter based on a difference degree between the target skin color and the reference skin color.

### Claim 11 (depends on 8)

The electronic device of claim 8, wherein adjusting the pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter comprises:
determining a first variable corresponding to each pixel point in the reference cartoonized image, the first variable being a ratio of a current pixel value of the pixel point to a set coefficient; and
determining an adjusted pixel value of each pixel point based on a power function of each first variable and the pixel adjustment parameter.

### Claim 12 (depends on 8)

The electronic device of claim 8, wherein, after obtaining the target cartoonized image corresponding to the facial image, the further comprises:
obtaining a facial image set and a cartoonized image set corresponding to the target skin color in a case that a number of target cartoonized images matching the target skin color is greater than a first threshold; and
performing training on an initial cartoonizing model based on the facial image set and the cartoonized image set to obtain the target cartoonizing model corresponding to the target skin color.

### Claim 13 (depends on 8)

The electronic device of claim 8, wherein, before performing skin color recognition on the facial image to be processed, the method further comprises:
performing face segmentation on an image to be processed by utilizing a face segmentation model to obtain the facial image to be processed.

### Claim 14 (depends on 13)

The electronic device of claim 13, wherein the further comprises:
performing background cartoonlization processing on the image to be processed to obtain a background-cartoonized image; and
merging the target cartoonized image and the background-cartoonized image to obtain a cartoonized image corresponding to the image to be processed.

### Claim 15

A non-transitory computer readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to execute the cartoonlization processing method for an image, the method comprising:
performing skin color recognition on a facial image to be processed to determine a target skin color of a face in the facial image;
processing the facial image by utilizing any cartoonizing model in a cartoonizing model set to obtain a reference cartoonized image corresponding to the facial image in a case that the cartoonizing model set does not contain a cartoonizing model corresponding to the target skin color;
determining a pixel adjustment parameter based on the target skin color and a reference skin color corresponding to the any cartoonizing model; and
adjusting a pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter, to obtain a target cartoonized image corresponding to the facial image.

### Claim 16 (depends on 15)

The storage medium of claim 15, wherein, before determining the pixel adjustment parameter based on the target skin color and the reference skin color corresponding to the any cartoonizing model, the method further comprises:
performing feature recognition on the facial image to determine a feature of the facial image; and
updating the pixel adjustment parameter based on the feature of the facial image.

### Claim 17 (depends on 15)

The storage medium of claim 15, wherein determining the pixel adjustment parameter based on the target skin color and the reference skin color corresponding to the any cartoonizing model comprising:
determining the pixel adjustment parameter based on a difference degree between the target skin color and the reference skin color.

### Claim 18 (depends on 15)

The storage medium of claim 15, wherein adjusting the pixel value of each pixel point in the reference cartoonized image based on the pixel adjustment parameter comprises:
determining a first variable corresponding to each pixel point in the reference cartoonized image, the first variable being a ratio of a current pixel value of the pixel point to a set coefficient; and
determining an adjusted pixel value of each pixel point based on a power function of each first variable and the pixel adjustment parameter.

### Claim 19 (depends on 15)

The storage medium of claim 15, wherein, after obtaining the target cartoonized image corresponding to the facial image, the further comprises:
obtaining a facial image set and a cartoonized image set corresponding to the target skin color in a case that a number of target cartoonized images matching the target skin color is greater than a first threshold; and
performing training on an initial cartoonizing model based on the facial image set and the cartoonized image set to obtain the target cartoonizing model corresponding to the target skin color.

### Claim 20 (depends on 15)

The storage medium of claim 15, wherein, before performing skin color recognition on the facial image to be processed, the method further comprises:
performing face segmentation on an image to be processed by utilizing a face segmentation model to obtain the facial image to be processed.
