Iris recognition method and device, electronic equipment and storage medium

Through feature extraction models and data expansion technology based on public iris data training, the problem of insufficient accuracy and robustness of traditional iris recognition technology in non-ideal scenarios is solved, and efficient iris recognition is achieved, reducing computing time.

CN119206845AInactive Publication Date: 2024-12-27BEIJING UNIV OF CIVIL ENG & ARCHITECTURE

Patent Information

Application Number
CN202411257881.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional iris recognition technology lacks accuracy and robustness in non-ideal and unrestricted scenarios, and the calculation time is long, making it difficult to effectively deal with conditions such as lighting changes, eye occlusion and image blur.

Method used

The iris feature extraction model trained based on public iris data is adopted, and the iris sample characteristics are identified through feature vector sequence lists, combining pixel displacement and random mask data expansion to improve the robustness and recognition efficiency of the model.

Benefits of technology

It improves the accuracy and robustness of iris recognition technology in non-ideal scenarios, reduces the calculation time of the recognition stage, and achieves fast and accurate identity matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206845A_ABST
    Figure CN119206845A_ABST
Patent Text Reader

Abstract

The invention provides an iris recognition method and device, electronic equipment and a storage medium, and belongs to the technical field of iris recognition, and the method comprises the steps: determining an iris registration feature sequence of an iris registration sample based on an iris recognition model, and associating the iris registration feature sequence with an identity tag corresponding to the iris registration sample; and determining an iris recognition feature sequence of the iris recognition sample based on the iris recognition model, and calculating the similarity between the iris recognition feature sequence and the iris registration feature sequence. According to the iris recognition method and device, the electronic equipment and the storage medium, the accuracy and robustness of the iris recognition technology in non-ideal and non-limited scenes can be improved, the calculation process in the recognition stage can be simplified, for the same pair of iris recognition samples and iris registration samples, only one-time similarity calculation needs to be carried out, and the recognition efficiency is improved. Multiple pixel displacement and multiple similarity calculation are not needed, so that the time required for iris recognition is effectively shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of iris recognition, and more specifically, relates to an iris recognition method and device, electronic equipment, and storage medium. Background Art

[0002] Iris recognition technology is considered to be the most promising biometric recognition technology due to its uniqueness, stability, non-contact, and anti-counterfeiting properties. Its wide application has prompted researchers to continuously develop more accurate iris recognition methods. Traditional iris recognition algorithms rely on manually designed filters to extract local texture features of iris images for matching. However, with the increase in data complexity and the diversification of application scenarios, traditional methods have shown certain limitations when processing iris images under non-ideal conditions (such as lighting changes, eye occlusion, image blur, etc.). Therefore, the accuracy and robustness of iris recognition technology in non-ideal and non-restricted scenarios still need to be improved, and the calculation time of the recognition stage will increase. Summary of the invention

[0003] The purpose of the present disclosure is to provide an iris recognition method and device, an electronic device, and a storage medium to improve the accuracy and robustness of iris recognition technology in non-ideal and non-restricted scenarios and reduce the computing time required in the recognition stage.

[0004] According to a first aspect of the embodiments of the present disclosure, there is provided an iris recognition method, comprising: Determine an iris registration feature sequence of an iris registration sample based on an iris recognition model, and associate the iris registration feature sequence with an identity tag corresponding to the iris registration sample, wherein the iris recognition model is an iris feature extraction model trained based on public iris data; Determine an iris recognition feature sequence of an iris recognition sample based on an iris recognition model, and calculate the similarity between the iris recognition feature sequence and the iris registration feature sequence; The similarity is compared with a first threshold to determine the identity tag corresponding to the iris recognition sample.

[0005] According to a second aspect of the embodiments of the present disclosure, an iris recognition device is provided, comprising: A feature extraction module, used to determine an iris registration feature sequence of an iris registration sample based on an iris recognition model, and associate the iris registration feature sequence with an identity tag corresponding to the iris registration sample, wherein the iris recognition model is an iris feature extraction model trained based on public iris data; A similarity module, used to determine an iris recognition feature sequence of an iris recognition sample based on an iris recognition model, and calculate the similarity between the iris recognition feature sequence and the iris registration feature sequence; The judgment module is used to compare the similarity with a first threshold to judge the identity tag corresponding to the iris recognition sample.

