Face image super-resolution method and device, storage medium and electronic equipment

By constructing a diversity style transfer network model and using the style transfer results to train a low-quality face image super-resolution model, we solve the problem of poor performance of low-quality face image super-resolution methods in the existing technology and achieve higher performance. Recognition accuracy and closer to the real degradation effect.

CN118761906AActive Publication Date: 2024-10-11WUHAN UNIV
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410820136.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-11
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Existing low-quality face image super-resolution methods perform poorly in real low-quality face image scenarios and have low reconstruction accuracy, mainly due to the poor performance of traditional degradation simulation methods.

Method used

Build a diversity style transfer network model, train a low-quality face image super-resolution model through the style transfer results of high-definition face content maps and low-quality face style maps, and use the style transfer results to generate low-quality faces that are closer to the real degradation The effect of high-low quality face sample pairs, thereby improving the super-resolution effect.

Benefits of technology

The high-low-quality face sample pairs generated through the diversity style transfer network model significantly improve the super-resolution effect of the low-quality face image super-resolution model on real low-quality face images, and improve the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761906A_ABST
    Figure CN118761906A_ABST
Patent Text Reader

Abstract

The invention discloses a face image super-resolution method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring a high-definition face content graph data set and a low-quality face style graph data set; constructing a diversity style migration network model, and inputting the high-definition face content graph data set and the low-quality face style graph data set into the diversity style migration network model to obtain a style migration result; calculating an overall loss function to carry out iterative training on the diversity style migration network model; inputting the high-definition face content graph and the low-quality face style graph into a trained diversity style migration network model to obtain a corresponding style migration result, and determining a high-low quality face sample pair based on the style migration result; and providing a low-quality face image super-resolution model, and inputting the high-low quality face sample pair into the trained low-quality face image super-resolution model to obtain a high-definition face image. According to the invention, the recognition precision of the super-resolution face image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital image technology, and in particular to a facial image super-resolution method, device, storage medium and electronic device. Background Art

[0002] In the field of security monitoring, surveillance cameras often capture low-quality facial images that are difficult to identify. By using image super-resolution methods, low-quality facial images can be super-resolved into high-definition facial images, which can better identify facial identities. The effect of super-resolution of low-quality facial images is inseparable from the accuracy of degradation simulation.

[0003] In recent years, deep learning technology has been increasingly used in the super-resolution of low-quality facial images. Most of the existing low-quality face super-resolution methods are based on various priors and different network architectures, while the traditional degradation simulation methods are still used for the degradation simulation of low-quality facial images, such as downsampling, adding Gaussian noise, adding Gaussian blur and adding JPEG compression. These methods perform poorly in the real low-quality face image super-resolution scenario and have low reconstruction accuracy. Summary of the invention

[0004] The embodiments of the present application provide a facial image super-resolution method, device, storage medium and electronic device, which can improve the recognition accuracy of super-resolution facial images.

[0005] The present application provides a facial image super-resolution method, comprising: Obtain a dataset of high-definition face content images and a dataset of low-quality face style images; Constructing a diversity style transfer network model, inputting the high-definition face content map dataset and the low-quality face style map dataset into the diversity style transfer network model to obtain a style transfer result; Calculating an overall loss function, and iteratively training the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; Inputting the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determining high-low quality face sample pairs based on the style transfer results; A low-quality face image super-resolution model is provided, and the high-low quality face sample pairs are input into the trained low-quality face image super-resolution model to obtain a high-definition face image.

[0006] Furthermore, in the above-mentioned facial image super-resolution method, the diversity style transfer network model includes two encoders and one decoder; The step of inputting the high-definition face content map dataset and the low-quality face style map dataset into the diversity style transfer network model to obtain a style transfer result includes: Inputting the high-definition face content image in the high-definition face content image dataset into a first encoder to obtain content features of different sizes and content features of different combinations; Inputting the low-quality face style map in the low-quality face style map dataset into a second encoder to obtain style features of different sizes and style features of different combinations; The content features of different sizes, the content features of different combinations, the style features of different sizes, the style features of different combinations, and the style random perturbation amount are input into a decoder to obtain a style transfer result.

