Model generation method and device with iris quality and attack detection knowledge

By training the teacher network model of iris presenting attack and quality detection in edge devices, and using knowledge distillation technology to transfer knowledge to the student network model, the problem of high computing resources consumption in the existing technology is solved, and efficient iris detection model generation is achieved.

CN116630746BActive Publication Date: 2025-04-15BEIJING WANLIHONG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310611623.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-27
Publication Date
2025-04-15
Estimated Expiration
2043-05-27

AI Technical Summary

Technical Problem

When the prior art develops models for iris presentation attack detection and iris quality detection in edge devices, computing resources consume a lot, resulting in increased latency.

Method used

By obtaining training data related to iris presentation attack and iris quality, the iris presentation attack detection model and iris quality detection model were trained respectively to obtain the teacher network model. Then, data with double labels are screened out from these data, the student network model is trained, and the knowledge of the teacher network model is transferred to the student network model through a knowledge distillation strategy to generate a joint model.

Benefits of technology

This method reduces the computing resource consumption when developing models on edge devices, avoids the need to develop iris quality detection and iris presentation attack detection models separately, and improves the detection performance and efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116630746B_ABST
    Figure CN116630746B_ABST
Patent Text Reader

Abstract

The present application relates to a model generation method and device with iris quality and attack detection knowledge, wherein the method includes: obtaining first training data corresponding to iris presentation attack and second training data corresponding to iris quality; using the first training data to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and using the second training data to train the iris quality detection model to obtain an iris quality detection teacher network model; screening third training data from the first training data and the second training data, using the third training data to train a preset student network model to obtain a primary student network model; based on the knowledge distillation strategy, transferring the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model to the primary student network model to obtain a model with iris quality and attack detection knowledge. The present application has the effect of reducing the consumption of computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of model generation, and in particular to a method and device for generating a model with iris quality and attack detection knowledge. Background Art

[0002] As a highly reliable identity authentication method, the actual recognition performance of iris recognition in applications is closely related to the quality of the collected iris images. Iris quality detection can be used to remove low-quality iris images that do not meet the recognition requirements, such as blur, severe occlusion, and deformation, thereby improving iris recognition performance. In addition, presentation attacks have always been the main security risk faced by iris recognition technology. Presentation attack detection can distinguish between real irises and fake irises. Fake irises refer to prosthetic irises, including printing and other display devices, which also plays an important role in improving iris recognition performance.

[0003] At present, the general approach for iris presentation attack detection and iris quality detection is to develop independent models for each purpose. However, due to the limited computing resources of edge devices, this approach to model development will consume more computing resources and increase latency. Summary of the invention

[0004] In order to reduce the consumption of computing resources, the present application provides a method and device for generating a model with iris quality and attack detection knowledge.

[0005] In a first aspect of the present application, a method for generating a model with iris quality and attack detection knowledge is provided, which specifically includes:

[0006] Acquire first training data corresponding to an iris presentation attack and second training data corresponding to iris quality, wherein the first training data has a first label, the second training data has a second label, data having the second label exists in the first training data, data having the first label exists in the second training data, the first label is an iris presentation attack detection label, and the second label is an iris quality detection label;

[0007] Using the first training data to train an iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and using the second training data to train an iris quality detection model to obtain an iris quality detection teacher network model;

[0008] Selecting third training data from the first training data and the second training data, and using the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label;

[0009] Based on the knowledge distillation strategy, the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model is transferred to the primary student network model to obtain a model with iris quality and attack detection knowledge.

[0010] By adopting the above technical solution, the first training data and the second training data are obtained, and the first training data is used alone to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model with the function of detecting presentation attacks. Similarly, the second training data is used alone to train the iris quality detection model to obtain an iris quality detection teacher network model with the function of detecting iris quality. Then, the third training data with the first label and the second label is selected from the first training data and the second training data, and the student network model is trained to obtain a primary student network model with preliminary knowledge of the two tasks of presentation attack detection and iris quality detection. Finally, through the knowledge distillation strategy, the knowledge in the iris presentation attack detection teacher network model and the iris quality detection teacher network model is better transferred to the primary student network model, thereby obtaining a model for joint iris quality and presentation attack detection, without the need to develop models for iris quality detection and iris presentation attack detection separately, thereby reducing the consumption of computing resources.

[0011] Optionally, based on the knowledge distillation strategy, the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model is transferred to the primary student network model to obtain a model with iris quality and attack detection knowledge, specifically including:

[0012] Using the first training data to perform first training on the iris quality detection teacher network model and the primary student network model respectively, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model;

[0013] After the first training, the second training data is used to perform a second training on the iris presentation attack detection teacher network model and the primary student network model after the first training, so as to transfer the knowledge of the iris presentation attack detection teacher network model to the primary student network model;

[0014] Based on the alternating training attenuation strategy formula, the first training and the second training are performed alternately to obtain a model with iris quality and attack detection knowledge.

[0015] By adopting the above technical solution, the first training data, i.e., the iris data related to iris presentation attack, is simultaneously input into the iris quality detection teacher network model and the primary student network model, and the first training is performed, so that while the first training data trains the primary student network model, the primary student network model can also learn the knowledge of the iris quality detection teacher network model. Then, the second training is performed alternately, and the second training data is input into the iris presentation attack detection teacher network model and the primary student network model, so that the primary student network model learns the knowledge of the iris presentation attack detection teacher network model. Finally, in order to avoid the high frequency of alternating training and the large fluctuation of the loss value of the primary student network model, based on the alternating training attenuation strategy formula, the first training and the second training are reasonably alternated, which is helpful to better transfer knowledge, so that the model accuracy of the joint iris quality and presentation attack detection obtained after alternating training is higher.

[0016] Optionally, the alternating training attenuation strategy formula is: Where γ represents the attenuation coefficient, a represents the current number of alternations, b represents the attenuation cutoff number, N represents the total number of training rounds, when a is greater than or equal to b, each round is alternately trained, and R represents the number of training rounds of the first training or the second training.

[0017] By adopting the above technical solution, if the current number of alternations is greater than or equal to the attenuation cutoff number, then the number of training rounds is determined to be 1, that is, 1 round of first training is performed, and then 1 round of second training is performed alternately; if the current number of alternations is less than the attenuation cutoff number, then the number of training rounds is determined to be N×exp(-γ×a / b), that is, N×exp(-γ×a / b) rounds of first training are performed, and then N×exp(-γ×a / b) rounds of second training are performed alternately. Through this alternating training attenuation strategy, it is better to avoid large fluctuations in the loss value of the student network model.