[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned iris recognition method when executing the computer program.

[0007] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned iris recognition method are implemented.

[0008] The beneficial effects of an iris recognition method and device, electronic device, and storage medium provided by the embodiments of the present disclosure are: The disclosed embodiment uses the public iris data to train an iris feature extraction model, the output of which is an iris feature sequence, which is different from the single feature vector commonly used in existing methods. By using a feature vector sequence, the characteristics of the iris sample can be more comprehensively characterized, thereby improving the accuracy of iris recognition. By comparing the similarity between the iris recognition feature sequence and the registered feature sequence and setting a reasonable first threshold, the identity label of the iris recognition sample can be accurately determined.

[0009] On the one hand, the disclosed embodiment applies pixel shift as a data expansion method in the training phase. In the recognition phase, there is no need to repeat pixel shift and multiple similarity calculations, thereby achieving fast and accurate identity matching and improving efficiency.

[0010] On the other hand, using random masks for data augmentation during training ensures that the iris recognition model is robust to local noise when extracting feature sequences of iris registration samples.

[0011] Therefore, the embodiments of the present disclosure improve the accuracy and robustness of iris recognition technology in non-ideal, non-restricted scenarios and reduce the computing time required for the recognition stage. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1 A flowchart of an iris recognition method provided by an embodiment of the present disclosure; Figure 2 A flowchart of another iris recognition method provided by an embodiment of the present disclosure; Figure 3 A flow chart of a training method for an iris recognition model provided in one embodiment of the present disclosure; Figure 4 A flowchart of image preprocessing provided by an embodiment of the present disclosure; Figure 5 A flowchart of a Transformer encoder provided in one embodiment of the present disclosure; Figure 6 A schematic diagram of iris positioning and normalization provided by an embodiment of the present disclosure; Figure 7 A schematic diagram of a pixel displacement method included in a data enhancement method provided in an embodiment of the present disclosure; Figure 8 A structural block diagram of an iris recognition device provided in one embodiment of the present disclosure; Fig. 9 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0015] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0016] Please refer to Figure 1 , Figure 1 A flowchart of an iris recognition method provided in an embodiment of the present disclosure includes: S101: Determine an iris registration feature sequence of an iris registration sample based on an iris recognition model, and associate the iris registration feature sequence with an identity tag corresponding to the iris registration sample. The iris recognition model is an iris feature extraction model trained based on public iris data.

[0017] In this embodiment, a first data set is obtained as a training database for training an iris recognition model to obtain a trained iris recognition model; wherein the trained iris recognition model is used to perform feature extraction on the first data set to obtain a first iris feature sequence; the first data set includes a first iris data set (public iris data) and a first identity tag set, and the first identity tag set corresponds to the first iris data set.

[0018] Collect a second data set, wherein the second data set includes a second iris data set (i.e., an iris registration sample) and a second identity tag set, and the second identity tag set corresponds to the second iris data set; input the second iris data set into a trained iris recognition model to obtain a second iris feature sequence (i.e., an iris registration feature sequence).

[0019] The iris registration feature sequence is associated with the identity tag corresponding to the iris registration sample and stored in the database to complete the identity registration.

[0020] Specifically, the steps of determining the iris registration feature sequence of the iris registration sample based on the iris recognition model are as follows: First, obtain iris registration samples. You can use special iris acquisition equipment to obtain clear iris images.

[0021] Second, the iris registration samples are processed using an iris recognition model, which is trained with a large amount of public iris data and has powerful feature extraction capabilities. It can extract unique iris registration feature sequences from iris images, which contain rich texture information.

[0022] Specifically, the steps of associating the iris registration feature sequence with the identity tag corresponding to the iris registration sample are as follows: Assign a unique identity tag to each iris registration sample. This tag can be the user's name, number, and other identification information. The extracted iris registration feature sequence is associated with the corresponding identity tag and stored so that the user identity can be determined quickly and accurately in the subsequent recognition stage.

[0023] Public iris data usually comes from multiple channels, including scientific research institutions, databases, etc., and contains a large number of iris images of different individuals, which is diverse and representative.

[0024] By training on public iris data, the iris recognition model can learn the characteristic patterns of different irises and improve the effectiveness and robustness of feature extraction. During the training process, the iris recognition model will continuously adjust its parameters to maximize the difference between the iris feature sequences of iris samples corresponding to different identities, while minimizing the difference between the iris feature sequences of iris samples corresponding to the same identity.

[0025] S102: Determine an iris recognition feature sequence of an iris recognition sample based on an iris recognition model, and calculate the similarity between the iris recognition feature sequence and an iris registration feature sequence.

[0026] In this embodiment, an iris image to be identified is obtained by an iris acquisition device as an iris identification sample. Then, an iris recognition model is used to extract features. The model can extract a unique iris recognition feature sequence from the iris recognition sample, which also contains iris texture information, and is the key to subsequent comparison with the iris registration feature sequence.