[0007] Furthermore, in the above-mentioned facial image super-resolution method, the decoder includes a facial style perturbation module, a multi-layer perceptron and a convolutional layer; The step of inputting the content features of different sizes, the content features of different combinations, the style features of different sizes, the style features of different combinations, and the style random perturbation amount into a decoder to obtain a style migration result includes: Inputting the content features of different combinations, the style features of different sizes, and the style features of different combinations into convolution layers respectively to obtain a first parameter, a second parameter, and a third parameter; Inputting the style random perturbation amount into the multi-layer perceptron to obtain a style perturbation factor; Calculate the attention mean and attention variance after disturbance based on the first parameter, the second parameter, the third parameter and the style disturbance factor input into the face style disturbance module; Based on the attention mean, the attention variance and the style perturbation factor, the content features of the different sizes are stylized and degraded to obtain a style transfer result.

[0008] Furthermore, in the above-mentioned face image super-resolution method, the overall loss function is:

[0009] in, represents the super-resolution feedback loss, represents the style loss, Indicates content loss, represents the super-resolution feedback loss weight, Represents the weight of the style loss.

[0010] Furthermore, the above-mentioned facial image super-resolution method further comprises: Based on the style transfer results of different styles and the same content, the style difference is performed to obtain the style difference result; Normalizing the high-definition face image and the high-definition face content map and then calculating the super-resolution feedback loss; The super-resolution feedback loss weight is calculated based on the attribute information of the high-definition face content map, the style migration result and the high-definition face content map.

[0011] Furthermore, the above-mentioned facial image super-resolution method further comprises: Calculating the mean and variance of the style transfer result and the low-quality face style map respectively through a convolutional neural network, and calculating the style loss based on the mean and variance of the style transfer result and the mean and variance of the low-quality face style map; Calculating the style loss weight based on the style random disturbance amount; The content loss is calculated based on the style migration result and the high-definition face content map.

[0012] The embodiment of the present application also provides a facial image super-resolution device, comprising: An acquisition module is used to acquire a high-definition face content map dataset and a low-quality face style map dataset; A first execution module is used to construct a diverse style transfer network model, input the high-definition face content map dataset and the low-quality face style map dataset into the diverse style transfer network model, and obtain a style transfer result; A training module, used to calculate an overall loss function, and iteratively train the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; The second execution module is used to input the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determine the high-low quality face sample pair based on the style transfer results; The third execution module is used to provide a low-quality face image super-resolution model, input the high-low quality face sample pairs into the trained low-quality face image super-resolution model, and obtain a high-definition face image.

[0013] Furthermore, in the above-mentioned facial image super-resolution device, the first execution module includes a first encoder, a second encoder and a decoder; The first encoder is used to obtain content features of different sizes and content features of different combinations based on the high-definition face content graph in the high-definition face content graph dataset; The second encoder is used to obtain style features of different sizes and style features of different combinations based on the low-quality face style map in the low-quality face style map dataset; The decoder is used to obtain a style migration result based on the content features of different sizes, the content features of different combinations, the style features of different sizes, the style features of different combinations, and the style random perturbation amount.

[0014] An embodiment of the present application also provides a computer-readable storage medium, in which a plurality of instructions are stored. The instructions are suitable for being loaded by a processor to execute any of the above-mentioned facial image super-resolution methods.

[0015] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used for the steps in any of the above-mentioned facial image super-resolution methods.

[0016] The present application provides a facial image super-resolution method, device, storage medium and electronic device. The present application obtains style transfer results by constructing a diverse style transfer network, and obtains high-low quality facial sample pairs based on the style transfer results, that is, high-low quality facial degradation sample pairs that are closer to the degradation effect of real low-quality facial images. A low-quality facial image super-resolution model is trained based on the high-low quality facial sample pairs, which can improve the super-resolution effect of the low-quality facial image super-resolution model on real low-quality facial images. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.

