Makeup migration method based on feature fusion lightweight

By constructing a lightweight makeup encoder, content encoder, dependency and image reconstruction module, the problems of inaccurate feature extraction and high computational complexity in makeup transfer methods are solved, realizing efficient, accurate and lightweight application of makeup transfer.

CN119006268APending Publication Date: 2024-11-22GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411023212.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing makeup transfer methods suffer from inaccurate makeup feature extraction, lack of stable dependencies, insufficient multi-scale feature interaction, and high memory consumption and long inference time due to complex network structures, which limit the application of the model on resource-constrained devices.

Method used

A lightweight makeup transfer method based on feature fusion is adopted. By constructing a lightweight makeup encoder, content encoder, lightweight dependency relation and lightweight image reconstruction module, and combining feature fusion and lightweight attention mechanism, the accurate extraction and transfer of makeup features are achieved.

Benefits of technology

It significantly improves the accuracy of makeup transfer, reduces model load and computational burden, expands application scenarios, and shortens the processing cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006268A_ABST
    Figure CN119006268A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer graphics processing, in particular to a feature fusion lightweight makeup migration method, which designs a lightweight feature fusion module to aggregate high-level information and low-level detail features of makeup styles to obtain more accurate and richer makeup features; providing a lightweight attention mechanism to model the dependence between the reference image and the source image; and a lightweight image reconstruction module is designed to reduce the model parameter quantity, and the proposed method greatly reduces the model load and calculation burden and shortens the processing period while ensuring the makeup transfer accuracy. According to the makeup migration method provided by the invention, the makeup migration accuracy is remarkably improved, the load and calculation burden of the model are greatly reduced, the processing period is effectively shortened, and the application scene of the makeup migration technology is greatly expanded, so that the makeup migration method shows strong practicability and potential in more fields, and the application prospect is wide. Therefore, the problem that an existing makeup migration method is low in precision is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer graphics processing technology, and in particular to a lightweight makeup migration method based on feature fusion. Background Art

[0002] Makeup transfer aims to accurately transfer the makeup style from a given reference makeup face image to the source image while preserving the facial identity and background information. This technology meets the needs of users in virtual makeup applications to try or imitate specific makeup styles online. As the demand for personalized beauty effects grows, it has become the focus of many software developers and cosmetic brands.

[0003] Makeup transfer technology has evolved from traditional methods to deep learning methods. Traditional methods, such as layer decomposition and layer perception based on physical reflection models, can achieve makeup transfer under face matching data, but their practicality is limited due to their dependence on accurate matching and the complexity of the processing flow. In contrast, makeup transfer models based on generative adversarial networks (GANs) and disentangled networks can accurately adjust the color of makeup to the target facial area in simple makeup, and do not require matching data, which improves the flexibility of makeup transfer. However, makeup transfer technology still faces some practical difficulties: Inaccurate makeup feature extraction: The model has difficulty in extracting makeup features in the reference image, including accurate capture of eye shadow color, skin color and lipstick color. Lack of stable dependencies: When there is a large difference in facial features between the reference image and the target image, the technology transfers makeup features to the wrong location, resulting in distortion. Existing models are not lightweight enough: Since the migration algorithm usually needs to be deployed on real-time devices with limited resources, such as mobile platforms, existing models cannot run on these platforms due to their high complexity.

[0004] Existing makeup transfer methods lack multi-scale feature interaction: Existing methods fail to design effective interaction modules for multi-scale features, resulting in the loss of context and semantic information during the extraction process. Lack of stable dependencies: When there are large differences in facial features between the reference image and the target image, it is difficult for the technology to accurately capture the subtleties of the makeup style. Complex deep learning network structure: Existing methods use complex network structures, resulting in high memory usage and computation, prolonging the inference time and limiting the practical application of the model. Summary of the invention

[0005] The purpose of the present invention is to provide a lightweight makeup transfer method based on feature fusion, aiming to solve the problem of low accuracy of existing makeup transfer methods.

[0006] To achieve the above object, the present invention provides a lightweight makeup migration method based on feature fusion, S1 constructs a data set;

[0007] S2 performs standardization processing on the data set to obtain processed plain-face images and makeup images, and uses a PSPNet model to perform facial segmentation on the plain-face images and makeup images to obtain masks with annotated labels;

[0008] S3 builds a lightweight makeup transfer LFMT method based on feature fusion;

[0009] S4 inputs the processed plain face image and the made-up face image into the make-up migration LFMT;

