Face image verification method and device, storage medium and computer equipment
By generating and comparing the historical face templates obtained by the QR code and the templates of current face images, the problems of slow verification speed and high misrecognition rate in large-scale face databases are solved, and fast and accurate face verification is achieved.
Patent Information
- Application Number
- CN202510612613.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the face verification method has problems such as slow verification speed, high misrecognition rate and large demand for storage and computing resources, especially in large-scale face databases.
By obtaining the QR code displayed by the target user, obtaining the historical face template and the collected current face image, generating the current face template and the historical face template for feature comparison, and converting it into 1:1 face recognition comparison, and using deep convolutional neural network and encryption technology to protect data security.
It effectively shortens the verification time from several seconds to milliseconds, improves verification efficiency and accuracy, reduces the demand for computing resources, and meets the rapid verification needs in high-traffic scenarios.
Smart Images

Figure CN120449143A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of face recognition technology, and in particular to a face image verification method, device, storage medium and computer equipment. Background Art
[0002] Currently, facial verification technology is widely used in numerous fields, including security monitoring, access control systems, attendance management, and financial transaction authentication. In these scenarios, it is often necessary to perform a 1:N search and feature point comparison between the face to be verified and a template pre-stored in a facial database. When the facial database is extremely large, traditional verification methods expose numerous drawbacks, as follows:
[0003] 1. Slow verification speed: Searching for matching face templates in a huge face database requires a lot of time for feature comparison and calculation;
[0004] 2. High misidentification rate: Due to the increasing diversity and complexity of the face database, faces with similar features are easily misidentified;
[0005] 3. Large demand for storage and computing resources: Storing a very large facial database requires a large amount of storage space, and frequent comparison calculations place extremely high demands on the computing power of the front-end equipment. This leads to a significant increase in hardware costs and a decrease in system operating efficiency, seriously affecting user experience and actual application effects. Summary of the Invention
[0006] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defects of traditional face verification methods in the prior art, which have slow verification speed, high misrecognition rate, and large requirements for storage and computing resources.
[0007] This application provides a face image verification method, the method comprising:
[0008] Obtaining a historical face template obtained by scanning a QR code displayed by a target user, and a current face image obtained by collecting a face image of the target user; wherein the QR code is generated based on the historical face template corresponding to the historical face image of the target user;
[0009] Generate a current face template corresponding to the current face image, perform feature comparison between the current face template and the historical face template, and determine whether the target person has passed the verification based on the comparison result.
[0010] Optionally, the process of generating the QR code includes:
[0011] Obtaining historical facial images of the target person;
[0012] Generating a historical face template corresponding to the historical face image;
[0013] The historical face template is compressed and encrypted, and the encrypted historical face template is encoded to obtain a corresponding QR code.
[0014] Optionally, obtaining a historical face template obtained by scanning a QR code displayed by a target user includes:
[0015] Get the QR code scanned by the target user;
[0016] After decoding and decrypting the QR code, a historical face template corresponding to the QR code is obtained.
[0017] Optionally, generating a current face template corresponding to the current face image includes:
[0018] Inputting the current face image into a pre-configured target face recognition model to obtain key facial features output by the target face recognition model;
[0019] The key facial features are used as the current face template.
[0020] Optionally, the target face recognition model includes a convolutional layer, a pooling layer and a fully connected layer;
[0021] Inputting the current face image into a pre-configured target face recognition model to obtain key facial features output by the target face recognition model includes:
[0022] Extracting multiple local features of the current face image through the convolutional layer;
[0023] Optimizing each local feature through the pooling layer to obtain multiple local key features;
[0024] The local key features are spliced through the fully connected layer to obtain the key features of the face.
[0025] Optionally, performing feature comparison between the current face template and the historical face template, and determining whether the target person has passed verification based on the comparison result, includes:
[0026] Call the preset similarity algorithm;
[0027] Calculating the similarity between the current face template and the historical face template using the similarity algorithm and obtaining a similarity value;
[0028] Comparing the similarity value with a preset similarity threshold and obtaining a comparison result;
[0029] If the comparison result shows that the similarity value is greater than the preset similarity threshold, it is determined that the target person has passed the verification;
[0030] If the comparison result is that the similarity value is not greater than the preset similarity threshold, it is determined that the target person verification fails.
[0031] This application also provides a face image verification device, comprising:
[0032] An information acquisition module, configured to acquire a historical facial template obtained by scanning a QR code displayed by a target user, and a current facial image obtained by collecting a facial image of the target user; wherein the QR code is generated based on the historical facial template corresponding to the historical facial image of the target user;
[0033] The face verification module is used to generate a current face template corresponding to the current face image, perform feature comparison between the current face template and the historical face template, and determine whether the target person has passed the verification based on the comparison result.
[0034] Optionally, the process of generating the QR code in the information acquisition module includes:
[0035] An image acquisition module, configured to acquire historical facial images of the target person;
[0036] A template generation module, configured to generate a historical face template corresponding to the historical face image;
[0037] The QR code generation module is used to compress and encrypt the historical face template, and encode the encrypted historical face template to obtain a corresponding QR code.
[0038] The present application also provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the face image verification method as described in any of the above embodiments.
[0039] The present application also provides a computer device, comprising: one or more processors, and a memory;
[0040] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the face image verification method described in any one of the above embodiments are performed.
[0041] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0042] The facial image verification method, device, storage medium, and computer equipment provided by the present application can obtain, when performing facial verification on a target user, a historical facial template obtained by scanning a QR code displayed by the target user, and a current facial image obtained by collecting a facial image of the target user; since the QR code displayed by the target user is generated based on the historical facial template corresponding to the historical facial image of the target user; therefore, after generating the current facial template corresponding to the current facial image, the present application can perform a feature comparison between the current facial template and the historical facial template obtained by scanning the QR code, and determine whether the target person has passed the verification based on the comparison results. This process transforms the traditional 1:N facial recognition comparison process into a 1:1 facial recognition comparison service, which can avoid the complex search process in a very large facial database and shorten the verification time from several seconds or even tens of seconds in traditional methods to milliseconds, thereby greatly meeting the rapid verification needs in high-traffic scenarios such as airports and stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present application 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 only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 A flowchart of a facial image verification method provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of the QR code generation process provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of the structure of a facial image verification device provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0049] In one embodiment, Figure 1 As shown, Figure 1A flowchart of a facial image verification method provided in an embodiment of the present application is provided. The present application provides a facial image verification method, which may include:
[0050] S110: Acquire a historical face template obtained by scanning a QR code displayed by a target user, and a current face image obtained by collecting a face image of the target user.
[0051] In this step, when verifying the target user's facial image, not only can the historical facial template obtained by scanning the QR code displayed by the target user be obtained, but also the current facial image obtained after facial image collection of the target user can be obtained. In this way, the target user's facial verification can be performed based on the historical facial template and the current facial image.
[0052] Among them, the QR code displayed by the target user in this application is generated based on the historical face template corresponding to the historical face image of the target user. That is to say, the target user in this application can collect a face image before face verification. The face image collected at this time is used as a historical face image. This application can generate a corresponding historical face template after image processing on the historical face image, and then generate a corresponding QR code based on the historical face template, and send the QR code to the target user for storage. In this way, when performing face verification later, the corresponding historical face template can be obtained by scanning the QR code displayed by the target user. The historical face template represents the key features of the historical face. Therefore, the current face verification result can be confirmed through the historical face template and the current face image.
[0053] Furthermore, when generating a QR code, this application can also use encryption technology to protect the facial template data. In this way, even if the QR code is illegally obtained, it is difficult to crack the facial information therein, thereby effectively protecting user privacy and identity security.
[0054] In addition, the target user of this application refers to the user who has authorized the collection of his / her facial information in advance. For the authorized target user, this application can use this method to quickly verify, thereby effectively improving the efficiency of facial verification.
[0055] S120: Generate a current face template corresponding to the current face image, perform feature comparison between the current face template and the historical face template, and determine whether the target person has passed the verification based on the comparison result.
[0056] In this step, after obtaining the historical face template obtained by scanning the QR code displayed by the target user and the current face image obtained after collecting the face image of the target user through S110, in order to improve the accuracy of the face verification result, this application can first generate a current face template corresponding to the current face image, and then compare the current face template with the historical face template. In this way, it can be determined whether the target person has passed the verification based on the comparison result.
[0057] Specifically, after obtaining the current face image, the present application can generate a current face template corresponding to the current face image based on the generation process of the historical face template. The current face template represents the key features of the current face. Therefore, the present application can perform feature comparison between the current face template and the historical face template. In this way, it can quickly determine whether the target person has passed the verification based on the comparison results, thereby effectively improving the verification efficiency and the accuracy of the verification results.
[0058] When comparing features between the current face template and historical face templates, the present application may employ a variety of methods, including but not limited to distance measurement methods, probability and statistics methods, machine learning and deep learning methods, and template aggregation and update strategies. When the present application selects a distance measurement method, the current face template and the historical face template can be judged by calculating the distance or similarity between them. When the present application selects probability and statistics methods, the feature vectors of the historical face templates can be assumed to follow a specific distribution (such as a Gaussian mixture model) and a likelihood ratio test can be used to determine whether they belong to the same category. When the present application selects machine learning and deep learning methods, the similarity can be directly output using a trained model or network. When the present application selects a template aggregation and update strategy, the historical face templates and the current face template can be clustered separately, and the most representative cluster centers or diverse samples can be selected for comparison. When selecting a specific comparison method, the present application may make the selection based on factors such as the computational efficiency, accuracy, and implementation complexity of each method, which are not limited here.
[0059] In the above embodiment, when performing facial verification on the target user, the historical face template obtained by scanning the QR code displayed by the target user and the current face image obtained by collecting the face image of the target user can be obtained; since the QR code displayed by the target user is generated based on the historical face template corresponding to the historical face image of the target user; therefore, after generating the current face template corresponding to the current face image, the present application can perform feature comparison between the current face template and the historical face template obtained after scanning the QR code, and determine whether the target person has passed the verification based on the comparison result. This process transforms the traditional 1:N face recognition comparison process into a 1:1 face recognition comparison service, which can avoid the complex search link in the super-large face database, and shorten the verification time from several seconds or even tens of seconds of the traditional method to milliseconds, thereby greatly meeting the rapid verification needs in high-traffic scenarios such as airports and stations.
[0060] In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of a QR code generation process provided in an embodiment of the present application; the QR code generation process may include:
[0061] S210: Acquire historical facial images of the target person.
[0062] S220: Generate a historical face template corresponding to the historical face image.
[0063] S230: compressing and encrypting the historical face template, and encoding the encrypted historical face template to obtain a corresponding QR code.
[0064] In this embodiment, when generating a QR code, the historical facial image of the target person can be collected first, and then a historical facial template corresponding to the historical facial image can be generated. The historical facial template is then compressed and encrypted, and the encrypted historical facial template is encoded, so that the corresponding QR code can be obtained.
[0065] Specifically, the present application can utilize a deep convolutional neural network (CNN) architecture model to process collected high-definition facial images. For example, through multiple convolutional and pooling layers, the present application can gradually extract key facial features, such as the precise shape of the facial contour, the relative positions of the facial features, and unique texture details. These features can then be converted into high-dimensional feature vectors to generate unique and highly recognizable historical facial templates.
[0066] Next, the application can use an efficient data compression algorithm to compress the generated historical facial template to reduce the amount of data. The application can then use an encryption algorithm, such as the AES encryption algorithm or other encryption algorithms, to encrypt the compressed data to ensure data security and protect user privacy. Finally, the application can encode the compressed and encrypted historical facial template according to a mature QR code encoding standard to generate a corresponding QR code.
[0067] After this application generates a corresponding QR code through a historical facial image, the QR code can be sent to the target user's personal account so that the target user can use the QR code for verification when performing facial verification later; the QR code and corresponding user identification and other information can also be stored in a database. When a scan fails or the QR code is not displayed, the target user can apply for manual processing or re-apply for the QR code in the relevant application. At this time, the relevant application can retrieve the QR code corresponding to the target user from the database to improve the quality of verification service.
[0068] In one embodiment, obtaining the historical face template obtained by scanning the QR code displayed by the target user in S110 may include:
[0069] S111: Obtain the QR code scanned by the target user.
[0070] S112: After decoding and decrypting the QR code, a historical face template corresponding to the QR code is obtained.
[0071] In this embodiment, when obtaining a historical face template, the QR code scanned by the target user may be obtained first, and then the QR code may be decoded and decrypted to obtain the historical face template corresponding to the QR code.
[0072] Among them, when the present application decodes the QR code, it can first perform image preprocessing on the QR code. The preprocessing process includes but is not limited to grayscale, binarization, noise reduction, edge enhancement, etc. of the QR code image; then, the present application can locate and correct the preprocessed QR code to identify the three corner marks of the QR code and correct the graphics, and can also correct tilted and distorted QR codes through Hough transform or corner detection; further, after the present application locates and corrects the QR code, it can determine the module grid of the QR code according to the positioning mark, and after reading the black and white modules according to the grid, convert it into a binary sequence, and then extract the key information in the binary sequence, and use the error correction algorithm to repair the damaged data, and finally output the encrypted historical face template.
[0073] Next, the application can obtain the key from the encryption algorithm used when encrypting the historical face template to decrypt the decoded QR code, thereby obtaining the final historical face template. Since both the historical face template and the current face template are compressed face templates, when comparing their features, the amount of data to be compared can be reduced, thereby effectively improving the efficiency of face verification.
[0074] In one embodiment, generating a current face template corresponding to the current face image in S120 may include:
[0075] S121: Input the current face image into a pre-configured target face recognition model to obtain key facial features output by the target face recognition model.
[0076] S122: Using the key facial features as a current facial template.
[0077] In this embodiment, after obtaining the current facial image of the target person, a current facial template corresponding to the current facial image can be generated based on the generation process of historical facial templates. The current facial template represents the key features of the current face. Therefore, the present application can perform feature comparison between the current facial template and the historical facial templates. In this way, it is possible to quickly determine whether the target person has passed the verification based on the comparison results, thereby effectively improving the verification efficiency and the accuracy of the verification results.
[0078] In a specific implementation method, in order to improve the efficiency of face template generation, the present application can input the current face image into a pre-configured target face recognition model, and use the target face recognition model to identify and output the key facial features in the current face image, so that the current face template corresponding to the key facial features can be obtained.
[0079] The target facial recognition model of this application can be a deep convolutional neural network (CNN) model or another neural network model. The specific choice depends on the actual situation and is not limited here. After this application selects a CNN model for training, the collected current facial image can be input into the CNN model. The model will then perform feature extraction according to the established network structure and parameters and generate the current facial template. This process is highly real-time, thereby effectively improving facial verification efficiency.
[0080] In one embodiment, the target face recognition model may include a convolutional layer, a pooling layer, and a fully connected layer; in S121, the current face image is input into a pre-configured target face recognition model to obtain key facial features output by the target face recognition model, which may include:
[0081] S1211: Extracting multiple local features of the current face image through the convolutional layer.
[0082] S1212: Optimizing each local feature through the pooling layer to obtain multiple local key features.
[0083] S1213: Concatenate the local key features through the fully connected layer to obtain the key features of the face.
[0084] In this embodiment, when using the target face recognition model to identify the key facial features of the current face image, the convolutional layer in the model can be used to extract multiple local features of the current face image, and then the extracted local features can be optimized through the pooling layer to obtain the local key features. Then, the application can use the fully connected layer to splice the various local key features to obtain the final key facial features.
[0085] It is understandable that the convolution layer in this application can find various detailed features in the current facial image, such as local features such as the outline of the eyes and the lines of the nose, and input these local features into the pooling layer. The pooling layer can organize and simplify these detailed features found by the convolution layer, remove some repeated or less important parts, and retain only the most critical features. This not only retains important information, but also reduces the amount of data, which facilitates subsequent processing. After processing by the convolution layer and the pooling layer, this application can obtain multiple local key features, and there are many neurons in the fully connected layer, each neuron is connected to all neurons in the previous layer (that is, the local key features after processing by the pooling layer). In this way, the fully connected layer can comprehensively consider all local key features and output a high-dimensional feature vector. The key features of the facial image can be represented by this high-dimensional feature vector and used for subsequent feature comparison.
[0086] In one embodiment, S120 performs feature comparison between the current face template and the historical face template, and determines whether the target person has passed the verification based on the comparison result, which may include:
[0087] S121: calling a preset similarity algorithm.
[0088] S122: Calculate the similarity between the current face template and the historical face template using the similarity algorithm, and obtain a similarity value.
[0089] S123: Compare the similarity value with a preset similarity threshold and obtain a comparison result.
[0090] S124: If the comparison result shows that the similarity value is greater than the preset similarity threshold, it is determined that the target person has passed the verification.
[0091] S125: If the comparison result shows that the similarity value is not greater than the preset similarity threshold, it is determined that the target person verification fails.
[0092] In this embodiment, when comparing the features of the current face template with the historical face template, the preset similarity algorithm can be called first. The similarity algorithm is selected based on computational efficiency, accuracy, and implementation complexity. Then, the application can use the similarity algorithm to calculate the similarity value between the current face template and the historical face template, and compare the similarity value with the preset similarity threshold. If the similarity value is greater than the preset similarity threshold, it means that the target person has passed the verification; if the similarity value is not greater than the preset similarity threshold, it means that the target person has failed the verification. In this way, the traditional business process of 1:N face recognition comparison can be converted into a 1:1 face recognition comparison business process, thereby solving various problems existing in the verification of super-large face databases.
[0093] The following describes a facial image verification device provided in an embodiment of the present application. The facial image verification device described below and the facial image verification method described above can be referenced to each other.
[0094] In one embodiment, Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a facial image verification device provided in an embodiment of the present application. The present application also provides a facial image verification device, which may include an information acquisition module 210 and a facial verification module 220, specifically including the following:
[0095] The information acquisition module 210 is used to obtain the historical face template obtained by scanning the QR code displayed to the target user, and the current face image obtained after collecting the face image of the target user; wherein, the QR code is generated based on the historical face template corresponding to the historical face image of the target user.
[0096] The face verification module 220 is used to generate a current face template corresponding to the current face image, perform feature comparison between the current face template and the historical face template, and determine whether the target person has passed the verification based on the comparison result.
[0097] In the above embodiment, when performing facial verification on the target user, the historical face template obtained by scanning the QR code displayed by the target user and the current face image obtained by collecting the face image of the target user can be obtained; since the QR code displayed by the target user is generated based on the historical face template corresponding to the historical face image of the target user; therefore, after generating the current face template corresponding to the current face image, the present application can perform feature comparison between the current face template and the historical face template obtained after scanning the QR code, and determine whether the target person has passed the verification based on the comparison result. This process transforms the traditional 1:N face recognition comparison process into a 1:1 face recognition comparison service, which can avoid the complex search link in the super-large face database, and shorten the verification time from several seconds or even tens of seconds of the traditional method to milliseconds, thereby greatly meeting the rapid verification needs in high-traffic scenarios such as airports and stations.
[0098] In one embodiment, the process of generating the QR code in the information acquisition module 210 may include:
[0099] The image acquisition module is used to acquire the historical facial images of the target person.
[0100] The template generation module is used to generate a historical face template corresponding to the historical face image.
[0101] The QR code generation module is used to compress and encrypt the historical face template, and encode the encrypted historical face template to obtain a corresponding QR code.
[0102] In this embodiment, when generating a QR code, the historical facial image of the target person can be collected first, and then a historical facial template corresponding to the historical facial image can be generated. The historical facial template is then compressed and encrypted, and the encrypted historical facial template is encoded, so that the corresponding QR code can be obtained.
[0103] Specifically, the present application can utilize a deep convolutional neural network (CNN) architecture model to process collected high-definition facial images. For example, through multiple convolutional and pooling layers, the present application can gradually extract key facial features, such as the precise shape of the facial contour, the relative positions of the facial features, and unique texture details. These features can then be converted into high-dimensional feature vectors to generate unique and highly recognizable historical facial templates.
[0104] Next, the application can use an efficient data compression algorithm to compress the generated historical facial template to reduce the amount of data. The application can then use an encryption algorithm, such as the AES encryption algorithm or other encryption algorithms, to encrypt the compressed data to ensure data security and protect user privacy. Finally, the application can encode the compressed and encrypted historical facial template according to a mature QR code encoding standard to generate a corresponding QR code.
[0105] After this application generates a corresponding QR code through a historical facial image, the QR code can be sent to the target user's personal account so that the target user can use the QR code for verification when performing facial verification later; the QR code and corresponding user identification and other information can also be stored in a database. When a scan fails or the QR code is not displayed, the target user can apply for manual processing or re-apply for the QR code in the relevant application. At this time, the relevant application can retrieve the QR code corresponding to the target user from the database to improve the quality of verification service.
[0106] In one embodiment, the present application also provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the face image verification method described in any of the above embodiments.
[0107] In one embodiment, the present application further provides a computer device, including: one or more processors, and a memory.
[0108] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the face image verification method described in any one of the above embodiments are performed.
[0109] Schematically, as Figure 4 As shown, Figure 4 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 can be provided as a server. Figure 4 Computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by memory 301 for storing instructions executable by processing component 302, such as an application. The application stored in memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, processing component 302 is configured to execute the instructions to perform the facial image verification method of any of the above-mentioned embodiments.
[0110] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or the like.
[0111] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0112] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0113] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.
[0114] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A face image verification method, characterized in that: The method comprises: Obtaining a historical face template obtained by scanning a QR code displayed by a target user, and a current face image obtained by collecting a face image of the target user; wherein the QR code is generated based on the historical face template corresponding to the historical face image of the target user; Generate a current face template corresponding to the current face image, perform feature comparison between the current face template and the historical face template, and determine whether the target person has passed the verification based on the comparison result.
2. The facial image verification method according to claim 1, wherein: The process of generating the QR code includes: Obtaining historical facial images of the target person; Generating a historical face template corresponding to the historical face image; The historical face template is compressed and encrypted, and the encrypted historical face template is encoded to obtain a corresponding QR code.
3. The facial image verification method according to claim 1, wherein: The acquiring of the historical face template obtained by scanning the QR code displayed by the target user includes: Get the QR code scanned by the target user; After decoding and decrypting the QR code, a historical face template corresponding to the QR code is obtained.
4. The facial image verification method according to claim 1, wherein: The generating of a current face template corresponding to the current face image includes: Inputting the current face image into a pre-configured target face recognition model to obtain key facial features output by the target face recognition model; The key facial features are used as the current face template.
5. The facial image verification method according to claim 4, characterized in that: The target face recognition model includes a convolutional layer, a pooling layer and a fully connected layer; Inputting the current face image into a pre-configured target face recognition model to obtain key facial features output by the target face recognition model includes: Extracting multiple local features of the current face image through the convolutional layer; Optimizing each local feature through the pooling layer to obtain multiple local key features; The local key features are spliced through the fully connected layer to obtain the key features of the face.
6. The facial image verification method according to claim 1, wherein: The comparing the features of the current face template with the historical face templates and determining whether the target person has passed the verification based on the comparison results includes: Call the preset similarity algorithm; Calculating the similarity between the current face template and the historical face template using the similarity algorithm and obtaining a similarity value; Comparing the similarity value with a preset similarity threshold and obtaining a comparison result; If the comparison result shows that the similarity value is greater than the preset similarity threshold, it is determined that the target person has passed the verification; If the comparison result is that the similarity value is not greater than the preset similarity threshold, it is determined that the target person verification fails.
7. A facial image verification device, characterized in that: include: An information acquisition module, configured to acquire a historical facial template obtained by scanning a QR code displayed by a target user, and a current facial image obtained by collecting a facial image of the target user; wherein the QR code is generated based on the historical facial template corresponding to the historical facial image of the target user; The face verification module is used to generate a current face template corresponding to the current face image, perform feature comparison between the current face template and the historical face template, and determine whether the target person has passed the verification based on the comparison result.
8. The face image verification device according to claim 7, characterized in that: The process of generating the QR code in the information acquisition module includes: An image acquisition module, configured to acquire historical facial images of the target person; A template generation module, configured to generate a historical face template corresponding to the historical face image; The QR code generation module is used to compress and encrypt the historical face template, and encode the encrypted historical face template to obtain a corresponding QR code.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the face image verification method according to any one of claims 1 to 6.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the facial image verification method according to any one of claims 1 to 6.