[0018] Figure 1 A flowchart of a facial image super-resolution method provided in an embodiment of the present application.

[0019] Figure 2 A schematic diagram of the structure of a diverse style transfer network model provided in an embodiment of the present application.

[0020] Figure 3 A schematic diagram of the structure of a facial feature extraction module provided in an embodiment of the present application.

[0021] Figure 4 A schematic diagram of the structure of the IRSE module provided in an embodiment of the present application.

[0022] Figure 5 A flowchart of obtaining a style transfer result through a decoder provided in an embodiment of the present application.

[0023] Figure 6 A flowchart of the diversity style transfer network model training provided in an embodiment of the present application.

[0024] Figure 7 A schematic diagram of the structure of a facial image super-resolution device provided in an embodiment of the present application.

[0025] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0026] Fig. 9 Another schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0028] Most of the existing low-quality face super-resolution methods are based on various priors and different network architectures, while the degradation simulation methods for low-quality face images still use traditional degradation simulation methods, which makes their performance poor in real low-quality face image super-resolution scenarios.

[0029] To solve the above problems, the embodiments of the present application provide a facial image super-resolution method, device, storage medium and electronic device. The facial image super-resolution device provided in the embodiments of the present application can be integrated in an electronic device, which can be a terminal, a server and other devices, wherein the terminal can include a tablet computer, a laptop computer, a personal computer (PC), a micro-processing box, or other devices.

[0030] See also Figure 1 , Figure 1 The present invention provides a flow chart of a facial image super-resolution method provided in an embodiment of the present invention, which is applied in an electronic device. The facial image super-resolution method includes the following steps: S1, obtain a high-definition face content map dataset and a low-quality face style map dataset.

[0031] Specifically, we take a number of real low-quality face images taken by several surveillance cameras, take one real low-quality face image from each camera as the real low-quality face style map dataset, and take the remaining low-quality face images from all cameras as the low-quality face style image test dataset for testing. In addition, we take a large number of high-definition faces as the high-definition face content map dataset.

[0032] After the data set is prepared, the face detection tool is used to detect the position of the face and its facial features in each image and crop them, retaining only the face part and removing irrelevant background. Then, according to the agreed positions of the key points of the facial features, the cropped faces are radially transformed so that all the facial features are aligned to the agreed key points of the facial features.

[0033] S2, build a diverse style transfer network model, input the high-definition face content map dataset and the low-quality face style map dataset into the diverse style transfer network model to obtain the style transfer result.

[0034] In one embodiment, if Figure 2 As shown, Figure 2 A schematic diagram of the structure of a diversity style transfer network model provided in an embodiment of the present application, wherein the diversity style transfer network model includes two encoders and one decoder.

[0035] Step S2 can be specifically represented by the following formula:

[0036] in, It is a high-definition face content map. is a low-quality face style map, For the encoder, For content features of different sizes and combinations, Style features in different sizes and combinations.

[0037] In one embodiment, step S2 may include the following steps: S21, inputting the high-definition face content image in the high-definition face content image dataset into a first encoder to obtain content features of different sizes and content features of different combinations.

[0038] S22, inputting the low-quality face style map in the low-quality face style map dataset into a second encoder to obtain style features of different sizes and style features of different combinations.