[0010] S5 inputs the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image;

[0011] S6: inputting the processed plain face image into a content feature encoder to extract facial content features of the plain face image;

[0012] S7 generates component makeup information corresponding to the plain face image based on the specific component makeup and the facial features;

[0013] S8 inputs the global makeup feature and the component makeup information into a lightweight dependency relationship to generate global makeup information adapted to the plain makeup image;

[0014] S9 inputs the global makeup information into a lightweight image reconstruction relationship to generate a makeup migration result;

[0015] S10 returns to S4 until either the makeup feature atlas or the bare face feature atlas is empty, then the first iteration is terminated, and the makeup migration model parameters after this iteration are saved;

[0016] S11 determines whether the preset number of iterations has been reached. If so, the makeup migration model saved this time is used as the trained parameter of LFMT. If not, the makeup feature atlas and the bare face feature atlas are updated, and the process returns to S4.

[0017] Among them, in "Constructing a lightweight makeup migration LFMT method based on feature fusion", the LFMT includes a lightweight makeup encoder, a content encoder, a lightweight dependency and a lightweight image reconstruction.

[0018] Among them, in "inputting the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image", the makeup extraction module is composed of two ordinary convolutional layers and a depth-separable convolutional layer.

[0019] The step of “inputting the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image” includes:

[0020] The makeup extraction module extracts makeup features of different resolutions;

[0021] The high-frequency details in the low-level makeup features extracted from the shallow convolutional layer are added to the FPN-processed features and the original deep features, and convolution is performed to obtain features that integrate high-frequency makeup details and makeup semantic information.

[0022] Among them, in “generating component makeup information corresponding to the plain makeup image based on the specific component makeup and the facial features”, it includes:

[0023] Use lightweight multi-scale makeup feature extraction and fusion encoder to extract global makeup features of makeup images and makeup features of different components;

[0024] The content encoder generates local makeup information corresponding to the plain makeup image based on the component makeup features.

[0025] Among them, in "inputting the global makeup features and the component makeup information into a lightweight dependency relationship to generate global makeup information adapted to the bare face image", the lightweight dependency relationship adopts a lightweight attention mechanism, focusing on information obtained from different positions, and constructing a dependency relationship between the global makeup styles of the bare face image and the makeup image, thereby achieving precise control of global makeup migration, while significantly reducing the number of parameters and calculations of the model.

[0026] Among them, in "inputting the global makeup information into the lightweight image reconstruction relationship to generate a makeup migration result", the lightweight image reconstruction relationship includes three residual link blocks and two upsampling parts, in which the component migration features and the global features are connected with the corresponding decoder features to enhance the expressiveness of the features.

[0027] The present invention provides a lightweight makeup migration method based on feature fusion, S1 constructs a data set; S2 performs standardization processing on the data set to obtain processed plain face images and makeup images, and uses a PSPNet model to perform facial segmentation on the plain face images and makeup images to obtain masks with annotated labels; S3 constructs a lightweight makeup migration LFMT method based on feature fusion; S4 inputs the processed plain face images and makeup images into the makeup migration LFMT; S5 inputs the processed makeup images into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup images; S6 inputs the processed plain face images into a content feature encoder to extract facial content features of the plain face images ; S7 generates component makeup information corresponding to the bare face image based on the specific component makeup and the facial features; S8 inputs the global makeup features and the component makeup information into a lightweight dependency relationship to generate global makeup information adapted to the bare face image; S9 inputs the global makeup information into a lightweight image reconstruction relationship to generate a makeup migration result; S10 returns to S4 until either the makeup feature atlas or the bare face feature atlas is empty, then the first iteration is terminated, and the makeup migration model parameters after this iteration are saved; S11 determines whether the preset number of iterations has been reached. If so, the makeup migration model saved this time is used as the trained parameters of LFMT. If not, the makeup feature atlas and the bare face feature atlas are updated, and then returns to S4. The present invention designs a lightweight feature fusion module to aggregate high-level information and low-level detail features of makeup style to obtain more accurate and richer makeup features; proposes a lightweight attention mechanism to model the dependency between reference images and source images; and designs a lightweight image reconstruction module to reduce the number of model parameters. The proposed method ensures the accuracy of makeup transfer while greatly reducing the model load and computational burden, shortening the processing cycle. The makeup transfer method proposed in the present invention not only significantly improves the accuracy of makeup transfer, but also greatly reduces the model load and computational burden, effectively shortens the processing cycle, and greatly expands the application scenarios of makeup transfer technology, making it show strong practicality and potential in more fields, thereby solving the problem of low accuracy of existing makeup transfer methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 This is the overall framework diagram of LFMT.

[0030] Figure 2 This is the framework diagram of the lightweight makeup extraction module.

[0031] Figure 3 It is a lightweight dependency module framework diagram.

[0032] Figure 4 It is the structure in the lightweight image reconstruction module.

[0033] Figure 5 It is the residual network diagram in the lightweight image reconstruction module.

[0034] Figure 6 This is a comparison chart of experimental results.

[0035] Figure 7 This is a flow chart of a lightweight makeup migration method based on feature fusion provided by the present invention. DETAILED DESCRIPTION

[0036] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0037] See also Figures 1 to 7 The present invention provides a lightweight makeup migration method based on feature fusion, comprising the following steps:

[0038] S1 builds the dataset;

[0039] Specifically, a data set is constructed, which is divided into two sets: bare face pictures and makeup pictures. The makeup pictures include daily light makeup, European and American heavy makeup, and opera makeup. The data set is divided into a training set and a test set.

[0040] S2 performs standardization processing on the data set to obtain processed plain-face images and makeup images, and uses a PSPNet model to perform facial segmentation on the plain-face images and makeup images to obtain masks with annotated labels;

[0041] The standardization process includes adjusting the image size, grayscale processing, and histogram equalization.

[0042] Specifically, the dataset in step 1 is standardized to obtain the processed plain image (source image) I and makeup image (reference image) R, and the masks with annotated labels are obtained by performing facial segmentation on the source image and the reference image using the PSPNet model, which are I and R, respectively. seg (source image mask) and R seg(reference image mask); the data processing using PSPNet includes preprocessing steps such as adjusting image size, grayscale processing, and histogram equalization; it is a deep learning model for semantic segmentation. It generates semantic segmentation results by introducing a pyramid pooling module, segments the various parts of the face, and performs data labeling. By adding masks of the source image and the reference image, the feature extraction of the facial area can be enhanced.

[0043] S3 builds a lightweight makeup transfer LFMT method based on feature fusion;

[0044] Specifically, a lightweight makeup transfer LFMT method based on feature fusion is constructed, which includes four key parts: lightweight makeup encoder, content encoder, lightweight dependency, and lightweight image reconstruction;

[0045] Lightweight makeup encoder: First, the lightweight makeup encoder is responsible for extracting the global makeup features of the reference image and makeup characteristics of different components such as lips, skin, and eyes 2. Content encoder: Secondly, the content encoder extracts content features from the source image and generates local makeup information corresponding to the specific component makeup generation based on these features 3. Lightweight dependency: Using the global features of the reference image, the long-range visual dependency between the reference image and the source image is modeled through a lightweight attention mechanism to generate global makeup information adapted to the source image. 4. And lightweight image reconstruction: Finally, the lightweight image reconstruction module is used to integrate local component features and global fusion features to generate the final makeup migration image

[0046] The loss function of the lightweight makeup transfer method based on feature fusion is as follows:

[0047] L total =L c +L m +λ per L p +λ ad L ad (6)

[0048] Where L total represents the overall loss function, L c represents the content consistency loss, L m Indicates makeup loss, L p represents the perceptual loss, L ad represents adversarial loss; λ per = 0.005 and λ ad =0.5 indicates the corresponding weight of the balance loss size;

[0049] Content consistency loss, in order to reduce the interference of the inherent makeup of the source image on the makeup transfer effect and retain the content characteristics of the source image in the transfer result, the content consistency in the constrained feature space is adopted. The content consistency loss is defined as:

[0050]

[0051] Where I represents the source image, represents the migration result, L c represents the content consistency loss, θ cont is the first Conv-IN-ReLU layer of the content encoder;

[0052] Makeup loss: The makeup loss composed of local histogram matching on different components of the source image and the reference image is used as follows:

[0053] L m =||G(I,R)-HM(I,R)||2+||G(R,I)-HM(R,I)||2 (8)

[0054] Where L m represents makeup loss, R represents reference image, and G represents makeup transfer model;

[0055] Perceptual loss: To maintain the perceptual similarity between the source image and the transferred result, we use the perceptual loss L p It is expressed as follows:

[0056]

[0057] where θ vgg Represents the pre-trained VGG-19 network and uses the conv4 layer;

[0058] Adversarial Loss:

[0059]

