Makeup removing method and apparatus using convolutional neural network, device, and readable storage medium
By training the model using the U-Net structure of a convolutional neural network and the HSV channel loss function, the problems of large skin tone differences and loss of detail in existing makeup removal methods are solved, achieving accurate makeup removal for different skin tones and makeup while preserving facial features.
Patent Information
- Application Number
- CN202210999276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Existing makeup removal methods produce drastically different results when processing images with makeup, especially for images with different skin tones, leading to unnatural makeup and even loss of image details.
A convolutional neural network is used, with a U-Net network structure, combined with an identity information editor, a makeup information encoder, and an image generator, for image preprocessing and feature extraction. The model is trained using the HSV channel loss function and the Adam optimization method to achieve accurate makeup removal.
It achieves precise makeup removal for different skin tones and makeup looks, while preserving facial features, thus improving the robustness and detail handling of the makeup removal effect.
Smart Images

Figure CN115330629B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of human skin, in particular to a makeup removing method and device based on a convolutional neural network, an equipment and a readable storage medium. BACKGROUND
[0002] Makeup overlay problems may occur when performing makeup operations on images with makeup, resulting in heavy makeup. In addition, images with makeup change facial features, causing certain difficulties in identifying some face verification systems. Therefore, before processing images, makeup removal operations are often performed to obtain clean bare-faced images, so as to better perform makeup and identification.
[0003] Existing makeup removal methods often adjust the saturation, brightness, etc. of pixels by adjusting the curve to filter the image, and simulate the makeup removal effect of different parts. However, the makeup removal effects of different skin colors differ greatly, especially the makeup after makeup removal turns green and white, and even some details of the image are lost. SUMMARY
[0004] The present application aims to provide a makeup removal method and device based on a convolutional neural network, an equipment and a readable storage medium to improve the above problems. In order to achieve the above purpose, the technical solutions adopted by the present application are as follows:
[0005] In a first aspect, the present application provides a makeup removal method based on a convolutional neural network, comprising:
[0006] Obtaining at least two groups of images with makeup;
[0007] Preprocessing the images with makeup to obtain a preprocessing result of the images with makeup;
[0008] Based on a network U-Net, inputting the preprocessing result into the network U-Net to obtain an output result;
[0009] Adjusting network parameters according to the output result and a preset supervision map loss, and obtaining a makeup removal model through training and learning.
[0010] Preferably, the preprocessing of the image data to obtain a preprocessing result comprises:
[0011] Inputting at least two groups of images with makeup into an RGB channel to obtain an input image;
[0012] Randomly selecting the input image and a preset target image for image enhancement, wherein the image enhancement comprises operations of cropping, translating and left-right flipping on the input image and the preset target image.
[0013] Preferably, the network U-Net is used to input the preprocessing result into the network U-Net, and output results are obtained, which include:
[0014] The network U-Net is selected, which includes an identity information editor, a makeup information encoder, an image generator, and an image discriminator; the makeup information encoder and the image generator constitute an image generation module; the identity information encoder is composed of multiple convolution layers, which extracts the identity information in the target image using the convolution layer after receiving the input target image, and finally outputs the identity information code of the target image; the makeup information encoder is composed of multiple convolution layers and pooling layers, which extracts the makeup information of the face in the image using the convolution layer after receiving the input target image and reference image, and finally compresses the output feature information using the pooling layer to output the corresponding target image makeup information code and reference image makeup information code; the image generator is an image decoder, which receives the identity information code and the makeup information code, fuses them using the convolution layer, and up-samples the image, and finally outputs a new image; the new image includes a makeup image with the reference image makeup and the face identity in the target image, and a reconstructed image of the target image;
[0015] The color and edge features in the makeup image are extracted, and the color and edge features in the makeup image are repaired to obtain a repaired result, which is output as an output result.
[0016] Preferably, the network parameters are adjusted according to the loss of the output result and a preset supervision graph, and the network is trained and learned, which includes:
[0017] The loss of the output result on the HSV channel is calculated, wherein the makeup image is normalized to obtain a normalized result, and the normalized result is processed by a convolutional neural network;
[0018] The weights are set, the Adam optimization method is used, and the weights of each makeup image are determined through multiple iterations;
[0019] The makeup images after iterative convergence constitute an image database;
[0020] The network parameters are adjusted based on the loss of the preset supervision graph and the image database, and the network is trained and learned.
[0021] In a second aspect, the application also provides a makeup removing device of a convolutional neural network, which includes:
[0022] An acquisition module is configured to acquire at least two groups of makeup images;
[0023] The pre-processing module is configured to pre-process the makeup image to obtain a pre-processing result of the makeup image.
[0024] The output module is configured to input the pre-processing result into the network U-Net based on the network U-Net to obtain an output result.
[0025] The obtaining module is configured to adjust network parameters according to the output result and a preset supervision map loss, and obtain a makeup removing model through training and learning.
[0026] In a third aspect, the present application further provides a makeup removing device of a convolutional neural network, comprising:
[0027] The memory is configured to store a computer program.
[0028] The processor is configured to implement the steps of the makeup removing method of the convolutional neural network when executing the computer program.
[0029] In a fourth aspect, the present application further provides a readable storage medium, wherein the readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the makeup removing method based on the convolutional neural network.
[0030] The present application has the following advantages:
[0031] The present application utilizes the feature extraction and recognition capability of the convolutional neural network, and learns the transformation mapping of the features through training, so as to remove the makeup on the face. A plurality of makeup operations of different makeup on clean face images are performed to obtain a large number of makeup-cleanness image data pairs. The pre-training weight is loaded before training, so that the model has good initialization parameters. During training, the makeup images under different makeup are randomly extracted and pre-processed as model input. The network parameters are adjusted according to the loss of the model output and the cleanness supervision map, and the final makeup removing model is obtained.
[0032] The present application introduces the loss of the HSV channel of different face parts, which can better strengthen the different parts and ensure that the color of the clean face image after makeup removing is excessively smooth. The pre-training model enables the network to have certain recognition capability and improve the feature extraction capability. The mask makeup transplantation increases the diversity of sample makeup, so that the network has better makeup removing effect and better robustness.
[0033] The present application removes the makeup information on the image to the greatest extent based on the deep learning method, while maintaining the features of the five organs. Compared with the traditional makeup removing method, the present application can distinguish the makeup information on the original image from the original face feature information, realize makeup removing, and has better detail processing and makeup removing effect for different skin colors or heavy makeup images.
[0034] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the makeup removal method using a convolutional neural network as described in an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram of the makeup removal device using a convolutional neural network as described in an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of the makeup removal device using a convolutional neural network as described in an embodiment of the present invention.
[0039] In the diagram: 701, Acquisition module; 702, Preprocessing module; 7021, Input unit; 7022, First selection unit; 703, Output module; 7031, Second selection unit; 7032, Extraction unit; 704, Acquisition module; 7041, Calculation unit; 7042, Optimization unit; 7043, Iteration unit; 7044, Training unit; 800, Convolutional neural network assembly; 801, Processor; 802, Memory; 803, Multimedia component; 804, I / O interface; 805, Communication component. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0041] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0042] Example 1:
[0043] Existing makeup removal methods often adjust the saturation and brightness of pixels by filtering the image through curves to simulate the makeup removal effect on different parts of the body. However, the makeup removal effect varies greatly for different skin tones, especially after makeup removal, the makeup may appear green or white, and some details of the image may even be lost.
[0044] Leveraging the powerful learning capabilities of convolutional neural networks, a makeup removal mapping function for human faces is learned under the supervision of clean, bare-faced images, preserving facial features while removing makeup.
[0045] This method addresses the existing problems by proposing the use of convolutional neural networks to achieve makeup removal.
[0046] This embodiment provides a makeup removal method based on a convolutional neural network.
[0047] See Figure 1 The figure shows that the method includes steps S100, S200, S300 and S400.
[0048] S100: Obtain at least two sets of images with makeup on.
[0049] Understandably, in this step, multiple makeup looks were applied to the clean, bare-faced photos, resulting in a large amount of data on photos with and without makeup.
[0050] S200. Preprocess the image with makeup to obtain the preprocessed result of the image with makeup.
[0051] It is understood that this step includes: inputting at least two sets of the made-up images into the RGB channels to obtain the input image;
[0052] The input image and the preset target image are randomly selected for image enhancement. The image enhancement includes cropping, translating and flipping the input image and the preset target image.
[0053] It should be noted that, after establishing the makeup removal network structure, data preprocessing is performed first:
[0054] For an input image with makeup (RGB channels), geometric operations such as cropping, translation, and left / right flipping are performed on the input and target images with random probabilities to enrich image features.
[0055] t_img i in ,t_img i target =transform(img i in ,img i target )
[0056] Among them, img i in The input is a strip chart, img i target This represents the corresponding bare-faced image, t_img i in t_img represents the input strip graph after geometric operations. i target represents the plain image after geometric operations, i represents the i-th image in the sample set, and transform represents the geometric operation.
[0057] S300. Based on the U-Net network, the preprocessing result is input into the U-Net network to obtain the output result.
[0058] It is understandable that this step includes:
[0059] The network U-Net is selected, which includes an identity information editor, a makeup information encoder, an image generator, and an image discriminator. The makeup information encoder and the image generator constitute an image generation module. The identity information encoder consists of multiple convolutional layers. After receiving the input target image, it uses convolutional layers to extract features of the identity information in the target image and finally outputs the identity information encoding of the target image. The makeup information encoder consists of multiple convolutional layers and pooling layers. After receiving the input target image and reference image, it uses convolutional layers to extract the makeup information of the face in the image, and finally uses pooling layers to compress the output feature information, outputting the corresponding target image makeup information encoding and reference image makeup information encoding. The image generator is an image decoder. It receives the identity information encoding and makeup information encoding, uses convolutional layers to fuse the two, and upsamples the image to finally output a new image. The new image includes a made-up image with the makeup of the reference image and the face identity in the target image, and a reconstructed image of the target image.
[0060] Extract the color and edge features from the image with makeup, repair the color and edge features in the image with makeup, and output the repaired result, which is denoted as the output result.
[0061] It should be noted that this method uses the U-Net network, a commonly used encoder-decoder network with good applications in semantic segmentation and image translation. The encoding part extracts color and edge features, while the decoding part restores specific detail edges, such as pupils and eyeliner. The encoding part performs 5 downsampling operations (max pooling) on the input image, and the decoding stage performs 5 upsampling operations (bilinear interpolation). For ease of description, this paper uses Encode1, Encode2, Encode3, Encode4, Encode5, Decode1, Decode2, Decode3, Decode4, Decode5, and Finally conv to represent the various encoding and decoding stages in the network, respectively. Each Encode and Decode stage contains multiple network blocks.
[0062] S400. Adjust the network parameters based on the output results and the loss of the preset supervision graph. After training and learning, obtain the makeup removal model.
[0063] It is understood that this step includes: calculating the loss of the output result on the HSV channel, wherein the image with makeup is normalized to obtain the normalized result, and the normalized result is processed by a convolutional neural network.
[0064] Set weights, use the Adam optimization method, and perform multiple iterations to determine the weights of each of the images with makeup.
[0065] The images of people wearing makeup, after iterative convergence, form an image database;
[0066] The network parameters are adjusted based on the loss of the preset supervised graph and the image database for training and learning.
[0067] It should be noted that the supervision process, which combines different facial region weights, is as follows:
[0068] To enhance the makeup removal effect on different areas and the skin tone after makeup removal, the loss on the HSV channel was calculated for different facial areas.
[0069] In this embodiment, X is assumed to be the network output converted to HSV channels, and Y is the corresponding target HSV channel. Using existing face segmentation results, masks for different makeup positions are obtained: face, lip, eye, and eyebrow. The lip mask and eye mask are then combined into a single mask_lip, and the eyebrow mask and face mask are combined into a single mask_brow_face. These are multiplied by the original image to extract the corresponding regions. The L1 loss for each region is calculated, with emphasis on the H and S channels for the lip and eye regions, and on the H channel for the eyebrow and face regions. wk (k = 1, 2) represents the weight for each region, obtained by subtracting the average HSV channel pixel value of the entire image from the average HSV channel pixel value of the region in the Euclidean distance, and all weights are normalized.
[0070] Loss eye_lip =w1(λ1||X K1 H -Y K1 H ||1+λ2||X K1 S -Y K1 S ||1+λ3||X K1 V -Y K1 V ||1)
[0071] Among them, X K1 Y K1 These represent the lip and eye regions in the output and target images, respectively. The superscripts H, S, and V correspond to their respective color channels, and λ1, λ2, and λ3 represent the weights of the loss for different color channels. eye_lip HSV channel loss in the lip and eye area.
[0072] Loss brow_face =w2(λ4||X K2 H -Y K2 H ||1+λ5||X K2 S -Y K2 S ||1+λ6||X K2 V -Y K2 V ||1)
[0073] Among them, X K2 Y K2These represent the eyebrow and face regions in the output and target images, respectively. The superscripts H, S, and V correspond to their respective color channels, and λ4, λ5, and λ6 represent the weights of the loss for different color channels. brow_face HSV channel loss in the eyebrow and face area.
[0074]
[0075] Among them, Y j HSV Y represents the HSV feature of the j-th region. HSV The HSV feature represents the entire image, while w1 and w2 are the weights corresponding to their respective blocks.
[0076] In addition, the l2 loss of the entire X and Y graphs needs to be calculated.
[0077] Loss2=||XY||2
[0078] In addition, a perceptual loss, Loss3, is introduced to make the input and target graphs have more similar semantics.
[0079]
[0080] Where Loss3 represents the perceptual loss, j represents the j-th layer of the perceptual loss network ε(·), and Cj,Hj,Wj are the feature map sizes of the j-th layer.
[0081] The total loss calculation for this method is expressed as follows:
[0082] Loss = Loss eye_lip +Loss brow_face +θLoss2+Loss3
[0083] Where θ is the weight of the full-image L2 loss Loss2, and empirically, setting it to 1.2 is appropriate. eye_lip For HSV channel loss in the lip and eye area, Loss brow_face Loss 1 represents the HSV channel loss in the eyebrow and face region. Loss 2 represents the perceptual loss.
[0084] It should be noted that, specifically, after the above description, training and learning are performed: the preprocessed image is input into the network, trained according to the loss described above, using the Adam optimizer, and the learning rate is set to 0.0002.
[0085] In summary, the beneficial effects of this invention are: the introduction of HSV channel loss for different facial regions allows for better targeted enhancement of different areas, ensuring a smooth color transition in the bare-faced image after makeup removal; the pre-trained model enables the network to recognize objects and improves feature extraction capabilities; and the use of mask makeup transplantation increases the diversity of sample makeup, resulting in better makeup removal performance and robustness. This method, based on deep learning, removes makeup information from images to the greatest extent possible while preserving facial features. Compared to traditional makeup removal methods, it can distinguish between makeup information and original facial features in the original image, achieving effective makeup removal and providing better detail processing and makeup removal results for different skin tones or heavily made-up images.
[0086] Example 2:
[0087] like Figure 2 As shown, this embodiment provides a makeup removal device based on a convolutional neural network. See [link to documentation]. Figure 2 The device includes:
[0088] Acquisition module 701: Used to acquire at least two sets of images with makeup on;
[0089] Preprocessing module 702: used to preprocess the image with makeup to obtain the preprocessing result of the image with makeup;
[0090] Output module 703: used to input the preprocessing results into the U-Net network based on the U-Net network, and obtain the output results;
[0091] Module 704: Used to adjust network parameters based on the output results and the loss of the preset supervision graph, and obtain the makeup removal model after training and learning.
[0092] Specifically, the preprocessing module 702 includes:
[0093] Input unit 7021: used to input at least two sets of the made-up images into the RGB channel to obtain an input image;
[0094] First selection unit 7022: used to randomly select the input image and a preset target image for image enhancement, the image enhancement including cropping, translating and flipping the input image and the preset target image.
[0095] Specifically, the output module 703 includes:
[0096] The second selection unit 7031 is used to select the network U-Net, which includes an identity information editor, a makeup information encoder, an image generator, and an image discriminator. The makeup information encoder and the image generator constitute an image generation module. The identity information encoder consists of multiple convolutional layers. After receiving the input target image, it uses convolutional layers to extract features of the identity information in the target image and finally outputs the identity information encoding of the target image. The makeup information encoder consists of multiple convolutional layers and pooling layers. After receiving the input target image and reference image, it uses convolutional layers to extract the makeup information of the face in the image and finally uses pooling layers to compress the output feature information, outputting the corresponding target image makeup information encoding and reference image makeup information encoding. The image generator is an image decoder. It receives the identity information encoding and makeup information encoding, uses convolutional layers to fuse the two, and upsamples the image to finally output a new image. The new image includes a made-up image with the makeup of the reference image and the face identity in the target image, and a reconstructed image of the target image.
[0097] Extraction unit 7032: used to extract color and edge features from the made-up image, repair the color and edge features in the made-up image, and output the repaired result, which is recorded as the output result.
[0098] Specifically, the obtaining module 704 includes:
[0099] Calculation unit 7041: used to calculate the loss of the output result on the HSV channel, wherein the makeup image is normalized to obtain the normalized result, and the normalized result is processed by a convolutional neural network;
[0100] Optimization unit 7042: used to set weights, and using the Adam optimization method to perform multiple iterations to determine the weights of each of the made-up images;
[0101] Iteration unit 7043: used to iteratively converge the images of people wearing makeup to form an image database;
[0102] Training unit 7044: used to adjust network parameters and the image database based on a preset supervised graph loss for training and learning.
[0103] It should be noted that the specific manner in which each module performs its operation in the apparatus described in the above embodiments has been described in detail in the embodiments of the method, and will not be elaborated here.
[0104] Example 3:
[0105] Corresponding to the above method embodiments, this embodiment also provides a makeup removal device based on a convolutional neural network. The makeup removal device based on a convolutional neural network described below and the makeup removal method based on a convolutional neural network described above can be referred to each other.
[0106] Figure 3 This is a block diagram illustrating a makeup removal device 800 based on a convolutional neural network, according to an exemplary embodiment. Figure 3 As shown, the makeup removal device 800 of the convolutional neural network may include: a processor 801 and a memory 802. The makeup removal device 800 of the convolutional neural network may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0107] The processor 801 controls the overall operation of the convolutional neural network makeup removal device 800 to complete all or part of the steps in the aforementioned convolutional neural network makeup removal method. The memory 802 stores various types of data to support the operation of the convolutional neural network makeup removal device 800. This data may include, for example, instructions for any application or method operating on the convolutional neural network makeup removal device 800, as well as application-related data such as contact data, sent and received messages, images, audio, video, etc. The memory 802 can be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 802 or transmitted via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. I / O interface 804 provides an interface between processor 801 and other interface modules, such as keyboards, mice, and buttons. These buttons can be virtual or physical. Communication component 805 is used for wired or wireless communication between the convolutional neural network removal device 800 and other devices. Wireless communication includes Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination thereof. Therefore, the corresponding communication component 805 may include a Wi-Fi module, a Bluetooth module, or an NFC module.
[0108] In an exemplary embodiment, the convolutional neural network makeup removal device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the convolutional neural network makeup removal method described above.
[0109] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the convolutional neural network makeup removal method described above. For example, the computer-readable storage medium may be the memory 802 including the program instructions described above, which may be executed by the processor 801 of the convolutional neural network makeup removal device 800 to complete the convolutional neural network makeup removal method described above.
[0110] Example 4:
[0111] Corresponding to the above method embodiments, this embodiment also provides a readable storage medium. The readable storage medium described below can be referred to in conjunction with the makeup removal method of a convolutional neural network described above.
[0112] A readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the makeup removal method of the convolutional neural network described in the above method embodiments.
[0113] Specifically, the readable storage medium can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other readable storage medium capable of storing program code.
[0114] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0115] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of removing makeup from a convolutional neural network, characterized by, The method comprises the following steps: Obtaining at least two groups of makeup images; Preprocessing the makeup images to obtain preprocessing results of the makeup images; Inputting the preprocessing results into a network U-Net to obtain output results; Inputting the preprocessing results into the network U-Net; The output results comprise: The network U-Net comprises an identity information encoder, a makeup information encoder, an image generator and an image discriminator; the makeup information encoder and the image generator constitute an image generation module; the identity information encoder is composed of multiple convolution layers and extracts the identity information of a target image using the convolution layers after receiving the target image as input, and finally outputs the identity information code of the target image; the makeup information encoder is composed of multiple convolution layers and pooling layers, extracts the makeup information of a face in an image using the convolution layers after receiving the target image and a reference image as input, and finally outputs the corresponding target image makeup information code and reference image makeup information code using the pooling layers to compress the output feature information; the image generator is an image decoder, receives the identity information code and the makeup information code, fuses the two using the convolution layers, and up-samples the image to finally output a new image; the new image comprises a makeup image with the reference image makeup and the face identity in the target image, and a reconstructed image of the target image; Extracting color and edge features in the makeup image and repairing the color and edge features in the makeup image to obtain a repaired result, and outputting the repaired result as an output result; Adjusting network parameters according to the output result and a preset supervision image loss, and training and learning to obtain a makeup removal model.
2. The method of claim 1, wherein The preprocessing of the makeup images comprises: Inputting at least two groups of the makeup images into an RGB channel to obtain input images; Randomly selecting the input images and a preset target image to perform image enhancement, wherein the image enhancement comprises operations of cropping, translating and left-right flipping on the input images and the preset target image.
3. The method of claim 1, wherein The adjusting of the network parameters according to the output result and the preset supervision image loss comprises: Calculating the loss of the output result on an HSV channel, wherein the makeup images are normalized to obtain normalized results, and the normalized results are processed by a convolutional neural network; Setting weights, using an Adam optimization method, performing multiple iterations to determine the weights of the makeup images; The makeup images after iteration convergence constitute an image database; Training and learning based on the preset supervision image loss, the network parameters and the image database.
4. A makeup removing device of a convolutional neural network, characterized by, The method comprises the following steps: An acquisition module is configured to acquire at least two groups of makeup images; A preprocessing module is configured to preprocess the makeup images to obtain preprocessing results of the makeup images; An output module is configured to input the preprocessed result into the network U-Net based on the network U-Net to obtain an output result. The output module comprises: A second selection unit is configured to select the network U-Net, wherein the network U-Net comprises an identity information encoder, a makeup information encoder, an image generator, and an image discriminator; the makeup information encoder and the image generator constitute an image generation module; the identity information encoder is composed of multiple convolution layers, and after receiving an input target image, the identity information encoder extracts features of identity information in the target image using the convolution layers, and finally outputs identity information encoding of the target image; the makeup information encoder is composed of multiple convolution layers and pooling layers, and after receiving input target images and reference images, the makeup information encoder extracts makeup information of faces in the images using the convolution layers, and finally compresses the output feature information using the pooling layers to output corresponding target image makeup information encoding and reference image makeup information encoding; the image generator is an image decoder, which receives the identity information encoding and the makeup information encoding, fuses the two using the convolution layers, and up-samples the image to finally output a new image; the new image comprises a makeup image with the reference image makeup and the face identity in the target image, and a reconstructed image of the target image; An extraction unit is configured to extract color and edge features in the makeup image, repair the color and edge features in the makeup image, and output a repaired result as an output result; An obtaining module is configured to adjust network parameters according to a loss of a preset supervision map and the output result, and obtain a makeup removing model through training and learning.
5. The CNN-based makeup removing device of claim 4, wherein, The preprocessing module comprises: An input unit is configured to input at least two groups of makeup images into an RGB channel to obtain input images; A first selection unit is configured to randomly select the input images and a preset target image to perform image enhancement, wherein the image enhancement comprises operations of cropping, translating, and left-right flipping on the input images and the preset target image. 6.The makeup removing apparatus of claim 4, wherein, The obtaining module comprises: A calculation unit is configured to calculate a loss of the output result on an HSV channel, wherein the makeup images are subjected to normalization processing to obtain normalized results, and the normalized results are subjected to convolutional neural network processing; An optimization unit is configured to set weights, use an Adam optimization method, perform multiple iterations, and determine weights of the makeup images; An iteration unit is configured to form an image database by iterating the makeup images after convergence; A training unit is configured to train and learn based on a loss of a preset supervision map and the image database. 7.A makeup removing device of a convolutional neural network, characterized by, The memory is configured to store a computer program. The processor is configured to implement steps of the makeup removing method of the convolutional neural network according to any one of claims 1 to 3 when executing the computer program. The computer program is stored on the readable storage medium, and when executed by the processor, the computer program implements steps of the makeup removing method of the convolutional neural network according to any one of claims 1 to 3.
8. A readable storage medium characterized by: