Iris image correction model training method, iris image correction method, iris image correction device and medium
Through the use of generative neural network training and correction models, the problem of poor correction of strabismus iris image is solved, and higher iris texture and shape matching are achieved, improving the accuracy of iris recognition.
Patent Information
- Application Number
- CN202411144663.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-15
AI Technical Summary
When correcting strabismus iris images in the prior art, the circular model cannot accurately capture non-circular distortions, resulting in poor accuracy of the correction of iris images.
By obtaining strabismus iris image samples and frontal iris mask samples with the same biomarker, pairing and inputting a generative neural network for training, generating a generative correction model, and using this model for iris image correction to improve the corrected iris texture and The accuracy of the shape.
The accuracy of strabismus iris image correction is improved, so that the texture of the corrected iris image is the same as the texture of the strabismus iris image sample in the input image, and the shape is the same as the shape of the frontal iris mask sample, which improves the accuracy of iris recognition.
Smart Images

Figure CN118968635A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of iris correction, and in particular to a correction model training method, correction method, device and medium for iris images. Background Art
[0002] At present, iris recognition technology is considered to be one of the safest biometric technologies. It is an advanced biometric technology based on the iris features of the human eye for identity authentication. The main technical principle is: by collecting and analyzing the color, texture and other detailed features of the human iris, the unique identity of the person being identified is determined. It has the characteristics of high uniqueness, stability, non-contact and convenience. It is widely used in many fields and shows great application potential, including but not limited to the security field, financial field and medical field. Among them, a special iris recognition device, such as an iris camera or scanner, is used to collect iris images of the human eye. Further, feature extraction is performed from the collected iris image to obtain the iris features of the human eye. In real life, since the person being collected cannot keep looking straight at the iris recognition device, the collected iris image has strabismus and the like. The accuracy of iris recognition based on such strabismus iris images is low. Therefore, there is an urgent need for a method to correct the strabismus iris image.
[0003] At present, the method commonly used to correct the iris image of strabismus is to correct the iris image through a circular model, that is, based on the circular ring geometric structure of the iris itself, the iris area is accurately located by detecting the inner and outer boundaries, thereby achieving iris image correction. However, when the iris image of strabismus undergoes non-circular distortion, it cannot be accurately captured by the circular model, resulting in poor accuracy of iris image correction. Summary of the invention
[0004] In order to improve the accuracy of iris image correction, the present application provides an iris image correction model training method, correction method, device and medium.
[0005] In a first aspect of the present application, a correction model training method for an iris image is provided, which specifically includes:
[0006] Acquire at least one strabismus iris image sample and emmetropia iris mask sample corresponding to the same biometric identifier; pair the strabismus iris image sample and the emmetropia iris mask sample to obtain at least one set of image pairs;
[0007] Each of the image pairs is input into a preset generative neural network for training to obtain a trained generative correction model, wherein the generative correction model is a model that generates and outputs a corresponding corrected iris image based on the input image pair, the iris texture of the corrected iris image is the same as the iris texture of the strabismus iris image sample in the input image pair, the iris shape of the corrected iris image is the same as the iris shape of the orthoptic iris mask sample in the input image pair, and the generative neural network has the ability to generate images.
[0008] By adopting the above technical solution, after obtaining the strabismus iris image sample and the normal view iris mask sample of the same biometric marker, that is, the strabismus iris image (iris image to be corrected) and the normal view iris mask of the same person's eyes, the strabismus iris image sample and the normal view iris mask sample of the same biometric marker are then paired to obtain an image pair, so that when the generative neural network is subsequently trained in the form of image pairs, the iris texture of the strabismus iris image sample in the input image pair and the iris shape corresponding to the normal view iris mask sample can be simultaneously learned. Finally, each image pair is input into the generative neural network for training, so that the corrected iris image generated by it is closer and closer to the iris texture of the strabismus iris image sample and the iris shape corresponding to the normal view iris mask sample in the input image pair. When the training converges, a generative correction model is obtained, so that the accuracy of the subsequent iris image correction through this generative correction model is higher.
[0009] Optionally, the step of pairing the strabismus iris image samples with the emmetropia iris mask samples to obtain at least one set of image pairs specifically includes:
[0010] Determine a first pupil-iris ratio of each strabismus iris image sample and a second pupil-iris ratio of each emmetropia iris image sample corresponding to each emmetropia iris mask sample, wherein the first pupil-iris ratio is a ratio of a pupil radius to an iris radius in each strabismus iris image sample, and the second pupil-iris ratio is a ratio of a pupil radius to an iris radius in each emmetropia iris image sample corresponding to each emmetropia iris mask sample;
[0011] Dividing a preset pupil-iris ratio range interval into a preset number of sub-range intervals, wherein the pupil-iris ratio range interval is a range interval in which the pupil-iris ratio of an iris image that can successfully perform iris recognition is located;
[0012] If the first pupil-iris ratio and the second pupil-iris ratio are in the same sub-range, the corresponding first pupil-iris ratio is determined as a first target pupil-iris ratio, and the corresponding second pupil-iris ratio is determined as a second target pupil-iris ratio;
[0013] The strabismus iris image samples corresponding to the first target pupil-iris ratio and the emmetropia iris mask samples corresponding to the second target pupil-iris ratio are paired to obtain a corresponding image pair.
[0014] By adopting the above technical solution, the strabismus iris image samples corresponding to the first target pupil-iris ratio and the emmetropia iris mask samples corresponding to the second target pupil-iris ratio are paired to obtain a corresponding image pair, so that the iris pupil sizes corresponding to the strabismus iris image samples and the emmetropia iris mask samples in the image pair are closer, so that when the generative neural network is subsequently trained using this image pair, the training effect is better and the generated corrected iris image is more accurate.
[0015] Optionally, the generative neural network includes an autoencoder, and the step of inputting each of the image pairs into a preset generative neural network for training to obtain a trained generative correction model specifically includes:
[0016] Inputting a single image pair into the autoencoder to generate a corresponding target iris image, and obtaining a first normal view iris image having the same biometric identifier as the strabismus iris image sample in the corresponding image pair and a second normal view iris image having a different biometric identifier;
[0017] Substituting the target iris image, the first emmetropia iris image and the second emmetropia iris image corresponding to the same image pair into a preset first loss function to obtain a corresponding first loss value, wherein the smaller the first loss value is, the higher the probability that the target iris image and the strabismus iris image sample in the corresponding image pair are the same biometric identifier;
[0018] Determine iris ellipse equation parameters of the target iris image and the corresponding first emmetropia iris image, and substitute each of the iris ellipse equation parameters into a preset second loss function to obtain a corresponding second loss value, wherein the smaller the second loss value is, the more similar the iris shape of the target iris image is to the iris shape of the corresponding first emmetropia iris image, and the iris ellipse equation parameters include parameters of three dimensions: major axis, minor axis and angle;
[0019] A trained autoencoder is determined by minimizing the sum of the first loss value and the second loss value, and the trained autoencoder is determined as a generative correction model.
[0020] By adopting the above technical solution, when the image pair is input to the autoencoder for training, the first loss value of the generated target iris image is determined, thereby characterizing the possibility that it is the same biometric identifier as the strabismus iris image sample in the input image pair; at the same time, the second loss value of the target iris image is determined, thereby characterizing the similarity in iris shape with the corresponding first normal iris image. In the final training, the sum of the first loss value and the second loss value is minimized, and finally the target iris image generated by the generative correction model tends to be the same as the iris texture in the strabismus iris image sample in the input image pair, and the iris shape tends to be the same as the normal iris mask sample in the input image pair, thereby improving the accuracy of iris image correction.
[0021] Optionally, the first loss function is:
[0022] L triplet (I o ,I p ,I n )=max(L id (I o ,I p )-L id (I o ,I n )+threshold,0)
[0023] L id (I o ,I p )=‖F(I o )-F(I p )‖
[0024] L id (I o ,I n )=‖F(I o )-F(I n )‖;
[0025] Where, L triplet represents the first loss value corresponding to the target iris image, I o represents the target iris image generated by the autoencoder, I p Indicates that o The first normal iris image with the same strabismus iris image sample biometric identifier in the corresponding image pair, I n Indicates that o The corresponding image pair has a second normal iris image with a different biometric identifier from the strabismus iris image sample. F is an iris feature extractor, which outputs a 1*n-dimensional feature vector. L id (I o ,I p ) indicates I o The corresponding eigenvector and Ip The distance between corresponding eigenvectors, L id (I o ,I n ) indicates I o The corresponding eigenvector and I n The distance between the corresponding eigenvectors, the threshold value is taken from the preset fixed value range, and controls L id (I o ,I p ) and L id (I o ,I n ) makes I o and I p The distance between the corresponding eigenvectors is less than I o and I n The distance between corresponding eigenvectors;
[0026] The second loss function is:
[0027]
[0028] Where, L circle Indicates the second loss value corresponding to the target iris image, Param o Represents the iris ellipse equation parameters of the target iris image, Param p represents the iris ellipse equation parameters of the corresponding first emmetropia iris image, and r represents one of the three dimensions of the iris ellipse equation parameters, namely, the major axis, the minor axis and the angle.
[0029] By adopting the above technical solution, L is controlled by threshold id (I o ,I p ) and L id (I o ,I n ) makes I o and I p The distance between the corresponding eigenvectors is less than I o and I n The distance between the corresponding eigenvectors ensures that I o and I p is the same biological identifier, so that the iris texture of the target iris image generated by the autoencoder is as similar as possible to the iris texture of the strabismus iris image sample in the input image pair. In addition, ‖Param o [r]-Param p [r]‖ 2The square of the Euclidean norm of the difference between the target iris image and the corresponding first emmetropia iris image in the same dimension of the iris ellipse equation parameters is expressed, thereby characterizing the difference in the same dimension. Finally, the square of the Euclidean norm of the difference in the parameters in the three dimensions of the major axis, the minor axis and the angle is multiplied by 0.5, and then summed to finally obtain the second loss value, thereby characterizing the degree of similarity between the iris shape of the target iris image and the iris shape of the corresponding first emmetropia iris image as a whole. The smaller the second loss value, the more similar the iris shape of the target iris image is to the iris shape of the corresponding first emmetropia iris image. Finally, in the process of training the autoencoder, through the constraints of the first loss function and the second loss function, the target iris image generated by the autoencoder in training is closer and closer to the iris shape of the corresponding first emmetropia iris image and the iris texture of the corresponding strabismus iris image sample, which helps to improve the accuracy of iris correction.
[0030] Optionally, after inputting the single image pair into the autoencoder to generate a corresponding target iris image, the method further includes:
[0031] The image quality of the target iris image is supervised by a preset third loss function, and the third loss function is:
[0032] L sharp (I o ,I p )=max(sharpness(I p )-sharpness(I o ),0);
[0033] Where, L sharp represents the third loss value corresponding to the target iris image. The smaller the third loss value is, the closer the image quality of the generated target iris image is to the corresponding first frontal iris image. sharpness represents the image sharpness calculation function. sharpness(I o ) represents the image sharpness of the target iris image. p ) represents the image sharpness of the first frontal iris image corresponding to the target iris image. When the third loss value is 0, the third loss function is set to 0.
[0034] By adopting the above technical solution, in the process of training the autoencoder through the image pair, the image quality of the generated target iris image is supervised by using the third loss function, that is, each time the third loss value is calculated, the sharpness (I p ) minus sharpness(I o) and 0, and when the third loss value is 0, the third loss function is set to 0, which prevents the autoencoder from updating its parameters during the training phase and avoids its back propagation, so that the image sharpness of the target iris image generated by the trained autoencoder is closer to the true value.
[0035] Optionally, the generative neural network further includes a discriminator, and after inputting the single image pair into the autoencoder to generate a corresponding target iris image, the method further includes:
[0036] The reliability of the target iris image is supervised by a preset fourth loss function, and the fourth loss function is:
[0037]
[0038] Wherein, L1 represents the fourth loss value corresponding to the target iris image. The smaller the fourth loss value is, the higher the reliability of the target iris image is. N*N represents the total number of elements in the matrix of N rows and N columns output from the target iris image input to the discriminator, where each element takes a value in [0,1]. The larger the value of the element is, the higher the quality of the corresponding area in the target iris image is. i represents the i-th row in the matrix, j represents the j-th column in the matrix, O1 represents a matrix in which all elements are 1, and O2 represents the matrix output by the discriminator.
[0039] By adopting the above technical solution, the values of the elements at the same position in O1 and the matrix O2 output by the discriminator are subtracted and the absolute value is obtained, so as to characterize the quality difference reflected by the elements at each position in the matrix output by the discriminator and the elements at the corresponding position in O1. The smaller the absolute value, the higher the quality of the corresponding area of the target iris image. Finally, the absolute values of the differences between the elements at each position in O1 and the matrix O2 output by the discriminator are summed and divided by the total number of elements in the matrix O2 to obtain the corresponding fourth loss value, so as to objectively characterize the reliability of the target iris image as a whole, realize the supervision of the reliability of the target iris image generated by the autoencoder, and make the target iris image generated by the autoencoder after subsequent training more realistic.
[0040] Optionally, after inputting the single image pair into the autoencoder to generate a corresponding target iris image, the method further includes:
[0041] The image style of the target iris image is supervised by a preset fifth loss function and a preset sixth loss function, wherein the fifth loss function is:
[0042]
[0043] Where, L ms-ssimrepresents the fifth loss value corresponding to the target iris image. The smaller the fifth loss value, the higher the multi-scale structural similarity between the target iris image and the corresponding first frontal iris image. M represents different image scales, m represents the mth image scale, and I oμ Represents the mean intensity value of each pixel in the target iris image, I pμ represents the mean value of the intensity value of each pixel in the first frontal iris image, I oσ Represents the standard deviation of the intensity value of each pixel in the target iris image, I pσ represents the standard deviation of the intensity value of each pixel in the first emmetropic iris image, I opσ represents the covariance of the pixel intensity values between the target iris image and the corresponding first frontal iris image, c1, c2 are constants, β m , γ m Both represent weights; the sixth loss function is:
[0044]
[0045] Where, L lpips represents the sixth loss value corresponding to the target iris image. The smaller the sixth loss value, the higher the perceived image patch similarity between the target iris image and the corresponding first frontal iris image. l represents the width of the feature of the lth layer of the F network, H l Indicates the height of the feature of the lth layer of the F network, F l (I o ) represents the features of the target iris image after passing through the lth layer of the F network, F l (I p ) represents the features of the first frontal iris image after passing through the lth layer of the F network, L cos represents the cosine distance, l represents the feature extraction network of the lth layer of the F network, n represents the total number of layers of the F network, and the F network represents the feature extraction network in the iris feature extractor.
[0046] By adopting the above technical solution, when inputting an image pair for training, a fifth loss value is calculated to characterize the multi-scale structural similarity between the target iris image and the corresponding first frontal iris image, and a sixth loss value is calculated to characterize the perceived image patch similarity between the target iris image and the corresponding first frontal iris image, so as to constrain the generated target iris image through the fifth loss function and the sixth loss function, so that the multi-scale structural similarity and the perceived image patch similarity between the target iris image generated by the autoencoder during training and the corresponding first frontal iris image are increasingly higher, and the image style between the target iris image and the corresponding first frontal iris image is closer, so that the generated target iris image is more in line with the visual perception of the person.
[0047] In a second aspect of the present application, a method for correcting an iris image is provided, which specifically includes:
[0048] Obtaining an iris image to be corrected of a target user and a generative correction model obtained by using the correction model training method for an iris image described in the first aspect;
[0049] The iris image to be corrected and the corresponding emmetropia iris mask are input into the generative correction model to obtain the corresponding corrected iris image.
[0050] By adopting the above technical solution, the target user's iris image to be corrected and the corresponding emmetropia iris mask are input into the generative correction model. Through this generative correction model, a corrected iris image can be generated that is closer to the iris texture of the iris image to be corrected and closer to the iris shape of the emmetropia iris mask, thereby improving the accuracy of iris image correction.
[0051] In a third aspect of the present application, a correction model training device for an iris image is provided, specifically comprising:
[0052] A sample acquisition module, used to acquire at least one strabismus iris image sample and an emmetropia iris mask sample corresponding to the same biometric identifier;
[0053] An image pairing module, used for pairing the strabismus iris image samples with the emmetropia iris mask samples to obtain at least one set of image pairs;
[0054] A model training module is used to input each of the image pairs into a preset generative neural network for training to obtain a trained generative correction model, wherein the generative correction model is a model that generates and outputs a corresponding corrected iris image based on the input image pair, the texture of the corrected iris image is the same as the texture of the strabismus iris image sample in the input image pair, the iris shape of the corrected iris image is the same as the iris shape of the orthoptic iris mask sample in the input image pair, and the generative neural network has the ability to generate images.
[0055] By adopting the above technical solution, the sample acquisition module obtains at least one strabismus iris image sample and an emmetropia iris mask sample, and the image pairing module pairs the strabismus iris image sample and the emmetropia iris mask sample to obtain corresponding image pairs. Finally, the model training module inputs each image pair into a generative neural network for training to obtain a trained generative correction model.
[0056] In a fourth aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps described in any one of the first aspects are performed.
[0057] In summary, the present application includes at least one of the following beneficial technical effects: after obtaining the strabismus iris image samples and the normal view iris mask samples of the same biometric identifier, that is, the strabismus iris image (iris image to be corrected) and the normal view iris mask of the same person's eye, the strabismus iris image samples of the same biometric identifier are then paired with the normal view iris mask samples to obtain image pairs, so that when the generative neural network is subsequently trained in the form of image pairs, the iris texture of the strabismus iris image samples in the input image pairs and the iris shape corresponding to the normal view iris mask samples can be simultaneously learned. Finally, each image pair is input into the generative neural network for training, so that the corrected iris image generated by it is closer and closer to the iris texture of the strabismus iris image samples in the input image pairs and the iris shape corresponding to the normal view iris mask samples. When the training converges, a generative correction model is obtained, so that the accuracy of the subsequent iris image correction through this generative correction model is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flowchart of a correction model training method for iris images provided in an embodiment of the present application;
[0059] Figure 2 It is a flowchart of a method for correcting an iris image provided in an embodiment of the present application;
[0060] Figure 3 It is a structural schematic diagram of a correction model training device for iris images provided in an embodiment of the present application;
[0061] Figure 4 It is a structural schematic diagram of another iris image correction model training device provided in an embodiment of the present application;
[0062] Figure 5 It is a structural schematic diagram of an iris image correction device provided in an embodiment of the present application.
[0063] Explanation of the accompanying drawings: 11. Sample acquisition module; 12. Image pairing module; 13. Model training module; 14. First constraint module; 15. Second constraint module; 16. Third constraint module; 21. Information acquisition module; 22. Image correction module. DETAILED DESCRIPTION
[0064] 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.
[0065] 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.
[0066] 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.
[0067] See also Figure 1 The present application embodiment discloses a flowchart of a method for training a correction model of an iris image, which can be implemented by a computer program or run on a correction model training device for an iris image based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:
[0068] S101: Acquire at least one strabismus iris image sample and an orthoptic iris mask sample corresponding to the same biometric identifier.
[0069] Specifically, in the embodiments of the present application, a biometric identifier refers to an identity identifier based on a person's biometric information. The biometric information is the iris texture information of the person's eyes. In other embodiments, the biometric information may also be a facial image, fingerprint or voiceprint of the person. A strabismus iris image sample refers to an iris image sample collected by an iris recognition device when the person's eyes are at a strabismus angle. A normal-view iris mask sample refers to a mask corresponding to a normal-view iris image of a person, that is, a binary template or mask used to mark and extract valid areas in the normal-view iris image. Among them, the normal-view iris image refers to an iris image collected when a person looks directly at the iris recognition device with his eyes looking directly at the lens.
[0070] Furthermore, the executor of a method for training a correction model for an iris image disclosed in an embodiment of the present application is a server. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The server and the iris recognition device are directly or indirectly connected via a wired or wireless network.
[0071] The iris recognition device may adopt a high-precision iris collector. In other embodiments, the iris recognition device may also be an iris detector. A feasible way to obtain at least one strabismus iris image sample and normal view iris mask sample corresponding to the same biometric identifier is: using a high-precision iris collector to collect strabismus iris images and normal view iris images of the same person, at different strabismus angles under the same light intensity and in the same time period, and determining the strabismus iris images at different strabismus angles as strabismus iris image samples, and determining the collected normal view iris images as normal view iris image samples. At the same time, the collected normal view iris image samples are segmented by a preset iris segmentation algorithm to obtain corresponding normal view iris mask samples. The iris segmentation algorithm may be a Daughman algorithm. In other embodiments, it may also be a trained convolutional neural network model. The training process is briefly described as follows: the convolutional neural network model is trained by using the labeled iris image data so that it learns the complex feature representation of the iris area, and finally automatically identifies and segments the iris area. This is a prior art and will not be described in detail here. It should be noted that when collecting the strabismus iris image and the normal iris image of the same person, that is, the same biometric identifier, the collected person may be at least one person based on at least one light intensity. In addition, the strabismus iris image collected under the same light intensity, in the same time period, and at the same strabismus angle may be one, and in other embodiments, may also be multiple.
[0072] S102: Pair the strabismus iris image samples with the orthoptic iris mask samples to obtain at least one set of image pairs.
[0073] Specifically, in the embodiment of the present application, the strabismus iris image samples and the emmetropia iris mask samples are paired. One achievable implementation method is: after the strabismus iris image samples and the emmetropia iris mask samples corresponding to the same biometric identifier are determined, the first pupil-iris ratio of each strabismus iris image sample is determined, that is, the ratio of the pupil radius to the iris radius in each strabismus iris image sample, and the second pupil-iris ratio of the emmetropia iris image sample corresponding to each emmetropia iris mask sample is determined, that is, the ratio of the pupil radius to the iris radius in the emmetropia iris image sample corresponding to each emmetropia iris mask sample. Further, a feasible method for determining the first pupil-iris ratio is: determining the center and edge of the pupil in the strabismus iris image sample by Hough Transform, and determining the pupil radius based on the average distance from the center to the edge of the pupil. In other embodiments, the center of the pupil in the strabismus iris image sample can also be determined by grayscale projection. Further, when the center of the pupil in the strabismus iris image sample is determined, the outer edge of the iris in the strabismus iris image sample is determined by Hough transform, and the iris radius is obtained based on the average distance from the center of the circle to the outer edge of the iris. Similarly, the process of determining the second pupil-iris ratio can refer to the process of determining the first pupil-iris ratio, which will not be repeated here.
[0074] Further, the preset pupil-iris ratio range interval is divided into a preset number of sub-range intervals, wherein the pupil-iris ratio range interval is the range interval of the pupil-iris ratio of the iris image that can successfully perform iris recognition. Exemplarily, the pupil-iris ratio range interval is 0.2-0.8. If the pupil-iris ratio of iris image A is 0.9, it means that the pupil in iris image A is too large, which may easily lead to iris recognition failure of iris image A. In the embodiment of the present application, the preset number is 6, that is, the pupil-iris ratio range interval is divided into 6 sub-range intervals of 0.2-0.3, 0.3-0.4, ... 0.7-0.8. In other embodiments, the preset number may also be 3, that is, the pupil-iris ratio range interval is divided into 3 sub-range intervals of 0.2-0.4, 0.4-0.6, and 0.6-0.8.
[0075] Furthermore, if the first pupil-iris ratio and the second pupil-iris ratio are within the same sub-range interval, it means that the corresponding first pupil-iris ratio and the second pupil-iris ratio are close, then the corresponding first pupil-iris ratio is determined as the first target pupil-iris ratio, and the corresponding second pupil-iris ratio is determined as the second target pupil-iris ratio. Finally, the strabismus iris image sample corresponding to the first target pupil-iris ratio and the emmetropia iris mask sample corresponding to the second target pupil-iris ratio are paired to obtain a corresponding image pair. By analogy, the strabismus iris image samples and emmetropia iris mask samples at different strabismus angles can be paired to obtain a corresponding image pair. In other embodiments, if the absolute value of the difference between the first pupil-iris ratio and the second pupil-iris ratio is less than a preset difference threshold, then the corresponding strabismus iris image sample and emmetropia iris mask sample are paired.
[0076] S103: Input each image pair into a preset generative neural network for training to obtain a trained generative correction model. The generative correction model is a model that generates and outputs a corresponding corrected iris image based on the input image pair. The texture of the corrected iris image is the same as the texture of the strabismus iris image sample in the input image pair. The iris shape of the corrected iris image is the same as the iris shape of the orthoptic iris mask sample in the input image pair. The generative neural network has the ability to generate images.
[0077] Specifically, after each image pair is determined, the image pair is used as a training sample for model input, and is input into a preset generative neural network for training, so as to obtain a trained generative correction model, which can generate and output a corresponding corrected iris image according to the input image pair, and the iris texture of the corrected iris image is the same as the iris texture of the strabismus iris image sample in the input image pair, and the iris shape of the corrected iris image is the same as the iris shape of the normal iris mask sample in the input image pair, so that the generative correction model can accurately correct the iris image. Among them, Generative Neural Networks is a generative model based on neural networks, which can learn the distribution of data and generate new data samples. In the embodiment of the present application, it has the ability to generate images.
[0078] The achievable implementation method for training the generative neural network is as follows: a single image pair is input into the autoencoder in the generative neural network, and the autoencoder generates a target iris image corresponding to the input image pair, and then a first emmetropia iris image having the same biometric identifier as the strabismus iris image sample in the input image pair and a second emmetropia iris image having a different biometric identifier from the strabismus iris image sample in the input image pair are obtained from the collected emmetropia iris image samples. Furthermore, the target iris image, the first emmetropia iris image, and the second emmetropia iris image corresponding to the same image pair are input into a preset first loss function to obtain a corresponding first loss value, and the first loss function is:
[0079] L triplet (I o ,I p ,I n )=max(L id (I o ,I p )-L id (I o ,I n )+threshold,0)
[0080] L id (I o ,I p )=‖F(I o )-F(I p )‖
[0081] L id (I o ,I n )=‖F(I o )-F(I n )‖;
[0082] Where, L triplet represents the first loss value corresponding to the target iris image, I o represents the target iris image generated by the autoencoder, I p Indicates that o The first normal iris image with the same strabismus iris image sample biometric identifier in the corresponding image pair, I n Indicates that o The corresponding image pair has a second normal iris image with a different biometric identifier from the strabismus iris image sample. F is an iris feature extractor, which outputs a 1*n-dimensional feature vector. L id (I o ,I p ) indicates I o The corresponding eigenvector and I p The distance between the corresponding eigenvectors is smaller, the I o and Ip The more similar, L id (I o ,I n ) indicates I o The corresponding eigenvector and I n The distance between the corresponding eigenvectors is smaller, the I o and I n The more similar, the threshold value is taken from the preset fixed value range to control L id (I o ,I p ) and L id (I o ,I n ) makes I o and I p The distance between the corresponding eigenvectors is less than I o and I n The distance between corresponding eigenvectors.
[0083] Exemplarily, the fixed value range is 0.6-0.8. The distance between feature vectors can be represented by Euclidean distance, and in other embodiments, can also be represented by cosine similarity. The smaller the first loss value, the higher the probability that the target iris image and the strabismus iris image sample in the corresponding image pair are the same biometric identifier, so as to make the iris texture of the target iris image generated by the autoencoder and the strabismus iris image sample in the input image pair as similar as possible.
[0084] Furthermore, the iris ellipse equation parameters of the target iris image generated by the autoencoder and the corresponding first emmetropia iris image (the first emmetropia iris image with the same biometric identifier as the strabismus iris image sample in the input image pair) are determined. The iris ellipse equation parameters include parameters of three dimensions: the major axis, the minor axis, and the angle of the iris. For the iris ellipse equation parameters of the target iris image, a feasible determination method is: detect the edge points of the iris in the target iris image by Hough transform, then use the least squares method to fit the edge points to obtain the corresponding iris ellipse equation, and then determine the iris ellipse equation parameters. Similarly, the iris ellipse equation parameters of the first emmetropia iris image corresponding to the target iris image can be determined. Furthermore, the determined iris ellipse equation parameters are input into a preset second loss function to obtain a corresponding second loss value.
[0085] Among them, the second loss function is:
[0086]
[0087] Where, L circle Indicates the second loss value corresponding to the target iris image, Param oRepresents the iris ellipse equation parameters of the target iris image, Param p represents the iris ellipse equation parameters of the corresponding first frontal iris image, and r represents one of the three dimensions of the iris ellipse equation parameters: major axis, minor axis, and angle. In addition, ‖Param o [r]-Param p [r]‖ 2 The square of the Euclidean norm of the difference between the target iris image and the corresponding first emmetropia iris image in the same dimension in the iris ellipse equation parameters is expressed, thereby characterizing the difference in the same dimension, and then the square of the Euclidean norm of the difference in the parameters in the three dimensions of major axis, minor axis and angle are multiplied by 0.5, and then summed up to finally obtain the second loss value, thereby characterizing the similarity between the iris shape of the target iris image and the iris shape of the corresponding first emmetropia iris image as a whole. The smaller the second loss value, the more similar the iris shape of the target iris image is to the iris shape of the corresponding first emmetropia iris image.
[0088] In the training process of inputting each image pair into the generative neural network, the first loss function and the second loss function are used for constraint supervision, and the sum of the value of the first loss function and the value of the second loss function is continuously minimized, that is, the sum of the first loss value and the second loss value is minimized, which is specifically achieved through optimization algorithms such as back propagation algorithm and gradient descent, so that the autoencoder in the generative neural network finally completes convergence during the training process, and the training is terminated. The trained autoencoder is determined as a generative correction model. At this time, the corrected iris image with the same iris texture as the strabismus iris image sample in the input image pair and the same iris shape as the normal iris mask sample in the input image pair can be obtained through this generative correction model. The process of supervising the model through the loss function until the model converges during the model training process is a prior art and will not be repeated here.
[0089] In other embodiments, each time an image pair is input into the autoencoder and a corresponding target iris image is generated, in addition to being constrained by the first loss function and the second loss function, the image quality of the generated target iris image may be supervised by a preset third loss function, wherein the third loss function is:
[0090] L sharp (I o ,I p )=max(sharpness(I p )-sharpness(I o ),0);
[0091] Where, L sharprepresents the third loss value corresponding to the target iris image, and sharpness represents the image sharpness calculation function. o ) represents the image sharpness of the target iris image. p ) represents the image sharpness of the first frontal iris image corresponding to the target iris image. o ) is no greater than sharpness(I p ), the maximum value of the max function is always sharpness(I p ) and sharpness(I o ), so the smaller the third loss value is, the closer the image quality of the generated target iris image is to the corresponding first emmetropia iris image, that is, the image sharpness of the generated target iris image is closer to the emmetropia iris image with the same strabismus iris image sample biometric identifier in the corresponding input image pair, so that the image sharpness of the generated target iris image is closer to the true value. o ) is greater than sharpness(I p ), the third loss value is 0, then the third loss function is set to 0, preventing the autoencoder from updating parameters during the training phase and avoiding its back propagation. Among them, the image sharpness calculation function can be:
[0092] In the formula, I represents the image whose image sharpness needs to be calculated, w represents the length of the image, h represents the width of the image, df represents the grayscale change amplitude between each corresponding neighboring point and the single pixel in the image, in the embodiment of the present application, each pixel takes 8 neighboring points, dx represents the distance increment between the pixels in the image, b represents the bth pixel in the image, the ratio of df to dx represents the grayscale change rate around the corresponding pixel, a represents the ath neighboring point of the single pixel, wherein, for a single pixel, the grayscale change rates from the eight neighboring points to it are summed to obtain the summed result, thereby characterizing the grayscale diffusion degree around the single pixel, and finally the summed results corresponding to all the pixels are summed and divided by the total number of pixels to obtain the image sharpness of the image. Wherein, the total number of pixels is the product of the length and width of the image.
[0093] It should be noted that during the training process, the model is finally converged by minimizing the sum of the values of the first loss function, the second loss function, and the third loss function, that is, minimizing the sum of the first loss value, the second loss value, and the third loss value, and the trained autoencoder is determined as a generative correction model, so that the image sharpness of the corrected iris image output by it is closer to the true value. In other embodiments, during the training of the input image pair, the first loss value, the second loss value, and the third loss value determined each time are compared with the corresponding loss value threshold. If they are all less than the corresponding loss value threshold, it is determined that the autoencoder has converged and the trained autoencoder is obtained.
[0094] In another embodiment, the preset generative neural network includes an autoencoder and a discriminator. Each time an image pair is input into the autoencoder and a corresponding target iris image is generated, in addition to being constrained by the first loss function and the second loss function, the reliability of the generated target iris image can also be supervised by a preset fourth loss function, that is, the matrix output after the generated target iris image is input into the discriminator is substituted into the fourth loss function to calculate the fourth loss value. In the embodiment of the present application, the discriminator is mainly used to determine the probability that the input target iris image is real data. The greater the probability, the higher the reliability. The discriminator is composed of a convolutional network. Among them, the fourth loss function is:
[0095]
[0096] In the formula, L1 represents the fourth loss value corresponding to the target iris image. The smaller the fourth loss value, the higher the reliability of the target iris image. N*N represents the total number of elements in the N-row and N-column matrix output from the target iris image input to the discriminator, where each element takes a value in [0,1]. The larger the value of the element, the higher the quality of the corresponding area in the target iris image. i represents the i-th row in the matrix, j represents the j-th column in the matrix, O1 represents a matrix in which all elements are 1, and O2 represents the matrix output by the discriminator. It should be noted that during the training of the input image pair, the model parameters are updated through optimization algorithms such as back propagation algorithm and gradient descent, and the first loss value, second loss value and fourth loss value determined each time are compared with the corresponding loss value threshold. If they are all less than the corresponding loss value threshold, it is determined that the autoencoder has converged, and the trained autoencoder is determined as the generative correction model.
[0097] In another embodiment, each time an image pair is input into the autoencoder and a corresponding target iris image is generated, in addition to being constrained by the first loss function and the second loss function, the image style of the generated target iris image may be supervised by a preset fifth loss function and a sixth loss function, that is, the corresponding fifth loss value and the sixth loss value are calculated for each generated target iris image, wherein the fifth loss function is:
[0098]
[0099] Where, L ms-ssim represents the fifth loss value corresponding to the target iris image. The smaller the fifth loss value, the higher the multi-scale structural similarity between the target iris image and the corresponding first frontal iris image. M represents different image scales, m represents the mth image scale, and I oμ Represents the mean intensity value of each pixel in the target iris image, I pμ represents the mean value of the intensity value of each pixel in the first frontal iris image, I oσ Represents the standard deviation of the intensity value of each pixel in the target iris image, I pσ represents the standard deviation of the intensity value of each pixel in the first emmetropic iris image, I opσ represents the covariance of the pixel intensity values between the target iris image and the corresponding first frontal iris image, c1, c2 are constants, β m , γ m It should be noted that the pixel intensity value is a quantitative indicator describing the brightness of each pixel in the image. In the process of calculating the fifth loss value, the preset OpenCV library can be used to calculate I oμ ,I pμ ,I oσ ,I pσ and I opσ , and substitute it into the fifth loss function to get the fifth loss value.
[0100] The sixth loss function is:
[0101]
[0102] Where, L lpips represents the sixth loss value corresponding to the target iris image. The smaller the sixth loss value, the higher the perceived image patch similarity between the target iris image and the corresponding first frontal iris image. l represents the width of the feature of the lth layer of the F network, H l Indicates the height of the feature of the lth layer of the F network, F l (I o ) represents the features of the target iris image after passing through the lth layer of the F network, F l (Ip ) represents the features of the first frontal iris image after passing through the lth layer of the F network, L cos represents the cosine distance, l represents the feature extraction network of the lth layer of the F network, n represents the total number of layers of the F network, and the F network represents the feature extraction network in the iris feature extractor.
[0103] Among them, the fifth loss function and the sixth loss function are both perceptual loss functions, which are mainly used to measure the perceptual difference between the target iris image and the corresponding first frontal iris image. Through the constraints of the perceptual loss function, the smaller the fifth loss value and the sixth loss value, the higher the multi-scale structural similarity and perceptual image patch similarity between the target iris image and the corresponding first frontal iris image, and the closer the image style between the target iris image and the corresponding first frontal iris image, so that the generated target iris image is more in line with the visual perception of the person. It should be noted that during the training of the input image pair, the model parameters are updated through optimization algorithms such as back propagation algorithm and gradient descent, and the first loss value, second loss value, fifth loss function and sixth loss function determined each time are compared with the corresponding loss value threshold. If they are all less than the corresponding loss value threshold, it is determined that the autoencoder has converged, and the trained autoencoder is determined as a generative correction model.
[0104] See also Figure 2 The present application embodiment discloses a flowchart of an iris image correction method, which can be implemented by a computer program or run on an iris image correction device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:
[0105] S201: Obtain an iris image to be corrected of a target user and a generative correction model obtained by using the correction model training method for an iris image in any of the above embodiments.
[0106] S202: Inputting the iris image to be corrected and the corresponding emmetropia iris mask into a generative correction model to obtain a corresponding corrected iris image.
[0107] Specifically, the target user is a user who needs to confirm his / her identity because he / she fails to look directly at the iris recognition device during iris recognition. The iris image to be corrected of the target user is obtained through the iris recognition device, and the iris image to be corrected and the corresponding front-facing iris mask are input into the generative correction model, and the generative correction model generates and outputs a corrected iris image corresponding to the iris image to be corrected, so that the corrected iris image is consistent with the iris image to be corrected in iris texture and consistent with the iris shape corresponding to the corresponding front-facing iris mask, thereby improving the accuracy of iris image correction and further improving the accuracy of iris recognition. It should be noted that a feasible method for determining the orthoptic iris mask input together with the iris image to be corrected is: determine the semi-major axis and semi-minor axis of the iris image to be corrected, mainly through the OpenCV tool to perform edge detection and contour extraction on the iris in the iris image to be corrected, and then determine the corresponding minimum circumscribed rectangle according to the extracted contour, further, extract the semi-major axis and semi-minor axis of the iris in the iris image to be corrected from the minimum circumscribed rectangle, and finally generate the orthoptic iris mask based on the semi-major axis and semi-minor axis through the preset OpenCV library.
[0108] The implementation principle of the iris image correction model training method of the embodiment of the present application is as follows: after obtaining the strabismus iris image samples and the normal view iris mask samples of the same biometric identifier, that is, the strabismus iris image (iris image to be corrected) and the normal view iris mask of the same person's eye, the strabismus iris image samples of the same biometric identifier are then paired with the normal view iris mask samples to obtain image pairs, so that when the generative neural network is subsequently trained in the form of image pairs, the iris texture of the strabismus iris image samples in the input image pairs and the iris shape corresponding to the normal view iris mask samples can be simultaneously learned. Finally, each image pair is input into the generative neural network for training, so that the corrected iris image generated by it is closer and closer to the iris texture of the strabismus iris image samples in the input image pairs and the iris shape corresponding to the normal view iris mask samples. When the training converges, a generative correction model is obtained, so that the accuracy of the subsequent iris image correction through this generative correction model is higher.
[0109] 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.
[0110] See also Figure 3 , is a schematic diagram of the structure of the correction model training device for iris images provided in an embodiment of the present application. The correction model training device applied to iris images can be implemented as all or part of the device through software, hardware or a combination of both. The device includes a sample acquisition module 11, an image pairing module 12 and a model training module 13.
[0111] A sample acquisition module 11, used to acquire at least one strabismus iris image sample and an emmetropia iris mask sample corresponding to the same biometric identifier;
[0112] An image pairing module 12 is used to pair the strabismus iris image samples with the emmetropia iris mask samples to obtain at least one set of image pairs;
[0113] The model training module 13 is used to input each image pair into a preset generative neural network for training to obtain a trained generative correction model. The generative correction model is a model that generates and outputs a corresponding corrected iris image based on the input image pair. The iris texture of the corrected iris image is the same as the iris texture of the strabismus iris image sample in the input image pair. The iris shape of the corrected iris image is the same as the iris shape of the orthoptic iris mask sample in the input image pair. The generative neural network has the ability to generate images.
[0114] Optionally, the image pairing module 12 is specifically used for:
[0115] Determine a first pupil-iris ratio of each strabismus iris image sample and a second pupil-iris ratio of each emmetropia iris image sample corresponding to each emmetropia iris mask sample, wherein the first pupil-iris ratio is a ratio of a pupil radius to an iris radius in each strabismus iris image sample, and the second pupil-iris ratio is a ratio of a pupil radius to an iris radius in each emmetropia iris image sample corresponding to each emmetropia iris mask sample;
[0116] Divide a preset pupil-iris ratio range interval into a preset number of sub-range intervals, the pupil-iris ratio range interval being a range interval in which the pupil-iris ratio of an iris image that can successfully perform iris recognition is located; if a first pupil-iris ratio and a second pupil-iris ratio are in the same sub-range interval, determine the corresponding first pupil-iris ratio as a first target pupil-iris ratio, and determine the corresponding second pupil-iris ratio as a second target pupil-iris ratio;
[0117] The strabismus iris image samples corresponding to the first target pupil-iris ratio and the emmetropia iris mask samples corresponding to the second target pupil-iris ratio are paired to obtain a corresponding image pair.
[0118] Optionally, the model training module 13 is specifically used for:
[0119] Input a single image pair into an autoencoder to generate a corresponding target iris image, and obtain a first normal view iris image having the same biometric identifier as the strabismus iris image sample in the corresponding image pair and a second normal view iris image having a different biometric identifier;
[0120] Substituting the target iris image, the first emmetropia iris image, and the second emmetropia iris image corresponding to the same image pair into a preset first loss function to obtain a corresponding first loss value, wherein the smaller the first loss value, the higher the probability that the target iris image and the strabismus iris image sample in the corresponding image pair are the same biometric identifier;
[0121] Determine iris ellipse equation parameters of the target iris image and the corresponding first emmetropia iris image, and substitute each iris ellipse equation parameter into a preset second loss function to obtain a corresponding second loss value. The smaller the second loss value, the more similar the iris shape of the target iris image is to the iris shape of the corresponding first emmetropia iris image. The iris ellipse equation parameters include parameters of three dimensions: major axis, minor axis and angle.
[0122] The trained autoencoder is determined by minimizing the sum of the first loss value and the second loss value, and the trained autoencoder is determined as the generative correction model.
[0123] Optional, such as Figure 4 As shown, the device further includes a first constraint module 14, which is specifically used to:
[0124] The image quality of the target iris image is supervised by the preset third loss function, and the third loss function is:
[0125] L sharp (I o ,I p )=max(sharpness(I p )-sharpness(I o ),0);
[0126] Where, L sharp represents the third loss value corresponding to the target iris image. The smaller the third loss value is, the closer the image quality of the generated target iris image is to the corresponding first frontal iris image. sharpness represents the image sharpness calculation function. sharpness(I o ) represents the image sharpness of the target iris image. p ) represents the image sharpness of the first frontal iris image corresponding to the target iris image. When the third loss value is 0, the third loss function is set to 0.
[0127] Optionally, the device further includes a second constraint module 15, which is specifically configured to:
[0128] The reliability of the target iris image is supervised by the preset fourth loss function, and the fourth loss function is:
[0129]
[0130] Wherein, L1 represents the fourth loss value corresponding to the target iris image. The smaller the fourth loss value is, the higher the reliability of the target iris image is. N*N represents the total number of elements in the N-row and N-column matrix output from the target iris image input to the discriminator, where each element takes a value in [0,1]. The larger the value of the element is, the higher the quality of the corresponding area in the target iris image is. i represents the i-th row in the matrix, j represents the j-th column in the matrix, O1 represents a matrix in which all elements are 1, and O2 represents the matrix output by the discriminator.
[0131] Optionally, the device further includes a third constraint module 16, which is specifically configured to:
[0132] The image style of the target iris image is supervised by the preset fifth loss function and the preset sixth loss function, and the fifth loss function is:
[0133]
[0134] Where, L ms-ssim represents the fifth loss value corresponding to the target iris image. The smaller the fifth loss value, the higher the multi-scale structural similarity between the target iris image and the corresponding first frontal iris image. M represents different image scales, m represents the mth image scale, and I oμ Represents the mean intensity value of each pixel in the target iris image, I pμ represents the mean value of the intensity value of each pixel in the first frontal iris image, I oσ Represents the standard deviation of the intensity value of each pixel in the target iris image, I pσ represents the standard deviation of the intensity value of each pixel in the first emmetropic iris image, I opσ represents the covariance of the pixel intensity values between the target iris image and the corresponding first frontal iris image, c1, c2 are constants, β m , γ m All represent weights; the sixth loss function is:
[0135]
[0136] Where, L lpips represents the sixth loss value corresponding to the target iris image. The smaller the sixth loss value, the higher the perceived image patch similarity between the target iris image and the corresponding first frontal iris image. l represents the width of the feature of the lth layer of the F network, H l Indicates the height of the feature of the lth layer of the F network, F l (I o ) represents the features of the target iris image after passing through the lth layer of the F network, F l (I p) represents the features of the first frontal iris image after passing through the lth layer of the F network, L cos represents the cosine distance, l represents the feature extraction network of the lth layer of the F network, n represents the total number of layers of the F network, and the F network represents the feature extraction network in the iris feature extractor.
[0137] See also Figure 5 , is a schematic diagram of the structure of the iris image correction device provided in the embodiment of the present application. The correction device applied to the iris image can be implemented as all or part of the device through software, hardware or a combination of both. The device includes an information acquisition module 21 and an image correction module 22.
[0138] An information acquisition module 21 is used to acquire an iris image to be corrected of a target user and a generative correction model obtained by using the correction model training method for an iris image in any of the above embodiments;
[0139] The image correction module 22 is used to input the iris image to be corrected and the corresponding emmetropia iris mask into the generative correction model to obtain the corresponding corrected iris image.
[0140] It should be noted that the iris image correction model training device provided in the above embodiment only uses the division of the above functional modules as an example when executing the iris image correction model training method. In actual applications, 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 iris image correction model training device provided in the above embodiment and the iris image correction model training method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0141] 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 correction model training method and a correction method of an iris image of the above embodiment are adopted.
[0142] 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.
[0143] Among them, through this computer-readable storage medium, a correction model training method and correction method of an iris image in the above embodiment are stored in a computer-readable storage medium, and are loaded and executed on a processor to facilitate the storage and application of the above method.
[0144] An embodiment of the present application also discloses an electronic device, in which a computer program is stored in a computer-readable storage medium. When the computer program is loaded and executed by a processor, the above-mentioned iris image correction model training method and correction method are adopted.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] Among them, through this electronic device, a correction model training method and correction method of an iris image in the above-mentioned embodiment are stored in the memory of the electronic device, and are loaded and executed on the processor of the electronic device for easy use.
[0149] 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 correction model training method for iris images, characterized in that: The method comprises: Acquire at least one strabismus iris image sample and an orthoptic iris mask sample corresponding to the same biometric identifier; Pairing the strabismus iris image samples with the emmetropia iris mask samples to obtain at least one set of image pairs; Each of the image pairs is input into a preset generative neural network for training to obtain a trained generative correction model, wherein the generative correction model is a model that generates and outputs a corresponding corrected iris image based on the input image pair, the iris texture of the corrected iris image is the same as the iris texture of the strabismus iris image sample in the input image pair, the iris shape of the corrected iris image is the same as the iris shape of the orthoptic iris mask sample in the input image pair, and the generative neural network has the ability to generate images.
2. The correction model training method for iris images according to claim 1, characterized in that: The step of pairing the strabismus iris image samples with the emmetropia iris mask samples to obtain at least one set of image pairs specifically includes: Determine a first pupil-iris ratio of each strabismus iris image sample and a second pupil-iris ratio of each emmetropia iris image sample corresponding to each emmetropia iris mask sample, wherein the first pupil-iris ratio is a ratio of a pupil radius to an iris radius in each strabismus iris image sample, and the second pupil-iris ratio is a ratio of a pupil radius to an iris radius in each emmetropia iris image sample corresponding to each emmetropia iris mask sample; Dividing a preset pupil-iris ratio range interval into a preset number of sub-range intervals, wherein the pupil-iris ratio range interval is a range interval in which the pupil-iris ratio of an iris image that can successfully perform iris recognition is located; If the first pupil-iris ratio and the second pupil-iris ratio are in the same sub-range, the corresponding first pupil-iris ratio is determined as a first target pupil-iris ratio, and the corresponding second pupil-iris ratio is determined as a second target pupil-iris ratio; The strabismus iris image samples corresponding to the first target pupil-iris ratio and the emmetropia iris mask samples corresponding to the second target pupil-iris ratio are paired to obtain a corresponding image pair.
3. The correction model training method for iris images according to claim 1, characterized in that: The generative neural network includes an autoencoder, and the image pairs are input into a preset generative neural network for training to obtain a trained generative correction model, which specifically includes: Inputting a single image pair into the autoencoder to generate a corresponding target iris image, and obtaining a first normal view iris image having the same biometric identifier as the strabismus iris image sample in the corresponding image pair and a second normal view iris image having a different biometric identifier; Substituting the target iris image, the first emmetropia iris image and the second emmetropia iris image corresponding to the same image pair into a preset first loss function to obtain a corresponding first loss value, wherein the smaller the first loss value is, the higher the probability that the target iris image and the strabismus iris image sample in the corresponding image pair are the same biometric identifier; Determine iris ellipse equation parameters of the target iris image and the corresponding first emmetropia iris image, and substitute each of the iris ellipse equation parameters into a preset second loss function to obtain a corresponding second loss value, wherein the smaller the second loss value is, the more similar the iris shape of the target iris image is to the iris shape of the corresponding first emmetropia iris image, and the iris ellipse equation parameters include parameters of three dimensions: major axis, minor axis and angle; A trained autoencoder is determined by minimizing the sum of the first loss value and the second loss value, and the trained autoencoder is determined as a generative correction model.
4. The correction model training method for iris images according to claim 3, characterized in that: The first loss function is: L triplet (I o ,I p ,I n )=max(L id (I o ,I p )-L id (I o ,I n )+threshold,0) L id (I o ,I p )=‖F(I o )-F(I p )‖ L id (I o ,I n )=‖F(I o )-F(I n )‖; Where, L triplet represents the first loss value corresponding to the target iris image, I o represents the target iris image generated by the autoencoder, I p Indicates that o The first normal iris image with the same strabismus iris image sample biometric identifier in the corresponding image pair, I n Indicates that o The corresponding image pair has a second normal iris image with a different biometric identifier from the strabismus iris image sample. F is an iris feature extractor, which outputs a 1*n-dimensional feature vector. L id (I o ,I p ) indicates I o The corresponding eigenvector and I p The distance between corresponding eigenvectors, L id (I o ,I n ) indicates I o The corresponding eigenvector and I n The distance between the corresponding eigenvectors, the threshold value is taken from the preset fixed value range, and controls L id (I o ,I p ) and L id (I o ,I n ) makes I o and I p The distance between the corresponding eigenvectors is less than I o and I n The distance between corresponding eigenvectors; The second loss function is: Where, L circle Indicates the second loss value corresponding to the target iris image, Param o Represents the iris ellipse equation parameters of the target iris image, Param p represents the iris ellipse equation parameters of the corresponding first emmetropia iris image, and r represents one of the three dimensions of the iris ellipse equation parameters: major axis, minor axis and angle.
5. The correction model training method for iris images according to claim 3, characterized in that: After inputting the single image pair into the autoencoder to generate the corresponding target iris image, the method further includes: The image quality of the target iris image is supervised by a preset third loss function, and the third loss function is: L sharp (I o ,I p )=max(sharpness(I p )-sharpness(I o ),0); Where, L sharp represents the third loss value corresponding to the target iris image. The smaller the third loss value is, the closer the image quality of the generated target iris image is to the corresponding first frontal iris image. sharpness represents the image sharpness calculation function. sharpness(I o ) represents the image sharpness of the target iris image. p ) represents the image sharpness of the first frontal iris image corresponding to the target iris image. When the third loss value is 0, the third loss function is set to 0.
6. The correction model training method for iris images according to claim 3, characterized in that: The generative neural network further includes a discriminator, and after inputting the single image pair into the autoencoder to generate the corresponding target iris image, it further includes: The reliability of the target iris image is supervised by a preset fourth loss function, and the fourth loss function is: Wherein, L1 represents the fourth loss value corresponding to the target iris image. The smaller the fourth loss value is, the higher the reliability of the target iris image is. N*N represents the total number of elements in the N-row and N-column matrix output from the target iris image input to the discriminator, where each element takes a value in [0,1]. The larger the value of the element is, the higher the quality of the corresponding area in the target iris image is. i represents the i-th row in the matrix, j represents the j-th column in the matrix, O1 represents a matrix in which all elements are 1, and O2 represents the matrix output by the discriminator.
7. The correction model training method for iris images according to claim 3, characterized in that: After inputting the single image pair into the autoencoder to generate the corresponding target iris image, the method further includes: The image style of the target iris image is supervised by a preset fifth loss function and a preset sixth loss function, wherein the fifth loss function is: Where, L ms-ssim represents the fifth loss value corresponding to the target iris image. The smaller the fifth loss value, the higher the multi-scale structural similarity between the target iris image and the corresponding first frontal iris image. M represents different image scales, m represents the mth image scale, and I oμ Represents the mean intensity value of each pixel in the target iris image, I pμ represents the mean value of the intensity value of each pixel in the first frontal iris image, I oσ Represents the standard deviation of the intensity value of each pixel in the target iris image, I pσ represents the standard deviation of the intensity value of each pixel in the first emmetropic iris image, I opσ represents the covariance of the pixel intensity values between the target iris image and the corresponding first frontal iris image, c1, c2 are constants, β m , γ m All represent weights; The sixth loss function is: Where, L lpips represents the sixth loss value corresponding to the target iris image. The smaller the sixth loss value, the higher the perceived image patch similarity between the target iris image and the corresponding first frontal iris image. l represents the width of the feature of the lth layer of the F network, H l Indicates the height of the feature of the lth layer of the F network, F l (I o ) represents the features of the target iris image after passing through the lth layer of the F network, F l (I p ) represents the features of the first frontal iris image after passing through the lth layer of the F network, L cos represents the cosine distance, l represents the feature extraction network of the lth layer of the F network, n represents the total number of layers of the F network, and the F network represents the feature extraction network in the iris feature extractor.
8. A method for correcting an iris image, characterized in that: The method comprises: Obtaining an iris image to be corrected of a target user and a generative correction model obtained by using the correction model training method for an iris image according to any one of claims 1 to 7; The iris image to be corrected and the corresponding emmetropia iris mask are input into the generative correction model to obtain the corresponding corrected iris image.
9. A correction model training device for iris images, characterized in that: include: A sample acquisition module (11) is used to acquire at least one strabismus iris image sample and an emmetropia iris mask sample corresponding to the same biometric identifier; An image pairing module (12) is used to pair the strabismus iris image sample with the emmetropia iris mask sample to obtain at least one set of image pairs; A model training module (13) is used to input each of the image pairs into a preset generative neural network for training, thereby obtaining a trained generative correction model, wherein the generative correction model is a model that generates and outputs a corresponding corrected iris image based on the input image pair, the iris texture of the corrected iris image is the same as the iris texture of the strabismus iris image sample in the input image pair, the iris shape of the corrected iris image is the same as the iris shape of the normal iris mask sample in the input image pair, and the generative neural network has the ability to generate images.
10. 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 8 is adopted.
Citation Information
Cited By
Iris image correction method and device, equipment and storage medium
CN119579850A
Iris image correction method, device, equipment and storage medium
CN119579850B