[0060] in represents the global adversarial loss, are local component specific adversarial losses (skin, lips, left eye, and right eye).

[0061] Experimental environment: Implemented using PyTorch on a Tesla M10 GPU. The present invention uses a fixed learning rate of 1×10-4 to train the model. The batch size is set to 1; For the discriminator used in the present invention, we use a U-Net discriminator to generate accurate gradient feedback for local areas;

[0062] Comparative experiments and analysis: The LFMT of the present invention is compared with several state-of-the-art makeup transfer methods (SCGAN, PSGAN, CPM and BeuatyREC), mainly in terms of model migration effect and lightweight;

[0063] like Figure 6 As shown in the figure, PSGAN, CPM and BeautyREC cannot effectively transfer the skin color of the reference image to the face of the source image; SCGAN cannot effectively transfer the makeup from the reference image to the source image, and even damages the identity of the source image such as the eyes; while the present invention not only effectively transfers the makeup style, but also well preserves the identity and non-makeup area of ​​the source image. This is due to the fact that the present invention introduces feature fusion in the makeup feature extraction module and establishes a stable and lightweight dependency model;

[0064] As shown in Table 1, the size and running time comparison of LFMT and the comparison model are shown. The trainable parameters Parameters (in M), FLOPs (in G) and FPS (frames per second) of a pair of source and reference images of size 256×256 are calculated and processed. Experiments show that the present invention has the lowest trainable parameters and FLOPs and the fastest inference speed; this is due to the fact that the depthwise separable convolution in the lightweight image reconstruction module of the present invention significantly reduces the required number of parameters, thereby reducing the computational complexity and memory requirements. This is particularly important for tasks that require deconvolution operations to generate high-resolution outputs, and can significantly improve computational efficiency.

[0065]

[0066] S4 inputs the processed plain face image and the made-up face image into the make-up migration LFMT;

[0067] The LFMT includes a lightweight makeup encoder, a content encoder, a lightweight dependency and a lightweight image reconstruction.

[0068] Specifically, the bare face image (source image) I and the makeup image (reference image) R processed in step 2 are input into the makeup migration method LFMT;

[0069] S5 inputs the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image;

[0070] The makeup extraction module consists of two ordinary convolutional layers and a depth-wise separable convolutional layer.

[0071] The makeup extraction module extracts makeup features of different resolutions;

[0072] The high-frequency details in the low-level makeup features extracted from the shallow convolutional layer are added to the FPN-processed features and the original deep features, and convolution is performed to obtain features that integrate high-frequency makeup details and makeup semantic information.

[0073] Specifically, the reference image R and the reference image mask R in step 2 are seg Input into the lightweight makeup encoder to extract the global makeup features of the reference image and makeup characteristics of different components (lips, skin and eyes) The lightweight makeup encoder includes a makeup extraction module and a makeup fusion module to extract global makeup features and makeup features of different components; it aims to effectively extract makeup features of different resolutions while reducing the number of parameters and calculations of the makeup extraction module; the makeup images R and R seg Input into the makeup extraction module; after three convolutions (normal convolution-depthwise separable convolution-normal convolution)-ReLU layers with the number of channels set to 48, makeup features (F0, F1, F2) of corresponding resolution are generated; two feature pyramid network (FPN) modules are introduced in makeup fusion to integrate the high-frequency details in the low-level makeup features (F0, F1) extracted from the shallow convolution layer into the high-level features (F2) extracted from the deep convolution layer. The expression of FPN is as follows;

[0074] FPN(F0,F2)=Conv(Interpolate(F0)+F2) (1)

[0075] FPN(F1,F2)=Conv(Interpolate(F1)+F2) (2)

[0076] Among them, Interpolate means using adjacent differences for downsampling operations, and Conv means convolution operations to smooth and merge features;

[0077] The features processed by FPN are added to the original deep features F2; ​​5. Finally, convolution is performed to obtain features that integrate high-frequency makeup details and makeup semantic information, thereby providing a richer and more accurate feature representation for makeup migration.

[0078] S6: inputting the processed plain face image into a content feature encoder to extract facial content features of the plain face image;

[0079] Specifically, the source image I and the source image mask I in step 2 seg Input into the content feature encoder to extract the facial content features I of the source image n; The feature extraction module contains three convolutional layers with kernel {7,4,4} and stride {1,2,2}. Each convolutional layer is followed by an instance norm layer and a ReLU activation function. The number of feature channels is set to 48. The encoder extracts the facial features of the source image at different layers in combination with the semantic parsing graph of the source image.