[0039] Specifically, the encoder includes a face feature extraction module, Figure 3 A schematic diagram of the structure of the face feature extraction module provided in the embodiment of the present application is shown in FIG. Figure 3 As shown in the figure, the face feature extraction module includes three convolution blocks and twenty-four IRSE (Improved Residual Squeeze-and-Excitation) modules. The convolution block consists of a 3×3 convolution layer, a BatchNorm layer, and a PReLU activation layer. Figure 4A schematic diagram of the structure of the IRSE module provided in the embodiment of the present application is shown in FIG. Figure 4 As shown in the figure, the IRSE module consists of two 3×3 convolutional layers, two BatchNorm layers, a PReLU activation layer and a SE attention module. The SE attention module includes two fully connected layers, a mean pooling layer, a Sigmoid activation layer and a ReLU activation layer. The face feature extraction module also contains four downsampling operations, which are located before the IRSE modules at four different levels. There are two face feature extraction modules in the network encoder part, which are used to extract face features of high-definition face content maps and low-quality face style maps respectively. In one embodiment, the high-definition face content image And the real low-quality face style map Input two face feature extraction modules respectively , , get content features of different sizes and style features , which can be specifically expressed by the following formula:

[0040] Downsample and concatenate style features and content features of different sizes to obtain content features of different combinations and style features , which can be specifically expressed by the following formula:

[0041] in, represents downsampling, Indicates splicing.

[0042] S23, inputting content features of different sizes, content features of different combinations, style features of different sizes, style features of different combinations, and style random perturbations into a decoder to obtain a style transfer result.

[0043] Specifically, the decoder includes a face style perturbation module, a multi-layer perceptron, and a convolutional layer. The face style perturbation module includes an attention weighting module and an InstanceNorm (instance normalization) layer. The attention weighting module consists of three 1×1 convolutional layers and two InstanceNorm layers. The attention weighting module obtains the attention matrix based on the input high-definition face content map features and low-quality face style features, which is used to calculate the attention mean and attention variance of the real low-quality face style features. The attention mean and attention variance of the real low-quality face style features are used to stylize and degrade the high-definition face content map features after InstanceNorm. The face style perturbation module receives the attention matrix perturbation amount, mean perturbation amount, and variance perturbation amount output by the multi-layer perceptron, and perturbs the degradation within the style. The multi-layer perceptron consists of four fully connected layers. The input of the multi-layer perceptron is the style random perturbation, and the output is the attention matrix perturbation, mean perturbation and variance perturbation, which are used to weight the attention matrix, attention mean and attention variance in each face style perturbation module.

[0044] In one embodiment, Figure 5 For a flowchart of obtaining a style transfer result through a decoder provided in an embodiment of the present application, please refer to Figure 5 , step S23 may include the following steps: S231, inputting different combinations of content features, different sizes of style features, and different combinations of style features into the convolution layer respectively to obtain a first parameter, a second parameter, and a third parameter.

[0045] Specifically, the content features of different combinations, style features of different sizes, and style feature instances of different combinations are normalized and then passed through a 1×1 convolutional layer to obtain the first parameter , the second parameter With the third parameter , which can be specifically expressed by the following formula:

[0046] in, represents instance normalization, Represents a 1×1 convolutional layer.

[0047] S232, inputting the style random perturbation amount into the multi-layer perceptron to obtain the style perturbation factor.

[0048] Specifically, the style random perturbation Input Multilayer Perceptron In the figure, after being mapped by four fully connected layers, The partition function is split into several forms such as The collection of is used as the style perturbation factor to be input into the face style perturbation module at each level of the decoder. The four elements of the style perturbation factor have different shapes, sizes and uses, among which , Multiplying together gives a shape of The matrix is ​​used to perturb the mean weight matrix, , , after the broadcast operation, the stylized mean and stylized variance are weighted respectively.

[0049] S233, based on the first parameter, the second parameter, the third parameter and the style perturbation factor, input into the face style perturbation module to calculate the perturbed attention mean and attention variance.

[0050] Specifically, use , , and style disturbance factor Calculate the mean attention after perturbation and attention variance .

[0051]

[0052] S=

[0053] =

[0054] in, represents matrix multiplication, is the transpose of the matrix, is the normalization function.

[0055] S234, based on the attention mean, attention variance and style perturbation factor, the content features of different sizes are stylized and degraded to obtain the style transfer result.

