Low-quality face recognition method, device and equipment based on adjustable style migration
Patent Information
- Application Number
- CN202510524154.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]本申请提供一种基于可调节风格迁移的低质量人脸识别方法、装置及设备,以解决相关技术难以模拟复杂的降质过程,导致识别效果不佳的问题,生成更接近真实低质量人脸降质效果的风格化图像,利用该图像作为低质量人脸识别算法的输入,可以提高人脸识别模型对真实低质量人脸图像的识别效果
[0043]由此,通过获取高清人脸的内容图数据集和低质量人脸的风格图数据集,并对初始可调节风格迁移网络模型进行训练得到训练后的可调节风格迁移网络模型,并将高清人脸的内容图数据集和低质量人脸的风格图数据集输入至训练后的可调节风格迁移网络模型得到风格化降质人脸数据集,利用风格化降质人脸数据集构建查询数据库,获取待识别人脸图像,通过查询数据库查询待识别人脸图像得到人脸识别序列。由此,解决了相关技术难以模拟复杂的降质过程,导致识别效果不佳的问题,生成更接近真实低质量人脸降质效果的风格化图像,从而提高人脸识别模型对真实低质量人脸图像的识别效果。
Smart Images

Figure CN123016489A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to a method, apparatus and device for low-quality face recognition based on adjustable style transfer. Background Technology
[0002] With the rapid development of information technology, facial recognition technology has been widely used in various fields such as security monitoring, criminal investigation, and intelligent access control. Especially in criminal investigation, facial recognition of suspect photos captured by surveillance cameras has become a crucial tool for solving cases. However, despite the significant progress made in facial recognition technology in recent years, its recognition effectiveness still heavily relies on the clarity of the photograph. In practical applications, due to factors such as complex surveillance environments and varying equipment quality, a large number of low-quality images are often generated. These images may be affected by various degrading factors such as motion blur, noise interference, and insufficient lighting, posing a significant challenge to facial recognition.
[0003] Low-quality face recognition methods in related technologies typically simulate low-quality images through downsampling, blurring, noise addition, and compression to reduce the modal differences between high-quality and low-quality images. However, these methods require extensive manual parameter tuning, and the generated degraded images still differ significantly from low-quality images in real-world scenarios, making them unsuitable for practical applications. For example, in criminal investigations, photos of suspects captured by surveillance cameras may be of poor quality due to complex environments, and related technologies cannot accurately simulate these complex degradation processes, resulting in poor recognition performance. Summary of the Invention
[0004] This application provides a low-quality face recognition method, apparatus, and device based on adjustable style transfer to solve the problem that related technologies are difficult to simulate complex degradation processes, resulting in poor recognition performance. It generates stylized images that are closer to the degradation effect of real low-quality faces. Using this image as input to the low-quality face recognition algorithm can improve the recognition performance of the face recognition model on real low-quality face images.
[0005] The first aspect of this application provides a low-quality face recognition method based on adjustable style transfer, comprising the following steps:
[0006] Obtain a high-resolution content graph dataset of faces and a low-quality style graph dataset of faces;
[0007] The initial adjustable style transfer network model is trained using the content map dataset of the high-definition face and the style map dataset of the low-quality face to obtain the trained adjustable style transfer network model.
[0008] The content map dataset of the high-definition faces and the style map dataset of the low-quality faces are input into the target adjustable style transfer network model to obtain the stylized degraded face dataset.
[0009] A query database is constructed using the stylized and degraded face dataset to obtain face images to be recognized. The face recognition sequence is obtained by querying the face images to be recognized through the query database.
[0010] Optionally, in some embodiments, after acquiring the content map dataset of high-resolution faces and the style map dataset of low-quality faces, the process includes:
[0011] The content map dataset of high-definition faces and the style map dataset of low-quality faces are preprocessed, and the confusion value of each face image is calculated.
[0012] Optionally, in some embodiments, the step of inputting the content map dataset of the high-resolution faces and the style map dataset of the low-quality faces into the trained adjustable style transfer network model to obtain a stylized degraded face dataset includes:
[0013] The system uses a preset feature extraction unit to extract the identity features corresponding to each face image from the content map of each high-definition face, and extracts the style features corresponding to each face image from the style map of each low-quality face.
[0014] The identity features and style features corresponding to each face image are input into a preset encoder unit to obtain the content encoding features and style encoding features corresponding to each face image.
[0015] The identity features corresponding to each face image, the style features corresponding to each face image, and the confusion value of each face image are input into a preset loss weight prediction unit to obtain the content-style loss weight;
[0016] The identity features corresponding to each face image, the style features corresponding to each face image, and the content-style loss weights are input into a preset decoder adjustment unit to obtain the stylized degraded face dataset.
[0017] Optionally, in some embodiments, after training the initial adjustable style transfer network model using the high-resolution face content map dataset and the low-quality face style map dataset to obtain the trained adjustable style transfer network model, the process includes:
[0018] Determine whether the overall loss function has met the preset convergence condition;
[0019] If the overall loss function reaches the preset convergence condition, the network parameters of the adjustable style transfer network model are updated according to the overall loss function.
[0020] Optionally, in some embodiments, the overall loss function is:
[0021]
[0022] in, Indicates identity as a means of combating loss. Indicating style loss, This represents the consistency loss predicted by dynamic weights, where λ is the weight of the style loss and w is the weight of the constraint loss.
[0023] A second aspect of this application provides a low-quality face recognition device based on adjustable style transfer, comprising:
[0024] The acquisition module is used to acquire content graph datasets of high-resolution faces and style graph datasets of low-quality faces;
[0025] The training module is used to train the initial adjustable style transfer network model using the content map dataset of the high-definition face and the style map dataset of the low-quality face to obtain the trained adjustable style transfer network model.
[0026] The input module is used to input the content map dataset of the high-definition face and the style map dataset of the low-quality face into the trained adjustable style transfer network model to obtain the stylized degraded face dataset.
[0027] The recognition module is used to construct a query database using the stylized degraded face dataset, obtain the face image to be recognized, and obtain the face recognition sequence by querying the face image to be recognized through the query database.
[0028] Optionally, in some embodiments, after acquiring the content map dataset of high-resolution faces and the style map dataset of low-quality faces, the acquisition module includes:
[0029] The preprocessing unit is used to preprocess the content map dataset of high-definition faces and the style map dataset of low-quality faces, and to calculate the confusion value of each face image.
[0030] Optionally, in some embodiments, the input module includes:
[0031] The extraction unit is used to extract the identity features corresponding to each face image from the content map of each high-definition face using a preset feature extraction unit, and to extract the style features corresponding to each face image from the style map of each low-quality face.
[0032] The encoding unit is used to input the identity features and style features corresponding to each face image into a preset encoder unit to obtain the content encoding features and style encoding features corresponding to each face image.
[0033] The loss weight prediction unit is used to input the identity features corresponding to each face image, the style features corresponding to each face image, and the confusion value of each face image into the preset loss weight prediction unit to obtain the content-style loss weight;
[0034] The decoding unit is used to input the identity features corresponding to each face image, the style features corresponding to each face image, and the content-style loss weights into a preset decoder adjustment unit to obtain the stylized degraded face dataset.
[0035] Optionally, in some embodiments, after training the initial adjustable style transfer network model using the high-resolution face content map dataset and the low-quality face style map dataset to obtain the trained adjustable style transfer network model, the training module includes:
[0036] The judgment unit is used to determine whether the overall loss function has reached the preset convergence condition.
[0037] The update unit is used to update the network parameters of the adjustable style transfer network model according to the overall loss function when the overall loss function reaches the preset convergence condition.
[0038] Optionally, in some embodiments, the overall loss function is:
[0039]
[0040] in, Indicates identity as a means of combating loss. Indicating style loss, This represents the consistency loss predicted by dynamic weights, where λ is the weight of the style loss and w is the weight of the constraint loss.
[0041] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the low-quality face recognition method based on adjustable style transfer as described in the above embodiments.
[0042] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the low-quality face recognition method based on adjustable style transfer as described in the above embodiments.
[0043] Therefore, by acquiring a high-resolution content map dataset of faces and a low-quality style map dataset of faces, and training an initial adjustable style transfer network model to obtain a trained adjustable style transfer network model, the high-resolution content map dataset and the low-quality style map dataset are input into the trained adjustable style transfer network model to obtain a stylized degraded face dataset. A query database is constructed using this stylized degraded face dataset to obtain the face images to be recognized. The face recognition sequence is obtained by querying the database to retrieve the face images to be recognized. This solves the problem that related technologies struggle to simulate complex degradation processes, leading to poor recognition results. It generates stylized images that more closely resemble the degradation effect of real low-quality faces, thereby improving the recognition performance of face recognition models on real low-quality face images.
[0044] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0045] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0046] Figure 1 A flowchart of a low-quality face recognition method based on adjustable style transfer provided in an embodiment of this application;
[0047] Figure 2 This is a schematic diagram illustrating the principle of an adjustable style transfer network according to an embodiment of this application;
[0048] Figure 3 This is a schematic diagram of the principle of a feature extraction unit provided according to an embodiment of this application;
[0049] Figure 4 This is a schematic diagram of an encoder adjustment unit according to an embodiment of this application;
[0050] Figure 5 This is a schematic diagram of the principle of a loss weight prediction unit according to an embodiment of this application;
[0051] Figure 6 This is a schematic diagram of a decoder adjustment unit according to an embodiment of this application;
[0052] Figure 7 This is a schematic diagram of the structure of a low-quality face recognition device based on adjustable style transfer according to an embodiment of this application.
[0053] Figure 8This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0054] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0055] The following description, with reference to the accompanying drawings, describes a method, apparatus, and device for low-quality face recognition based on adjustable style transfer, according to embodiments of this application. Addressing the problem mentioned in the background art that related technologies struggle to simulate complex degradation processes, leading to poor recognition results, this application provides a method for low-quality face recognition based on adjustable style transfer. In this method, a high-resolution face content map dataset and a low-quality face style map dataset are acquired. An initial adjustable style transfer network model is trained to obtain a trained adjustable style transfer network model. The high-resolution face content map dataset and the low-quality face style map dataset are input into the trained adjustable style transfer network model to obtain a stylized degraded face dataset. A query database is constructed using the stylized degraded face dataset to obtain the face image to be recognized. The face recognition sequence is obtained by querying the face image to be recognized through the query database. This solves the problem that related technologies struggle to simulate complex degradation processes, leading to poor recognition results. It generates stylized images that more closely resemble the degradation effect of real low-quality faces, thereby improving the recognition performance of face recognition models on real low-quality face images.
[0056] Specifically, Figure 1 This is a flowchart illustrating a low-quality face recognition method based on adjustable style transfer, provided in an embodiment of this application.
[0057] like Figure 1 As shown, this low-quality face recognition method based on adjustable style transfer includes the following steps:
[0058] In step S101, a content graph dataset of high-definition faces and a style graph dataset of low-quality faces are obtained.
[0059] Specifically, in this application embodiment, facial key point alignment and cropping are performed on all facial images. Based on the quality and source of the facial images, a high-definition facial content map dataset, a real low-quality facial style map dataset, and a real low-quality facial image test dataset are constructed.
[0060] In practice, several low-quality real face images captured by surveillance cameras were used. One low-quality face image from each camera was selected as the low-quality face style map dataset. The remaining low-quality face images from all cameras were used as the test low-quality face image dataset. A large number of high-resolution faces were also selected as the high-resolution face content map dataset. After the datasets were prepared, a face detection tool was used to detect the position of faces and their facial features in each image and cropped the images, retaining only the faces and removing irrelevant backgrounds. Then, according to the agreed-upon facial feature keypoints, a radial transformation was performed on the cropped faces to align the facial features with the agreed-upon facial feature keypoints.
[0061] Optionally, in some embodiments, after obtaining the content graph dataset of high-definition faces and the style graph dataset of low-quality faces, the method includes: preprocessing the content graph dataset of high-definition faces and the style graph dataset of low-quality faces, and calculating the confusion value of each face image.
[0062] Specifically, embodiments of this application can process the content map dataset of high-definition faces and the style map dataset of low-quality faces. First, facial features of the queried face dataset are extracted using the ArcFace feature extractor. Then, we assume that the similarity distances between the candidate face and other faces in the database are d1, d2, ..., d n The distance weights between the candidate face and other faces in the database are w1, w2, ..., w n Simultaneously define the distance weight w between face i in the database and candidate faces. i And similarity distance d i The relationship between them is satisfied The similarity distance d is represented by the cosine distance. Therefore, for a candidate face, its confusion level H can be defined as:
[0063] H = w1*d1 + w2*d2 + ... + w n *d n ;
[0064] After simplification, we get:
[0065]
[0066] After scaling, H is constrained to the range (0, 1). The scaled result can be expressed as:
[0067]
[0068] In step S102, the initial adjustable style transfer network model is trained using the content graph dataset of high-definition faces and the style graph dataset of low-quality faces to obtain the trained adjustable style transfer network model.
[0069] Optionally, in some embodiments, the content map dataset of high-resolution faces and the style map dataset of low-quality faces are input into a trained adjustable style transfer network model to obtain a stylized degraded face dataset, including: extracting the identity features corresponding to each face image from the content map of each high-resolution face using a preset feature extraction unit, and extracting the style features corresponding to each face image from the style map of each low-quality face; inputting the identity features and style features corresponding to each face image into a preset encoder unit to obtain the content encoding features and style encoding features corresponding to each face image; inputting the identity features, style features, and confusion values of each face image into a preset loss weight prediction unit to obtain content-style loss weights; and inputting the identity features, style features, and content-style loss weights into a preset decoder adjustment unit to obtain the stylized degraded face dataset.
[0070] Specifically, such as Figure 2 As shown, the adjustable style transfer network trained in this embodiment can generate stylized degraded faces based on high-resolution face content images and real low-quality face style images. Specifically, it includes four main modules: a feature extraction module, an encoder adjustment module, a decoder adjustment module, and a loss weight prediction module. These modules work together to achieve a balance between degraded style and the recognizability of identity features. First, the style image and content image are processed by the feature extraction module to obtain identity features and style features, respectively. Second, the encoder adjustment mechanism generates weight matrices corresponding to the style encoder and content encoder within the encoder adjustment module based on the two features. Then, based on the two weight matrices and the face confusion estimate obtained in step 102, the weights of the content-style loss are dynamically predicted in the loss weight prediction module. Finally, based on the identity features, style features, and loss prediction weights, the input weight of the self-attention is dynamically adjusted in the decoder adjustment mechanism to obtain synthetic features, which are then used to generate the output image via a VGG mirror decoder.
[0071] Specifically, the preset feature extraction module, such as Figure 3As shown, the system consists of an identity feature extraction unit and a style feature extraction unit. The style feature extraction unit uses a pre-trained VGG19 network to extract style features from low-quality face images. Relu3_1, Relu4_1, and Relu5_1 of the VGG network are selected as key layers for feature extraction. The feature maps extracted from these three layers are upsampled to ensure they have similar spatial dimensions. Finally, the three upsampled feature maps are fused to obtain a comprehensive style feature. The identity feature extraction unit uses a pre-trained ResNet50 network to extract identity features from high-resolution face images. Conv2_x, conv3_x, and conv4_x are selected as key layers for feature extraction. The feature maps extracted from these three layers are also upsampled and then fused to obtain a comprehensive identity feature.
[0072] Preset encoder adjustment module such as Figure 4 As shown, the system includes a weight matrix generation unit and a weight matrix fusion unit. Specifically, the weight matrix generation unit processes the input features using four convolutional layers (Conv), two batch normalization layers (BN), and one average pooling layer (AvgPool), then introduces non-linearity through the ReLU activation function. Finally, after a reshape operation, the resulting feature map is reshaped into a weight matrix. The weight matrix fusion unit obtains new weighted encoding information by simply multiplying the weight matrix generated by the weight matrix generation unit with the encoding information generated by the original encoder's strip attention window. Specifically, the weight matrix generation unit generates the corresponding weight matrix based on the input style and identity features. The weight matrix fusion unit includes two processes: first, attention is calculated using horizontal, vertical, and square windows; second, the weight matrix generated by the weight matrix generation unit is simply multiplied with the encoding information generated by the attention window to obtain new weighted encoding information, and then a fusion operation is performed to achieve dynamic adjustment of the encoding information.
[0073] The preset loss weight prediction module is as follows: Figure 5 As shown, it mainly consists of three branches: one for processing style features (vgg_q), one for processing identity features (Arc_id), and one for processing confusion level (H). Each branch contains a series of convolutional layers (Conv), average pooling layers (AvgPool), and fully connected layers (FC), as well as a ReLU activation function, to extract and fuse feature information. Specifically, for style and identity features, they are first processed through one convolutional layer and one average pooling layer for feature extraction and dimensionality reduction, respectively. Then, the feature maps are flattened into one-dimensional vectors using the Flatten operation. Next, these vectors are input into the fully connected layer, where the ReLU activation function introduces non-linearity to further extract high-level features. Finally, the fully connected layer is used to obtain w.style and w id The confusion H is generated into two weight values, w1 and w2, through a simple mapping between a fully connected layer, a ReLU activation function, and another fully connected layer. Finally, the outputs of the two feature branches and the weight values of the confusion branch are fused together by a weighted sum, and the final loss weight λ is obtained through the Softmax function.
[0074] Preset decoder adjustment module such as Figure 6 As shown, a content-style loss weight λ, obtained by introducing a loss prediction unit in addition to the two features, is introduced. These three weights work together to adjust the weighting of content-style encoded information in the decoder's cross-attention, achieving coordinated adjustment of the two features during the transfer stage. The input features Arc_id and vgg_q are processed through a convolutional layer (Conv), a batch normalization layer (BN), and a ReLU activation function for feature extraction and transformation to obtain their respective weights. Next, the loss weight λ is processed through a fully connected layer (FC), a ReLU activation function, and another fully connected layer to generate two weight values w1 and w2. Finally, the above four weights are fused to obtain an intermediate weight w. mid =w1·w id +w2·w style Then, the intermediate weights undergo a series of convolutional layers, batch normalization layers, and ReLU activation functions for feature extraction and transformation, ultimately generating two weights W. q and W k Finally, the two generated weights are weighted and summed with the query feature q and the key feature k, respectively, to obtain new Q and K.
[0075] In actual implementation, the training process of the adjustable style transfer network model is as follows:
[0076] Step 2.1: Adjustable style transfer network receives high-resolution face content image I c Realistic low-quality face style image I s As input.
[0077] Step 2.2: I. The high-resolution face content image obtained in the previous step c Input the content feature extraction unit to obtain the identity feature Arc_id. Low-quality face style map I s Input the style feature extraction unit to obtain the style feature Vgg_q.
[0078] Step 2.3: Combine the identity feature Arc_id obtained in the previous step with the high-resolution face image I c The content encoding feature f is obtained by inputting it into the identity encoder. c The style feature Vgg_q obtained in step 3.2 and the low-quality face image I are then compared. sThe input is fed into the style encoder to obtain the style-coded features f. s .
[0079] Step 2.4: Based on the identity feature Arc_id and style feature Vgg_q obtained in Step 2.2 and the face confusion estimate H obtained in Step 101, dynamically predict the weight λ of the content-style loss in the loss weight prediction unit.
[0080] Step 2.5: The decoder adjustment mechanism uses the identity feature Arc_id, style feature vgg_q, and content-style loss weight λ obtained in Step 2.2 to jointly adjust the weight of content-style information in the decoder's cross-attention, and outputs the synthesized feature f. cs .
[0081] Step 2.6: Combine the synthesized features f obtained in Step 2.6 cs The input is fed into the Vgg image decoder to generate the output image I. out .
[0082] Optionally, in some embodiments, after training the initial adjustable style transfer network model using a high-definition face content map dataset and a low-quality face style map dataset to obtain the trained adjustable style transfer network model, the method includes: determining whether the overall loss function has reached a preset convergence condition; if the overall loss function has reached the preset convergence condition, updating the network parameters of the adjustable style transfer network model according to the overall loss function.
[0083] Specifically, in this embodiment, the adjustable style transfer network is trained using a high-resolution face content map dataset and a real low-quality face style map dataset. The sum of various loss functions is calculated, and backpropagation is used to update the parameters of the diverse style transfer network until the sum of the loss functions converges. During training, the network updates the overall network parameters according to the loss function, which is expressed as:
[0084]
[0085] in, Indicates identity as a means of combating loss. Indicating style loss, λ represents the consistency loss of dynamic weight prediction, which is generated by the loss weight prediction module during network training, and w = 1.
[0086] In step S103, the content map dataset of high-definition faces and the style map dataset of low-quality faces are input into the trained adjustable style transfer network model to obtain the stylized degraded face dataset.
[0087] Specifically, in this embodiment of the application, a trained adjustable style transfer network model is used to convert high-quality face images into degraded styles to obtain a stylized degraded face dataset.
[0088] In step S104, a query database is constructed using a stylized degraded face dataset to obtain the face image to be recognized, and the face recognition sequence is obtained by querying the face image to be recognized through the query database.
[0089] Specifically, in this embodiment of the application, a trained network model is used to input low-quality query faces and high-quality query faces into the network to generate new synthetic faces and construct a query database. Then, the query faces and synthetic faces are used for face recognition matching, thereby significantly improving the recognition rate.
[0090] In summary, this application's embodiments treat the degradation process of low-quality faces as a special style, and use style transfer technology to transfer this degradation style to high-quality query faces, generating stylized images that are closer to the degradation effect of real low-quality faces, effectively reducing modal differences and improving the recognition effect of face recognition models on real low-quality face images.
[0091] The low-quality face recognition method based on adjustable style transfer proposed in this application involves acquiring a high-resolution face content map dataset and a low-quality face style map dataset, training an initial adjustable style transfer network model to obtain a trained adjustable style transfer network model, and inputting the high-resolution face content map dataset and the low-quality face style map dataset into the trained adjustable style transfer network model to obtain a stylized degraded face dataset. A query database is constructed using the stylized degraded face dataset to obtain the face image to be recognized, and the face recognition sequence is obtained by querying the face image to be recognized through the query database. This solves the problem that related technologies struggle to simulate complex degradation processes, leading to poor recognition results, and generates stylized images that more closely resemble the degradation effect of real low-quality faces, thereby improving the recognition performance of face recognition models on real low-quality face images.
[0092] Next, referring to the accompanying drawings, a low-quality face recognition device based on adjustable style transfer, according to an embodiment of this application, is described.
[0093] Figure 7 This is a block diagram of a low-quality face recognition device based on adjustable style transfer, according to an embodiment of this application.
[0094] like Figure 7 As shown, the low-quality face recognition device 10 based on adjustable style transfer includes: an acquisition module 100, a training module 200, an input module 300, and a recognition module 400.
[0095] The acquisition module 100 is used to acquire a high-definition face content graph dataset and a low-quality face style graph dataset.
[0096] Training module 200 is used to train the initial adjustable style transfer network model using a high-definition face content map dataset and a low-quality face style map dataset to obtain the trained adjustable style transfer network model.
[0097] Input module 300 is used to input the high-definition face content map dataset and the low-quality face style map dataset into the trained adjustable style transfer network model to obtain the stylized degraded face dataset.
[0098] The recognition module 400 is used to construct a query database using a stylized degraded face dataset, obtain the face image to be recognized, and obtain the face recognition sequence by querying the face image to be recognized through the query database.
[0099] Optionally, in some embodiments, after acquiring the content graph dataset of high-definition faces and the style graph dataset of low-quality faces, the acquisition module 100 includes a preprocessing unit.
[0100] The preprocessing unit is used to preprocess the content graph dataset of high-definition faces and the style graph dataset of low-quality faces, and to calculate the confusion value of each face image.
[0101] Optionally, in some embodiments, the input module includes: an extraction unit, an encoding unit, a loss weight prediction unit, and a decoding unit.
[0102] The extraction unit is used to extract the identity features corresponding to each face image from the content map of each high-definition face using a preset feature extraction unit, and to extract the style features corresponding to each face image from the style map of each low-quality face.
[0103] The encoding unit is used to input the identity features and style features corresponding to each face image into the preset encoder unit to obtain the content encoding features and style encoding features corresponding to each face image.
[0104] The loss weight prediction unit is used to input the identity features, style features, and confusion values of each face image into the preset loss weight prediction unit to obtain the content-style loss weight.
[0105] The decoding unit is used to input the identity features, style features, and content-style loss weights corresponding to each face image into the preset decoder adjustment unit to obtain the stylized degraded face dataset.
[0106] Optionally, in some embodiments, after training the initial adjustable style transfer network model using a high-resolution face content map dataset and a low-quality face style map dataset to obtain a trained adjustable style transfer network model, the training module includes:
[0107] The judgment unit is used to determine whether the overall loss function has reached the preset convergence condition.
[0108] The update unit is used to update the network parameters of the adjustable style transfer network model according to the overall loss function when the overall loss function reaches the preset convergence condition.
[0109] Optionally, in some embodiments, the overall loss function is:
[0110]
[0111] in, Indicates identity as a means of combating loss. Indicating style loss, This represents the consistency loss predicted by dynamic weights, where λ is the weight of the style loss and w is the weight of the constraint loss.
[0112] It should be noted that the foregoing explanation of the embodiment of the low-quality face recognition method based on adjustable style transfer also applies to the low-quality face recognition device based on adjustable style transfer in this embodiment, and will not be repeated here.
[0113] The low-quality face recognition device based on adjustable style transfer proposed in this application obtains a high-definition face content map dataset and a low-quality face style map dataset, trains an initial adjustable style transfer network model to obtain a trained adjustable style transfer network model, and inputs the high-definition face content map dataset and the low-quality face style map dataset into the trained adjustable style transfer network model to obtain a stylized degraded face dataset. A query database is constructed using the stylized degraded face dataset to obtain the face image to be recognized, and the face recognition sequence is obtained by querying the face image to be recognized through the query database. This solves the problem that related technologies struggle to simulate complex degradation processes, leading to poor recognition results, and generates stylized images that more closely resemble the degradation effect of real low-quality faces, thereby improving the recognition performance of the low-quality face recognition model based on adjustable style transfer on real low-quality face images.
[0114] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:
[0115] The memory 801, the processor 802, and the computer program stored on the memory 801 and capable of running on the processor 802.
[0116] When the processor 802 executes the program, it implements the low-quality face recognition method based on adjustable style transfer provided in the above embodiments.
[0117] Furthermore, electronic devices also include:
[0118] Communication interface 803 is used for communication between memory 801 and processor 802.
[0119] The memory 801 is used to store computer programs that can run on the processor 802.
[0120] The memory 801 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0121] If the memory 801, processor 802, and communication interface 803 are implemented independently, then the communication interface 803, memory 801, and processor 802 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0122] Optionally, in a specific implementation, if the memory 801, processor 802, and communication interface 803 are integrated on a single chip, then the memory 801, processor 802, and communication interface 803 can communicate with each other through an internal interface.
[0123] The processor 802 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0124] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described low-quality face recognition method based on adjustable style transfer.
[0125] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0126] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0127] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0128] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0129] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0130] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A low-quality face recognition method based on adjustable style transfer, characterized in that, Includes the following steps: Obtain a high-resolution content graph dataset of faces and a low-quality style graph dataset of faces; The initial adjustable style transfer network model is trained using the content map dataset of the high-definition face and the style map dataset of the low-quality face to obtain the trained adjustable style transfer network model. The content map dataset of the high-definition faces and the style map dataset of the low-quality faces are input into the trained adjustable style transfer network model to obtain the stylized degraded face dataset. A query database is constructed using the stylized and degraded face dataset to obtain face images to be recognized. The face recognition sequence is obtained by querying the face images to be recognized through the query database.
2. The method according to claim 1, characterized in that, After obtaining the content map dataset of high-resolution faces and the style map dataset of low-quality faces, the following steps are taken: The content map dataset of high-definition faces and the style map dataset of low-quality faces are preprocessed, and the confusion value of each face image is calculated.
3. The method according to claim 2, characterized in that, The step of inputting the content map dataset of the high-definition faces and the style map dataset of the low-quality faces into the trained adjustable style transfer network model to obtain the stylized degraded face dataset includes: The system uses a preset feature extraction unit to extract the identity features corresponding to each face image from the content map of each high-definition face, and extracts the style features corresponding to each face image from the style map of each low-quality face. The identity features and style features corresponding to each face image are input into a preset encoder unit to obtain the content encoding features and style encoding features corresponding to each face image. The identity features corresponding to each face image, the style features corresponding to each face image, and the confusion value of each face image are input into a preset loss weight prediction unit to obtain the content-style loss weight; The identity features corresponding to each face image, the style features corresponding to each face image, and the content-style loss weights are input into a preset decoder adjustment unit to obtain the stylized degraded face dataset.
4. The method according to claim 1, characterized in that, After training the initial adjustable style transfer network model using the high-resolution face content map dataset and the low-quality face style map dataset to obtain the trained adjustable style transfer network model, the process includes: Determine whether the overall loss function has met the preset convergence condition; If the overall loss function reaches the preset convergence condition, the network parameters of the adjustable style transfer network model are updated according to the overall loss function.
5. The method according to claim 4, characterized in that, The overall loss function is: in, Indicates identity as a means of combating loss. Indicating style loss, This represents the consistency loss predicted by dynamic weights, where λ is the weight of the style loss and w is the weight of the constraint loss.
6. A low-quality face recognition device based on adjustable style transfer, characterized in that, include: The acquisition module is used to acquire content graph datasets of high-resolution faces and style graph datasets of low-quality faces; The training module is used to train the initial adjustable style transfer network model using the content map dataset of the high-definition face and the style map dataset of the low-quality face to obtain the trained adjustable style transfer network model. The input module is used to input the content map dataset of the high-definition face and the style map dataset of the low-quality face into the trained adjustable style transfer network model to obtain the stylized degraded face dataset. The recognition module is used to construct a query database using the stylized degraded face dataset, obtain the face image to be recognized, and obtain the face recognition sequence by querying the face image to be recognized through the query database.
7. The apparatus according to claim 6, characterized in that, After acquiring the content map dataset of high-resolution faces and the style map dataset of low-quality faces, the acquisition module includes: The preprocessing unit is used to preprocess the content map dataset of high-definition faces and the style map dataset of low-quality faces, and to calculate the confusion value of each face image.
8. The apparatus according to claim 7, characterized in that, The input module includes: The extraction unit is used to extract the identity features corresponding to each face image from the content map of each high-definition face using a preset feature extraction unit, and to extract the style features corresponding to each face image from the style map of each low-quality face. The encoding unit is used to input the identity features and style features corresponding to each face image into a preset encoder unit to obtain the content encoding features and style encoding features corresponding to each face image. The loss weight prediction unit is used to input the identity features corresponding to each face image, the style features corresponding to each face image, and the confusion value of each face image into the preset loss weight prediction unit to obtain the content-style loss weight; The decoding unit is used to input the identity features corresponding to each face image, the style features corresponding to each face image, and the content-style loss weights into a preset decoder adjustment unit to obtain the stylized degraded face dataset.
9. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the low-quality face recognition method based on adjustable style transfer as described in any one of claims 1-5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the low-quality face recognition method based on adjustable style transfer as described in any one of claims 1-5.