[0080] S7 generates component makeup information corresponding to the plain face image based on the specific component makeup and the facial features;

[0081] Use lightweight multi-scale makeup feature extraction and fusion encoder to extract global makeup features of makeup images and makeup features of different components;

[0082] The content encoder generates local makeup information corresponding to the plain makeup image based on the component makeup features. Specifically, the content encoder generates local makeup information corresponding to the plain makeup image based on the component makeup features. Specifically, based on the specific component makeup in step 5 and facial features I in step 6 n Generate component makeup information corresponding to the source image First, the analytical graph R of the reference image R par Binarization is performed, that is, the corresponding component area (skin, lips or eyes) is set to 1, and other areas are set to 0; then the corresponding component of the reference image is obtained by the following formula:

[0083]

[0084] Where R com represents the component com of the reference image, represents the binary analytical graph, ⊙ is the Hadamard product, R com They are fed into three Conv-ReLU layers respectively to realize the makeup features of the corresponding components.

[0085] The content features in step 6 are scaled using the channel attention and spatial attention mechanisms to enhance the expressiveness of the features. A three-layer fully connected network with 48 channels is used to learn channel weights from component-based makeup statistics. For spatial attention, average pooling and maximum pooling operations are applied to the feature maps reweighted along the channel direction by the channel attention module. The two mappings obtained by the average pooling and maximum pooling operations are connected, and a 1×1 convolutional layer with a sigmoid activation function is used to learn the spatial attention mask. Position mapping technology is used to accurately transfer makeup features to corresponding areas of the source image, such as lips, skin, and eyes. By establishing a correspondence between reference makeup features and source content features, fine-tuning features in specific areas is performed to generate natural and accurate local makeup information corresponding to the source image. The location map PM output looks like this:

[0086]

[0087] where F SA represents the output feature of the corresponding spatial attention, F in Represents the input feature of the corresponding channel attention, ⊕ represents element-by-element addition, and by only migrating the makeup elements of the reference image to the relevant parts of the source image, it effectively prevents the non-makeup area of ​​the source image from being affected.

[0088] S8 inputs the global makeup feature and the component makeup information into a lightweight dependency relationship to generate global makeup information adapted to the plain makeup image;

[0089] The lightweight dependency adopts a lightweight attention mechanism, focusing on information obtained from different positions, and constructing a dependency relationship between the global makeup styles of the bare face image and the makeup image, thereby achieving precise control of the global makeup migration, while significantly reducing the number of parameters and the amount of calculation of the model.

[0090] Specifically, the global makeup features in step 5 Same as in step 7 The input is then fed into the lightweight dependency to generate global makeup information adapted to the source image.

[0091] In the early stage of the model, deep separable convolution is used to efficiently process and extract global makeup features R m Same as in step 7 Information is expressed as query (Q) and key (K) respectively; the query matrix is ​​multiplied by the learnable parameter vector to learn its attention weight to generate a global attention query vector, and then the query matrix is ​​pooled according to the learned attention weight. This process is represented by GTQ in the figure to generate a global query vector q; the interaction between the global query vector q and the key K is encoded by the element-by-element product, and then the similarity between the two is precisely quantified, and the key information of the makeup is accurately captured and efficiently transferred; the output relationship of the lightweight dependency relationship is:

[0092]

[0093] in represents the normalized query matrix, q represents the process of generating the global query vector, and finally obtains the global makeup information of the source image after migration.

[0094] S9 inputs the global makeup information into a lightweight image reconstruction relationship to generate a makeup migration result; the lightweight image reconstruction relationship includes three residual link blocks and two upsampling parts, wherein the component migration features and the global features are connected with the corresponding decoder features to enhance the expressiveness of the features

[0095] Specifically, the global makeup information in step 8 is input into the lightweight image reconstruction relationship to generate the makeup transfer result The lightweight image reconstruction module contains three residual connection blocks and two upsampling parts. The steps of the lightweight image reconstruction module are: Input residual module (such as Figure 5 ) with component-specific features The source image is merged to refine the features; the identity features of the source image are connected to the corresponding upsampling module to enhance the identity feature retention of the source image; the upsampling encoder contains two depth-wise separable convolutions, each of which consists of a 3×3 convolution with 48 channels and a 1x1 convolution; for the last convolution layer, we use the Tanh activation function to produce the final result; the image resolution is restored by lightweight upsampling to generate the final migration result