[0018] Optionally, the first training data is used to perform first training on the iris quality detection teacher network model and the primary student network model, respectively, and specifically includes:

[0019] Inputting the first training data into the iris quality detection teacher network model and the primary student network model respectively, performing spatial feature fusion processing on the output feature graph of the third level of the iris quality detection teacher network model, and obtaining a first fused spatial feature and a corresponding first mean;

[0020] Performing spatial feature fusion processing on the output feature map of the third level of the primary student network model to obtain a second fused spatial feature and a corresponding second mean;

[0021] The first fused spatial feature and the second fused spatial feature are constrained by a preset spatial feature constraint function, and the spatial feature constraint function is: In the formula, μ t-iqa,k represents the first mean of the kth output feature map, μ s,k represents the second mean of the k-th output feature map, H t-iqa,k represents the first fused spatial feature of the kth output feature map, H s,k represents the second fusion spatial feature of the k-th output feature map, M represents the total number of output feature maps, k represents the k-th output feature map, and L s Represents the spatial feature constraint loss value;

[0022] Performing feature extraction on the output feature graphs of the third level of the iris quality detection teacher network model and the primary student network model to obtain extraction results;

[0023] The extraction result is semantically constrained by a preset cosine distance loss function, and the attack detection regression head in the primary student network model is constrained by a preset attack detection loss function to complete the first training.

[0024] By adopting the above technical solution, during the first training, the output feature graphs of the three levels of the iris quality detection teacher network model and the primary student network model are processed with spatial features, and the first fused spatial features and the first mean corresponding to the iris quality detection teacher network model, and the second fused spatial features and the second mean corresponding to the primary student network model are determined. Based on the spatial feature constraint function, the first fused spatial features and the second fused spatial features are constrained so that the spatial positions of the three-level output feature graphs are aligned, and the primary student network model learns the spatial feature distribution of the iris quality detection teacher network model. Then, semantic constraints are imposed on the extraction results corresponding to the iris quality detection teacher network model and the primary student network model, and the attack detection regression head of the primary student network model is constrained, so that the knowledge in the iris quality detection teacher network model is better transferred to the primary student network model during the first training process.

[0025] Optionally, the first label includes a label corresponding to the prosthesis type, and the attack detection regression head in the primary student network model is constrained by a preset attack detection loss function, specifically including:

[0026] If the output result of the attack detection regression head in the primary student network model is a label corresponding to the prosthesis type, adjusting the preset attack detection loss function to obtain an adjusted attack detection loss function;

[0027] The attack detection regression head in the primary student network model is constrained by the adjusted attack detection loss function to penalize the output result, and the adjusted attack detection loss function is:

[0028] L b =-G label≠2 ×logpt-G label=2 ×(1-pt) α logpt

[0029] Where, L b is the attack detection loss value calculated by the adjusted attack detection loss function, pt represents the output probability value, G represents the label vector mask corresponding to the output result of the attack detection regression head, α represents the penalty coefficient, label≠2 represents that the output result is not the label corresponding to the prosthesis type, and label=2 represents that the output result is the label corresponding to the prosthesis type.

[0030] By adopting the above technical solution, since there will be a problem of misidentification when the output result is the label corresponding to the prosthesis type, in order to solve this problem, the output result corresponding to the label corresponding to the prosthesis type is penalized. When constraining the attack detection regression head in the primary student network model, if the output result is the label corresponding to the prosthesis type, it is necessary to adjust the preset attack detection loss function and constrain it according to the adjusted attack detection loss function, so that the subsequent joint iris quality and presentation attack detection model is more accurate and avoids misidentification.

[0031] Optionally, based on the knowledge distillation strategy, the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model is transferred to the primary student network model to obtain a model with iris quality and attack detection knowledge, specifically including:

[0032] Using the first training data to perform first training on the iris quality detection teacher network model and the primary student network model respectively, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model;

[0033] Based on the model pruning strategy, the model parameters of the iris presentation attack detection teacher network model are pruned and fine-tuned to obtain the fine-tuned attack detection model parameters and the corresponding target mask;

[0034] The second training data is used to perform a second training on the primary student network model after the first training, and the model parameters of the primary student network model after the first training are corrected based on the fine-tuned attack detection model parameters, the target mask and the overall loss function to obtain a model with iris quality and attack detection knowledge.

[0035] By adopting the above technical solution, after the primary student network model is determined, the first training data is used to perform the first training on the iris quality detection teacher network model and the primary student network model, so that the primary student network model can better learn the knowledge of the iris quality detection teacher network model. Then, the model pruning strategy is adopted to prune and fine-tune the model parameters of the iris presentation attack detection teacher network model, and obtain the fine-tuned attack detection model parameters and the corresponding target mask to obtain a lightweight iris presentation attack detection teacher network model. Finally, the second training data is used to train the primary student network model after the first training, and the fine-tuned attack detection model parameters and target mask are input into the overall loss function. The primary student network model after the first training is compensated for the loss during the training process to prevent the primary student network model from forgetting the knowledge of presentation attack detection, which helps the primary student network model to better complete knowledge transfer.

[0036] Optionally, the overall loss function is:

[0037]

[0038] In the formula, represents the fine-tuned attack detection model parameters, represents the model parameters of the primary student network model after the first training, σ represents the hyperparameter, and L at this time b1 represents the quality evaluation loss value corresponding to the quality evaluation regression head in the primary student network model after the first training, PM represents the target mask, L sum is the overall loss value.

[0039] By adopting the above technical solution, the target mask is multiplied by the model parameters of the primary student network model to obtain the product, so that the model parameters of the primary student network model are corrected, and then the product is subtracted from the fine-tuned attack detection model parameters to obtain the difference, and finally the square of the second norm of the difference is multiplied by the hyperparameter, and then summed with the quality evaluation loss value to finally obtain the overall loss value. During the training process, the overall loss value is constrained, so as to avoid the primary student network model from forgetting the knowledge of presentation attack detection, and at the same time, the primary student network model can be continuously optimized.

[0040] In a second aspect of the present application, a model generation device having iris quality and attack detection knowledge is provided, specifically comprising:

[0041] a training data acquisition module, configured to acquire first training data corresponding to an iris presentation attack and second training data corresponding to iris quality, wherein the first training data has a first label, the second training data has a second label, data having the second label exists in the first training data, data having the first label exists in the second training data, the first label is an iris presentation attack detection label, and the second label is an iris quality detection label;

