Light-weight portrait wrinkle removal image enhancement method based on generative adversarial network
By using a lightweight generative adversarial network, combined with depthwise separable convolution and attention mechanisms, the problem of high computational cost in existing wrinkle removal methods is solved, achieving efficient and natural wrinkle removal and skin texture enhancement effects, suitable for real-time beautification and mobile applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-13
AI Technical Summary
Existing methods for removing wrinkles in portraits are difficult to achieve high-quality, natural, and controllable wrinkle removal and skin texture enhancement under lightweight conditions. They also have high computational costs and long processing times, making it difficult to meet the needs of real-time beautification and mobile applications.
A lightweight generative adversarial network is adopted, which combines depthwise separable convolution, residual connections and attention mechanisms to construct an encoder-decoder structure. The generator outputs a preliminary wrinkle-removed image and a wrinkle region mask, and the image is trained using perceptual loss and adversarial loss to achieve efficient wrinkle removal and skin texture enhancement.
While reducing network computation, it achieves efficient and natural wrinkle removal effects, preserving facial details and realistic lighting changes, and is suitable for real-time beautification and mobile applications.
Smart Images

Figure CN121660910A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of portrait processing technology, and in particular to a lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks. Background Technology
[0002] With the development of artificial intelligence and computer vision technologies, intelligent processing of portrait images has been widely applied in social media, short video platforms, beauty cameras, virtual digital human generation, and post-production retouching of film and television. Among these applications, face wrinkle removal is a crucial step in enhancing the visual appeal and youthful appearance of portraits. Wrinkles are a direct manifestation of skin aging, formed by the combined effects of internal physiological aging (such as collagen loss and skin laxity) and external environmental factors (such as ultraviolet radiation, stress, and air pollution). In portrait photos or videos, the presence of wrinkles often leads to an older visual age and rougher skin texture, negatively impacting aesthetics. Therefore, removing wrinkles while preserving natural skin details is a key technical challenge in image beautification and enhancement.
[0003] Current methods for removing wrinkles from portraits can be broadly categorized into three types: The first type, traditional image processing methods, relies primarily on image smoothing and filtering techniques. These methods cannot adaptively process different areas of the face (such as the corners of the eyes and forehead), often resulting in the removal of texture details and leading to decreased skin texture and excessive overall smoothing. The second type, local wrinkle removal methods based on image restoration, employ facial landmark detection or skin region segmentation. Because they depend on accurate semantic segmentation, any deviation in the segmentation result can easily produce discontinuous and unnatural artifacts at the edges of the affected areas, impacting the overall appearance and realism. The third type is end-to-end generation methods based on deep learning. These methods learn a mapping from "wrinkled portraits" to "smooth-skinned portraits" to achieve automatic wrinkle removal. While wrinkle removal is a common problem, it is computationally expensive and time-consuming, requiring a large amount of high-quality paired or semi-paired training data. Furthermore, its generalization ability is poor across different ethnicities, lighting conditions, and facial expressions. To address this, patent document CN120411305A discloses a method and system for intelligent facial wrinkle removal based on generative adversarial networks (GANs). This method uses GANs and mask-guided techniques to provide an efficient and natural facial beautification and wrinkle removal experience. The entire solution focuses on wrinkle segmentation and differential fusion, making the repair target clear and enabling multi-scale discrimination to improve the realism of details. However, its drawbacks include a long process and a greater emphasis on high-precision segmentation and repair at the backend, while lacking in front-end lightweighting and data processing, which hinders computational efficiency and process simplification. In summary, existing solutions still struggle to achieve a good balance between low computational cost, simplified process, and high-quality visual effects. Therefore, a new method that can achieve natural and stable facial wrinkle removal and skin texture enhancement under lightweight conditions is urgently needed. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, the technical problem to be solved by this invention is to propose a lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks. This method significantly reduces the computational load of the network while achieving high-quality, natural, and controllable wrinkle removal and skin texture enhancement effects, thereby meeting the performance requirements of real-time beautification, mobile AI filters, and video restoration.
[0005] To achieve this objective, the present invention adopts the following technical solution: The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks provided by this invention includes the following steps: S00: Construct a training set, which includes multiple training data pairs. Obtain a wrinkle-free face image as the target image. Extract high-frequency details of skin texture from a wrinkled face image and fuse them into the corresponding skin region of the target image to generate a source image with simulated wrinkles to form a training data pair. S10: Construct a lightweight generative adversarial network, whose generator is an encoder-decoder structure, and introduce an attention mechanism. Train the generative adversarial network with the training data input, wherein the loss function of the generator includes at least adversarial loss and perceptual loss. S20: Input the input portrait image to be processed into the trained generative adversarial network, and the generator outputs a preliminary wrinkle-removed image and the corresponding wrinkle region mask; S30: Based on the wrinkle region mask, the preliminary wrinkle-removing image is fused with the input portrait image to generate the final wrinkle-removing output image.
[0006] In step S00, the construction step of the training data pairs includes: S01: Collect high-resolution images of wrinkle-free and wrinkled faces as the basis for generating wrinkled images. S02: Crop out the face area and use facial key points to align the facial features to ensure consistency; S03: Using the Laplacian pyramid or Poisson fusion method, high-frequency texture components are decomposed from the wrinkled face image, the high-frequency texture components are aligned and superimposed on the corresponding skin high-frequency channel of the wrinkle-free face image, and the low-frequency structure and color information in the wrinkle-free face image are preserved. S04: Take an original wrinkle-free face image and a wrinkled face image generated through steps S01~S03 as a training data pair.
[0007] In step S03, after the texture is fused, the operation area is constrained using a face skin region mask to ensure that the texture generation only applies to the skin region, and at least one data augmentation operation is performed on the generated image data, including rotation, blurring, compression, or illumination perturbation.
[0008] In step S10, the encoder-decoder structure uses depthwise separable convolution and residual connections, and the attention mechanism is a spatial or channel attention module to enhance attention to wrinkle regions.
[0009] In step S10, the training steps of the generative adversarial network are as follows: S11: Input a portrait image and crop the face region based on facial landmarks; S12: Repairing wrinkled areas based on lightweight generative adversarial networks; S13: The generative adversarial network outputs a preliminary wrinkle-removed image and a corresponding wrinkle region mask; S14: Based on the wrinkle region mask, the preliminary wrinkle-removed image and the corresponding wrinkle region mask are fused to obtain the repaired face image; S15: Calculate the GAN adversarial loss and VGG perceptual loss, update the adversarial generation network, and feed the new adversarial generation network back to step S12.
[0010] In step S15, the adversarial loss is a loss based on feature extraction from a pre-trained GAN network, specifically expressed as follows:
[0011] Among them, among them, This represents the loss function of GAN. Represents the distribution of real data To make an expectation; x represents a real data sample, The output of the discriminator D for the real data sample x represents the probability that sample x is classified as real data. Represented as noise distribution Let z represent the noise vector sampled from the noise distribution, G(z) represent the output of the generator G on the noise z, and represent the generated fake sample. D(G(z)): The complement of the discriminator D to the output of the generated sample G(z), representing the probability that the sample G(z) is judged as fake data.
[0012] In step S15, the perceptual loss is a loss based on feature extraction from a pre-trained VGG network, specifically expressed as:
[0013] in, Let N represent the VGG perceptual loss function, and N represent the number of samples. This refers to the feature extraction function of a VGG network, typically the output of a specific layer. This indicates that the generator G is applied to the i-th noise. The output of represents the generated fake samples; This represents the i-th real sample; This represents the square of the Euclidean distance, i.e., the L2 norm between two vectors, used to calculate the Euclidean distance between two vectors; This indicates that the VGG network generates samples. Extracted features; This indicates that the VGG network is compatible with real samples. Extracted features.
[0014] In step S20, the generator is configured to simultaneously output the preliminary wrinkle-removed image and the wrinkle region mask; the wrinkle region mask is predicted and generated by the intermediate feature layer of the generator through an additional convolutional layer.
[0015] In step S30, the wrinkle region mask is used as a weight map. In the wrinkle region indicated by the mask, the pixels of the preliminary wrinkle-removing image are mainly used, while in the non-wrinkle region, the original pixels of the input portrait image are mainly retained. A natural transition is achieved through weighted superposition.
[0016] The beneficial effects of this invention are as follows: (1) Lightweight design and high computational efficiency: Compared with the traditional deep generative network architecture, this invention adopts a lightweight encoder-decoder structure and combines a collaborative design of separable convolution, residual blocks and attention mechanism. The three together form an efficient coupled internal structure, which enables feature representation to be shared and reused in multiple layers, thereby forming a lightweight generator with low parameter number and low computational complexity, which greatly reduces the number of model parameters and computation. With the help of this structure, real-time, low-latency portrait wrinkle removal inference can be achieved even on ordinary GPUs, edge devices or mobile chips. It is very suitable for deployment in scenarios that require high frame rate processing, such as video beautification, online live streaming, and real-time photography enhancement.
[0017] (2) Wrinkle removal while preserving facial details and natural skin texture: To address the problem of over-smoothing and loss of detail that traditional methods often lead to, this invention introduces perceptual / VGG Loss and a local texture attention mechanism. This allows the network to focus not only on low-level pixel errors during optimization but also on preserving high-frequency facial information (such as skin texture, subtle contours, and highlight structures). Through this joint constraint of global structural information and local texture features, the final generated image can maintain natural skin texture and realistic lighting changes while efficiently removing wrinkles, avoiding common problems such as "over-smoothing" and "plastic look".
[0018] (3) Mask fusion strategy to improve wrinkle removal accuracy: In order to improve the repair accuracy and further reduce the overall burden of the network, this invention proposes a lightweight fusion strategy guided by the wrinkle region Mask. The network can output the preliminary wrinkle removal image and the corresponding wrinkle region Mask at the same time using only a single generator. Then, the Mask is used as the region guide to perform local region fusion with the preliminary wrinkle removal result and the input original image. This method is different from the traditional global blur repair and will not cause unnecessary modification to non-wrinkle areas. In particular, it can retain more natural textures in high dynamic and high detail areas such as the corners of the eyes and mouth. Through the local precision enhancement of Mask constraint, local precision wrinkle removal is achieved. The final generated result achieves high-quality, controllable and detail-friendly portrait wrinkle removal effect while maintaining the overall naturalness of the face. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks provided in a specific embodiment of the present invention. Figure 2 This is a schematic diagram of the training process of the generative adversarial network provided in a specific embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the principle and flow of the lightweight generator's internal features and sharing provided in a specific embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the principle of the lightweight generator obtaining two results in a specific embodiment of the present invention; Figure 5 This is a schematic diagram of the internal network structure of the lightweight generator provided in a specific embodiment of the present invention. Detailed Implementation
[0020] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0021] To provide a portrait image enhancement method that significantly reduces network computation while achieving high-quality, natural, and controllable wrinkle removal and skin texture enhancement effects, thereby meeting the performance requirements of real-time beautification, mobile AI filters, and video restoration, this invention utilizes the image generation and feature restoration capabilities of deep generative networks to intelligently identify skin regions and remove wrinkle features from input portrait images. This achieves wrinkle removal and visual enhancement while maintaining the integrity of the facial structure and the natural details of skin texture. Specifically, it provides a lightweight portrait image enhancement method based on generative adversarial networks, including dataset construction, generative adversarial network training, portrait processing, and portrait fusion, specifically including the following steps: S00: Construct a training set, which includes multiple training data pairs. Obtain wrinkle-free face images as target images. Extract high-frequency details of skin texture from wrinkled face images and fuse them to the corresponding skin region of the target image to generate source images with simulated wrinkles to form training data pairs. The steps for constructing the training data pairs include: S01: Collect high-resolution images of wrinkle-free and wrinkled faces as the basis for generating wrinkled images. S02: Crop out the face area and use facial key points to align the facial features to ensure consistency; S03: Using the Laplacian pyramid or Poisson fusion method, high-frequency texture components are decomposed from the wrinkled face image, the high-frequency texture components are aligned and superimposed on the corresponding high-frequency skin channel of the wrinkle-free face image, and the low-frequency structure and color information in the wrinkle-free face image are preserved; preferably, after the texture is fused, the operation area is constrained by the face skin area mask to ensure that the texture generation only acts on the skin area, and at least one data enhancement operation of rotation, blurring, compression or illumination perturbation is performed on the generated image data; S04: Take an original wrinkle-free face image and a wrinkled face image generated through steps S01~S03 as a training data pair.
[0022] Through the above steps, a sufficient number of training data pairs are continuously acquired to form the training set for the Generative Adversarial Network (GAN). Regarding wrinkle synthesis, wrinkle-free and wrinkled facial images are collected. High-frequency textures are extracted from wrinkled images and superimposed onto the high-frequency channels of wrinkle-free images (corners of the eyes, forehead, nasolabial folds, etc.) using Laplacian pyramid or Poisson fusion techniques, preserving the original image's mid-to-low frequencies (structure, color), thus generating "wrinkle-wrinkle-free" training data pairs. Next, regarding skin region constraints, facial skin mask constraints are applied to ensure that wrinkle removal only affects the skin region, avoiding impact on other parts such as facial features and hair. Regarding the diversification of training data pair augmentation, techniques such as rotation, blurring, JPEG compression, and lighting perturbation are combined to improve the model's generalization ability under different shooting conditions.
[0023] S10: Construct a lightweight generative adversarial network (GAN), whose generator is an encoder-decoder structure, and introduce an attention mechanism. The training data is input to the GAN for training. Preferably, the encoder-decoder structure uses depthwise separable convolutions and residual connections. The attention mechanism is a spatial or channel attention module to enhance attention to wrinkle regions. Depthwise separable convolutions are used to first perform depthwise convolutions (each input channel is filtered individually), followed by pointwise convolutions (1x1 convolutions, combining channel information), thus significantly reducing computational cost and parameter count (typically reduced to 1 / 8 to 1 / 9 of standard convolutions) to achieve the goal of lightweighting the GAN model. Furthermore, residual connections are used to solve the gradient vanishing / exploding problem in deep network training and promote feature reuse. In the wrinkle removal task, this helps the network remove high-frequency wrinkles while stably preserving facial structure and skin color (low-frequency) identity information required by the downstream decoder to retain natural skin texture. Preferably, attention mechanisms are used to enhance attention to wrinkle regions. The mechanism employs channel attention to learn the importance weights of different feature channels (such as channels representing texture and color) and spatial attention to learn the importance weights of spatial locations in the feature map (such as the corners of the eyes and forehead). This enables precise local repair, allowing the network to spontaneously focus on areas with dense or obvious wrinkles and allocate more computational resources for fine-tuning, while reducing modifications to smooth skin areas to achieve accurate wrinkle removal and avoid global blurring. In summary, to achieve internal collaboration within the lightweight generator, depthwise separable convolutions are first used to efficiently extract local texture features. Then, an attention mechanism (spatial / channel) is used to calculate wrinkle region weights, and residual connections preserve identity and structural information. Thus, depthwise separable convolutions, the attention mechanism, and residual connections together form a highly efficient and collaborative organic whole, creating a lightweight generator with shared internal features (as shown in the figure). This lightweighting of the entire generative adversarial network model significantly reduces the number of model parameters and computational cost, enabling it to be implemented on ordinary GPUs. Real-time wrinkle removal inference can be implemented on mobile devices, suitable for video or real-time portrait beautification scenarios; preferably, the generative adversarial network also includes a discriminator. In this case, the discriminator is designed as a single-task structure to determine whether the input image is a real portrait, and at the same time evaluate the wrinkle removal effect and skin texture naturalness, ensuring that the generated image removes wrinkles while maintaining realism. The generator and discriminator learn their own features independently during training to avoid information interference caused by sharing of underlying features, that is, to ensure that efficient computation and fast inference are achieved while ensuring the wrinkle removal effect. The generator and discriminator are built independently and do not share underlying features with each other. Wrinkle-removed images are generated through forward propagation, and the discriminator performs realism judgment and optimization.
[0024] Furthermore, the loss function of the generator includes at least adversarial loss and perceptual loss; based on this, the training steps of the generative adversarial network are as follows: S11: Input a portrait image and crop the face region based on facial landmarks; S12: Repairing wrinkled areas based on lightweight generative adversarial networks; S13: The generative adversarial network outputs a preliminary wrinkle-removed image and a corresponding wrinkle region mask; S14: Based on the wrinkle region mask, the preliminary wrinkle-removed image and the corresponding wrinkle region mask are fused to obtain the repaired face image; S15: Calculate the GAN adversarial loss and VGG perceptual loss and update the adversarial generation network, and feed the new adversarial generation network back to step S12; In summary, the original portrait image is processed by the generator of a generative adversarial network to generate a wrinkle-removed image, which is then passed to the discriminator to evaluate the image's realism and naturalness. The data is continuously fed back for iterative updates. The loss calculation consists of two parts: GAN Loss (adversarial loss), which is fed back from the discriminator to the generator to improve the realism and local texture naturalness of the generated image; specifically, the adversarial loss is based on the feature extraction from the pre-trained GAN network, expressed as follows:
[0025] Among them, among them, Represents the loss function of GAN; Represents the distribution of real data To make an expectation; x represents a real data sample; The output of the discriminator D for the real data sample x represents the probability that sample x is classified as real data. Represented as noise distribution The expectation is calculated; z represents the noise vector sampled from the noise distribution; G(z) represents the output of the generator G to the noise z, and represents the generated fake sample; 1 D(G(z)) represents the complement of the discriminator D's output on the generated sample G(z), and represents the probability that the sample G(z) is judged as fake data.
[0026] Preferably, the perceptual loss (VGG Loss) is directly fed back from the generated image to optimize the similarity of the generated image in the high-level feature space, ensuring that the facial structure and skin texture after wrinkle removal are natural and harmonious. Specifically, the perceptual loss is a loss based on feature extraction from a pre-trained VGG network, expressed as follows:
[0027] in, Let N represent the VGG perceptual loss function, and N represent the number of samples. This refers to the feature extraction function of a VGG network, typically the output of a specific layer. This indicates that the generator G is applied to the i-th noise. The output of represents the generated fake samples; This represents the i-th real sample; This represents the square of the Euclidean distance, i.e., the L2 norm between two vectors, used to calculate the Euclidean distance between two vectors; This indicates that the VGG network generates samples. Extracted features; This indicates that the VGG network is compatible with real samples. Extracted features.
[0028] S20: The input portrait image to be processed is input into the trained generative adversarial network, and the generator outputs a preliminary wrinkle-removed image and a corresponding wrinkle region mask. The generator is configured to simultaneously output the preliminary wrinkle-removed image and the wrinkle region mask. The wrinkle region mask is predicted and generated by the intermediate feature layer of the generator through an additional convolutional layer. Unlike the traditional portrait restoration method of "segmentation first and then restoration", this case achieves the two tasks of outputting a preliminary wrinkle-removed image and a corresponding wrinkle region mask through a single generative adversarial network. Two output results can be obtained at the same time as the preliminary image information is input. That is, the preliminary wrinkle-removed image is obtained through generator feature sharing (as described above), and the wrinkle region mask is predicted and generated by the intermediate feature layer of the generator through an additional convolutional layer. This avoids the cost (such as computing resources, memory, and time) required to deploy and run two independent large network models. In summary, the overall loss function in this case can be summarized as follows:
[0029] in, The mask loss function is used. and This is the weighting factor.
[0030] During training, two task lines—outputting the initial wrinkle-removing image and the corresponding wrinkle region mask—are jointly trained to improve the accuracy of the restoration. Specifically, during collaborative work and training, the generative adversarial network (GAN) simultaneously receives supervision from both the ground truth image and the ground truth mask. Gradient backpropagation converges at the bifurcation point, simultaneously optimizing the processing of the two task branches of the shared generator. To meet the needs of both tasks, the generator learns to extract the most effective feature representations for both wrinkle localization and skin restoration, thereby producing a more accurate mask and a more natural restoration result. This makes the mask more accurate and the restoration more natural, with both optimizing each other to achieve the best results. Taking the illustration as an example, the generator adopts a lightweight and integrated design. The shared high-level features extracted by the encoder are simultaneously input to the main decoding branch and the mask prediction auxiliary branch at the bottleneck layer. The main decoding branch generates a preliminary wrinkle-removed image through an upsampling module sequence containing attention mechanisms and residual connections (corresponding to the feature sharing mentioned above). The auxiliary branch directly predicts the binary mask of the wrinkle region from the same set of features through a lightweight convolutional layer and activation function (such as the Sigmoid function). This dual-branch parallel structure realizes feature sharing and task collaboration, and efficiently completes the localization and repair of the portrait in a single forward propagation of the generative adversarial network.
[0031] S30: Based on the wrinkle region mask, the preliminary wrinkle-removed image is fused with the input portrait image. Preferably, the wrinkle region mask is used as a weight map. In the wrinkle region indicated by the mask, the pixels of the preliminary wrinkle-removed image are mainly used, and in the non-wrinkle region, the original pixels of the input portrait image are mainly retained. A natural transition is achieved through weighted superposition to generate the final wrinkle-removed output image.
[0032] This invention has been described through preferred embodiments. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. This invention is not limited to the specific embodiments disclosed herein; other embodiments falling within the scope of the claims are also within the protection scope of this invention.
Claims
1. A lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks, characterized in that, Includes the following steps: S00: Construct a training set, which includes multiple training data pairs. Obtain a wrinkle-free face image as the target image. Extract high-frequency details of skin texture from a wrinkled face image and fuse them into the corresponding skin region of the target image to generate a source image with simulated wrinkles to form a training data pair. S10: Construct a lightweight generative adversarial network, whose generator is an encoder-decoder structure, and introduce an attention mechanism. Train the generative adversarial network with the training data input, wherein the loss function of the generator includes at least adversarial loss and perceptual loss. S20: Input the input portrait image to be processed into the trained generative adversarial network, and the generator outputs a preliminary wrinkle-removed image and the corresponding wrinkle region mask; S30: Based on the wrinkle region mask, the preliminary wrinkle-removing image is fused with the input portrait image to generate the final wrinkle-removing output image.
2. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 1, characterized in that: In step S00, the construction step of the training data pairs includes: S01: Collect high-resolution images of wrinkle-free and wrinkled faces as the basis for generating wrinkled images. S02: Crop out the face area and use facial key points to align the facial features to ensure consistency; S03: Using the Laplacian pyramid or Poisson fusion method, high-frequency texture components are decomposed from the wrinkled face image, the high-frequency texture components are aligned and superimposed on the corresponding skin high-frequency channel of the wrinkle-free face image, and the low-frequency structure and color information in the wrinkle-free face image are preserved. S04: Take an original wrinkle-free face image and a wrinkled face image generated through steps S01~S03 as a training data pair.
3. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 2, characterized in that, In step S03, after the texture is fused, the operation area is constrained using a face skin region mask to ensure that the texture generation only applies to the skin region, and at least one data augmentation operation is performed on the generated image data, including rotation, blurring, compression, or illumination perturbation.
4. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 3, characterized in that, In step S10, the encoder-decoder structure uses depthwise separable convolution and residual connections, and the attention mechanism is a spatial or channel attention module to enhance attention to wrinkle regions.
5. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 4, characterized in that, In step S10, the training steps of the generative adversarial network are as follows: S11: Input a portrait image and crop the face region based on facial landmarks; S12: Repairing wrinkled areas based on lightweight generative adversarial networks; S13: The generative adversarial network outputs a preliminary wrinkle-removed image and a corresponding wrinkle region mask; S14: Based on the wrinkle region mask, the preliminary wrinkle-removed image and the corresponding wrinkle region mask are fused to obtain the repaired face image; S15: Calculate the GAN adversarial loss and VGG perceptual loss, update the adversarial generation network, and feed the new adversarial generation network back to step S12.
6. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 5, characterized in that, In step S15, the adversarial loss is a loss based on feature extraction from a pre-trained GAN network, specifically expressed as follows: Among them, among them, This represents the loss function of GAN. Represents the distribution of real data To make an expectation; x represents a real data sample, The output of the discriminator D for the real data sample x represents the probability that sample x is classified as real data. Represented as noise distribution Let z represent the noise vector sampled from the noise distribution, G(z) represent the output of the generator G on the noise z, and represent the generated fake sample. D(G(z)): The complement of the discriminator D to the output of the generated sample G(z), representing the probability that the sample G(z) is judged as fake data.
7. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 5, characterized in that, In step S15, the perceptual loss is a loss based on feature extraction from a pre-trained VGG network, specifically expressed as: in, Let N represent the VGG perceptual loss function, and N represent the number of samples. This refers to the feature extraction function of a VGG network, typically the output of a specific layer. This indicates that the generator G is applied to the i-th noise. The output of represents the generated fake samples; This represents the i-th real sample; This represents the square of the Euclidean distance, i.e., the L2 norm between two vectors, used to calculate the Euclidean distance between two vectors; This indicates that the VGG network generates samples. Extracted features; This indicates that the VGG network is compatible with real samples. Extracted features.
8. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 5, characterized in that, In step S20, the generator is configured to simultaneously output the preliminary wrinkle-removed image and the wrinkle region mask; the wrinkle region mask is predicted and generated by the intermediate feature layer of the generator through an additional convolutional layer.
9. The lightweight portrait wrinkle removal and image enhancement method based on generative adversarial networks according to claim 8, characterized in that, In step S30, the wrinkle region mask is used as a weight map. In the wrinkle region indicated by the mask, the pixels of the preliminary wrinkle-removing image are mainly used, while in the non-wrinkle region, the original pixels of the input portrait image are mainly retained. A natural transition is achieved through weighted superposition.
Citation Information
Patent Citations
Method for repairing face defect images based on auto-encoder and generative adversarial networks
CN108520503A
Sick face data enhancement method based on generative adversarial network
CN112233017A
Multi-scale feature fusion generative adversarial network image restoration method based on structure guidance
CN120070258A
Image super-resolution reconstruction method based on deep learning
CN120125436A
Intelligent face wrinkle removing method and system based on generative adversarial network
CN120411305A