[0056] Specifically, the style perturbation factor attention mean is used , attention variance and style disturbance factor Perform stylized degradation on the content features to obtain stylized and degraded facial features (The style-degraded facial features are the style migration results), which can be specifically expressed by the following formula:

[0057] S3, calculate the overall loss function, and iteratively train the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model.

[0058] In one embodiment, after calculating the overall loss function, back propagation is performed to update the parameters of the diversity style transfer network model, where the overall loss function is:

[0059] in, represents the super-resolution feedback loss, represents the style loss, Indicates content loss, represents the super-resolution feedback loss weight, Represents the weight of the style loss.

[0060] In one embodiment, Figure 6 The flowchart of the diversity style transfer network model training provided in the embodiment of the present application is as follows: Figure 6 As shown, step S3 includes the following steps: S31, performing style difference based on style migration results of different styles and the same content to obtain style difference results.

[0061] Specifically, the inter-style difference method is used to calculate the inter-style difference result, which can be calculated by the following formula:

[0062]

[0063] in, express Style transfer results under style, express Style transfer results under style, express Style transfer results under style and The style transfer result under the style is interpolated, and the interpolation method is linear interpolation per pixel. Style transfer results under style , the weight of the pixel multiplied during interpolation is , relatively, Style transfer results under style , the weight of the pixel multiplied during interpolation is In the process of training the diversity style transfer network, the present invention randomly selects pictures with the same content and different styles in a batch according to the weight set shown. Perform interpolation between styles to generate multiple interpolation results between styles. Generally, .

[0064] S32, normalizing the high-definition face image and the high-definition face content map and then calculating the super-resolution feedback loss.

[0065] Specifically, the super-resolution feedback loss can be calculated by the following formula:

[0066] in, is the style transfer result, Represents a high-definition face content map, represents any low-quality face image super-resolution model trained on paired high-low quality face sample pairs, It is a pixel normalization operation, which is used to normalize the pixel values ​​of the image to between.

[0067] S33, calculating the super-resolution feedback loss weight based on the attribute information of the high-definition face content map, the style transfer result and the high-definition face content map.

[0068] Specifically, the super-resolution feedback loss weight is an adaptive weight, which can adjust the relationship between stylization and super-resolution feedback as the current stylization progresses. It can be calculated by the following formula:

[0069] in, , , Respectively represent the number of channels, height, and width of the high-definition face content image. Divide the numerator and denominator of the fraction by It can be found that the denominator represents the average difference between the pixels of the restored image and the high-definition image.

[0070] S34, respectively calculating the mean and variance of the style transfer result and the low-quality face style map through a convolutional neural network, and calculating the style loss based on the mean and variance of the style transfer result and the mean and variance of the low-quality face style map.

[0071] Specifically, it can be calculated by the following formula:

[0072] in, Indicates the calculation of the mean, represents the calculation of variance, ReLU represents the ReLU of the input image extracted using the pre-trained VGG16 convolutional neural network In the embodiment of the present application, the style of the image is represented by the mean and variance of the features, and the style loss is calculated by the style transfer result. and style map Mean and variance measures of respective VGG features.

[0073] S35, calculating the style loss weight based on the style random perturbation amount.

[0074] Specifically, the style loss weight and style random perturbation amount The modulus length hook can be used to control the degree of stylization degradation, which can be calculated by the following formula:

[0075] in, Indicates the number of dimensions for obtaining the random disturbance of the wind turbine. express The mold length.

[0076] S36, calculates the content loss based on the style transfer result and the high-definition face content map.

[0077] Specifically, it can be calculated by the following formula:

[0078] in, ReLU representing the input image extracted with pre-trained VGG16 _1 layer features.

[0079] S4, inputting the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain the corresponding style transfer results, and determining the high-low quality face sample pairs based on the style transfer results.

[0080] Among them, the style transfer result is a stylized low-quality face image, and the high-low quality Renliang sample pair is a high-quality face content image-stylized low-quality face image sample pair.