[0042] a teacher model training module, configured to train an iris presentation attack detection model using the first training data to obtain an iris presentation attack detection teacher network model, and to train an iris quality detection model using the second training data to obtain an iris quality detection teacher network model;

[0043] A student model training module, used to select third training data from the first training data and the second training data, and use the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label;

[0044] The teacher knowledge transfer module is used to transfer the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model to the primary student network model based on the knowledge distillation strategy, so as to obtain a model with iris quality and attack detection knowledge.

[0045] By adopting the above technical solution, after the training data acquisition module acquires the first training data and the second training data, the teacher model training module uses the first training data to train the iris presentation attack detection model, and uses the second training data to train the iris quality detection model, respectively obtaining the iris presentation attack detection teacher network model and the iris quality detection teacher network model, and then the student model training module selects the third training data having both the first label and the second label, and uses the third training data to train the student network model to obtain the primary student network model. Finally, based on the knowledge distillation strategy, the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model is transferred to the primary student network model, and a model with iris quality and attack detection knowledge is obtained.

[0046] In a third aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, the method steps described in any one of the first aspects are executed.

[0047] In a fourth aspect of the present application, an electronic device is provided, specifically comprising:

[0048] A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the processor is used to execute the computer program stored in the memory so that the electronic device executes the method as described in any one of the first aspects.

[0049] In summary, the present application includes at least one of the following beneficial technical effects:

[0050] The first training data and the second training data are obtained, and the first training data is used alone to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model with the function of detecting presentation attacks. Similarly, the second training data is used alone to train the iris quality detection model to obtain an iris quality detection teacher network model with the function of detecting iris quality. Then, the third training data with the first label and the second label are selected from the first training data and the second training data to train the student network model, thereby obtaining a primary student network model with preliminary knowledge of the two tasks of presentation attack detection and iris quality detection. Finally, through the knowledge distillation strategy, the knowledge in the iris presentation attack detection teacher network model and the iris quality detection teacher network model is better transferred to the primary student network model, thereby obtaining a model with iris quality and attack detection knowledge, without the need to develop models for iris quality detection and iris presentation attack detection separately, thereby reducing the consumption of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flowchart of a method for generating a model with iris quality and attack detection knowledge provided in an embodiment of the present application;

[0052] Figure 2 It is a flowchart of another model generation method with iris quality and attack detection knowledge provided in an embodiment of the present application;

[0053] Figure 3 It is a structural schematic diagram of a knowledge migration provided by an embodiment of the present application;

[0054] Figure 4 It is a flowchart of another method for generating a model with iris quality and attack detection knowledge provided in an embodiment of the present application;

[0055] Figure 5 is a schematic diagram of another structure of knowledge migration provided by an embodiment of the present application;

[0056] Figure 6 It is a structural diagram of a model generation device with iris quality and attack detection knowledge provided in an embodiment of the present application.

[0057] Explanation of the accompanying drawings: 11. Training data acquisition module; 12. Teacher model training module; 13. Student model training module; 14. Teacher knowledge transfer module. DETAILED DESCRIPTION

[0058] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0059] In the description of the embodiments of the present application, words such as "illustrative", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "illustrative", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "illustrative", "for example" or "for example" is intended to present related concepts in a concrete way.

[0060] In the description of the embodiments of the present application, the term "and / or" is only a kind of association relationship describing the associated objects, indicating that there may be three kinds of relationships, for example, A and / or B, which can represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0061] The application scenario of the model generation method with iris quality and attack detection knowledge disclosed in the present application is: when it is necessary to detect the image quality of the iris image and the attack presented by the iris image at the same time, separately developing corresponding models to detect the image quality and the attack presented respectively will consume more computing resources of the edge device. Therefore, in this application scenario, the model generated by the model generation method with iris quality and attack detection knowledge disclosed in the present application can realize that a model has the functions of detecting image quality and presenting attacks at the same time, and only one model needs to be developed to avoid consuming more computing resources.

[0062] In addition, the implementation environment of the present application includes: a terminal and a server, and the terminal can be directly or indirectly connected to the server through a wired or wireless network. The execution subject of the model generation method with iris quality and attack detection knowledge is a server, and the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The terminal can be an electronic device such as a mobile phone, a tablet computer, an e-book reader, a multimedia player, a wearable device, a PC (Personal Computer), etc., which can be used to upload training data to the server.

[0063] See also Figure 1 The present application embodiment discloses a flow chart of a method for generating a model with iris quality and attack detection knowledge, which can be implemented by a computer program or run on a model generating device with iris quality and attack detection knowledge based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:

[0064] S101: Acquire first training data corresponding to iris presentation attack and second training data corresponding to iris quality.

[0065] Specifically, presentation attacks are called deception attacks, which are one of the most important attack vectors against iris recognition systems. The iris data of presentation attacks makes it difficult for iris recognition systems to identify true and false, resulting in a large iris recognition security risk. Presentation Attack Detection (PAD) technology is also the biggest bottleneck for iris recognition systems to enter high-end, safe, and large-scale applications. It is mainly used to determine whether the captured human eye iris information is a real iris or a forged iris. Among them, the types of iris presentation attacks include printing, cosmetic contact lenses, artificial eyes, glass eyeballs, and other display devices. The first training data is the iris data of presentation attacks. Iris quality, that is, iris image quality, in iris recognition systems, the quality of iris images will directly affect the accuracy of recognition. The types of iris quality include light spots, noise, and too small iris available area, etc. The second training data is the iris data corresponding to different iris quality types. One feasible way to obtain the first training data and the second training data is: collect human eye image samples through an iris collector, and use a key point detection tool to detect the key points of the upper and lower eyelids in the human eye image samples, fit the upper and lower eyelid curves according to the upper and lower eyelid key points to obtain the eyelid fitting curve, and finally crop according to the range of the eyelid fitting curve to obtain the first training data and the second training data.

[0066] After the first training data and the second training data are determined, it is necessary to label the first training data and the second training data to facilitate better use of the training data to train the model. Among them, the first training data has a first label, and the second training data has a second label. The first label is an iris presentation attack detection label, and the second label is an iris quality detection label. In an embodiment of the present application, the first label includes a real iris label, a cosmetic contact lens, an artificial eye, and a glass eyeball label, and a printing and other display device iris label. The real iris label is marked as 0, the cosmetic contact lens, an artificial eye, and a glass eyeball label is marked as 1, and the printing and other display device label is marked as 2. The iris quality detection label is manually marked, and the value is between 0 and 1.