[0027] Finally, a variety of methods can be used to calculate similarity, the most common ones are Hamming distance, cosine similarity, etc. For example, Hamming distance refers to the number of different characters in corresponding positions of two strings of equal length. The smaller the Hamming distance, the higher the similarity; cosine similarity measures similarity by calculating the cosine value of the angle between two vectors. The closer the cosine value is to 1, the higher the similarity.

[0028] S103: Compare the similarity with the first threshold to determine the identity tag corresponding to the iris recognition sample.

[0029] In this embodiment, the calculated similarity value can set a threshold (i.e., the first threshold). When the similarity exceeds the first threshold, it can be considered that the iris recognition sample and the corresponding iris registration sample belong to the same person, thereby determining the user's identity. The first threshold is usually determined through a large number of experiments and practical applications. By performing recognition tests on a large number of iris samples with known identities and observing indicators such as the correct recognition rate and the false acceptance rate and false rejection rate under different similarity values, a threshold that can achieve a good balance between accuracy and security can be found.

[0030] After calculating the similarity between the iris recognition feature sequence of the iris recognition sample and a certain iris registration feature sequence, the similarity value is compared with the first threshold.

[0031] If the similarity is greater than or equal to the first threshold, then it can be determined that the iris recognition sample and the corresponding iris registration sample belong to the same person, so that the identity tag corresponding to the iris recognition sample can be determined to be the identity tag associated with the registration sample. For example, if the similarity between an iris recognition sample and the iris registration feature of a registered user A reaches a set first threshold, then the identity corresponding to the iris recognition sample can be determined to be user A.

[0032] If the similarity is less than the first threshold, it means that the iris recognition sample and the currently compared iris registration sample do not belong to the same person. At this time, it is necessary to continue to compare with other registered iris feature sequences, or determine that the iris recognition sample is an unregistered new user.

[0033] From the above, it can be concluded that the iris feature extraction model obtained by this embodiment is trained by using public iris data. The output of this model is an iris feature sequence, which is different from the single feature vector commonly used in existing methods. By using a feature vector sequence, the characteristics of the iris sample can be more comprehensively characterized, thereby improving the accuracy of iris recognition. By comparing the similarity between the iris recognition feature sequence and the registered feature sequence, and setting a reasonable first threshold, the identity label of the iris recognition sample can be accurately determined. Therefore, this embodiment improves the accuracy and robustness of iris recognition technology in non-ideal and non-restricted scenarios, and reduces the computing time required for the recognition stage.

[0034] In one embodiment of the present disclosure, reference Figure 1 , Figure 2 and Figure 3 , an iris recognition method further includes: Acquire public iris data, where the public iris data includes a plurality of iris sample images and identity tags corresponding to the respective iris sample images; Divide the public iris data into multiple triplets, and determine iris pre-processed image sets corresponding to the multiple triplets; Training the first recognition model based on the iris preprocessed image set to obtain an iris recognition model; Among them, each triplet includes three types of samples: anchor samples, positive samples and negative samples; anchor samples are randomly selected from public iris data; the identity labels of anchor samples and positive samples are the same, and the identity labels of anchor samples and negative samples are different.

[0035] In this embodiment, the public iris data is used as training samples, and the public iris data includes multiple iris sample images and identity labels corresponding to each iris sample image. For each batch of training samples, the public iris data is divided into multiple triplets according to their identity labels. Each triplet contains three samples, namely, an anchor sample, a positive sample, and a negative sample. Among them, the positive sample and the anchor sample have the same identity label, and the negative sample and the anchor sample have different identity labels.

[0036] By performing preprocessing operations on the iris sample images in each divided triplet, a set of iris preprocessed images is obtained. Preprocessing can include operations such as image enhancement, denoising, normalization, and pixel shifting, with the aim of improving the quality, consistency, and diversity of the image for better model training.

[0037] The first recognition model is the initial iris recognition model, which has certain feature extraction and classification capabilities, but needs to be optimized and improved through a large amount of training data. The first recognition model is trained using the iris preprocessed image set. During the training process, the first recognition model will learn how to distinguish different iris samples, especially how to identify the similarity between the anchor sample and the positive sample and the difference between the anchor sample and the negative sample.

[0038] For example, the first recognition model will adjust its own parameters. Through continuous iterative training, the first recognition model will gradually improve its ability to extract iris features and classification accuracy, and eventually obtain an optimized iris recognition model.

[0039] It can be concluded from the above that by acquiring public iris data, dividing triples, determining the iris preprocessing image set and training the first recognition model, an iris recognition model with good performance can be obtained, which provides strong support for accurate iris recognition.