[0096] S10 returns to S4 until either the makeup feature atlas or the bare face feature atlas is empty, then the first iteration is terminated, and the makeup migration model parameters after this iteration are saved;

[0097] Specifically, return to step 4 until either the makeup feature atlas or the bare face feature atlas is empty, then the first iteration is terminated, and the makeup migration model parameters after this iteration are saved;

[0098] S11 determines whether the preset number of iterations has been reached. If so, the makeup migration model saved this time is used as the trained parameter of LFMT. If not, the makeup feature atlas and the bare face feature atlas are updated, and the process returns to S4.

[0099] Specifically, determine whether the preset number of iterations has been reached. If yes, use the makeup transfer model saved this time as the trained parameter of LFMT. Otherwise, update the makeup feature atlas and the bare face feature atlas to the makeup image R and the bare face image I obtained in step 2, and return to step 4.

[0100] What is disclosed above is only a preferred embodiment of the lightweight makeup migration method based on feature fusion of the present invention. Of course, it cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A lightweight makeup transfer method based on feature fusion, characterized in that: The following steps are involved: S1 builds the dataset; S2 performs standardization processing on the data set to obtain processed plain-face images and makeup images, and uses a PSPNet model to perform facial segmentation on the plain-face images and makeup images to obtain masks with annotated labels; S3 builds a lightweight makeup transfer LFMT method based on feature fusion; S4 inputs the processed plain face image and the made-up face image into the make-up migration LFMT; S5 inputs the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image; S6: inputting the processed plain face image into a content feature encoder to extract facial content features of the plain face image; S7 generates component makeup information corresponding to the plain face image based on the specific component makeup and the facial features; S8 inputs the global makeup feature and the component makeup information into a lightweight dependency relationship to generate global makeup information adapted to the plain makeup image; S9 inputs the global makeup information into a lightweight image reconstruction relationship to generate a makeup migration result; S10 returns to S4 until either the makeup feature atlas or the bare face feature atlas is empty, then the first iteration is terminated, and the makeup migration model parameters after this iteration are saved; S11 determines whether the preset number of iterations has been reached. If so, the makeup migration model saved this time is used as the trained parameter of LFMT. If not, the makeup feature atlas and the bare face feature atlas are updated, and the process returns to S4.

2. The lightweight makeup transfer method based on feature fusion according to claim 1, characterized in that: In "Constructing a lightweight makeup migration LFMT method based on feature fusion", the LFMT includes a lightweight makeup encoder, a content encoder, a lightweight dependency and a lightweight image reconstruction.

3. The lightweight makeup transfer method based on feature fusion according to claim 1, characterized in that: In “inputting the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image”, the makeup extraction module is composed of two ordinary convolutional layers and a depth-separable convolutional layer.

4. The lightweight makeup transfer method based on feature fusion according to claim 1, characterized in that: In “inputting the processed makeup image into a lightweight makeup encoder to extract global makeup features and makeup features of different components of the makeup image”, it includes: The makeup extraction module extracts makeup features of different resolutions; The high-frequency details in the low-level makeup features extracted from the shallow convolutional layer are added to the FPN-processed features and the original deep features, and convolution is performed to obtain features that integrate high-frequency makeup details and makeup semantic information.

5. The lightweight makeup transfer method based on feature fusion according to claim 1, characterized in that: In “generating component makeup information corresponding to the plain makeup image based on the specific component makeup and the facial features”, it includes: Use lightweight multi-scale makeup feature extraction and fusion encoder to extract global makeup features of makeup images and makeup features of different components; The content encoder generates local makeup information corresponding to the plain makeup image based on the component makeup features.

6. The lightweight makeup transfer method based on feature fusion according to claim 1, characterized in that: In "inputting the global makeup features and the component makeup information into a lightweight dependency relationship to generate global makeup information adapted to the bare face image", the lightweight dependency relationship adopts a lightweight attention mechanism, focusing on information obtained from different positions, by constructing a dependency relationship between the global makeup styles of the bare face image and the makeup image.

7. The lightweight makeup transfer method based on feature fusion according to claim 1, characterized in that: In "inputting the global makeup information into a lightweight image reconstruction relationship to generate a makeup migration result", the lightweight image reconstruction relationship includes three residual link blocks and two upsampling parts, wherein component migration features and global features are connected to corresponding decoder features.

Citation Information

Cited By

  • Image makeup migration method and system based on diffusion type converter and feature decoupling injection

    CN122529960A