[0067] It should be noted that there is data with the second label in the first training data, and there is data with the first label in the second training data, that is, the training data corresponding to the iris quality detection label will include a small amount of training data for iris presentation attack, and similarly, the training data corresponding to the iris presentation attack label will also include a small amount of training data corresponding to the iris quality detection label. Therefore, the data with both the first label and the second label (the data with the second label in the first training data and the data with the first label in the second training data) are selected as backup data.

[0068] S102: Using the first training data to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and using the second training data to train the iris quality detection model to obtain an iris quality detection teacher network model.

[0069] Specifically, after the first training data and the second training data are determined and labeled, the first training data is input into the iris presentation attack detection model for training, wherein the iris presentation attack detection model adopts a teacher network model. The teacher network model has very good performance and generalization ability. It is a three-layer forward network. Its responsibility is to provide appropriate batch data for each step of the student network model, and to serve as a soft target to guide another simpler student network model to learn, so that the simpler student network model with less parameter calculation can also have similar performance to the teacher network model.

[0070] The first training data input into the iris presentation attack detection model will go through three levels of feature extraction. Each level of feature extraction will be downsampled once. The output feature map sizes of each downsampling are 128*128, 64*64 and 32*32 respectively. Finally, it is classified by two fully connected layers, among which the fully connected layers (FC) act as classifiers, which are actually equivalent to convolutional layers. After the training is completed, the iris presentation attack detection teacher network model is obtained, which can detect iris data presenting attacks. Similarly, the second training data is input into the iris quality detection model, and the iris quality detection teacher network model is trained to obtain the iris quality detection teacher network model, which can identify the image quality of iris data. The iris quality detection model also uses the teacher network model.

[0071] It should be noted that the feature extraction network structure of the iris presentation attack detection teacher network model and the iris quality detection teacher network model is the same. The network structure can use any classification network. The iris presentation attack detection teacher network model includes an attack detection regression head, which is composed of two layers of ordinary convolution layers. The iris quality detection teacher network model includes a quality assessment regression head, which is composed of a layer of ordinary 2D convolution and a fully connected layer. In addition, the regression strategy is used for training.

[0072] S103: Filter the third training data from the first training data and the second training data, and use the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label.

[0073] Specifically, after the iris presentation attack detection teacher network model and the iris quality detection teacher network model are determined, refer to step S101, use the spare data as the third training data, and input the third training data into the student network model for training, that is, use the training data with both the iris presentation attack detection label and the iris quality detection label to train the student network model, thereby initializing the model parameters of the student network model, so that it has the preliminary knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model, and finally obtains the primary student network model. Among them, the third training data is input into the student network model, and it will also undergo three-level feature extraction, and the student network model and the teacher network model use the same feature extraction network structure.

[0074] S104: Based on the knowledge distillation strategy, the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model is transferred to the primary student network model to obtain a model with iris quality and attack detection knowledge.

[0075] Specifically, knowledge distillation is a commonly used method for model compression. Different from pruning and quantization in model compression, knowledge distillation builds a lightweight small model. The supervision information of the larger model with better performance (teacher network model) is used to train this small model (student network model) to achieve better performance and accuracy. After the primary student network model is determined, the primary student network model and the teacher network model are trained in an alternating training method, as follows:

[0076] The first training data is used to simultaneously perform the first training on the iris quality detection teacher network model and the primary student network model, so that the primary student network model can learn the knowledge of the iris quality detection teacher network model. After the first training, the second training data is used to simultaneously perform the second training on the iris presentation attack detection teacher network model and the primary student network model after the first training, so that the primary student network model can learn the knowledge of the iris presentation attack detection teacher network model. The first training and the second training are performed alternately, so that the primary student network model is continuously optimized, and finally a model of joint iris quality and presentation attack detection is obtained, which has the functions of iris quality detection and iris presentation attack detection. There is no need to develop models for iris quality detection and iris presentation attack detection separately, which effectively reduces the consumption of computing resources.

[0077] It should be noted that the primary student network model includes the same attack detection regression head as the iris presentation attack detection teacher network model, and the same quality evaluation regression head as the iris quality detection teacher network model, which facilitates the knowledge transfer of the iris presentation attack detection teacher network model and the iris quality detection teacher network model to the primary student network model.

[0078] See also Figure 2 The present application embodiment discloses a flow chart of another method for generating a model with iris quality and attack detection knowledge, which can be implemented by a computer program or run on a model generating device with iris quality and attack detection knowledge based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:

[0079] S201: Acquire first training data corresponding to iris presentation attack and second training data corresponding to iris quality.

[0080] S202: Using the first training data to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and using the second training data to train the iris quality detection model to obtain an iris quality detection teacher network model.

[0081] S203: Filter the third training data from the first training data and the second training data, and use the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label.

[0082] For details, please refer to steps S101-S103, which will not be described in detail here.

[0083] S204: Performing first training on the iris quality detection teacher network model and the primary student network model respectively using the first training data, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model.

[0084] In an achievable implementation, the first training data is respectively input into the iris quality detection teacher network model and the primary student network model, and the output feature graph of the three levels of the iris quality detection teacher network model is subjected to spatial feature fusion processing to obtain a first fused spatial feature and a corresponding first mean value;

[0085] Perform spatial feature fusion processing on the output feature maps of the three levels of the primary student network model to obtain a second fused spatial feature and a corresponding second mean;

[0086] The first fusion spatial feature and the second fusion spatial feature are constrained by a preset spatial feature constraint function, and the spatial feature constraint function is:

[0087] In the formula, μ t-iqa,k represents the first mean of the kth output feature map, μ s,k represents the second mean of the k-th output feature map, H t-iqa,k represents the first fused spatial feature of the kth output feature map, H s,k represents the second fusion spatial feature of the k-th output feature map, M represents the total number of output feature maps, k represents the k-th output feature map, and L s Represents the spatial feature constraint loss value; extracts features from the output feature graphs of the third level of the iris quality detection teacher network model and the primary student network model to obtain the extraction results;

[0088] The refined results are semantically constrained by a preset cosine distance loss function, and the attack detection regression head in the primary student network model is constrained by a preset attack detection loss function to complete the first training.

[0089] For details, see Figure 3 , Figure 3It is a structural diagram of a knowledge transfer provided by an embodiment of the present application. After the primary student network model is determined, the first training data, i.e., the iris data presenting the attack, is simultaneously input into the iris quality detection teacher network model and the primary student network for the first training, and the model parameters of the iris quality detection teacher network model are frozen, so that the primary student network model can acquire the knowledge of the iris quality detection teacher network model, and at the same time, a large amount of the first training data can be used to train the primary student network model. The first training process is described in detail as follows:

[0090] Since the network structure of the primary student network model is the same as that of the iris quality detection teacher network model, after the first training data is input, both will undergo three-level feature extraction to obtain an output feature map. Therefore, the output feature maps of the three levels of the iris quality detection teacher network model are processed with spatial features, that is, taking the scale of the first-level output feature map of the iris quality detection teacher network model as the benchmark, and then performing sliding window sampling with a step size of the ratio of S1 to S2 and the ratio of S1 to S3, wherein the sampling scales are the scale of the second-level output feature map and the scale of the third-level output feature map, respectively, and the sampled feature maps are fused with the second-level output feature map and the third-level output feature map, respectively, and finally the fused feature map is restored to the scale of the first-level output feature map, and its feature dimension is reduced to a specified size to obtain the first fused spatial feature, and the mean of the first fused spatial feature is calculated to obtain the first mean, so that the spatial positions of the three-level output features are aligned, the distribution of their features is maintained, and the feature enhancement function can also be achieved. Among them, S1 represents the first-level output feature map, S2 represents the second-level output feature map, and S3 represents the third-level output feature map.

[0091] When the first training data is input to the primary student network model for training, the spatial feature fusion is performed on the output feature map of each level in the primary student network model to further obtain the second fused spatial feature and the corresponding second mean. Then, the spatial feature constraint function is used to perform loss constraints on the first fused spatial feature and the second fused spatial feature, thereby helping the primary student network to easily learn the spatial feature distribution of the iris quality detection teacher network model.

[0092] Among them, the spatial feature constraint function is expressed as:

[0093] In the formula, μ t-iqa,k represents the first mean of the kth output feature map, μ s,k represents the second mean of the k-th output feature map, H t-iqa,k represents the first fused spatial feature of the kth output feature map, H s,k represents the second fusion spatial feature of the k-th output feature map, M represents the total number of output feature maps, k represents the k-th output feature map, and L sIt should be noted that the first fused spatial feature, the first mean, the second fused spatial feature and the second mean here all correspond to each output feature map of the third level of the iris quality detection teacher network model or the primary student network model.

[0094] Then, the third-level output feature maps of the iris quality detection teacher network model and the primary student network model are respectively subjected to feature extraction to obtain corresponding extraction results. Feature extraction refers to the additional processing of the image. In the embodiment of the present application, the third-level output feature map is enhanced. After the extraction results are determined, it is necessary to perform semantic constraints on the extraction results corresponding to the iris quality detection teacher network model and the primary student network model, that is, to measure the semantic features of the feature vectors corresponding to the extraction results. Semantic constraints can be used to transfer the knowledge of the iris quality detection teacher network model to the primary student network model. The loss function corresponding to the semantic constraint adopts the preset cosine distance loss function, which is expressed as: L c = -cos(F t-iqa ,F s ), F t-iqa represents the refined result corresponding to the iris quality detection teacher network model, F s represents the refined result corresponding to the primary student network model, L c Represents the semantic constraint loss value.

[0095] Finally, the attack detection regression head in the primary student network model is constrained by a preset attack detection loss function, so that when the first training data is input into the primary student network model for training, the primary student network model can learn the characteristics of the iris data presenting the attack, and finally complete the first training. Among them, the preset attack detection loss function adopts a binary cross entropy function.

[0096] In another achievable implementation, constraining the attack detection regression head in the primary student network model by a preset attack detection loss function specifically includes:

[0097] If the output result of the attack detection regression head in the primary student network model is a label of the prosthesis type, the preset attack detection loss function is adjusted to obtain an adjusted attack detection loss function;

[0098] The attack detection regression head in the primary student network model is constrained by the adjusted attack detection loss function to penalize the output results. The adjusted attack detection loss function is:

[0099] L b =-G label≠2 ×logpt-G label=2 ×(1-pt)α logpt

[0100] Where, L b is the attack detection loss value calculated by the adjusted attack detection loss function, pt represents the output probability value, G represents the label vector mask corresponding to the output result of the attack detection regression head, α represents the penalty coefficient, label≠2 represents that the output result is not the label corresponding to the prosthesis type, and label=2 represents that the output result is the label corresponding to the prosthesis type.

[0101] Specifically, the types of iris presentation attacks include irises corresponding to printing and other display devices, which are called prosthesis types. Then the labels of iris data of the prosthesis type are labels corresponding to the prosthesis type, that is, the first labels include labels corresponding to the prosthesis type. Since the iris images corresponding to the prosthesis type have more noise and poor iris quality, and there are also low-quality iris images of the noise type in the second training data, during the knowledge transfer process, the real iris images of the noise type in the second training data are easily misidentified as prosthesis types, resulting in errors in iris presentation attack detection, and thus affecting the recognition accuracy of the model with iris quality and attack detection knowledge.

[0102] In order to solve the problem of misidentification, if the output result of the attack detection regression head in the primary student network is the label of the prosthesis type, that is, when the label is marked as 2, the preset attack detection loss function needs to be adjusted to penalize the output result of the prosthesis type label. The adjusted attack detection loss function is specifically:

[0103] L b =-G label≠2 ×logpt-G label=2 ×(1-pt) α logpt

[0104] Where, L b is the attack detection loss value calculated by the adjusted attack detection loss function, pt represents the output probability value, which can be understood as the probability value of the output result, G represents the label vector mask corresponding to the output result of the attack detection regression head, α represents the penalty coefficient, label≠2 indicates that the output result is not the label corresponding to the prosthesis type, and label=2 indicates that the output result is the label corresponding to the prosthesis type.

[0105] S205: After the first training, the second training data is used to perform a second training on the iris presentation attack detection teacher network model and the primary student network model after the first training, so as to transfer the knowledge of the iris presentation attack detection teacher network model to the primary student network model.

[0106] Specifically, after the first training is completed, the second training data corresponding to the iris quality is input into the iris presentation attack detection teacher network model and the primary student network model after the first training, and the second training is performed, and the model parameters of the iris presentation attack detection teacher network model are frozen. The second training process is the same as the first training. For details, please refer to step S204, that is, the spatial feature fusion processing is performed on the output feature maps of the three levels of the iris presentation attack detection teacher network model and the primary student network model respectively, and the corresponding fused spatial features and mean values ​​are obtained, and the fused spatial features are constrained based on the spatial feature constraint function corresponding to the second training. Among them, the spatial feature constraint function corresponding to the second training is expressed as:

[0107]

