Face recognition method, device and electronic equipment
Through the combination of cross-resolution dual-stream training network and facial resolution network, high and low resolution image features are extracted, which solves the problem of low recognition performance of the general face recognition model in low resolution face image recognition, improves the recognition success rate, and is suitable for actual Non-cooperated monitoring scenarios in the application.
Patent Information
- Application Number
- CN202010653082.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-07-08
AI Technical Summary
The existing universal face recognition model has a lower performance when recognizing low-resolution face images, resulting in a low recognition success rate. Especially in non-cooperated monitoring scenarios, face images taken at a distance are smaller in size and low resolution. In the presence of motion blur and excessive angle, the recognition performance is severely degraded.
Using a low-resolution recognition model based on a cross-resolution dual-stream training network, high-resolution image features are extracted through high-resolution recognition model branches and low-resolution recognition model branches extract low-resolution image features, and through preset faces The analytical network performs facial component analysis and feature extraction, and generates a trained low-resolution recognition model to improve recognition performance.
It improves the recognition success rate of low-resolution face images, can effectively perform face recognition under low resolution and adverse conditions, and improves recognition performance in practical applications.
Smart Images

Figure CN113936308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and in particular to a face recognition method, device and electronic equipment. Background Art
[0002] The research on face recognition system began in the 1960s. After the 1980s, it was improved with the development of computer technology and optical imaging technology. It really entered the primary application stage in the late 1990s, and was mainly realized by technology from the United States, Germany and Japan. The key to the success of face recognition system lies in whether it has cutting-edge core algorithms and whether the recognition results have practical recognition rate and speed. "Face recognition system" integrates artificial intelligence, machine recognition, machine learning, model theory, expert system, video image processing and other professional technologies, and needs to be combined with the theory and implementation of intermediate value processing. It is the latest application of biometric recognition. The realization of its core technology shows the transformation from weak artificial intelligence to strong artificial intelligence.
[0003] The general face recognition algorithm based on deep learning has developed very rapidly in recent years, so much so that the community has gradually regarded the general face recognition task as a solved problem. The general face recognition we often see is often trained and tested on public data sets, which are often high-definition celebrity face photos crawled from the Internet using crawlers. The quality of these pictures is often very good, and the results of face recognition algorithms trained and tested on this data are also quite good. In application scenarios such as mobile phone unlocking and access control check-in, general face recognition models often perform well.
[0004] However, in actual application scenarios, it is difficult for cameras to capture high-resolution, high-quality facial images for face recognition tasks. In non-cooperative surveillance scenarios, facial images taken at a long distance often have problems such as small size and low resolution, as well as motion blur and large angles. In this case, the performance of existing general face recognition models for such low-resolution facial images will be severely degraded, resulting in a low recognition success rate. Summary of the invention
[0005] The embodiments of the present invention provide a face recognition method, device and electronic device to solve the problem that the existing general face recognition model has poor recognition performance for low-resolution face images and leads to low recognition success rate.
[0006] In a first aspect, an embodiment of the present invention provides a face recognition method, comprising:
[0007] Inputting a face image to be recognized and a facial component analysis graph of the face image to be recognized into a trained low-resolution recognition model, and outputting features of the face image to be recognized;
[0008] Face recognition is performed according to the features of the face image to be recognized.
[0009] Optionally, the trained low-resolution recognition model is based on high-resolution sample images and is trained using a preset cross-resolution dual-stream training network; the cross-resolution dual-stream training network includes a high-resolution recognition model branch and a low-resolution recognition model branch; the high-resolution recognition model branch is used to extract high-resolution image features, and the low-resolution recognition model branch is used to extract low-resolution image features; the high-resolution sample images are images in a preset training set whose resolution is higher than a first preset threshold.
[0010] Optionally, before inputting the to-be-recognized face image and the facial component analysis graph of the to-be-recognized face image into the trained low-resolution recognition model, the method further includes:
[0011] The face image to be identified is analyzed using a preset facial analysis network to obtain a facial component analysis graph of the face image to be identified.
[0012] Optionally, the specific steps of obtaining the trained low-resolution recognition model are as follows:
[0013] Extracting features of the high-resolution sample image through the high-resolution recognition model branch, performing downsampling processing on the high-resolution sample image to obtain a low-resolution sample image, and extracting features of the low-resolution sample image through the low-resolution recognition model branch; the low-resolution sample image is an image with a resolution lower than a second preset threshold;
[0014] Based on the features of the high-resolution sample image and the features of the low-resolution sample image, model parameters in the low-resolution recognition model branch are generated to obtain the trained low-resolution recognition model.
[0015] Optionally, the generating model parameters in the low-resolution recognition model branch based on the features of the high-resolution sample image and the features of the low-resolution sample image specifically includes:
[0016] Acquire a similarity distance measure between the features of the high-resolution sample image and the features of the low-resolution sample image according to the features of the high-resolution sample image and the features of the low-resolution sample image;
[0017] Determining a feature loss between a feature of the high-resolution sample image and a feature of the low-resolution sample image based on the similarity distance metric;
[0018] Gradient feedback is performed based on the feature loss to determine the model parameters in the low-resolution recognition model branch.
[0019] Optionally, extracting the feature of the low-resolution sample image through the low-resolution recognition model branch specifically includes:
[0020] Analyzing the low-resolution sample image using a preset facial analysis network to obtain a facial component analysis graph of the low-resolution sample image;
[0021] Downsampling the facial component analysis image of the low-resolution sample image;
[0022] Based on the facial parts analysis map of the low-resolution sample image after downsampling processing and the low-resolution sample image, the features of the low-resolution sample image are acquired.
[0023] Optionally, obtaining a facial component analysis diagram of the low-resolution sample image specifically includes:
[0024] Obtaining L1 loss and structural similarity loss of the low-resolution sample image;
[0025] Assign preset weight values corresponding to the L1 loss and the structural similarity loss, calculate a weighted sum of the L1 loss and the structural similarity loss, and obtain a facial component analysis map of the low-resolution sample image according to the weighted sum and the cross entropy loss of the low-resolution sample image.
[0026] Optionally, performing face recognition according to the features of the face image to be recognized specifically includes:
[0027] The features of the face image to be identified are compared with the features of a preset face. When the similarity between the features of the face image to be identified and the features of the preset face exceeds a third preset threshold, it is determined that the face image to be identified is successfully identified.
[0028] In a second aspect, an embodiment of the present invention provides a face recognition device, comprising:
[0029] A feature acquisition module, used for inputting a face image to be identified and a facial component analysis diagram of the face image to be identified into a trained low-resolution recognition model, and outputting features of the face image to be identified;
[0030] The recognition module is used to perform face recognition based on the features of the face image to be recognized.
[0031] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the face recognition method as described in any one of the first aspects are implemented.
[0032] The face recognition method, device and electronic device provided by the embodiments of the present invention improve the recognition success rate of low-resolution face images by inputting the facial component analysis map of the face image to be recognized as face prior information into a trained low-resolution recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of a face recognition method according to an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of the structure of a face recognition device provided by an embodiment of the present invention;
[0036] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0037] Figure 4 A recognition architecture diagram of a face recognition method provided by an embodiment of the present invention;
[0038] Figure 5 The overall architecture diagram of the trained low-resolution recognition model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] like Figure 1 As shown, the face recognition method provided by the embodiment of the present invention includes:
[0041] Inputting a face image to be recognized and a facial component analysis graph of the face image to be recognized into a trained low-resolution recognition model, and outputting features of the face image to be recognized;
[0042] Face recognition is performed according to the features of the face image to be recognized.
[0043] Specifically, the face image to be identified refers to the face image to be identified, usually the face image collected by an image sensor. The facial component analysis map of the face image to be identified is obtained by inputting the face image to be identified into a preset facial analysis network for processing, and the preset facial analysis network includes a loss function for low-resolution face analysis. The trained low-resolution recognition model is based on the high-resolution sample image and is trained using a preset cross-resolution dual-stream training network, including a high-resolution recognition model branch and a low-resolution recognition model branch; wherein the high-resolution recognition model branch is used to extract high-resolution image features, and the low-resolution recognition model branch is used to extract low-resolution image features; the high-resolution sample image is an image in a preset training set whose resolution is higher than a first preset threshold. Figure 4 As shown, the face image to be identified and the facial component analysis map of the face image to be identified are input into the trained low-resolution recognition model, and the features of the face image to be identified are output. The features of the face image to be identified are used to compare with the features of the preset faces in the background database to realize the determination of the face image to be identified.
[0044] Furthermore, the method for determining the facial image to be identified is to compare the features of the facial image to be identified with the features of a preset face in the background database. When the similarity between the features of the facial image to be identified and the features of the preset face exceeds a preset threshold, it is determined that the facial image to be identified is successfully identified.
[0045] As an embodiment of the present invention, the trained low-resolution recognition model is based on a high-resolution sample image and is trained using a preset cross-resolution dual-stream training network; the cross-resolution dual-stream training network includes a high-resolution recognition model branch and a low-resolution recognition model branch; the high-resolution recognition model branch is used to extract high-resolution image features, and the low-resolution recognition model branch is used to extract low-resolution image features; the high-resolution sample image is an image in a preset training set whose resolution is higher than a first preset threshold.
[0046] Specifically, the trained low-resolution recognition model includes a high-resolution recognition model branch and a low-resolution recognition model branch, and the trained low-resolution recognition model is a twin network. The twin network has two branches, namely the high-resolution recognition model branch and the low-resolution recognition model branch, and the network parameters in the high-resolution recognition model branch and the low-resolution recognition model branch are not shared but the structure is exactly the same. The high-resolution recognition model branch is used to extract high-resolution image features, and the high-resolution recognition model branch is pre-trained on a preset large-scale high-resolution sample image and keeps the parameters fixed. The low-resolution recognition model branch is used to extract low-resolution image features, and the low-resolution recognition model branch undergoes the same pre-training as the high-resolution recognition model branch, but the model parameters in the low-resolution recognition model branch can be updated.
[0047] As an embodiment of the present invention, before inputting the face image to be recognized and the facial component analysis graph of the face image to be recognized into the trained low-resolution recognition model, the method further includes:
[0048] The face image to be identified is analyzed using a preset facial analysis network to obtain a facial component analysis graph of the face image to be identified.
[0049] Specifically, the preset facial parsing network is a semantic segmentation network. For example, we use BiSeNet as the backbone network of our facial parsing network. BiSeNet is a semantic segmentation network. We extend it to the task of facial parsing and make the following improvements. 1. Change the skeleton network of Context Path from ResNet to the face recognition feature extraction network, and the corresponding feature map downsampling scale is changed. 2. Change the interpolation upsampling method to the parameter-learnable Pixel Shuffle upsampling method. The preset facial parsing network includes a loss function for low-resolution face parsing. We obtain the facial component parsing map of the face image to be recognized through the loss function of low-resolution face parsing.
[0050] The loss function for low-resolution face parsing is:
[0051]
[0052] Among them, L FP is the facial component analysis diagram of the face image to be recognized, L PWCE is the pixel-level cross entropy classification loss, L L1 is the L1 loss function commonly used in super-resolution tasks, L SSIM is the structural similarity loss function, λ1 and λ2 are weighted coefficients. fp is the analytical graph output by the analytical model, I gt Pixel-level annotation.
[0053] As an embodiment of the present invention, the specific steps of obtaining the trained low-resolution recognition model are as follows:
[0054] Extracting features of the high-resolution sample image through the high-resolution recognition model branch, performing downsampling processing on the high-resolution sample image to obtain a low-resolution sample image, and extracting features of the low-resolution sample image through the low-resolution recognition model branch; the low-resolution sample image is an image with a resolution lower than a second preset threshold;
[0055] Based on the features of the high-resolution sample image and the features of the low-resolution sample image, model parameters in the low-resolution recognition model branch are generated to obtain the trained low-resolution recognition model.
[0056] Specifically, the low-resolution sample image is obtained by downsampling the high-resolution sample image, and the high-resolution recognition model branch is used to extract high-resolution image features. The high-resolution recognition model branch is pre-trained on a preset large-scale high-resolution sample image and keeps the parameters fixed. The low-resolution recognition model branch is used to extract low-resolution image features. The low-resolution recognition model branch undergoes the same pre-training as the high-resolution recognition model branch, but the model parameters in the low-resolution recognition model branch can be updated. The low-resolution sample image is an image with a resolution lower than a second preset threshold; we can obtain the trained low-resolution recognition model by obtaining the model parameters in the low-resolution recognition branch.
[0057] As an embodiment of the present invention, generating model parameters in a low-resolution recognition model branch based on the features of the high-resolution sample image and the features of the low-resolution sample image specifically includes:
[0058] Acquire a similarity distance measure between the features of the high-resolution sample image and the features of the low-resolution sample image according to the features of the high-resolution sample image and the features of the low-resolution sample image;
[0059] Determining a feature loss between a feature of the high-resolution sample image and a feature of the low-resolution sample image based on the similarity distance metric;
[0060] Gradient feedback is performed based on the feature loss to determine the model parameters in the low-resolution recognition model branch.
[0061] Specifically, Figure 5As shown, we perform similarity distance measurement on the features of the high-resolution sample image and the features of the low-resolution sample image to obtain the similarity distance measurement between the features of the high-resolution sample image and the features of the low-resolution sample image, so that the features of the high-resolution sample image and the features of the low-resolution sample image are sufficiently close in value, that is, they meet the following requirements:
[0062]
[0063] Where D[, *] represents the similarity distance measure between two features, m is the preset parameter value, and N is the scale of the sample image, including the features of the high-resolution sample image and the low-resolution sample image;
[0064] represents the features of the i-th high-resolution sample image, Represents the features of the i-th low-resolution sample image.
[0065] Furthermore, based on the similarity distance metric, we can determine the feature loss between the features of the high-resolution sample image and the features of the low-resolution sample image. The formula for obtaining the feature loss is:
[0066]
[0067] Among them, L FH is the feature loss, is the feature of the i-th high-resolution sample image, is the feature of the i-th low-resolution sample image, and m is the preset parameter value.
[0068] Finally, the feature loss is processed by gradient backpropagation to update the model parameters in the low-resolution recognition model branch, and the model parameters in the low-resolution recognition model branch are determined.
[0069] As an embodiment of the present invention, extracting the features of the low-resolution sample image through the low-resolution recognition model branch specifically includes:
[0070] Analyzing the low-resolution sample image using a preset facial analysis network to obtain a facial component analysis graph of the low-resolution sample image;
[0071] Downsampling the facial component analysis image of the low-resolution sample image;
[0072] Based on the facial parts analysis map of the low-resolution sample image after downsampling processing and the low-resolution sample image, the features of the low-resolution sample image are acquired.
[0073] Specifically, the specific steps of obtaining the features of the low-resolution sample image include:
[0074] Downsampling the facial component analysis image of the low-resolution sample image to a first preset scale, and fusing the first preset scale with the recognition feature of the low-resolution sample image to obtain a first fused feature;
[0075] Downsampling the facial component analysis image of the low-resolution sample image to a second preset scale, and performing feature fusion of the second preset scale and the first fusion feature to obtain a second fusion feature;
[0076] Downsampling the facial component analysis image of the low-resolution sample image to a third preset scale, and performing feature fusion of the third preset scale and the second fusion feature to obtain a third fusion feature;
[0077] The facial component analysis image of the low-resolution sample image is downsampled to a fourth preset scale, and the fourth preset scale is fused with the third fusion feature to obtain the feature of the low-resolution sample image.
[0078] As an embodiment of the present invention, obtaining the facial component analysis diagram of the low-resolution sample image specifically includes:
[0079] Obtaining L1 loss and structural similarity loss of the low-resolution sample image;
[0080] Assign preset weight values corresponding to the L1 loss and the structural similarity loss, calculate a weighted sum of the L1 loss and the structural similarity loss, and obtain a facial component analysis map of the low-resolution sample image according to the weighted sum and the cross entropy loss of the low-resolution sample image.
[0081] Specifically, we obtain the facial component analysis map of the face image to be recognized through the loss function of low-resolution face parsing.
[0082] The loss function for low-resolution face parsing is:
[0083]
[0084] Among them, L FP is the facial component analysis diagram of the face image to be recognized, L PWCE is the pixel-level cross entropy classification loss, L L1 is the L1 loss function commonly used in super-resolution tasks, L SSIM is the structural similarity loss function, λ1 and λ2 are weighted coefficients. fp is the analytical graph output by the analytical model, I gt Pixel-level annotation.
[0085] We transform the image similarity loss function L in the super-resolution task into SSIMAdded to the preset face parsing network, it optimizes the parsing of facial parts for face images to be recognized.
[0086] As an embodiment of the present invention, performing face recognition according to the features of the face image to be recognized specifically includes:
[0087] The features of the face image to be identified are compared with the features of a preset face. When the similarity between the features of the face image to be identified and the features of the preset face exceeds a third preset threshold, it is determined that the face image to be identified is successfully identified.
[0088] Specifically, the features of the face image to be identified are compared with the features of the preset face, and the specific comparison algorithm can be preset as needed. The features of the preset face are the features of the face preset as the comparison features, which are usually collected and stored in the background database. When the features of the face image to be identified and the features of the preset face are compared and the similarity exceeds the third preset threshold, it is determined that the face image to be identified is successfully identified.
[0089] like Figure 2 As shown, the face recognition device provided by the embodiment of the present invention includes:
[0090] A feature acquisition module, used for inputting a face image to be identified and a facial component analysis diagram of the face image to be identified into a trained low-resolution recognition model, and outputting features of the face image to be identified;
[0091] The recognition module is used to perform face recognition based on the features of the face image to be recognized.
[0092] Specifically, the face image to be identified refers to the face image to be identified, which is usually a face image collected by an image sensor. The facial component analysis map of the face image to be identified is obtained by inputting the face image to be identified into a preset facial analysis network for processing, and the preset facial analysis network includes a loss function for low-resolution face analysis. The trained low-resolution recognition model is based on the high-resolution sample image and is trained using a preset cross-resolution dual-stream training network, including a high-resolution recognition model branch and a low-resolution recognition model branch; wherein the high-resolution recognition model branch is used to extract high-resolution image features, and the low-resolution recognition model branch is used to extract low-resolution image features; the high-resolution sample image is an image in a preset training set with a resolution higher than a first preset threshold. The feature acquisition module is used to input the face image to be identified and the facial component analysis map of the face image to be identified into the trained low-resolution recognition model, and output the features of the face image to be identified.
[0093] The recognition module is used to compare the features of the face image to be recognized with the features of the preset face in the background database to realize the determination of the face image to be recognized. The determination method of the face image to be recognized is to compare the features of the face image to be recognized with the features of the preset face in the background database. When the similarity between the features of the face image to be recognized and the features of the preset face exceeds a preset threshold, it is determined that the recognition of the face image to be recognized is successful.
[0094] like Figure 3 As shown, an electronic device provided by an embodiment of the present invention may include: a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302 and the memory 303 communicate with each other through the communication bus 304. The processor 301 may call the logic instructions in the memory 303 to execute the following method: input the face image to be identified and the face component analysis diagram of the face image to be identified into a trained low-resolution recognition model, output the features of the face image to be identified; perform face recognition according to the features of the face image to be identified.
[0095] In addition, the logic instructions in the above-mentioned memory 303 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0096] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A face recognition method, characterized in that: include: Inputting a face image to be recognized and a facial component analysis graph of the face image to be recognized into a trained low-resolution recognition model, and outputting features of the face image to be recognized; Performing face recognition according to the features of the face image to be recognized; The trained low-resolution recognition model is based on the high-resolution sample image and is trained using a preset cross-resolution dual-stream training network; the cross-resolution dual-stream training network includes a high-resolution recognition model branch and a low-resolution recognition model branch; the high-resolution recognition model branch is used to extract high-resolution image features, and the low-resolution recognition model branch is used to extract low-resolution image features; the high-resolution sample image is an image in a preset training set whose resolution is higher than a first preset threshold; The specific steps of obtaining the trained low-resolution recognition model are as follows: Extracting features of the high-resolution sample image through the high-resolution recognition model branch, performing downsampling processing on the high-resolution sample image to obtain a low-resolution sample image, and extracting features of the low-resolution sample image through the low-resolution recognition model branch; the low-resolution sample image is an image with a resolution lower than a second preset threshold; Based on the features of the high-resolution sample image and the features of the low-resolution sample image, generating model parameters in the low-resolution recognition model branch to obtain the trained low-resolution recognition model; The generating of the model parameters in the low-resolution recognition model branch based on the features of the high-resolution sample image and the features of the low-resolution sample image specifically includes: Acquire a similarity distance measure between the features of the high-resolution sample image and the features of the low-resolution sample image according to the features of the high-resolution sample image and the features of the low-resolution sample image; Determining a feature loss between a feature of the high-resolution sample image and a feature of the low-resolution sample image based on the similarity distance metric; Gradient feedback is performed based on the feature loss to determine the model parameters in the low-resolution recognition model branch.
2. The face recognition method according to claim 1, characterized in that: Before inputting the face image to be recognized and the facial component analysis graph of the face image to be recognized into the trained low-resolution recognition model, the method further includes: The face image to be identified is analyzed using a preset facial analysis network to obtain a facial component analysis graph of the face image to be identified.
3. The face recognition method according to claim 1, characterized in that: The extracting the features of the low-resolution sample image through the low-resolution recognition model branch specifically includes: Analyzing the low-resolution sample image using a preset facial analysis network to obtain a facial component analysis graph of the low-resolution sample image; Performing downsampling processing on the facial component analysis image of the low-resolution sample image; Based on the facial parts analysis map of the low-resolution sample image after downsampling processing and the low-resolution sample image, the features of the low-resolution sample image are acquired.
4. The face recognition method according to claim 3, characterized in that: The step of obtaining a facial component analysis diagram of the low-resolution sample image specifically includes: Obtaining L1 loss and structural similarity loss of the low-resolution sample image; Assign preset weight values corresponding to the L1 loss and the structural similarity loss, calculate a weighted sum of the L1 loss and the structural similarity loss, and obtain a facial component analysis map of the low-resolution sample image according to the weighted sum and the cross entropy loss of the low-resolution sample image.
5. The face recognition method according to claim 1, characterized in that: The performing face recognition according to the features of the face image to be recognized specifically includes: The features of the face image to be identified are compared with the features of a preset face. When the similarity between the features of the face image to be identified and the features of the preset face exceeds a third preset threshold, it is determined that the face image to be identified is successfully identified.
6. A face recognition device, characterized in that: include: A feature acquisition module, used for inputting a face image to be identified and a facial component analysis diagram of the face image to be identified into a trained low-resolution recognition model, and outputting features of the face image to be identified; A recognition module, used for performing face recognition according to the features of the face image to be recognized; The trained low-resolution recognition model is based on the high-resolution sample image and is trained using a preset cross-resolution dual-stream training network; the cross-resolution dual-stream training network includes a high-resolution recognition model branch and a low-resolution recognition model branch; the high-resolution recognition model branch is used to extract high-resolution image features, and the low-resolution recognition model branch is used to extract low-resolution image features; the high-resolution sample image is an image in a preset training set whose resolution is higher than a first preset threshold; The specific steps of obtaining the trained low-resolution recognition model are as follows: Extracting features of the high-resolution sample image through the high-resolution recognition model branch, performing downsampling processing on the high-resolution sample image to obtain a low-resolution sample image, and extracting features of the low-resolution sample image through the low-resolution recognition model branch; the low-resolution sample image is an image with a resolution lower than a second preset threshold; Based on the features of the high-resolution sample image and the features of the low-resolution sample image, generating model parameters in the low-resolution recognition model branch to obtain the trained low-resolution recognition model; The generating of the model parameters in the low-resolution recognition model branch based on the features of the high-resolution sample image and the features of the low-resolution sample image specifically includes: Acquire a similarity distance measure between the features of the high-resolution sample image and the features of the low-resolution sample image according to the features of the high-resolution sample image and the features of the low-resolution sample image; Determining a feature loss between a feature of the high-resolution sample image and a feature of the low-resolution sample image based on the similarity distance metric; Gradient feedback is performed based on the feature loss to determine the model parameters in the low-resolution recognition model branch.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the face recognition method according to any one of claims 1 to 5 are implemented.