[0081] When generating paired high-low quality face sample pairs, the style random perturbation is used to generate face sample pairs with intra-style degradation diversity, and the inter-style interpolation is used to generate face sample pairs with inter-style degradation diversity. The style random perturbation is a random vector of fixed dimension, and each element (i∈Z,1≤i≤d(Z)) obeys the standard normal distribution ∼N(0,1), in the process of training the diversity style transfer network model, the style random perturbation amount is randomly generated. In the process of generating sample pairs using the trained diversity style transfer network model, the style random perturbation amount can be randomly generated or the degree of stylization degradation can be controlled by artificially controlling the modulus length.

[0082] S5, providing a low-quality face image super-resolution model, inputting high-low quality face sample pairs into the trained low-quality face image super-resolution model to obtain a high-definition face image.

[0083] The low-quality face image super-resolution model may be any low-quality face image super-resolution model trained based on paired high- and low-quality face sample pairs, such as the GFPGAN model.

[0084] In one embodiment, before step S5, a low-quality face image super-resolution model needs to be trained using high-low quality face sample pairs to obtain a trained low-quality face image super-resolution model.

[0085] The embodiment of the present application constructs a diverse style transfer network model, and uses style transfer degradation to generate high-low quality face sample pairs with intra-style and inter-style degradation diversity. Compared with traditional degradation methods, it has a degradation effect that is closer to real low-quality face images. The embodiment of the present application uses high-low quality face sample pairs generated by the diverse style transfer network model to train a low-quality face image super-resolution model, and successfully improves the super-resolution effect of the low-quality face image super-resolution model on real low-quality face images.

[0086] According to the method described in the above embodiments, this embodiment will be further described from the perspective of a facial image super-resolution device. The facial image super-resolution device can be implemented as an independent entity or integrated in an electronic device. The electronic device can be a terminal, a server, or other devices. The terminal can include a tablet computer, a laptop computer, a personal computer (PC), a micro processing box, or other devices.

[0087] See also Figure 7 , Figure 7 The face image super-resolution device provided by the embodiment of the present application is specifically described, and is applied to an electronic device. The face image super-resolution device may include: An acquisition module is used to acquire a high-definition face content map dataset and a low-quality face style map dataset; The first execution module is used to build a diverse style transfer network model, input the high-definition face content map dataset and the low-quality face style map dataset into the diverse style transfer network model, and obtain the style transfer result; The training module is used to calculate the overall loss function, and iteratively train the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; The second execution module is used to input the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determine the high-low quality face sample pairs based on the style transfer results; The third execution module is used to provide a low-quality face image super-resolution model, input the high-low quality face sample pairs into the trained low-quality face image super-resolution model, and obtain a high-definition face image.

[0088] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0089] In addition, the embodiment of the present application also provides an electronic device, which may be a computer, a tablet computer, or other device. Figure 8 As shown, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.

[0090] The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or loading applications stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the electronic device as a whole.

[0091] In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402 to implement various functions: Obtain a dataset of high-definition face content images and a dataset of low-quality face style images; Constructing a diversity style transfer network model, inputting the high-definition face content map dataset and the low-quality face style map dataset into the diversity style transfer network model to obtain a style transfer result; Calculating an overall loss function, and iteratively training the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; Inputting the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determining high-low quality face sample pairs based on the style transfer results; A low-quality face image super-resolution model is provided, and the high-low quality face sample pairs are input into the trained low-quality face image super-resolution model to obtain a high-definition face image.

[0092] The electronic device can implement the steps in any embodiment of the facial image super-resolution method provided in the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by any facial image super-resolution method provided in the embodiments of the present invention. Please refer to the previous embodiments for details and will not be repeated here.