[0108] Where W represents the total number of output feature maps in the second training, p represents the pth output feature map in the second training, and L s′ represents the spatial feature constraint loss value corresponding to the second training, μ t-pad,p represents the mean of the fused spatial features after the p-th output feature map of the three-level teacher network model for iris presentation attack detection is fused, μ s′,p represents the mean of the fused spatial features after the fusion of the p-th output feature map of the three levels of the primary student network model after the first training, H t-pad,p represents the fused spatial feature after the p-th output feature map of the three-level teacher network model of iris presentation attack detection is fused, H s′,p It represents the fused spatial features after the p-th output feature map of the three levels of the primary student network model after the first training is fused.

[0109] Then, the output feature graphs of the third level of the iris presentation attack detection teacher network model and the primary student network model are refined, and the cosine distance loss function is also used to semantically constrain the results of feature extraction. Finally, the quality evaluation regression head in the primary student network model is constrained by a preset quality evaluation loss function, so that when the second training data is input into the primary student network model, the primary student network model can learn the characteristics of the second training data and finally complete the second training. Among them, the quality evaluation loss function adopts the absolute mean error loss function.

[0110] S206: Based on the alternating training attenuation strategy formula, the first training and the second training are performed alternately to obtain a model having iris quality and attack detection knowledge.

[0111] Specifically, since the frequency of alternating training of different training data is high during the first training and the second training, it is easy to cause large fluctuations in the loss value, which is not conducive to the knowledge transfer from the two teacher network models to the primary student network model. Therefore, based on the alternating training attenuation strategy formula, the first training and the second training are reasonably carried out.

[0112] Among them, the alternating training attenuation strategy formula is:

[0113]

[0114] Where γ represents the attenuation coefficient, a represents the current number of alternations, b represents the attenuation cutoff number, N represents the total number of training rounds, when a is greater than or equal to b, each round is alternately trained, and R represents the number of training rounds of the first training or the second training.

[0115] If the current number of alternations a is greater than or equal to b, it means that the current number of alternations has reached or exceeded the attenuation cutoff number, so the number of training rounds R is 1, that is, after one round of the first training, one round of the second training is performed alternately...; if the current number of alternations a is less than b, it means that the current number of alternations has not reached the attenuation cutoff number, so the frequency of alternating training should not be too fast, and the number of training rounds R is N×exp(-γ×a / b). For example, the number of training rounds R may be 5, that is, after five rounds of the first training, five rounds of the second training are performed alternately, and so on. It should be noted that the number of training rounds here refers to the number of training rounds of the first training or the second training. a (the current number of alternations) is the number of times the first training and the second training are alternating. The alternating training of the first training and the second training can be regarded as one round.

[0116] See also Figure 4 The present application embodiment discloses a flow chart of another method for generating a model with iris quality and attack detection knowledge, which can be implemented by a computer program or run on a model generating device with iris quality and attack detection knowledge based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:

[0117] S301: Acquire first training data corresponding to iris presentation attack and second training data corresponding to iris quality.

[0118] S302: Using the first training data to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and using the second training data to train the iris quality detection model to obtain an iris quality detection teacher network model.

[0119] S303: Filter third training data from the first training data and the second training data, and use the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label.

[0120] For details, please refer to steps S101-S103, which will not be described in detail here.

[0121] S304: Performing first training on the iris quality detection teacher network model and the primary student network model respectively using the first training data, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model.

[0122] For details, please refer to step S204, which will not be described in detail here.

[0123] S305: Based on the model pruning strategy, the model parameters of the iris presentation attack detection teacher network model are pruned and fine-tuned to obtain the fine-tuned attack detection model parameters and the corresponding target mask.

[0124] Specifically, model pruning is a model compression technology that removes "unnecessary" weights or biases from a neural network. It can improve the efficiency and speed of the model by reducing the size and computational complexity of the model. Model pruning can be divided into different pruning methods such as fine-grained pruning, coarse-grained pruning, and structured pruning. After the first training is completed, the convolution kernel pruning algorithm corresponding to the model pruning algorithm is used to prune and fine-tune the model parameters of the iris presentation attack detection teacher network model to obtain the fine-tuned attack detection model parameters. In other embodiments, a low-rank decomposition pruning algorithm can also be used for pruning and fine-tuning. Prune the weights with lower importance in the model parameters, and set the masks of the corresponding positions to 0; the weights without pruning are more important, and the masks of the corresponding positions are set to 1, and finally the target masks corresponding to the fine-tuned attack detection model parameters are obtained.

[0125] It should be noted that the target mask can be understood as the importance vector of the attack detection model parameters. The mask is a binary image composed of 0 and 1. When the mask is applied to a function, the 1-value area is processed and the masked 0-value area is not included in the calculation.

[0126] S306: Perform a second training on the primary student network model after the first training using the second training data, and modify the model parameters of the primary student network model after the first training based on the fine-tuned attack detection model parameters, target mask, and overall loss function to obtain a model with iris quality and attack detection knowledge.

[0127] Specifically, after the fine-tuned attack detection model parameters and the corresponding target mask are determined, the primary student network model after the first training is trained for the second time using the second training data. During the training process, only the iris data corresponding to different iris quality types are input, which may easily cause the primary student network model to forget the knowledge of iris presentation attack detection. Therefore, it is necessary to add a restriction loss to the model parameters of the primary student network model to compensate for the forgetting. And only the quality evaluation regression head of the primary student network model is constrained, specifically using the quality evaluation loss function (absolute mean error loss function) for constraint.

[0128] During the training process, the fine-tuned attack detection model parameters and target mask are input into the overall loss function, so as to constrain the primary student network model, and then modify the model parameters of the primary student network model, continuously optimize the primary student network model after the first training, and finally determine the primary student network model with iris quality and attack detection knowledge after the model parameters are modified, so that iris presentation attack detection and iris quality detection can be performed simultaneously. Among them, the overall loss function is:

[0129]

[0130] In the formula, represents the fine-tuned attack detection model parameters, represents the model parameters of the primary student network model after the first training, σ represents the hyperparameter, and L at this time b1 represents the quality evaluation loss value corresponding to the quality evaluation regression head in the primary student network model after the first training, PM represents the target mask, L sum is the overall loss value. The quality evaluation loss value is calculated by the quality evaluation loss function, the quality evaluation loss function adopts the absolute mean error loss function, and the quality evaluation loss function is used to constrain the loss of the quality evaluation regression head in the primary student network model after the first training.

