Fingerprint identification method and device, electronic equipment, storage medium and program product
By screening the matching of global feature vectors and local feature matrix of fingerprint images, the problem of low fingerprint recognition efficiency in the prior art is solved, and a more efficient fingerprint recognition effect is achieved.
Patent Information
- Application Number
- CN202510510036.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-08
AI Technical Summary
In the existing fingerprint recognition technology, since the small-area fingerprint sensor collects multiple image features of the same finger, it is necessary to match a large number of image features one by one during the recognition stage, which is relatively inefficient.
By extracting the global feature vector of the fingerprint image to be identified and the global feature vector of the template fingerprint image, the specific global feature vector within the distance threshold is filtered out, and local feature matrix matching is performed to reduce unnecessary matches.
The efficiency of fingerprint recognition has been improved, especially in the calculation subject with low computing power, which has significantly improved the recognition speed.
Smart Images

Figure CN120452032A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing, and in particular to a fingerprint recognition method, device, electronic device, storage medium, and program product. Background Art
[0002] Fingerprint recognition technology, as one of the commonly used biometric technologies, is widely used in scenarios such as judicial evidence collection, attendance clocking, access control management, and personal electronic device login authentication.
[0003] Currently, in the fingerprint recognition process, a small-area fingerprint sensor is usually used to collect fingerprints. Considering that a small-area fingerprint sensor can only collect a part of a single finger's fingerprint at a time, during the fingerprint registration stage, the same finger can be pressed multiple times on the small-area fingerprint sensor to obtain fingerprint images of different areas of the finger, and the image features of all collected fingerprint images are stored. During the fingerprint recognition stage, the features of the collected fingerprint images can be matched one by one with the stored image features to achieve fingerprint recognition.
[0004] However, since multiple image features of the same finger are stored during the fingerprint registration stage, in actual application scenarios, the number of stored image features may reach dozens, hundreds or even more. This results in the fingerprint recognition stage generally requiring a large number of image features to be matched one by one, resulting in low fingerprint recognition efficiency. Summary of the Invention
[0005] In view of this, embodiments of the present application provide a fingerprint recognition method, apparatus, electronic device, storage medium, and program product to at least partially solve the above-mentioned problems.
[0006] According to a first aspect of an embodiment of the present application, a fingerprint recognition method is provided, comprising: determining, based on a first global feature vector of a fingerprint image to be recognized and second global feature vectors of multiple template fingerprint images, some of the second global feature vectors as specific global feature vectors, wherein a distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold; and determining, based on a first local feature matrix of the fingerprint image to be recognized and a second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors, a recognition result of the fingerprint image to be recognized.
[0007] According to a second aspect of an embodiment of the present application, a fingerprint recognition device is provided, comprising: a determination unit, configured to determine, based on a first global feature vector of a fingerprint image to be recognized and second global feature vectors of multiple template fingerprint images, some of the second global feature vectors as specific global feature vectors, wherein a distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold; and an identification unit, configured to determine, based on a first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors, a recognition result of recognizing the fingerprint image to be recognized.
[0008] According to the third aspect of the embodiment of the present application, an electronic device is provided, including: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation corresponding to the method of the first aspect above.
[0009] According to a fourth aspect of the embodiments of the present application, a computer storage medium is provided, on which a computer program is stored, and the program is used by a processor to execute the method of the first aspect.
[0010] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to execute the method of the first aspect described above.
[0011] According to the fingerprint recognition solution provided by the embodiment of the present application, it is possible to first determine some of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, and then determine the recognition result of the fingerprint image to be identified based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector. Thus, the second global feature vector can be pre-screened based on the first global feature vector, and then the second local feature matrix corresponding to the selected second global feature vector can be matched one by one with the first local feature matrix. Compared with matching all the second local feature matrices with the first local feature matrix one by one, the present application can reduce the number of matching times of the local feature matrix and improve the efficiency of fingerprint recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] 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 recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0013] Figure 1 This is a flow chart of a fingerprint recognition method according to an embodiment of the present application;
[0014] Figure 2 This is a processing logic diagram of a global feature extraction model according to an embodiment of the present application;
[0015] Figure 3 is a schematic diagram of a fingerprint recognition device according to an embodiment of the present application;
[0016] Figure 4 It is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0017] Application environment of this application
[0018] The embodiments of the present application propose a fingerprint recognition solution. The entire fingerprint recognition solution is relatively universal and can be used to identify fingerprints during identity verification, such as for judicial evidence collection, attendance clocking, access control management, or personal electronic device login scenarios to verify identity. The fingerprint recognition solution can be executed by data centers, servers, personal computers, Internet of Things (IoT) devices, embedded devices, etc. The fingerprint recognition solution is independent of the hardware deployed by the computing device executing the solution.
[0019] Fingerprint recognition method
[0020] Based on the above application environment, an embodiment of the present application provides a fingerprint recognition method, which is described in detail below through multiple embodiments.
[0021] Figure 1 This is a flow chart of a fingerprint recognition method according to an embodiment of the present application. Figure 1 As shown, the fingerprint recognition method includes the following steps:
[0022] Step 101: According to the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, part of the second global feature vectors are respectively determined as specific global feature vectors.
[0023] The distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold.
[0024] In a specific embodiment, before collecting the fingerprint image to be identified by the small-area fingerprint sensor, fingerprints of multiple fingers can be registered. For example, N3 fingers can be pressed against the small-area fingerprint sensor N4 times respectively, so that the small-area fingerprint sensor collects Nu (Nu=N3*N4) template fingerprint images. Local feature extraction and global feature extraction are then performed on each template fingerprint image to obtain a second local feature matrix and a second global feature vector of each template fingerprint image in the Nu template fingerprint images.
[0025] During the fingerprint recognition process, the fingerprint image to be identified can be first collected through a small-area fingerprint sensor, and then local feature extraction and global feature extraction can be performed on the fingerprint image to be identified to obtain the first local feature matrix and the second global feature vector of the fingerprint image to be identified, and then the second global feature vector with a smaller distance from the first global feature vector is determined as a specific global feature vector to screen out the characteristic global feature vector from all the second global feature vectors.
[0026] Among them, local feature extraction can be achieved by extracting local features of the fingerprint image to be subjected to local feature extraction based on a small-area fingerprint recognition algorithm feature extractor; global feature extraction can be achieved by obtaining the corresponding global feature vector based on the local feature matrix, which can be achieved specifically through a global feature extraction model, a vector of locally aggregated descriptors (VLAD) algorithm, a bag of words (BoW) algorithm, or a method based on a vector of locally aggregated descriptors network (VLADNet) / graph neural network (GNN).
[0027] Step 102: Determine a recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
[0028] In a specific embodiment, after some of the second global eigenvectors are respectively determined as specific global eigenvectors, if there is a second local feature matrix that matches the first local feature matrix in the second local feature matrix of the template fingerprint image corresponding to each specific global eigenvector, it can be determined that the recognition result of the fingerprint image to be recognized is a successful recognition; otherwise, it can be determined that the recognition result of the fingerprint image to be recognized is a failed recognition.
[0029] In an embodiment of the present application, based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, some of the second global feature vectors can be respectively determined as specific global feature vectors, and then based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector, the recognition result of the fingerprint image to be identified can be determined. Thus, the second global feature vector can be pre-screened according to the first global feature vector, and then the second local feature matrix corresponding to the selected second global feature vector can be matched one by one with the first local feature matrix. Compared with matching all the second local feature matrices with the first local feature matrix one by one, the present application can reduce the number of matching times of the local feature matrix and improve the efficiency of fingerprint recognition.
[0030] Furthermore, the fingerprint recognition method in the present application can be flexibly applied in a variety of application environments and has plug-and-play characteristics; compared with the solution of determining whether two fingerprint images are similar based on whether they belong to the same finger, the fingerprint recognition method in the present application can identify small-area fingerprints and has a wider range of applications.
[0031] It should be noted that compared with the local feature matrix, the global feature vector has less data volume, so the global feature vector is processed faster, so that the pre-screening of the second global feature vector according to the first global feature vector in this application is faster. Therefore, on the same computing entity (such as a microcontroller unit (MCU) or a system-on-chip (SOC), etc.), the efficiency of fingerprint recognition performed by the fingerprint recognition method in this application is higher than the efficiency of fingerprint recognition performed by the scheme in the background technology, especially for some low-computing-power computing entities (such as control units, etc.), the efficiency of fingerprint recognition performed by the fingerprint recognition method in this application is much higher than the efficiency of fingerprint recognition performed by the scheme in the background technology.
[0032] In one possible implementation, the fingerprint recognition method also includes the following specific processing: performing local feature extraction on the fingerprint image to be identified to obtain a first local feature matrix; inputting the first local feature matrix into a trained global feature extraction model to obtain a first global feature vector output by the global feature extraction model.
[0033] Therefore, by inputting the first local feature matrix into the global feature extraction model, the first global feature vector can be directly obtained, which is convenient, fast and efficient.
[0034] In a possible implementation, the fingerprint recognition method further includes the following specific processing: performing local feature extraction on the xth template fingerprint image among the above-mentioned multiple template fingerprint images to obtain a second local feature matrix of the xth template fingerprint image, where 1≤x≤m, and m is the number of template fingerprint images in the above-mentioned multiple template fingerprint images; inputting the second local feature matrix of the xth template fingerprint image into the trained global feature extraction model to obtain a second global feature vector of the xth template fingerprint image output by the global feature extraction model.
[0035] Therefore, by inputting each second local feature matrix into the global feature extraction model, the second global feature vector of each template fingerprint image can be directly obtained, which is convenient, fast and efficient.
[0036] In one possible implementation, the processing of the global feature extraction model is as follows:
[0037] After receiving the target local feature matrix input into the global feature extraction model, the target local feature matrix is input into the first multilayer perceptron and the second multilayer perceptron included in the global feature extraction model respectively to obtain a first matrix output by the first multilayer perceptron and a second matrix output by the second multilayer perceptron, wherein the target local feature matrix is the first local feature matrix or any second local feature matrix, and at least some parameters of the first multilayer perceptron and the second multilayer perceptron are different; the parameter matrix is input into the third multilayer perceptron included in the global feature extraction model to obtain a third matrix output by the third multilayer perceptron, wherein the parameter matrix is a trained parameter of the global feature extraction model; based on the first matrix and the third matrix, the attention weight matrix is determined; based on the attention weight matrix and the second matrix, the target global feature vector corresponding to the target local feature matrix is determined, wherein when the target local feature matrix is the first local feature matrix, the target global feature vector is the first global feature vector, and when the target local feature matrix is any second local feature matrix, the target global feature vector is the second global feature vector of the template fingerprint image corresponding to any second local feature matrix.
[0038] Among them, for each multilayer perceptron in the first multilayer perceptron, the second multilayer perceptron and the third multilayer perceptron, the multilayer perceptron includes 2 linear mapping layers (Linear layers) and 1 neural network nonlinear activation layer (ReLU activation layer), and the number of columns of the output matrix of the multilayer perceptron is less than the number of columns of the output matrix. The structures of the first multilayer perceptron, the second multilayer perceptron and the third multilayer perceptron can be the same, but at least some parameters of any two different multilayer perceptrons in the first multilayer perceptron, the second multilayer perceptron and the third multilayer perceptron are different. The specific structures and specific parameters of the first multilayer perceptron, the second multilayer perceptron and the third multilayer perceptron can be set according to actual needs, and the embodiments of the present application are not limited to this.
[0039] In one embodiment, Figure 2 As shown, after the target local feature matrix Fn is input into the global feature extraction model, Fn can be input into the first multi-layer perceptron MLP1 and the second multi-layer perceptron MLP2 respectively, so that MLP1 outputs a first matrix with fewer columns than Fn And make MLP2 output a second matrix with fewer columns than Fn At the same time, the parameter matrix P (P is a trained parameter of the global feature extraction model, that is, in the process of training the global feature extraction model, an initially randomly generated trained parameter will be continuously adjusted until the global feature extraction model training is completed, and the current trained parameter is P) can be input into the third multi-layer perceptron MLP3, so that MLP3 outputs a third matrix Q with fewer columns than P. Then, according to Multiply it with Q and process it through the function σ() to get the attention weight matrix A n , and then according to A n and Perform multiplication and pass the function φ() and the function Processing, get the target global feature vector g n .
[0040] In an embodiment of the present application, an attention mechanism is introduced into the global feature extraction model, which can focus on the key information in the target local feature matrix, help the model better understand the key features in the target local feature matrix, and thus improve the performance and accuracy of the model; at the same time, the model can input the local feature matrix of the existing small-area fingerprint recognition algorithm, and can also reduce the impact of whether the finger is rotated when the fingerprint image is collected, thereby solving the problems of fingerprint alignment and missing small-area fingerprint detail points in related solutions.
[0041] In one possible implementation, the formula for determining the attention weight matrix based on the first matrix and the third matrix is as follows:
[0042]
[0043] in, is the fourth matrix, is the first matrix, Q is the third matrix, Q T is the transposed matrix of Q, A n is the attention weight matrix, σ() is the normalized exponential function used to normalize the matrix by column (such as the normalized exponential function (softmax function)), A n The element a in row i and column j ij and The element in row i and column j Satisfies the following formula:
[0044]
[0045] Among them, Kn is The number of rows, 1≤i≤Kn, exp is the exponential function with the natural constant e as the base.
[0046] In one possible implementation, the formula for determining the target global feature vector corresponding to the target local feature matrix based on the attention weight matrix and the second matrix is as follows:
[0047]
[0048] Among them, G n is the fifth matrix, A n is the attention weight matrix, A n The transposed matrix of is the second matrix, is the original global vector, φ() is the function used to transform the two-dimensional matrix into a one-dimensional vector, g n is the target global eigenvector, is the function used to perform L2 normalization on the vector, g n The tth element g in t and The tth element in Satisfies the following formula:
[0049]
[0050] Where Dg is The number of elements in is The dimension of g n The dimensions are equal, 1≤t≤Dg.
[0051] In one possible implementation, the training process of the global feature extraction model is as follows: obtaining an initial global feature extraction model; obtaining multiple fingerprint image sample groups, wherein the fingerprint image sample groups include multiple fingerprint image samples corresponding to the same finger, and different fingerprint image sample groups correspond to different fingers; among the fingerprint image samples included in the multiple fingerprint image sample groups, any two fingerprint image samples that have successful feature matching, correspond to the same finger, and have an overlapping area ratio greater than a ratio threshold are formed into a corresponding fingerprint image pair; at least part of the fingerprint image pairs are formed into a fingerprint image pair set; based on the fingerprint image pair set, the initial global feature extraction model is trained to obtain a trained global feature extraction model.
[0052] The ratio threshold is 50% to 80%, such as 60% or 70%.
[0053] Exemplarily, the specific process of obtaining the fingerprint image pair set can be as follows: collect N2 fingerprint images of N1 fingers as fingerprint image samples through a small-area fingerprint sensor to obtain N1 fingerprint image sample groups, each fingerprint image sample group includes N2 fingerprint image samples, that is, Nv (Nv=N1*N2) fingerprint image samples are obtained, and then based on the small-area fingerprint algorithm feature extractor, local feature extraction is performed on the Nv fingerprint image samples respectively to obtain a local fingerprint feature library, which includes the local feature matrix of Nv fingerprint image samples, and then for any two in the same fingerprint image sample group, the local feature matrix is extracted. Fingerprint image samples Im and In are both processed as follows: the local feature matrix of Im and the local feature matrix of In are matched using a feature recognition function to obtain a matching result and the area ratio of the overlapping region of Im and In. If the matching result indicates a successful match and the area ratio of the overlapping region of Im and In is greater than a ratio threshold, Im and In are combined into a fingerprint image pair. If the matching result indicates a failed match, or the area ratio of the overlapping region of Im and In is less than or equal to the ratio threshold, Im and In are not determined as a fingerprint image pair. Next, the multiple fingerprint image pairs obtained can be combined into a fingerprint image pair set.
[0054] Optionally, after collecting N2 fingerprint images of N1 fingers as fingerprint image samples through a small-area fingerprint sensor, the images can be randomly rotated and some image areas can be randomly set to invalid values to perform data augmentation to increase the number of fingerprint image samples in each fingerprint image sample.
[0055] In an embodiment of the present application, the global feature extraction model is trained based on a set of fingerprint image pairs. Each fingerprint image pair in the set includes two fingerprint image samples belonging to the same finger and having a large overlapping area. This allows a large number of training sample pairs to be available when training the global feature extraction model, allowing the global feature extraction model to be fully trained and improving the accuracy of the trained global feature extraction model.
[0056] In a possible implementation, the initial global feature extraction model is trained based on the fingerprint image pair set to obtain a trained global feature extraction model, including the following steps:
[0057] Step 201: randomly select B fingerprint image pairs from the fingerprint image pair set, where B ≥ 2; Step 202: train the initial global feature extraction model based on the B fingerprint image pairs; Step 203: determine the loss value based on the loss function. If the loss value meets the training end condition, the current global feature extraction model is determined as the trained global feature extraction model. Optionally, in step 203, if the loss value does not meet the training end condition, enter step 201.
[0058] In the process of training the initial global feature extraction model based on B fingerprint image pairs, the AdamW (Adam with Weight Decay) algorithm can be used to adjust the above-mentioned initially randomly generated trained parameters and the parameters of the linear mapping layer based on the B fingerprint image pairs to achieve optimization of the global feature extraction model.
[0059] The formula of the loss function is as follows:
[0060]
[0061] L is the loss value, g p After the local feature matrix of the first fingerprint image sample in the p-th fingerprint image pair among B fingerprint image pairs is input to the current global feature extraction model, the global feature vector output by the global feature extraction model is: After the local feature matrix of the second fingerprint image sample in the p-th fingerprint image pair among B fingerprint image pairs is input into the current global feature extraction model, the global feature vector output by the global feature extraction model is: After the local feature matrix of the second fingerprint image sample in the qth fingerprint image pair among B fingerprint image pairs is input to the current global feature extraction model, the global feature vector output by the global feature extraction model is: g p and distance, g p and distance, e is a natural constant, and log() is a logarithmic function.
[0062]
[0063] in, for The L2 norm of for The L2 norm of .
[0064] In an embodiment of the present application, the loss value can be calculated based on two fingerprint image samples belonging to the same fingerprint image pair and two fingerprint image samples that do not belong to the same fingerprint image pair. This allows the loss function to consider more factors, improves the accuracy of the loss value, and makes the trained global feature extraction model more accurate.
[0065] The loss function may also adopt a triplet loss function or a lifted structure loss function, etc., which is not limited in the embodiment of the present application.
[0066] In one possible implementation, the above-mentioned step 101 includes: among the second global feature vectors of multiple template fingerprint images, the first NS1 second global feature vectors with the smallest distance from the first global feature vector are respectively determined as specific global feature vectors, wherein 1≤NS1≤NUM, the specific value of NS1 can be set according to actual needs. Generally, the larger the NS1, the more accurate the fingerprint recognition result, and the smaller the NS1, the higher the efficiency of fingerprint recognition. NUM is the number of template fingerprint images in the multiple template fingerprint images, and the distance between the second global feature vector and the first global feature vector is the L2 norm of the difference between the second global feature vector and the first global feature vector.
[0067] In this implementation, the distance threshold is: the distance between the second global eigenvector with the largest distance from the first global eigenvector and the first global eigenvector among the first NS1 second global eigenvectors with the smallest distance from the first global eigenvector.
[0068] In the embodiment of the present application, the first NS1 second global feature vectors with the smallest distance from the first global feature vector are directly determined as specific global feature vectors. Compared with the next implementation, the processing logic in this implementation is simpler and more efficient.
[0069] In another possible implementation, the template fingerprint image is an image of at least a portion of the fingerprint of a corresponding single finger, at least some of the template fingerprint images correspond to different fingers, and at least some of the template fingerprint images correspond to the same finger. Based on this, the above-mentioned step 101 includes: according to the first global feature vector of the fingerprint image to be identified and the second global feature vectors of the multiple template fingerprint images, determining part of the second global feature vectors as specific global feature vectors respectively, including: among the second global feature vectors of the template fingerprint image corresponding to the yth finger, determining the first NS2 second global feature vectors with the smallest distance to the first global feature vector as specific global feature vectors, wherein the yth finger is the yth finger among the fingers corresponding to the multiple template fingerprint images, 1≤y≤n, n is the number of fingers corresponding to the multiple template fingerprint images, 1≤NS2≤Nmin, the specific value of NS2 can be set according to actual needs. Generally, the larger NS2 is, the more accurate the fingerprint recognition result is, and the smaller NS2 is, the higher the fingerprint recognition efficiency is. Nmin is the minimum value of the number of template fingerprint images corresponding to each finger among the fingers corresponding to the multiple template fingerprint images.
[0070] In this implementation, the distance threshold corresponding to each feature global feature vector is: the distance between the second global feature vector with the largest distance from the first global feature vector and the first global feature vector among the NS2 second global feature vectors corresponding to the feature global feature vector; wherein, the NS2 second global feature vectors corresponding to the feature global feature vector are: the first NS2 second global feature vectors with the smallest distance from the first global feature vector among the second global feature vectors of all template fingerprint images corresponding to the finger corresponding to the feature global feature vector.
[0071] In an embodiment of the present application, among the second global feature vectors of the template fingerprint image corresponding to the yth finger, the first NS2 second global feature vectors with the smallest distance from the first global feature vector are respectively determined as specific global feature vectors. Compared with the previous implementation method, the number of specific global feature vectors corresponding to different fingers determined in this implementation method is the same, which reduces the possibility that the second global feature vector corresponding to the second local feature matrix matching the first local feature matrix is not determined as a specific global feature vector, and can improve the accuracy of fingerprint recognition.
[0072] In one possible implementation, step 102 includes: performing feature matching on the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector with the first local feature matrix respectively; if there is a second local feature matrix that successfully matches the features of the first local feature matrix, determining that the recognition result is a successful recognition; if there is no second local feature matrix that successfully matches the features of the first local feature matrix, determining that the recognition result is a failed recognition.
[0073] Exemplarily, the above feature matching can be achieved through a feature matching function.
[0074] In the embodiment of the present application, by determining the recognition result through the local feature matrix, a more accurate match between the fingerprint image to be recognized and the template fingerprint image can be achieved, so that the fingerprint recognition is more accurate.
[0075] In terms of fingerprint efficiency, when the fingerprint information of 20 fingers is registered, if the fingerprint recognition method in this application is adopted, the fingerprint recognition time is basically 181 milliseconds, and if the fingerprint recognition method in the background technology is adopted, the fingerprint recognition time is basically 1320 milliseconds. When the fingerprint information of 50 fingers is registered, if the fingerprint recognition method in this application is adopted, the fingerprint recognition time is basically 223 milliseconds, and if the fingerprint recognition method in the background technology is adopted, the fingerprint recognition time is basically 3300 milliseconds. It can be seen that the fingerprint recognition method in this application improves the efficiency of fingerprint recognition.
[0076] Fingerprint recognition device
[0077] Corresponding to the above method embodiment, Figure 3 A schematic diagram of a fingerprint recognition device according to an embodiment of the present application is shown in FIG. Figure 3 As shown, the fingerprint recognition device 300 includes:
[0078] a determining unit 301 configured to determine, based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of the plurality of template fingerprint images, some of the second global feature vectors as specific global feature vectors, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold;
[0079] The recognition unit 302 is configured to determine a recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
[0080] In an embodiment of the present application, the determination unit 301 can determine some of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images. The identification unit 302 can determine the recognition result of the fingerprint image to be identified based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector. Thus, the second global feature vector can be pre-screened based on the first global feature vector, and then the second local feature matrix corresponding to the selected second global feature vector is matched one by one with the first local feature matrix. Compared with matching all the second local feature matrices with the first local feature matrix one by one, the present application can reduce the number of matching times of the local feature matrix and improve the efficiency of fingerprint recognition.
[0081] It should be noted that the fingerprint recognition device of this embodiment is used to implement the corresponding fingerprint recognition method in the aforementioned method embodiment and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0082] electronic devices
[0083] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the electronic device. Figure 4 As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communication bus 408.
[0084] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0085] The communication interface 404 is used to communicate with other electronic devices or servers.
[0086] The processor 402 is configured to execute a program 410 , and specifically may execute the relevant steps in any of the aforementioned fingerprint recognition method embodiments.
[0087] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0088] Processor 402 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0089] RISC-V is an open-source instruction set architecture based on the principles of the Reduced Instruction Set (RISC). It can be applied to various fields, including microcontrollers and FPGA chips. Specifically, it has applications in areas such as IoT security, industrial control, mobile phones, and personal computers. Designed with small size, high speed, and low power consumption in mind, it is particularly suitable for modern computing devices such as warehouse-scale cloud computers, high-end mobile phones, and tiny embedded systems. With the rise of the artificial intelligence (AI) Internet of Things (AIoT), the RISC-V instruction set architecture has also received increasing attention and support, and is expected to become the next generation of widely used CPU architecture.
[0090] The computer operating instructions in the embodiments of the present application may be computer operating instructions based on the RISC-V instruction set architecture. Correspondingly, the processor 402 may be designed based on the RISC-V instruction set. Specifically, the processor chip in the electronic device provided in the embodiments of the present application may be a chip designed using the RISC-V instruction set. The chip may execute executable code based on the configured instructions, thereby implementing the fingerprint recognition method in the above embodiments.
[0091] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0092] The program 410 may be specifically configured to enable the processor 402 to execute the fingerprint recognition method in any of the aforementioned embodiments.
[0093] The specific implementation of each step in program 410 can be found in the corresponding descriptions of the corresponding steps and units in any of the aforementioned fingerprint recognition method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that for the sake of convenience and brevity, the specific working processes of the above-described devices and modules can refer to the corresponding process descriptions in the aforementioned method embodiments, and will not be repeated here.
[0094] Computer storage media
[0095] The present application also provides a computer-readable storage medium storing instructions for causing a machine to execute the power consumption analysis method described herein. Specifically, a system or device equipped with a storage medium can be provided, on which software program code implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.
[0096] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of this application.
[0097] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0098] Computer program product
[0099] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to perform any corresponding operation in the above-mentioned multiple method embodiments.
[0100] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0101] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0102] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or can be implemented as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded via a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.
[0103] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0104] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for specific applications, but such implementation should not be considered to be beyond the scope of the embodiments of this application.
[0105] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application shall be defined by the claims.
Claims
1. A fingerprint recognition method, characterized in that: include: According to the first global feature vector of the fingerprint image to be identified and the second global feature vectors of the plurality of template fingerprint images, part of the second global feature vectors are respectively determined as specific global feature vectors, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold; A recognition result of the fingerprint image to be recognized is determined according to the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors.
2. The method according to claim 1, characterized in that The method further comprises: Performing local feature extraction on the fingerprint image to be identified to obtain the first local feature matrix; The first local feature matrix is input into the trained global feature extraction model to obtain the first global feature vector output by the global feature extraction model.
3. The method according to claim 1, characterized in that The method further comprises: Performing local feature extraction on an x-th template fingerprint image among the multiple template fingerprint images to obtain the second local feature matrix of the x-th template fingerprint image, where x≤m, and m is the number of the template fingerprint images among the multiple template fingerprint images; The second local feature matrix of the x-th template fingerprint image is input into a trained global feature extraction model to obtain the second global feature vector of the x-th template fingerprint image output by the global feature extraction model.
4. The method according to claim 2 or 3, characterized in that The processing process of the global feature extraction model is as follows: After receiving the target local feature matrix input into the global feature extraction model, inputting the target local feature matrix into a first multilayer perceptron and a second multilayer perceptron included in the global feature extraction model, respectively, to obtain a first matrix output by the first multilayer perceptron and a second matrix output by the second multilayer perceptron, wherein the target local feature matrix is the first local feature matrix or any second local feature matrix, and at least some parameters of the first multilayer perceptron and the second multilayer perceptron are different; Inputting a parameter matrix into a third multilayer perceptron included in the global feature extraction model to obtain a third matrix output by the third multilayer perceptron, wherein the parameter matrix is a trained parameter of the global feature extraction model; Determine an attention weight matrix according to the first matrix and the third matrix; According to the attention weight matrix and the second matrix, the target global eigenvector corresponding to the target local feature matrix is determined, wherein when the target local feature matrix is the first local feature matrix, the target global eigenvector is the first global eigenvector; when the target local feature matrix is any second local feature matrix, the target global eigenvector is the second global eigenvector of the template fingerprint image corresponding to any second local feature matrix.
5. The method according to claim 4, characterized in that The formula for determining the attention weight matrix based on the first matrix and the third matrix is as follows: in, is the fourth matrix, is the first matrix, Q is the third matrix, Q T is the transposed matrix of Q, A n is the attention weight matrix, σ() is the normalized exponential function used to calculate the matrix column-by-column normalization, A n The element a in row i and column j ij and The element in row i and column j Satisfies the following formula: Among them, Kn is The number of rows, 1≤i≤Kn, exp is the exponential function with the natural constant e as the base.
6. The method according to claim 4, characterized in that The formula for determining the target global feature vector corresponding to the target local feature matrix based on the attention weight matrix and the second matrix is as follows: Among them, G n is the fifth matrix, A n is the attention weight matrix, A n The transposed matrix of is the second matrix, is the original global vector, φ() is the function used to transform the two-dimensional matrix into a one-dimensional vector, g n is the target global feature vector, is the function used to perform L2 normalization on the vector, g n The tth element g in t and The tth element in Satisfies the following formula: Where Dg is The number of elements in , 1≤t≤Dg.
7. The method according to claim 1, characterized in that The step of determining, based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of the plurality of template fingerprint images, a portion of the second global feature vectors as specific global feature vectors includes: Among the second global feature vectors of the multiple template fingerprint images, first NS1 second global feature vectors having the smallest distances to the first global feature vector are respectively determined as the specific global feature vectors, where 1≤NS1≤NUM, and NUM is the number of the template fingerprint images in the multiple template fingerprint images.
8. The method according to claim 1, characterized in that The template fingerprint image is an image of at least a portion of a fingerprint corresponding to a single finger, at least a portion of the template fingerprint image corresponds to different fingers, and at least a portion of the template fingerprint image corresponds to the same finger; The step of determining, based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of the plurality of template fingerprint images, a portion of the second global feature vectors as specific global feature vectors includes: Among the second global feature vectors of the template fingerprint image corresponding to the yth finger, the first NS2 second global feature vectors with the smallest distance from the first global feature vector are respectively determined as the specific global feature vectors, wherein the yth finger is the yth finger among the fingers corresponding to the multiple template fingerprint images, y≤n, n is the number of fingers corresponding to the multiple template fingerprint images, 1≤NS2≤Nmin, Nmin is the minimum value of the number of template fingerprint images corresponding to each finger among the fingers corresponding to the multiple template fingerprint images.
9. The method according to claim 1, characterized in that Determining a recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors includes: Perform feature matching on the second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors and the first local feature matrix respectively; If there is a second local feature matrix that successfully matches the first local feature matrix, determining that the recognition result is a successful recognition; If there is no second local feature matrix that successfully matches the features of the first local feature matrix, the recognition result is determined to be a recognition failure.
10. The method according to claim 2 or 3, characterized in that The training process of the global feature extraction model is as follows: Obtaining the initial global feature extraction model; Acquire multiple fingerprint image sample groups, wherein the fingerprint image sample groups include multiple fingerprint image samples corresponding to the same finger, and different fingerprint image sample groups correspond to different fingers; Among the fingerprint image samples included in the multiple fingerprint image sample groups, any two fingerprint image samples that have successful feature matching, correspond to the same finger, and have an overlapping area ratio greater than a ratio threshold are combined into a corresponding fingerprint image pair; Combining at least some of the fingerprint image pairs into a fingerprint image pair set; The initial global feature extraction model is trained according to the fingerprint image pair set to obtain the trained global feature extraction model.
11. The method according to claim 10, characterized in that The initial global feature extraction model is trained based on the fingerprint image pair set to obtain the trained global feature extraction model, including: Randomly select B fingerprint image pairs from the fingerprint image pair set, where B ≥ 2; Training the initial global feature extraction model based on the B fingerprint image pairs; Determine the loss value based on the loss function; If the loss value satisfies the training end condition, the current global feature extraction model is determined as the global feature extraction model that has completed training; The formula of the loss function is as follows: L is the loss value, g p The global feature vector output by the global feature extraction model after the local feature matrix of the first fingerprint image sample in the p-th fingerprint image pair among the B fingerprint image pairs is input to the current global feature extraction model. The global feature vector output by the global feature extraction model after the local feature matrix of the second fingerprint image sample in the p-th fingerprint image pair among the B fingerprint image pairs is input to the current global feature extraction model. The global feature vector output by the global feature extraction model after the local feature matrix of the second fingerprint image sample in the qth fingerprint image pair among the B fingerprint image pairs is input to the current global feature extraction model, g p and distance, g p and distance, e is a natural constant, and log() is a logarithmic function.
12. A fingerprint recognition device, characterized in that: include: a determining unit, configured to determine, based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of the plurality of template fingerprint images, some of the second global feature vectors as specific global feature vectors, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold; The recognition unit is used to determine the recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
13. An electronic device, characterized in that: include: Processor, memory, communication interface and communication bus, the processor, memory and communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1 to 11.
14. A computer storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product, characterized in that The method comprises computer instructions for instructing a computing device to execute the method according to any one of claims 1 to 11.