[0040] In one embodiment of the present disclosure, reference Figure 4 , determine the iris preprocessing image sets corresponding to multiple triplets, including: Performing iris inner and outer circle positioning on a target iris image in a target triplet to obtain positioning information, wherein the target triplet is a triplet in a plurality of triples, and the target iris image is an iris image in the target triplet; Extracting an iris region image of the target iris image according to the positioning information; Determine a target normalized image of the target iris image, enhance the target normalized image using a contrast-limited adaptive histogram equalization algorithm, perform data expansion using pixel shift, and obtain an iris preprocessed image of the target iris image; The iris preprocessed image is an image in the iris preprocessed image set.

[0041] In this embodiment, the target iris image in the target triplet needs to be first located within and outside the iris circle, because accurate location can provide accurate basic information for subsequent processing. The inner and outer circles of the iris define the effective area of ​​the iris. Only by accurately determining this area can valuable iris features be effectively extracted.

[0042] This embodiment can use various image processing algorithms and technologies to locate the inner and outer circles of the iris. Usually, factors such as grayscale changes and texture features of the iris image are considered to improve the accuracy of positioning. For example, an edge detection algorithm can be used to detect the edge of the iris, and then the inner and outer circles of the iris are determined by fitting a circle.

[0043] When the iris location information is obtained, the iris region image of the target iris image can be extracted according to the location information. The purpose of extracting the iris region image is to remove irrelevant parts of the image and retain only information related to iris recognition, thereby reducing the amount of calculation and interference factors of subsequent processing.

[0044] According to the coordinates of the inner and outer circles of the iris determined by the positioning information, the iris area can be separated from the original image using techniques such as image cropping to obtain a pure iris area image.

[0045] The purpose of determining the target normalized image of the target iris image is to make different iris images consistent in terms of size, brightness, contrast, etc. Normalization can eliminate the differences caused by factors such as acquisition equipment and lighting conditions, and improve the adaptability and recognition accuracy of the model to different iris images.

[0046] The purpose of enhancing the target normalized image is to highlight the characteristics of the iris and improve the quality and recognizability of the image. Enhancement can be done in a variety of ways, such as contrast enhancement and sharpening, to make the texture and details of the iris more clearly visible.

[0047] The purpose of performing random pixel shift on the target normalized image is to increase the diversity of the image, which helps to improve the robustness of the model for the same iris sample collected under different conditions. That is, it can solve the problem of iris image rotation caused by the subject's tilted head or squinting eyes when collecting the iris, which affects the recognition result.

[0048] After normalization and enhancement, the iris preprocessing image of the target iris image is obtained. This image will be used as an element in the iris preprocessing image set for subsequent training of the iris recognition model.

[0049] Specifically, the target iris image in the target triplet is subjected to image preprocessing operation, and the operation steps are as follows: Obtain public iris data as training samples; Use the public iris positioning algorithm to locate the inner and outer circles of the iris of the training samples; Extracting an iris area image according to the positioning information; The obtained iris region image is normalized, and the iris region is expanded according to polar coordinates to obtain a rectangular iris image with a resolution of 64×512 (i.e., the target normalized image), as shown in Figure 6 As shown; The target normalized image is texture enhanced using the contrast-limited adaptive histogram equalization (CLAHE) algorithm, and data augmentation is performed on the target normalized image randomly, i.e., random pixel displacement, with a maximum left or right shift of no more than 14 pixels. Then, Figure 7 Shows the left shift of the target normalized image Pixel shift operation: shift the target normalized image to the left pixels, and the leftmost width The area is spliced ​​to the far right of the target normalized image.

[0050] From the above, it can be concluded that this embodiment uses the pixel shift operation in the input stage as a data expansion method. After obtaining the training samples, the samples are randomly translated and then input into the model. Thanks to the ability of the self-attention module in the Transformer encoder to model global information, pixel translation can be used as a data enhancement method to improve the robustness of the model to translation transformation, and avoid the computational time consumption caused by multiple similarity calculations in the recognition stage, thereby ensuring the real-time performance of iris recognition.

[0051] In one embodiment of the present disclosure, reference Figure 3 , training the first recognition model based on the iris preprocessed image set to obtain an iris recognition model, including: Segmenting the first image to obtain a first number of image blocks corresponding to the first image, where the first image is an image in an iris preprocessing image set; Performing random masking on a first number of image blocks to obtain a second number of image blocks, wherein the first number is greater than the second number; Determine an initial feature vector sequence corresponding to a second number of image blocks; Input the initial feature vector sequence into the Transformer encoder for forward propagation, and retain all the output feature vector sequences of the Transformer encoder to obtain the iris feature sequence corresponding to the first image; using the iris feature sequence corresponding to the first image as the iris feature sequence in the iris feature set; The first recognition model is trained based on the iris feature set to obtain an iris recognition model.