[0131] The implementation principle of the model generation method with iris quality and attack detection knowledge in the embodiment of the present application is as follows: first training data and second training data are obtained, and the first training data is used alone to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model with the function of detecting presentation attacks. Similarly, the second training data is used alone to train the iris quality detection model to obtain an iris quality detection teacher network model with the function of detecting iris quality. Then, the third training data with the first label and the second label is selected from the first training data and the second training data, and the student network model is trained to obtain a primary student network model with preliminary knowledge of the two tasks of presentation attack detection and iris quality detection. Finally, through the knowledge distillation strategy, the knowledge in the iris presentation attack detection teacher network model and the iris quality detection teacher network model is better transferred to the primary student network model, so that the primary student network model becomes a model with iris quality and attack detection knowledge, and there is no need to develop models for iris quality detection and iris presentation attack detection separately, thereby reducing the consumption of computing resources.

[0132] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0133] See also Figure 6 , is a schematic diagram of the structure of a model generation device with iris quality and attack detection knowledge provided in an embodiment of the present application. The model generation device applied to iris quality and attack detection knowledge can be implemented as all or part of the device through software, hardware or a combination of both. The device 1 includes a training data acquisition module 11, a teacher model training module 12, a student model training module 13 and a teacher knowledge transfer module 14.

[0134] The training data acquisition module 11 is used to acquire first training data corresponding to the iris presentation attack and second training data corresponding to the iris quality, the first training data has a first label, the second training data has a second label, the first training data contains data with the second label, the second training data contains data with the first label, the first label is an iris presentation attack detection label, and the second label is an iris quality detection label;

[0135] The teacher model training module 12 is used to train the iris presentation attack detection model using the first training data to obtain the iris presentation attack detection teacher network model, and to train the iris quality detection model using the second training data to obtain the iris quality detection teacher network model;

[0136] The student model training module 13 is used to select third training data from the first training data and the second training data, and use the third training data to train the preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label;

[0137] The teacher knowledge transfer module 14 is used to transfer the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model to the primary student network model based on the knowledge distillation strategy, so as to obtain a model with iris quality and attack detection knowledge.

[0138] Optionally, the teacher knowledge transfer module 14 is specifically used for:

[0139] Using the first training data to perform first training on the iris quality detection teacher network model and the primary student network model respectively, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model;

[0140] After the first training, the second training data is used to perform a second training on the iris presentation attack detection teacher network model and the primary student network model after the first training, so as to transfer the knowledge of the iris presentation attack detection teacher network model to the primary student network model;

[0141] Based on the alternating training attenuation strategy formula, the first training and the second training are performed alternately to obtain a model with iris quality and attack detection knowledge.

[0142] Optionally, the teacher knowledge transfer module 14 is further used for:

[0143] Inputting the first training data into the iris quality detection teacher network model and the primary student network model respectively, performing spatial feature fusion processing on the output feature graph of the third level of the iris quality detection teacher network model, and obtaining a first fused spatial feature and a corresponding first mean;

[0144] Perform spatial feature fusion processing on the output feature maps of the three levels of the primary student network model to obtain a second fused spatial feature and a corresponding second mean;

[0145] The first fusion spatial feature and the second fusion spatial feature are constrained by a preset spatial feature constraint function, and the spatial feature constraint function is:

[0146]

[0147] In the formula, μ t-iqa,k represents the first mean of the kth output feature map, μ s,k represents the second mean of the k-th output feature map, H t-iqa,k represents the first fused spatial feature of the kth output feature map, Hs,k represents the second fusion spatial feature of the k-th output feature map, M represents the total number of output feature maps, k represents the k-th output feature map, and L s Represents the spatial feature constraint loss value;

[0148] Perform feature extraction on the output feature graphs of the third level of the iris quality detection teacher network model and the primary student network model to obtain extraction results;

[0149] The refined results are semantically constrained by a preset cosine distance loss function, and the attack detection regression head in the primary student network model is constrained by a preset attack detection loss function to complete the first training.

[0150] Optionally, the teacher knowledge transfer module 14 is further used for:

[0151] If the output result of the attack detection regression head in the primary student network model is a label corresponding to the prosthesis type, the attack detection loss function is adjusted to obtain an adjusted attack detection loss function;

[0152] The attack detection regression head in the primary student network model is constrained by the adjusted attack detection loss function to penalize the output results. The adjusted attack detection loss function is:

[0153] L b =-G label≠2 ×logpt-G label=2 ×(1-pt) α logpt

[0154] Where, L b is the attack detection loss value calculated by the adjusted attack detection loss function, pt represents the output probability value, G represents the label vector mask corresponding to the output result of the attack detection regression head, α represents the penalty coefficient, label≠2 represents that the output result is not the label corresponding to the prosthesis type, and label=2 represents that the output result is the label corresponding to the prosthesis type.

[0155] Optionally, the teacher knowledge transfer module 14 is further used for:

[0156] Using the first training data to perform first training on the iris quality detection teacher network model and the primary student network model respectively, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model;

[0157] Based on the model pruning strategy, the model parameters of the iris presentation attack detection teacher network model are pruned and fine-tuned to obtain the fine-tuned attack detection model parameters and the corresponding target mask;

[0158] The primary student network model after the first training is trained for the second time using the second training data, and the model parameters of the primary student network model after the first training are modified based on the fine-tuned attack detection model parameters, target mask and overall loss function to obtain a model with iris quality and attack detection knowledge.

[0159] It should be noted that the above embodiment provides a model generation device with iris quality and attack detection knowledge, when executing the model generation method with iris quality and attack detection knowledge, only takes the division of the above functional modules as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the above embodiment provides a model generation device with iris quality and attack detection knowledge and a model generation method with iris quality and attack detection knowledge, which belong to the same concept. The implementation process is detailed in the method embodiment, which will not be repeated here.

[0160] The embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a model generation method with iris quality and attack detection knowledge of the above embodiment is adopted.

[0161] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.

[0162] Among them, through this computer-readable storage medium, a model generation method with iris quality and attack detection knowledge in the above embodiment is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.

[0163] An embodiment of the present application further discloses an electronic device, wherein a computer program is stored in a computer-readable storage medium, and when the computer program is loaded and executed by a processor, the above-mentioned model generation method with iris quality and attack detection knowledge is adopted.

[0164] The electronic device may be a desktop computer, a laptop computer, a cloud server or other electronic device, and the electronic device includes but is not limited to a processor and a memory. For example, the electronic device may also include input and output devices, a network access device, and a bus.

[0165] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, 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. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.

[0166] Among them, the memory can be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device, or it can be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the electronic device, and the memory can also be a combination of an internal storage unit and an external storage device of the electronic device. The memory is used to store computer programs and other programs and data required by the electronic device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.