[0093] Fig. 9 The specific structural block diagram of the electronic device provided in the embodiment of the present invention is shown, and the electronic device can be used to implement the face image super-resolution method provided in the above embodiment. The electronic device 500 can be a terminal, a server, etc., wherein the terminal can include a tablet computer, a notebook computer, a personal computer (PC, Personal Computer), a micro processing box, or other devices.

[0094] The RF circuit 510 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 510 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 510 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks may use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0095] The memory 520 can be used to store software programs and modules, such as the corresponding program instructions / modules in the above embodiments. The processor 580 executes various functional applications and data processing by running the software programs and modules stored in the memory 520, that is, realizing the functions of taking pictures with the front camera, processing the captured images, and switching the display color of the display content on the display screen. The memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 520 may further include a memory remotely arranged relative to the processor 580, and these remote memories may be connected to the electronic device 500 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0096] The input unit 530 may be used to receive input digital or character information, and generate a keyboard and a mouse related to user settings and function control. The display unit 540 may be used to display information input by the user or information provided to the user and various graphical user interfaces, which may be composed of graphics, text, icons, videos, and any combination thereof. The display unit 540 may include a display panel 541, which may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.

[0097] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the electronic device 500. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, which is converted into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and converted into audio data, and then the audio data is output to the processor 580 for processing, and then sent to another terminal through the RF circuit 510, or the audio data is output to the memory 520 for further processing. The audio circuit 560 may also include an earplug jack to provide communication between an external headset and the electronic device 500.

[0098] The electronic device 500 can help the user receive requests, send information, etc. through the transmission module 570 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 570 is shown in the figure, it can be understood that it is not a necessary component of the electronic device 500 and can be omitted as needed without changing the essence of the invention.

[0099] The processor 580 is the control center of the electronic device 500. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 520, and calling data stored in the memory 520, it executes various functions of the electronic device 500 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 580 may include one or more processing cores; in some embodiments, the processor 580 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 580.

[0100] The electronic device 500 also includes a power supply 590 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 580 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 590 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0101] Although not shown, the electronic device 500 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors. One or more programs include instructions for performing the following operations: Obtain a dataset of high-definition face content images and a dataset of low-quality face style images; Constructing a diversity style transfer network model, inputting the high-definition face content map dataset and the low-quality face style map dataset into the diversity style transfer network model to obtain a style transfer result; Calculating an overall loss function, and iteratively training the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; Inputting the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determining high-low quality face sample pairs based on the style transfer results; A low-quality face image super-resolution model is provided, and the high-low quality face sample pairs are input into the trained low-quality face image super-resolution model to obtain a high-definition face image.

[0102] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0103] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores multiple instructions, and the instructions can be loaded by a processor to execute the steps of any embodiment of the face image super-resolution method provided by the embodiment of the present invention.

[0104] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0105] Since the instructions stored in the storage medium can execute the steps in any embodiment of the face image super-resolution method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any face image super-resolution method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0106] The above is a detailed introduction to a facial image super-resolution method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A facial image super-resolution method, characterized in that: The method comprises: Obtain a dataset of high-definition face content images and a dataset of low-quality face style images; Constructing a diversity style transfer network model, inputting the high-definition face content map dataset and the low-quality face style map dataset into the diversity style transfer network model to obtain a style transfer result; Calculating an overall loss function, and iteratively training the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; Inputting the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determining high-low quality face sample pairs based on the style transfer results; A low-quality face image super-resolution model is provided, and the high-low quality face sample pairs are input into the trained low-quality face image super-resolution model to obtain a high-definition face image.

2. The facial image super-resolution method according to claim 1, characterized in that: The diversity style transfer network model includes two encoders and one decoder; The step of inputting the high-definition face content map dataset and the low-quality face style map dataset into the diversity style transfer network model to obtain a style transfer result includes: Inputting the high-definition face content image in the high-definition face content image dataset into a first encoder to obtain content features of different sizes and content features of different combinations; Inputting the low-quality face style map in the low-quality face style map dataset into a second encoder to obtain style features of different sizes and style features of different combinations; The content features of different sizes, the content features of different combinations, the style features of different sizes, the style features of different combinations, and the style random perturbation amount are input into a decoder to obtain a style transfer result.