[0052] In this embodiment, since the Transformer encoder needs to serialize the input (that is, the input needs to be a vector sequence), the first image in the iris preprocessing image set is segmented. A common serialization method is to divide the first image into small blocks and arrange the image blocks in sequence to form a sequence. Different areas in the iris image can contain different feature information, and segmentation can be used to analyze and process this information in more detail.

[0053] This embodiment may adopt a regular grid segmentation method, for example, evenly dividing the image into a number of image blocks of a fixed size, each of which may be regarded as a representative of a local area.

[0054] Since the number of image blocks obtained by segmentation is the first number, not all image blocks are equally important for iris recognition. Therefore, it is necessary to screen and retain more valuable image blocks (such as the second number) to reduce the amount of calculation and noise interference.

[0055] The first number of image blocks are randomly masked, that is, the dropout() function can be used to randomly discard the image blocks, which can increase the accuracy of the iris recognition model and increase the robustness of the iris recognition model to local noise. The discarded image blocks can be randomly selected.

[0056] For the second number of image blocks obtained by random masking, it is necessary to determine the initial feature vector sequence corresponding thereto, which will serve as the basis for subsequent processing and is used to represent the feature information of the image blocks. The image blocks can be linearly mapped to obtain the initial feature vector sequence.

[0057] The Transformer encoder is a powerful deep learning model with good sequence processing and global information fusion capabilities. Inputting the initial feature vector sequence into the Transformer encoder can fully utilize its advantages to extract more advanced and global iris features. The Transformer encoder can capture the relationship and contextual information between different image patches, thereby better understanding the overall characteristics of the iris image.

[0058] In the Transformer encoder, the initial feature vector sequence undergoes a series of linear transformations, attention mechanisms and other operations to gradually fuse and update feature information. Through forward propagation, the iris feature sequence corresponding to the first image is finally obtained. The attention mechanism can make the model pay more attention to important image blocks and features, improving the accuracy and efficiency of feature extraction.

[0059] The iris feature sequence corresponding to the first image is added to the iris feature set, and a set including multiple iris image features is gradually constructed, and the set will be used to train the first recognition model.

[0060] The iris feature set provides rich training data for the model, enabling it to learn the characteristic patterns and changing rules of different iris images. By continuously adjusting the model parameters, the model can accurately identify and distinguish different iris features.

[0061] The first recognition model is trained using the iris feature set. During the training process, the model learns and optimizes based on the input iris feature sequence and the corresponding identity tag. By continuously adjusting the model's weights and parameters, the model can extract iris image features with better representation and discrimination.

[0062] After multiple iterations of training, when the performance of the model on the training set reaches certain requirements (such as accuracy, recall and other indicators meet the set standards), the model can be considered to have been trained and the final iris recognition model is obtained.

[0063] In this embodiment, the resolution of the image after preprocessing is The iris image (i.e. the first image) is divided into blocks of 16×16 , a total of 128 image blocks (i.e., the first number of image blocks). Randomly discard 75% of them, i.e., discard 96 image blocks, then is the total number of image blocks that are not discarded in an input training sample (i.e., the second number of image blocks), where: and Indicates high, and Indicates width. The order of the image blocks discarded by the three images in each triplet remains the same; Each image block is expanded into a one-dimensional vector by row and linearly mapped to a fixed dimension , get the initial feature vector of the image block: , The size is ,in, represents the size of each image block, Indicates the number of channels of the image block, Indicates image blocks, represents the linear mapping parameter matrix; The initial feature vector sequence of the image block is sent as input to the Transformer encoder for forward propagation to obtain the iris feature sequence of the training sample , The size is

[0064] Finally, the training error is calculated through the loss function, and the network parameters are updated through the back propagation algorithm based on the training error so as to carry out the next round of model training and finally obtain the iris recognition model.

[0065] It can be concluded from the above that this embodiment proposes a Transformer encoder, which not only effectively utilizes the Transformer's ability to effectively extract features from partial images, but also effectively avoids the iris recognition model from learning local noise and other information irrelevant to identity recognition, thereby improving the accuracy and robustness of the iris recognition model. By performing segmentation, random masking, feature extraction, Transformer encoder processing, and model training based on the iris feature set on the iris preprocessed image, a good-performance iris recognition model can be obtained, which can accurately identify and distinguish different iris features.

[0066] In one embodiment of the present disclosure, reference Figure 5 , input the initial feature vector sequence into the Transformer encoder for forward propagation, and retain all the output feature vector sequences of the Transformer encoder to obtain the iris feature sequence corresponding to the first image, including: Normalizing the initial feature vector sequence to obtain a normalized feature vector sequence; Dependency relationship modeling is performed based on the normalized feature vector sequence to obtain an iris feature sequence corresponding to the first image.