[0167] Among them, through this electronic device, a model generation method with iris quality and attack detection knowledge of the above embodiment is stored in the memory of the electronic device, and is loaded and executed on the processor of the electronic device for easy use.

[0168] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for generating a model with iris quality and attack detection knowledge, characterized in that: The method comprises: Acquire first training data corresponding to an iris presentation attack and second training data corresponding to iris quality, wherein the first training data has a first label, the second training data has a second label, data having the second label exists in the first training data, data having the first label exists in the second training data, the first label is an iris presentation attack detection label, and the second label is an iris quality detection label; Using the first training data to train an iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and using the second training data to train an iris quality detection model to obtain an iris quality detection teacher network model; Selecting third training data from the first training data and the second training data, and using the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label; Based on the knowledge distillation strategy, the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model are transferred to the primary student network model to obtain a model with iris quality and attack detection knowledge, including: using the first training data to perform a first training on the iris quality detection teacher network model and the primary student network model respectively, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model, including: inputting the first training data into the iris quality detection teacher network model and the primary student network model respectively, performing spatial feature fusion processing on the output feature map of the three levels of the iris quality detection teacher network model, and obtaining a first fused spatial feature and a corresponding first mean; Performing spatial feature fusion processing on the output feature map of the third level of the primary student network model to obtain a second fused spatial feature and a corresponding second mean; The first fused spatial feature and the second fused spatial feature are constrained by a preset spatial feature constraint function; feature extraction is performed on the output feature graphs of the third level of the iris quality detection teacher network model and the primary student network model to obtain extraction results; Semantically constraining the extraction result by a preset cosine distance loss function, and constraining the attack detection regression head in the primary student network model by a preset attack detection loss function to complete the first training; After the first training, the second training data is used to perform a second training on the iris presentation attack detection teacher network model and the primary student network model after the first training, so as to transfer the knowledge of the iris presentation attack detection teacher network model to the primary student network model; Based on the alternating training attenuation strategy formula, the first training and the second training are performed alternately to obtain a model with iris quality and attack detection knowledge.

2. The model generation method with iris quality and attack detection knowledge according to claim 1, characterized in that: The alternating training attenuation strategy formula is: Where γ represents the attenuation coefficient, a represents the current number of alternations, b represents the attenuation cutoff number, N represents the total number of training rounds, when a is greater than or equal to b, each round is alternately trained, and R represents the number of training rounds of the first training or the second training.

3. The method for generating a model with iris quality and attack detection knowledge according to claim 1, characterized in that: The spatial feature constraint function is: In the formula, μ t-iqa,k represents the first mean of the kth output feature map, μ s,k represents the second mean of the k-th output feature map, H t-iqa,k represents the first fused spatial feature of the kth output feature map, H s,k represents the second fusion spatial feature of the k-th output feature map, M represents the total number of output feature maps, k represents the k-th output feature map, and L s Represents the spatial feature constraint loss value.

4. The method for generating a model with iris quality and attack detection knowledge according to claim 1, characterized in that: The first label includes a label corresponding to the prosthesis type, and the attack detection regression head in the primary student network model is constrained by a preset attack detection loss function, specifically including: If the output result of the attack detection regression head in the primary student network model is a label corresponding to the prosthesis type, adjusting the preset attack detection loss function to obtain an adjusted attack detection loss function; The attack detection regression head in the primary student network model is constrained by the adjusted attack detection loss function to penalize the output result, and the adjusted attack detection loss function is: L b J-G label≠2 ×logpt-G label=2 ×(1-pt) α logpt Where, L b is the attack detection loss value calculated by the adjusted attack detection loss function, pt represents the output probability value, G represents the label vector mask corresponding to the output result of the attack detection regression head, α represents the penalty coefficient, label≠2 represents that the output result is not the label corresponding to the prosthesis type, and label=2 represents that the output result is the label corresponding to the prosthesis type.

5. The method for generating a model with iris quality and attack detection knowledge according to claim 1, characterized in that: The knowledge distillation strategy is based on transferring the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model to the primary student network model to obtain a model with iris quality and attack detection knowledge, specifically including: Using the first training data to perform first training on the iris quality detection teacher network model and the primary student network model respectively, so as to transfer the knowledge of the iris quality detection teacher network model to the primary student network model; Based on the model pruning strategy, the model parameters of the iris presentation attack detection teacher network model are pruned and fine-tuned to obtain the fine-tuned attack detection model parameters and the corresponding target mask; The second training data is used to perform a second training on the primary student network model after the first training, and the model parameters of the primary student network model after the first training are corrected based on the fine-tuned attack detection model parameters, the target mask and the overall loss function to obtain a model with iris quality and attack detection knowledge.

6. The method for generating a model with iris quality and attack detection knowledge according to claim 5, characterized in that: The overall loss function is: In the formula, represents the fine-tuned attack detection model parameters, represents the model parameters of the primary student network model after the first training, σ represents the hyperparameter, and L at this time b1 represents the quality evaluation loss value corresponding to the quality evaluation regression head in the primary student network model after the first training, PM represents the target mask, L sum is the overall loss value.

7. A model generation device with iris quality and attack detection knowledge, used to implement the model generation method with iris quality and attack detection knowledge as claimed in any one of claims 1 to 6, characterized in that: include: A training data acquisition module (11) is used to acquire first training data corresponding to an iris presentation attack and second training data corresponding to iris quality, wherein the first training data has a first label, the second training data has a second label, the first training data contains data having the second label, the second training data contains data having the first label, the first label is an iris presentation attack detection label, and the second label is an iris quality detection label; A teacher model training module (12), configured to use the first training data to train the iris presentation attack detection model to obtain an iris presentation attack detection teacher network model, and use the second training data to train the iris quality detection model to obtain an iris quality detection teacher network model; A student model training module (13) is used to select third training data from the first training data and the second training data, and use the third training data to train a preset student network model to obtain a primary student network model, wherein the third training data has both the first label and the second label; The teacher knowledge transfer module (14) is used to transfer the knowledge of the iris presentation attack detection teacher network model and the iris quality detection teacher network model to the primary student network model based on the knowledge distillation strategy, so as to obtain a model with iris quality and attack detection knowledge.

8. A computer-readable storage medium having a computer program stored therein, characterized in that: When the computer program is loaded and executed by a processor, the method according to any one of claims 1 to 6 is adopted.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor loads and executes the computer program, the method according to any one of claims 1 to 6 is adopted.

Citation Information

Patent Citations

  • Generating Pretrained Sparse Student Model for Transfer Learning

    US20230010142A1