3. The facial image super-resolution method according to claim 2, characterized in that: The decoder includes a face style perturbation module, a multi-layer perceptron and a convolutional layer; The step of inputting the content features of different sizes, the content features of different combinations, the style features of different sizes, the style features of different combinations, and the style random perturbation amount into a decoder to obtain a style migration result includes: Inputting the content features of different combinations, the style features of different sizes, and the style features of different combinations into convolution layers respectively to obtain a first parameter, a second parameter, and a third parameter; Inputting the style random perturbation amount into the multi-layer perceptron to obtain a style perturbation factor; Calculate the attention mean and attention variance after disturbance based on the first parameter, the second parameter, the third parameter and the style disturbance factor input into the face style disturbance module; Based on the attention mean, the attention variance and the style perturbation factor, the content features of the different sizes are stylized and degraded to obtain a style transfer result.

4. The facial image super-resolution method according to claim 3, characterized in that: The overall loss function is: in, represents the super-resolution feedback loss, represents the style loss, Indicates content loss, represents the super-resolution feedback loss weight, Represents the weight of the style loss.

5. The facial image super-resolution method according to claim 4, characterized in that: The method further comprises: Based on the style transfer results of different styles and the same content, the style difference is performed to obtain the style difference result; Normalizing the high-definition face image and the high-definition face content map and then calculating the super-resolution feedback loss; The super-resolution feedback loss weight is calculated based on the attribute information of the high-definition face content map, the style migration result and the high-definition face content map.

6. The facial image super-resolution method according to claim 4, characterized in that: The method further comprises: Calculating the mean and variance of the style transfer result and the low-quality face style map respectively through a convolutional neural network, and calculating the style loss based on the mean and variance of the style transfer result and the mean and variance of the low-quality face style map; Calculating the style loss weight based on the style random disturbance amount; The content loss is calculated based on the style migration result and the high-definition face content map.

7. A facial image super-resolution device, characterized in that: include: An acquisition module is used to acquire a high-definition face content map dataset and a low-quality face style map dataset; A first execution module is used to construct a diverse style transfer network model, input the high-definition face content map dataset and the low-quality face style map dataset into the diverse style transfer network model, and obtain a style transfer result; A training module, used to calculate an overall loss function, and iteratively train the diversity style transfer network model based on the overall loss function to obtain a trained diversity style transfer network model; The second execution module is used to input the high-definition face content map and the low-quality face style map into the trained diversity style transfer network model to obtain corresponding style transfer results, and determine the high-low quality face sample pair based on the style transfer results; The third execution module is used to provide a low-quality face image super-resolution model, input the high-low quality face sample pairs into the trained low-quality face image super-resolution model, and obtain a high-definition face image.

8. The facial image super-resolution device according to claim 7, characterized in that: The first execution module includes a first encoder, a second encoder and a decoder; The first encoder is used to obtain content features of different sizes and content features of different combinations based on the high-definition face content graph in the high-definition face content graph dataset; The second encoder is used to obtain style features of different sizes and style features of different combinations based on the low-quality face style map in the low-quality face style map dataset; The decoder is used to obtain a style migration result based on the content features of different sizes, the content features of different combinations, the style features of different sizes, the style features of different combinations, and the style random perturbation amount.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the facial image super-resolution method according to any one of claims 1 to 6.

10. An electronic device, characterized in that: It comprises a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the face image super-resolution method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image conversion method and device, computer equipment and storage medium

    CN108564127A

  • Face image super-resolution method based on dense residual neural network

    CN110610464A

  • Low-resolution face image super-resolution method for recognition.

    CN112288627A

  • Font style migration method based on Chinese character pattern disturbance

    CN114548038A

  • Multi-camera face super-resolution method and system based on domain migration fusion network

    CN115131205A