[0067] In this embodiment, the Transformer encoder is composed of 12 Transformer blocks with the same structure. Each block takes the output feature vector sequence (or the initial input feature vector sequence) of the previous block as input and outputs the processed feature vector sequence. The following is the calculation process of a single Transformer block: First, the input initial feature vector sequence of the image block is layer-normalized, and then the dependency modeling is performed in different representation subspaces through a multi-head attention module.

[0068] Then, when calculating attention, Rotary Positional Encoding (RoPE) is introduced to encode the relative position of each image block in the output feature vector sequence, so that the iris recognition model can learn spatially associated and discriminative local texture features.

[0069] Finally, the result is added to the initial input feature vector sequence, followed by a second layer normalization, and the normalized features are sent to a multi-layer perceptron for refinement. The multi-layer perceptron consists of two fully connected layers, a GELU activation layer, and two dropout layers. The refined features are added to the features before the second normalization, and the result is used as the final output of the Transformer block.

[0070] From the above, it can be concluded that this embodiment, relying on the powerful context feature extraction capability of Transformer, can enhance the local feature extraction capability of iris without losing iris information, thereby obtaining semantically rich and discriminative identity features and achieving high-precision iris matching. This embodiment fully exploits the context feature extraction capability of Transformer, which is conducive to obtaining detailed, discriminative, and noise-robust iris features, thereby achieving high-precision and generalizable iris recognition.

[0071] In one embodiment of the present disclosure, an iris recognition method further includes: The feature of the anchor sample in a triple is recorded as , the positive sample feature is recorded as , the negative sample feature is recorded as ; The extended cosine distance is calculated as follows:

[0072]

[0073] in, express and The extended cosine distance, express and The extended cosine distance, represents the number of input feature vector sequences, represents the first feature vectors, The size is , similarly, and Represents the first feature vectors, represents the inner product between the anchor sample feature vector and the positive sample feature vector, represents the inner product between the anchor sample feature vector and the negative sample feature vector, Represents the anchor sample The feature vector norm, Represents the positive sample The feature vector norm, Represents the negative sample The feature vector norm; The loss function is calculated as follows:

[0074] in, represents the loss function, Indicates taking the maximum value, .

[0075] In this embodiment, the loss function is used to calculate the training error, and the network parameters are updated through the back propagation algorithm according to the training error, so as to carry out the next round of model training. This embodiment also proposes the concept of extended cosine distance, which makes full use of the sequence feature output when calculating the similarity of two iris samples, further improving the recognition accuracy of the model.

[0076] In one embodiment of the present disclosure, an iris recognition method further includes: Rotational position coding is introduced to encode the relative positions of the second number of image blocks in the output feature vector sequence.

[0077] In this embodiment, RoPE is introduced to encode the relative position of each image block in the output feature vector sequence when calculating attention, so that the model can learn the spatially associated and distinguishable local texture features. The self-attention mechanism formula is:

[0078]

[0079]

[0080] in, represents the query vector sequence, represents a sequence of key vectors, represents a sequence of value vectors, represents the parameter matrix learned during the training of the first recognition model, The size is , represents the attention weight matrix, The size is , express The result obtained after self-attention calculation is represents the input feature vector sequence after calculating RoPE, The size is , represents the number of input sequences, represents the dimension, Indicates transpose.

[0081] calculate When , firstly, the input feature vector sequence Calculate RoPE for each vector in and concatenate the results:

[0082]

[0083] in, is the first character sequence of the input feature vector elements, The size is , For the corresponding The RoPE position embedding matrix in 2D form has 2 elements, The size is , the calculation method is:

[0084]

[0085]

[0086] The calculation method of The same. Among them, and For the The two-dimensional coordinates of the image block corresponding to the feature vector in the target iris image.

[0087] According to the pairwise similarity between two elements in the feature vector sequence and the corresponding and To calculate the attention weight , which calculates all the values ​​in the sequence The multi-head self-attention is an extension of self-attention. The above process is repeated h times, and the results of each time are concatenated and mapped to a fixed dimension. The formula for multi-head self-attention is:

[0088] in, The size is , express The result obtained after multi-head self-attention calculation.

[0089] For an input feature vector sequence, the absolute position encoding models the number of each vector in the sequence, while the relative position encoding models the difference in numbers between any two image blocks. When the iris image undergoes a translation transformation, the absolute position of the pixels in the image changes, while the relative position between the pixels remains unchanged. In order to make the iris recognition model unaffected by the translation transformation, it is necessary to model the relative position between the pixels. Therefore, it is necessary to introduce relative position encoding.

[0090] It can be concluded from the above that this embodiment chooses to use RoPE as the relative position encoding method. Compared with other relative position encoding methods, RoPE has been widely used in natural language processing models, which fully proves that it can effectively improve the feature extraction ability of the model. In addition, the advantages of RoPE also include that it does not contain learnable parameters and will not increase the number of parameters for the model.

[0091] Corresponding to an iris recognition method in the above embodiment, Figure 8 This is a structural block diagram of an iris recognition device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 8 The iris recognition device 20 includes: a feature extraction module 21, a similarity module 22 and a judgment module 23.

[0092] The feature extraction module 21 is used to determine the iris registration feature sequence of the iris registration sample based on the iris recognition model, and associate the iris registration feature sequence with the identity tag corresponding to the iris registration sample. The iris recognition model is an iris feature extraction model trained based on public iris data. A similarity module 22, used to determine an iris recognition feature sequence of an iris recognition sample based on an iris recognition model, and calculate the similarity between the iris recognition feature sequence and an iris registration feature sequence; The judgment module 23 is used to compare the similarity with the first threshold to judge the identity tag corresponding to the iris recognition sample.

[0093] In one embodiment of the present disclosure, an iris recognition device 20 further includes: a training module; A training module, used to obtain public iris data, where the public iris data includes a plurality of iris sample images and identity tags corresponding to each iris sample image; Divide the public iris data into multiple triplets, and determine iris pre-processed image sets corresponding to the multiple triplets; Training the first recognition model based on the iris preprocessed image set to obtain an iris recognition model; Among them, each triplet includes three types of samples: anchor samples, positive samples and negative samples; anchor samples are randomly selected from public iris data; the identity labels of anchor samples and positive samples are the same, and the identity labels of anchor samples and negative samples are different.

[0094] In one embodiment of the present disclosure, the training module is further used to: Performing iris inner and outer circle positioning on a target iris image in a target triplet to obtain positioning information, wherein the target triplet is a triplet in a plurality of triples, and the target iris image is an iris image in the target triplet; Extracting an iris region image of the target iris image according to the positioning information; Determine a target normalized image of the target iris image, enhance the target normalized image using a contrast-limited adaptive histogram equalization algorithm, perform data expansion using pixel shift, and obtain an iris preprocessed image of the target iris image; The iris preprocessed image is an image in the iris preprocessed image set.

[0095] In one embodiment of the present disclosure, the training module is further used to: Segmenting the first image to obtain a first number of image blocks corresponding to the first image, where the first image is an image in an iris preprocessing image set; Performing random masking on a first number of image blocks to obtain a second number of image blocks, wherein the first number is greater than the second number; Determine an initial feature vector sequence corresponding to a second number of image blocks; Input the initial feature vector sequence into the Transformer encoder for forward propagation, and retain all the output feature vector sequences of the Transformer encoder to obtain the iris feature sequence corresponding to the first image; Sequencing the iris features corresponding to the first image as an iris feature sequence in an iris feature set; The first recognition model is trained based on the iris feature set to obtain an iris recognition model.

[0096] In one embodiment of the present disclosure, the training module is further used to: Normalizing the initial feature vector sequence to obtain a normalized feature vector sequence; Dependency relationship modeling is performed based on the normalized feature vector sequence to obtain an iris feature sequence corresponding to the first image.

[0097] In one embodiment of the present disclosure, the training module is further used to: The feature of the anchor sample in a triple is recorded as , the positive sample feature is recorded as , the negative sample feature is recorded as ; The extended cosine distance is calculated as follows:

[0098]

[0099] in, express and The extended cosine distance, express and The extended cosine distance, represents the number of input feature vector sequences, represents the first feature vectors, The size is , similarly, and Represents the first feature vectors, represents the inner product between the anchor sample feature vector and the positive sample feature vector, represents the inner product between the anchor sample feature vector and the negative sample feature vector, Represents the anchor sample The feature vector norm, Represents the positive sample The feature vector norm, Represents the negative sample The feature vector norm; The loss function is calculated as follows:

[0100] in, represents the loss function, Indicates taking the maximum value, .

[0101] In one embodiment of the present disclosure, the training module is further used to: Rotational position coding is introduced to encode the relative positions of the second number of image blocks in the output feature vector sequence.

[0102] See also Fig. 9 , Fig. 9 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Fig. 9The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 8 The functions of modules 21 to 23 are shown.

[0103] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0104] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0105] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0106] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of an iris recognition method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0107] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0108] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0109] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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 each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0110] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0111] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0113] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0114] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. An iris recognition method, characterized in that: include: Determine an iris registration feature sequence of an iris registration sample based on an iris recognition model, and associate the iris registration feature sequence with an identity tag corresponding to the iris registration sample, wherein the iris recognition model is an iris feature extraction model trained based on public iris data; Determine an iris recognition feature sequence of an iris recognition sample based on an iris recognition model, and calculate the similarity between the iris recognition feature sequence and the iris registration feature sequence; The similarity is compared with a first threshold to determine the identity tag corresponding to the iris recognition sample.

2. An iris recognition method as claimed in claim 1, characterized in that: Also includes: Acquire public iris data, where the public iris data includes a plurality of iris sample images and identity tags corresponding to the respective iris sample images; Dividing the public iris data into a plurality of triplets, and determining a set of iris preprocessed images corresponding to the plurality of triplets; Training a first recognition model based on the iris preprocessed image set to obtain the iris recognition model; Each triplet includes three types of samples: anchor samples, positive samples and negative samples; the anchor samples are randomly selected from the public iris data; the identity labels of the anchor samples and the positive samples are the same, and the identity labels of the anchor samples and the negative samples are different.

3. An iris recognition method as claimed in claim 2, characterized in that: The step of determining a set of iris preprocessed images corresponding to a plurality of triplets comprises: Performing iris inner and outer circle positioning on a target iris image in a target triplet to obtain positioning information, wherein the target triplet is a triplet in the multiple triples, and the target iris image is an iris image in the target triplet; Extracting an iris region image of the target iris image according to the positioning information; Determine a target normalized image of the target iris image, enhance the target normalized image using a contrast-limited adaptive histogram equalization algorithm, and perform data expansion using pixel shift to obtain an iris preprocessed image of the target iris image; The iris preprocessed image is an image in the iris preprocessed image set.

4. The iris recognition method according to claim 2, characterized in that: The step of training the first recognition model based on the iris preprocessed image set to obtain the iris recognition model comprises: Segmenting a first image to obtain a first number of image blocks corresponding to the first image, where the first image is an image in the iris preprocessed image set; Performing random masking on the first number of image blocks to obtain a second number of image blocks, wherein the first number is greater than the second number; Determining an initial feature vector sequence corresponding to the second number of image blocks; Inputting the initial feature vector sequence into a Transformer encoder for forward propagation, and retaining all output feature vector sequences of the Transformer encoder to obtain an iris feature sequence corresponding to the first image; using the iris feature sequence corresponding to the first image as the iris feature sequence in the iris feature set; The first recognition model is trained based on the iris feature set to obtain the iris recognition model.

5. An iris recognition method as claimed in claim 4, characterized in that: The step of inputting the initial feature vector sequence into a Transformer encoder for forward propagation and retaining all output feature vector sequences of the Transformer encoder to obtain an iris feature sequence corresponding to the first image includes: Normalizing the initial feature vector sequence to obtain a normalized feature vector sequence; Dependency relationship modeling is performed based on the normalized feature vector sequence to obtain an iris feature sequence corresponding to the first image.

6. An iris recognition method as claimed in claim 4, characterized in that: Also includes: The feature of an anchor sample in the triple is recorded as , the positive sample feature is recorded as , the negative sample feature is recorded as ; The extended cosine distance is calculated as follows: in, express and The extended cosine distance, express and The extended cosine distance, represents the number of input feature vector sequences, represents the first feature vectors, The size is , similarly, and Represents the first feature vectors, represents the inner product between the anchor sample feature vector and the positive sample feature vector, represents the inner product between the anchor sample feature vector and the negative sample feature vector, Represents the anchor sample The feature vector norm, Represents the positive sample The feature vector norm, Represents the negative sample The feature vector norm; The loss function is calculated as follows: in, represents the loss function, Indicates taking the maximum value, .

7. An iris recognition method as claimed in claim 6, characterized in that: Also includes: Rotational position coding is introduced to encode the relative positions of the second number of image blocks in the output feature vector sequence.

8. An iris recognition device, characterized in that: include: A feature extraction module, used to determine an iris registration feature sequence of an iris registration sample based on an iris recognition model, and associate the iris registration feature sequence with an identity tag corresponding to the iris registration sample, wherein the iris recognition model is an iris feature extraction model trained based on public iris data; A similarity module, used to determine an iris recognition feature sequence of an iris recognition sample based on an iris recognition model, and calculate the similarity between the iris recognition feature sequence and the iris registration feature sequence; The judgment module is used to compare the similarity with a first threshold to judge the identity tag corresponding to the iris recognition sample.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Iris recognition method and device and terminal device

    CN107506754A

  • Cross-view gait recognition method based on block horizontal pyramid spatial-temporal feature fusion model and gait reordering

    CN113435225A

  • Remote sensing scene classification method based on mask attention mechanism

    CN117372763A

Cited By

  • Iris recognition method and device based on uncertainty modeling, medium and equipment

    CN120496155A

  • Iris recognition method, device, medium and equipment based on uncertainty modeling

    CN120496155B