Iris image correction model training method, correction method, device and medium
By training a target correction model and combining segmentation loss function and semantic feature loss function, iris images are corrected, which solves the problem of low correction efficiency of distorted iris images in iris recognition system and improves the accuracy and efficiency of iris recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WANLIHONG TECH CO LTD
- Filing Date
- 2023-05-27
- Publication Date
- 2026-04-14
AI Technical Summary
Existing iris recognition systems often capture distorted iris images because the person being scanned cannot look directly at the camera, leading to increased complexity and inefficiency in image correction.
By acquiring emerald and distorted iris images, an initial correction model is used for image correction and feature reconstruction. The target correction model is then trained by combining segmentation loss function, similarity loss constraint, and semantic feature loss function to improve correction efficiency and accuracy.
It enables rapid and accurate correction of distorted iris images, improving the recognition efficiency of iris recognition systems, and effectively solving the iris recognition problem under perspective conditions, especially in VR devices.
Smart Images

Figure CN116704590B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of iris image recognition technology, specifically to a method for training a correction model for iris images, a correction method, a device, and a medium. Background Technology
[0002] Currently, iris recognition systems are becoming increasingly common. These are intelligent systems that identify individuals based on the iris of the eye. Iris recognition technology is a type of biometric identification technology. The high stability, uniqueness, and immutability of the iris are the material basis for its use in identity verification. In existing iris recognition systems, a circular model is often used when normalizing and unfolding the iris region. Since the iris region is also annular, multiple rotations are required when comparing the acquired iris images using this circular model to complete the final iris recognition.
[0003] However, when the iris recognition system acquires iris images, the person being acquired cannot keep looking directly at the camera, resulting in squinting or rotation of the acquired iris image, which means that a distorted iris image is acquired. This leads to an increase in the number of rotations when comparing iris images, reducing the efficiency of correcting distorted iris images. Summary of the Invention
[0004] To improve the efficiency of correcting distorted iris images, this application provides a method for training a correction model for iris images, a correction method, an apparatus, and a medium.
[0005] The first aspect of this application provides a method for training a correction model for iris images, specifically including:
[0006] Acquire at least one emerald iris image and a corresponding distorted iris image for each emerald iris image;
[0007] Each of the distorted iris images is input into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features;
[0008] Based on the reconstructed features, a segmented pupil mask is obtained, and the pupil shape of the pupil mask is supervised by a preset segmentation loss function to obtain a corrected iris image.
[0009] The reconstructed iris image is obtained by applying a similarity loss constraint to the corrected iris image based on the emphyseal iris image.
[0010] Based on the reconstructed iris image and the emphyseal iris image, semantic feature loss constraints are applied to the reconstructed iris image, and the initial correction model is adjusted to obtain the target correction model.
[0011] By employing the aforementioned technical solution, an emmetropic iris image and its corresponding distorted iris image are obtained. The distorted iris image is used as a sample to train an initial correction model. During training, the initial correction model performs image correction and feature reconstruction on the distorted iris image, obtaining reconstructed features. This compensates for the loss of iris texture information during correction, resulting in a more accurate corrected image. Next, pupil mask features are extracted from the reconstructed features to obtain segmented pupil masks. A segmentation loss function is then used to supervise and constrain the pupil shape corresponding to the segmented pupil mask, resulting in a corrected iris image. This prevents pupil shape deformation during correction, which could affect the accuracy of the corrected iris image. After the corrected iris image is determined, a similarity loss constraint is applied between the corrected iris image and the emmetropic iris image to minimize the similarity loss during training, resulting in a reconstructed iris image that more closely approximates the emmetropic iris image. Finally, the semantic feature loss between the reconstructed iris image and the emphyseal image is constrained and supervised. During the training process, the semantic feature loss is minimized to compensate for the semantic feature loss during the correction process. Finally, the initial correction model is trained and the target correction model is obtained, which makes the corrected iris image predicted by the target correction model more accurate.
[0012] Optionally, acquiring at least one emphyseal image and a corresponding distorted iris image for each emphyseal image specifically includes:
[0013] At least one emerald image is acquired, and the outer edge of the iris in each emerald image is marked to obtain the outer ring curve circle of the iris;
[0014] Establish a coordinate system, determine the four intersection points of the outer iris ring curve circle with the coordinate system, and rotate the rotation line around the origin of the coordinate system according to a preset rotation method. The origin of the coordinate system is the center of the outer iris ring curve circle. Based on the intersection points of the rotated rotation line with the outer iris ring curve circle, obtain the four vertices.
[0015] Calculate the projection matrix between the four intersection points and the four vertices, invert the projection matrix to obtain the inverse matrix, and apply the inverse matrix to the emphyseal image to obtain the distorted iris image corresponding to the emphyseal image. The preset rotation method is as follows:
[0016] When the rotation line is a straight line, rotate the rotation line twice consecutively, or
[0017] When the rotation line is two intersecting straight lines, rotate the rotation line once, or
[0018] When the rotation line is a ray, the rotation line is rotated four times consecutively.
[0019] By adopting the above technical solution, the four intersection points of the outer ring curve circle of the iris corresponding to the normal emphyseal image and the coordinate system are first determined. Then, the rotation line is rotated, and the four vertices corresponding to the distorted iris image are determined based on the intersection points of the rotation line and the outer ring curve circle of the iris. Finally, the projection matrix between the four intersection points corresponding to the emphyseal image and the four vertices corresponding to the distorted iris image is calculated, and the projection matrix is inverted. The inverse matrix is then applied to the emphyseal image to obtain training samples of the distorted iris image, thereby realizing the simulation of diverse distorted iris images based on the emphyseal image.
[0020] Optionally, the initial correction model includes three feature extraction layers, three spatial transformation layers, and a hollow spatial pyramid pooling layer. The feature extraction layers and the spatial transformation layers are alternately distributed. The step of inputting the distorted iris image into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features specifically includes:
[0021] The distorted iris image is input into the initial correction model, and then downsampled through the three feature extraction layers and transformed into a feature space through the three spatial transformation layers. Each spatial transformation layer outputs a spatial transformation result.
[0022] The spatial transformation result output from the third spatial transformation layer is input into the void space pyramid pooling layer, and feature reconstruction is performed to obtain the first reconstructed feature. The first reconstructed feature is then fused with the spatial transformation result output from the second spatial transformation layer, and feature reconstruction is performed to obtain the second reconstructed feature.
[0023] By employing the aforementioned technical solution, when the distorted iris image is input into the initial correction model for training, the features of the distorted iris image are progressively downsampled through three feature extraction layers. Simultaneously, after downsampling at each feature extraction layer, a spatial transformation layer is used for feature spatial transformation, thereby achieving deflection correction of the distorted iris image. The spatial transformation result output from the third spatial transformation layer is then input into a hollow spatial pyramid pooling layer for feature extraction at more scales. Furthermore, during the correction process, feature reconstruction is performed on the output of the hollow spatial pyramid pooling layer to obtain the first reconstructed feature. This first reconstructed feature is then fused with the spatial transformation result output from the second spatial transformation layer for feature reconstruction, resulting in the second reconstructed feature. This process compensates for the texture loss caused during the correction of the distorted iris image.
[0024] Optionally, the step of obtaining a segmented pupil mask based on the reconstructed features, and supervising the pupil shape of the pupil mask using a preset segmentation loss function to obtain a corrected iris image, specifically includes:
[0025] The first pupil mask feature is extracted from the first reconstructed feature, the second pupil mask feature is extracted from the second reconstructed feature, and the first pupil mask feature is upsampled and then fused with the second pupil mask feature to obtain the pupil mask feature.
[0026] The pupil mask features are transposed and convolved to obtain a segmented pupil mask;
[0027] Obtain the pupil mask image corresponding to the emphyseal image, use the pupil mask image as a label, and obtain the pupil outline and label outline based on the label and the pupil mask;
[0028] Based on the pupil contour and the label contour, the pupil shape corresponding to the pupil mask is supervised by a preset segmentation loss function to determine the adjusted second reconstruction feature. The adjusted second reconstruction feature is then combined with the spatial transformation result output by the first spatial transformation layer to perform feature reconstruction and obtain the third reconstruction feature.
[0029] The third reconstructed feature is transposed and convolved to obtain the corrected iris image.
[0030] By employing the above technical solution, after determining the first and second reconstruction features, pupil mask features are simultaneously extracted from both features to obtain a segmented pupil mask. Since iris and pupil shape deformation occurs during the correction process, a segmentation loss function is used to calculate the segmentation loss between the pupil contour and the label contour. During model training, minimizing this loss adjusts the second reconstruction feature, controlling the pupil shape deformation and thus improving the accuracy of the corrected image. Next, the adjusted second reconstruction feature is combined with the spatial transformation result of the first spatial transformation layer to perform feature reconstruction, obtaining a third reconstruction feature with less pupil shape deformation. Finally, the third reconstruction feature is transposed and convolved for amplification, resulting in the corrected iris image. This improves the accuracy of predicting the corrected iris image during the initial correction model training process.
[0031] Optionally, the segmentation loss function is expressed as:
[0032] d p =sum(1,where(select(P3)>0.5))
[0033]
[0034] P1 represents the segmented pupil mask, B1 represents the label, B2 represents the label outline, sum(B2) represents the perimeter of the label outline, and d p L represents the circumference of the pupil's outline. BCEThis represents the binary cross-entropy loss, P3 represents the pupil contour, select represents the continuous region, and where(select(P3)>0.5) represents the number of pixels in the continuous region of the pupil contour that are greater than 0.5. m represents the segmentation loss value, and sum represents the summation.
[0035] By adopting the above technical solution, the sum function is first used to sum the number of pixels greater than 0.5 in the continuous region of the pupil outline from pixel number 1 to obtain the perimeter of the pupil outline. Then, the sum function is used to calculate the perimeter of the label outline. Finally, the ratio of the perimeter of the pupil outline to the perimeter of the label outline is calculated. The distance between the perimeter ratio and 1 is minimized by the segmentation loss function, and the binary cross-entropy loss between the segmented pupil mask and the label is added to finally obtain the segmentation loss value, thereby realizing the supervision of the pupil shape.
[0036] Optionally, the step of applying a similarity loss constraint to the corrected iris image based on the emphyseal image to obtain the reconstructed iris image specifically includes:
[0037] Based on the emphyseal image, the corrected iris image is constrained by a similarity loss function to obtain a reconstructed iris image;
[0038] The similarity loss function is expressed as:
[0039]
[0040] L c The similarity loss value is represented by N, which represents the total number of pixels in the corrected iris image or the frontal iris image, and I represents the frontal iris image. Let represent the corrected iris image, and i represent the i-th pixel. The total number of pixels in the corrected iris image and the emmetropic iris image are equal.
[0041] By adopting the above technical solution, the norm square of the difference between the corrected iris image and the emmetropic iris image at each pixel is calculated. After summing the norm squares corresponding to each pixel, the average value is calculated, and finally the similarity loss value between the corrected iris image and the emmetropic iris image is determined. This allows the similarity loss between the corrected iris image and the emmetropic iris image to be constrained during the training process, continuously reducing the gap between the corrected iris image and the emmetropic iris image, making the corrected iris image more accurate.
[0042] Optionally, the step of applying semantic feature loss constraints to the reconstructed iris image based on the reconstructed iris image and the emphyseal iris image, and adjusting the initial correction model to obtain the target correction model, specifically includes:
[0043] Based on the reconstructed iris image and the emterior iris image, the reconstructed iris image is subjected to semantic feature loss constraint through a semantic loss function, and the initial correction model is adjusted to obtain the target correction model;
[0044] The semantic loss function is expressed as:
[0045]
[0046] L f Let M represent the semantic feature loss value, M represent the length of the feature vector of the frontal iris image or the reconstructed iris image, and ω represent the feature vector of the frontal iris image. represents the feature vector of the reconstructed iris image, and j represents the index of the element in the feature vector of the frontal iris image or the reconstructed iris image.
[0047] By employing the above technical solution, since semantic features are lost during the correction of distorted iris images, a semantic loss function is used. This function calculates the norm squared of the distance between the feature vectors of the corrected iris image and the emmetropic iris image at each feature vector length. The average value is then calculated by summing the norm squared values for each length, thus determining the semantic loss value between the corrected and emmetropic iris images. This minimizes the semantic loss value between the corrected and emmetropic iris images during training, continuously reducing the gap between them and resulting in more accurate iris correction.
[0048] A second aspect of this application provides a method for correcting iris images, specifically including:
[0049] Acquire an iris image to be corrected and a target correction model obtained using the iris image correction model training method described in any one of the first aspects;
[0050] The iris image to be corrected is input into the target correction model to obtain the corrected iris image.
[0051] By adopting the above technical solution and determining the final target correction model through the above correction model training method, the actual iris image to be corrected is obtained. The iris image to be corrected is input into the target correction model. After the target correction model corrects and reconstructs the iris image to be corrected, a highly accurate corrected iris image is quickly predicted, thereby improving the efficiency of distorted iris image correction.
[0052] A third aspect of this application provides a training apparatus for a correction model of an iris image, specifically comprising:
[0053] The image acquisition module is used to acquire at least one emphyseal image and a distorted iris image corresponding to each emphyseal image;
[0054] The feature reconstruction module is used to input each of the distorted iris images into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features;
[0055] The image correction module is used to obtain a segmented pupil mask based on the reconstructed features, and to supervise the pupil shape of the pupil mask through a preset segmentation loss function to obtain a corrected iris image.
[0056] An image reconstruction module is used to apply a similarity loss constraint to the corrected iris image based on the emphyseal image to obtain a reconstructed iris image.
[0057] The model determination module is used to perform semantic feature loss constraints on the reconstructed iris image based on the reconstructed iris image and the emphyseal iris image, and to adjust the initial correction model to obtain the target correction model.
[0058] By adopting the above technical solution, after the image acquisition module acquires the emmetropic iris image and the corresponding distorted iris image, the feature reconstruction module performs image correction and feature reconstruction on the distorted iris image to obtain reconstructed features. Then, the image correction module extracts pupil mask features from the reconstructed features to obtain segmented pupil masks. During the training process, the pupil shape of the segmented pupil masks is constrained to finally obtain the corrected iris image. The image reconstruction module constrains the similarity loss between the corrected iris image and the emmetropic iris image to obtain the reconstructed iris image. Finally, during the model training process, the model determination module constrains the semantic feature loss between the reconstructed iris image and the emmetropic iris image to finally obtain the target correction model.
[0059] In summary, this application includes at least one of the following beneficial technical effects:
[0060] The distorted iris image is input into the initial correction model for training. Image correction and reconstruction are performed on the distorted iris image to obtain reconstructed features. The segmented pupil mask is obtained from the reconstructed features, and a segmentation loss function is used for loss constraint to reduce pupil shape distortion. Then, similarity loss constraint and semantic feature loss constraint are applied to the corrected iris image successively. The model is continuously trained, and the model parameters of the initial correction model are adjusted to obtain the target correction model. This allows the target correction model to quickly correct the iris image to be corrected, improving the correction efficiency of distorted iris images. Attached Figure Description
[0061] Figure 1This is a flowchart illustrating a method for training an iris image correction model according to an embodiment of this application.
[0062] Figure 2 This is a schematic diagram of an initial correction model network structure provided in an embodiment of this application;
[0063] Figure 3 This is a flowchart illustrating another method for training a correction model for iris images provided in an embodiment of this application.
[0064] Figure 4 This is a schematic diagram of a vertex determination strategy provided in an embodiment of this application;
[0065] Figure 5 This is a flowchart illustrating another method for training a correction model for iris images provided in an embodiment of this application;
[0066] Figure 6 This is a schematic diagram of the structure of a feature reconstruction module provided in an embodiment of this application;
[0067] Figure 7 This is a schematic diagram of the structure of an iris image correction model training device provided in an embodiment of this application;
[0068] Figure 8 This is a schematic diagram of the structure of an iris image correction device provided in an embodiment of this application.
[0069] Figure labeling: 11. Image acquisition module; 12. Feature reconstruction module; 13. Image correction module; 14. Image reconstruction module; 15. Model determination module. Detailed Implementation
[0070] 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 with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0071] It should be noted that the iris image correction model training method and correction method disclosed in this application can be applied not only to the correction of distorted iris images generated in Scenario 1, where the user cannot maintain a proper camera position, resulting in distorted iris images and affecting the iris recognition rate, but also to Scenario 2. Scenario 2 is in the VR field, where the camera in VR devices is close to the user's eyes at a certain angle, resulting in a large number of perspective-related images in the acquired iris images. This severely affects the recognition rate of the iris recognition system, and simple affine transformations are insufficient to solve this problem. Furthermore, the execution entity of the iris image correction model training method and correction method disclosed in this application is a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The training method for the iris image correction model and the implementation environment of the correction method include an image acquisition device and a server. The image acquisition device can be directly or indirectly connected to the server via wired or wireless network. The image acquisition device can be an iris scanner or an iris camera. The image acquisition device acquires the iris image to be corrected and transmits it to the server, where the trained target correction model corrects the iris image.
[0072] See Figure 1 This application discloses a flowchart illustrating a method for training a correction model of iris images. This method can be implemented using a computer program or run on a von Neumann-based iris image correction model training device. The computer program can be integrated into an application or run as a standalone utility application, specifically including:
[0073] S101: Obtain at least one emotic iris image and a corresponding distorted iris image for each emotic iris image.
[0074] Specifically, an image of the iris of at least one eye of a person is acquired using an image acquisition device. The iris image is a non-distorted image of the iris captured by the device. Key points on the outer edge of the iris image are detected using a key point detection tool, and curve fitting is performed on these key points to obtain the outer ring curve of the iris corresponding to the outer edge of the iris image. The outer ring curve is then placed in a coordinate system, with its origin at the center. The intersection points of the x-coordinate and y-coordinate of the coordinate system with the outer ring curve are selected, resulting in four initial intersection points. The coordinate system is then rotated around the origin by a preset angle, resulting in four new intersection points between the x-coordinate and y-coordinate of the rotated coordinate system and the outer ring curve.
[0075] Finally, the projection matrix is calculated between the coordinates of the initial four intersection points and the coordinates of the new four intersection points. The method for calculating the projection matrix is existing technology and will not be elaborated here. After the projection matrix is determined, it is inverted to obtain the corresponding inverse matrix. Finally, the inverse matrix is applied to the emmetropic iris image. That is, the emmetropic iris image is transformed by the inverse matrix to obtain the corresponding distorted iris image.
[0076] Alternatively, multiple rotations of the coordinate system can yield a set of multiple distorted images corresponding to a set of emphyseal images, or a single rotation can yield a set of distorted iris images corresponding to a set of emphyseal images. The preset angle range is 0-90 degrees. The image acquisition device can be an iris scanner; in other embodiments, it can also be an iris camera.
[0077] It should be noted that this method of acquiring distorted iris images fully utilizes the circular outer edge of the iris image, simulating distorted iris images with various rotation angles based on the actual iris image, resulting in a relatively rich sample of distorted iris images used for model training. Alternatively, in other embodiments, distorted iris images can also be acquired using an image acquisition device, followed by manual intervention with external input selection commands to filter out distorted iris images from the acquired iris images.
[0078] S102: Input each distorted iris image into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features.
[0079] Specifically, such as Figure 2 As shown, multiple distorted iris images are determined and input into an initial correction model. The initial correction model is trained to obtain a model capable of correcting distorted iris images. This initial correction model can be a convolutional neural network (CNN) model; in other embodiments, it can also be a backpropagation (BP) neural network model. In this embodiment, the network structure of the initial correction model includes a feature extraction layer, a spatial transformation layer, and an atrous spatial pyramid pooling (ASPP) layer, with the feature extraction layer preceding the spatial transformation layer, alternating between them. The feature extraction layer, also known as a convolutional layer, consists of varying numbers of residual blocks and extracts image features from the input distorted iris images. The spatial transformation layer consists of multiple basic unit layers, including 3x3 convolutional and max-pooling layers. The spatial transformation layer progressively corrects the input distorted iris images to standard, accurate iris images. The ASPP layer extracts image features at more scales and is positioned after the third spatial transformation layer. The feature extraction layer and the spatial transformation layer each have three layers. In other embodiments, the feature extraction layer and the spatial transformation layer may each have four layers.
[0080] After the distorted iris image is input into the initial correction model, image features are first extracted by the feature extraction layer, and then the extracted image features are spatially transformed by the spatial transformation layer. Following this process, the image is processed by the ASPP layer after three feature extraction layers and three spatial transformation layers, and then image feature reconstruction is performed by a preset feature reconstruction module to obtain the first reconstructed feature. Finally, the first reconstructed feature is fused with the feature output of the second spatial transformation layer, and image feature reconstruction is also performed by the feature reconstruction module to obtain the second reconstructed feature corresponding to the second spatial transformation layer. It should be noted that because the distorted iris image loses some texture information after being corrected by the spatial transformation layer, it will affect subsequent iris recognition. Therefore, feature reconstruction is needed to compensate for the texture information lost during the correction process. Furthermore, the reconstructed features here include both the first and second reconstructed features.
[0081] S103: Based on the reconstructed features, obtain the segmented pupil mask, and supervise the pupil shape of the pupil mask through a preset segmentation loss function to obtain the corrected iris image.
[0082] Specifically, although feature reconstruction can compensate for lost texture information in iris images, uncontrollable changes in pupil and iris shapes occur during iris image correction. Therefore, it is necessary to supervise the pupil shape of the reconstructed features during feature reconstruction to ensure the accuracy of the corrected iris image. Thus, after determining the second reconstruction feature corresponding to the second spatial transformation layer, pupil mask features are extracted from the first and second reconstruction features respectively. The extracted pupil mask features are then fused (pixel-by-pixel addition), transposed, and convolved to obtain the segmented pupil mask.
[0083] After the segmented pupil mask is determined, during the training of the initial correction model, the pupil shape of the segmented pupil mask is supervised using a segmentation loss function. Specifically, when calculating the loss using the segmentation loss function, the distance between the ratio of the pupil contour predicted by the initial correction model and the pupil contour perimeter of the emphyseal image to 1 is continuously minimized. Simultaneously, the model parameters of the initial correction model are adjusted. This supervises the adjustment of the second reconstruction features corresponding to the first and second spatial transformation layers, thereby preventing uncontrollable changes in the pupil and iris shape of the corrected iris image. Finally, the adjusted reconstruction features corresponding to the second spatial transformation layer are fused with the features output from the first spatial transformation layer. After passing through the feature reconstruction module, a second feature reconstruction is performed to obtain the final reconstructed features. The final reconstructed features are then transposed and convolved to obtain the corrected iris image.
[0084] S104: Apply similarity loss constraints to the corrected iris image based on the emphyseal image to obtain the reconstructed iris image.
[0085] In one feasible implementation, a reconstructed iris image is obtained by applying a similarity loss constraint to the corrected iris image based on the emphyseal image using a similarity loss function.
[0086] The similarity loss function is expressed as:
[0087]
[0088] L c The similarity loss value is represented by N, which represents the total number of pixels in the corrected iris image or the frontal iris image, and I represents the frontal iris image. Let represent the corrected iris image, and i represent the i-th pixel. The total number of pixels in the corrected iris image and the emmetropic iris image are equal.
[0089] Specifically, after the corrected iris image is determined, it needs to be supervised to minimize the distance between the corrected iris image and the original iris image used as the label. A similarity loss function is used to calculate the similarity loss value between the corrected iris image and the emmetropic iris image. During model training, minimizing this similarity loss value ultimately yields the reconstructed iris image, resulting in a more accurate corrected image. It should be noted that I... i This represents the i-th pixel in a frontally viewed iris image. This represents the i-th pixel of the corrected iris image. Furthermore, the corrected iris image here is obtained by correcting the distorted iris image corresponding to the emmetropic iris image.
[0090] S105: Based on the reconstructed iris image and the emphyseal image, semantic feature loss constraints are applied to the reconstructed iris image, and the initial correction model is adjusted to obtain the target correction model.
[0091] In another feasible implementation, based on the reconstructed iris image and the emphyseal image, a semantic feature loss constraint is applied to the reconstructed iris image using a semantic loss function, and the initial correction model is adjusted to obtain the target correction model; wherein, the semantic loss function is expressed as:
[0092]
[0093] L f Let M represent the semantic feature loss value, M represent the length of the feature vector of the frontal iris image or the reconstructed iris image, and ω represent the feature vector of the frontal iris image. Let ω represent the feature vector of the reconstructed iris image, where j represents the index of an element in the feature vector of the orthographic or reconstructed iris image. It should be noted that ω... jThis represents the j-th element in the feature vector of a frontal iris image. This represents the j-th element in the feature vector of the reconstructed iris image.
[0094] Specifically, since semantic features are lost during the correction of distorted iris images through the spatial transformation layer, a semantic loss function is used to supervise the reconstructed iris image after it is determined, thereby minimizing the semantic loss value. The detailed process is as follows: First, the reconstructed iris image and the emphyseal iris image undergo the same preprocessing. This preprocessing mainly involves image normalization using OpenCV tools, that is, dividing multiple pixel values of the image by 255 to obtain values between 0 and 1. After preprocessing, the distance between the feature vectors of the emphyseal iris image and the reconstructed iris image is calculated. During model training, the model parameters are continuously adjusted to minimize the distance between the feature vectors, i.e., to minimize the semantic loss value. When the semantic loss value reaches the loss threshold, the initial correction model training is complete, and the target correction model is finally obtained. The loss threshold is the minimum critical value of the semantic loss.
[0095] See Figure 3 This application discloses a flowchart illustrating another method for training a correction model for iris images. This method can be implemented using a computer program or run on a von Neumann-based iris image correction model training device. The computer program can be integrated into an application or run as a standalone utility application, specifically including:
[0096] S201: Obtain at least one emphyseal image, mark the outer edge of the iris in each emphyseal image, and obtain the outer ring curve circle of the iris.
[0097] S202: Establish a coordinate system, determine the four intersection points between the outer iris ring curve circle and the coordinate system, and rotate the rotation line around the origin of the coordinate system according to the preset rotation method.
[0098] S203: Based on the intersection of the rotated line and the outer ring curve of the iris, four vertices are obtained.
[0099] In one feasible implementation, the preset rotation method is: when the rotation line is a straight line, rotate the rotation line twice consecutively, or
[0100] When the rotation line consists of two intersecting straight lines, rotate the rotation line once, or
[0101] When the rotation line is a ray, rotate the rotation line four times consecutively.
[0102] Specifically, the method for determining the four intersection points of the outer iris ring curve circle and the coordinate system can be found in step 103, and will not be repeated here. The coordinate system is established using a preset MATLAB program. The origin of the coordinate system is the center of the outer iris ring curve circle. The rotation line can be two intersecting straight lines, a single straight line, or a ray. The two intersecting straight lines can be perpendicular or not, and the angle between them must be within a preset angle range. When the rotation line is two intersecting straight lines, the rotation line is rotated once around the origin of the coordinate system by a preset angle. In other embodiments, when the rotation line is a single straight line, the rotation line is rotated twice consecutively around the origin of the coordinate system, i.e., this straight line is rotated twice consecutively each time, with a different angle each time. The intersection points of this straight line with the outer iris ring curve circle after the first and second rotations are selected respectively. The angle of the second rotation is greater than a preset angle threshold to avoid the angle between the two rotations being too small, resulting in a large perspective distortion in the generated image, which does not conform to practical use. In another embodiment, when the rotation line is a ray, the rotation line is rotated four times consecutively, and the intersection points of the first, second, third, and fourth rotations of the rotation line with the outer ring curve of the iris are selected respectively. The ray after the four rotations is located in different quadrants of the coordinate system, and the angle between adjacent rays after the first, second, third, and fourth rotations is greater than a preset angle threshold, so that the final generated distorted iris image is more consistent with the actual acquisition situation.
[0103] like Figure 4 As shown, when the rotation line consists of two intersecting, perpendicular lines, these two perpendicular lines are respectively lines along the horizontal and vertical axes of the coordinate system (or not necessarily lines along the horizontal and vertical axes). After rotating these two perpendicular lines around the origin of the coordinate system by a preset angle, the intersection point of the rotated two perpendicular lines with the outer iris loop curve is selected. The method for obtaining the final four vertices is discussed in detail using one of these intersection points, x. The distance Lox from the origin o to x is the radius of the outer iris loop curve. Two points m and n are selected on the line containing ox. The distance Lom from om is equal to the first coefficient * Lox, and the distance Lon from on is equal to the second coefficient * Lox. In this embodiment, the first coefficient is 0.75 and the second coefficient is 1.25. In other embodiments, the first coefficient can be 0.8 and the second coefficient can be 1.2. Then, any one of m and n is arbitrarily selected as one of the four vertices. The remaining three vertices from the last four vertices are determined by using the same method as the intersection points of the two mutually perpendicular lines after rotation with the other three points of the outer iris ring curve circle, thus obtaining the final four vertices.
[0104] It should be noted that the preset angle is greater than 0 degrees and less than 90 degrees. With each rotation, the coordinates of the four vertices are calculated based on the rotation angle and the distances from the four vertices to the origin of the coordinate system. Furthermore, when the cumulative sum of the rotation angles reaches 90 degrees, rotation ceases. Additionally, the direction of rotation can be either clockwise or counterclockwise.
[0105] S204: Calculate the projection matrix between the four intersection points and the four vertices, invert the projection matrix to obtain the inverse matrix, apply the inverse matrix to the emphyseal image to obtain the distorted iris image corresponding to the emphyseal image.
[0106] Specifically, refer to step S101 for a more detailed explanation of how the inverse matrix is applied to the corresponding formal iris image: using a pre-set OpenCV tool, the emphyseal image is adjusted based on the inverse matrix to obtain a distorted iris image.
[0107] S205: Input each distorted iris image into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features.
[0108] S206: Based on the reconstructed features, obtain the segmented pupil mask, and supervise the pupil shape of the pupil mask through a preset segmentation loss function to obtain the corrected iris image.
[0109] S207: Apply similarity loss constraints to the corrected iris image based on the emphyseal image to obtain the reconstructed iris image.
[0110] S208: Based on the reconstructed iris image and the emterior iris image, semantic feature loss constraints are applied to the reconstructed iris image, and the initial correction model is adjusted to obtain the target correction model.
[0111] For details, please refer to steps S102-S105, which will not be repeated here.
[0112] See Figure 5 This application discloses a flowchart of another method for training a correction model for iris images, which can be implemented using a computer program or run on a von Neumann-based iris image correction model training device. The computer program can be integrated into an application or run as a standalone utility application, specifically including:
[0113] S301: Obtain at least one emmetropic iris image and a corresponding distorted iris image for each emmetropic iris image.
[0114] For details, please refer to step S101, which will not be repeated here.
[0115] S302: Input the distorted iris image into the initial correction model, perform downsampling through three feature extraction layers, and perform feature space transformation through three spatial transformation layers. Each spatial transformation layer outputs the spatial transformation result.
[0116] Specifically, the distorted iris image is input into the initial correction model. After downsampling by the first feature extraction layer, the extracted image features are obtained. These features are then input into the first spatial transformation layer following the first feature extraction layer for spatial feature transformation. Next, the second feature extraction layer following the first spatial transformation layer performs further downsampling, and the second spatial transformation layer performs another feature space transformation. Finally, the image passes through a third feature extraction layer and a third spatial transformation layer, thus achieving gradual correction of the distorted iris image. The processing in this layer is consistent with the previous two layers, where each spatial transformation layer outputs a spatial transformation result. Referring to step S102, since the scale of the image features decreases after each spatial transformation layer, the first spatial transformation layer uses 4 basic unit layers, the second uses 3 basic unit layers, and the third uses 2 basic unit layers.
[0117] It should be noted that the basic unit layer in the third spatial transformation layer is followed by two fully connected layers. The function of the fully connected layers is to synthesize the preceding image features and finally output the corresponding feature vectors to form a feature deformation matrix. The feature deformation matrix is then applied to the input features of the first spatial transformation layer to obtain the iris features after correction by the three spatial transformation layers, as shown in the following formula:
[0118]
[0119] Where f1 represents a fully connected layer, f2 represents convolution and pooling, grid_gen represents the grid generation function, grid_sample represents the interpolation sampling operation on the input features, and W x This represents the input features of the first spatial transformation layer. This indicates the corrected iris features.
[0120] S303: Input the spatial transformation result output by the third spatial transformation layer into the void space pyramid pooling layer, and perform feature reconstruction to obtain the first reconstructed feature. Then, fuse the first reconstructed feature with the spatial transformation result output by the second spatial transformation layer, and perform feature reconstruction to obtain the second reconstructed feature.
[0121] Specifically, after feature space transformation through three spatial transformation layers, the spatial transformation result output from the third spatial transformation layer is input into the hollow spatial pyramid pooling layer. This extracts image features of more dimensions from the spatial transformation result of the third spatial transformation layer. Then, the feature reconstruction module reconstructs the output features of the hollow spatial pyramid pooling layer to obtain the first reconstructed features. For a further detailed explanation of the feature reconstruction module, please refer to [link to documentation]. Figure 6 The figure shows a schematic diagram of the feature reconstruction module, including an edge enhancement branch (edge enhancement layer) and a transposed convolution branch (transposed convolution layer). The edge enhancement branch is used to extract high-frequency texture features from the iris image. The transposed convolution, also known as deconvolution, achieves upsampling by transposing the matrix, increasing the width and height of the input image. In this embodiment, the transposed convolution branch mainly reconstructs the features after spatial transformation of each spatial transformation layer. Finally, the outputs of the two branches are added pixel-by-pixel along each channel to obtain the corresponding reconstructed features.
[0122] After the first reconstructed feature is determined, it is transposed and convolved, and then fused with the features transformed by the second spatial transformation layer. The feature reconstruction module is then used to perform feature reconstruction again to obtain the second reconstructed feature. It should be noted that the second reconstructed feature is the reconstructed feature corresponding to the second spatial transformation layer.
[0123] S304: Extract the first pupil mask feature from the first reconstructed feature, extract the second pupil mask feature from the second reconstructed feature, and then upsample and fuse the first pupil mask feature with the second pupil mask feature to obtain the pupil mask feature.
[0124] S305: Transpose and convolve the pupil mask features to obtain the segmented pupil mask.
[0125] Specifically, after the first reconstructed feature is determined, the first pupil mask feature is extracted from the first reconstructed feature through convolution. The mask is a binary image composed of 0s and 1s. Then, in the same manner, the second pupil mask feature is extracted from the second reconstructed feature. Since the feature scale of the first reconstructed feature is smaller than that of the second reconstructed feature, the first pupil mask feature is upsampled to amplify it, so that the feature scale of the upsampled first pupil mask feature is consistent with that of the second pupil mask feature. Next, the upsampled first pupil mask feature is added to the second pupil mask feature pixel-by-pixel and fused to obtain the pupil mask feature. Finally, the pupil mask feature is transposed and convolved to amplify its scale, resulting in the segmented pupil mask, which is the pupil mask predicted by the initial correction model.
[0126] It should be noted that during the iris image correction process using the spatial transformation layer, although feature reconstruction can compensate for the lost texture information, the pupil and iris shapes are prone to uncontrollable changes (or deformations) that cannot be compensated for. This results in a difference in content between the corrected iris image and the initial iris image, leading to poor accuracy and a low recognition rate. Therefore, by extracting pupil mask features from the first and second reconstructed features respectively, the pupil mask features of the first and second reconstructed features can be supervised during model training, thereby achieving supervision of pupil shape.
[0127] S306: Obtain the pupil mask image corresponding to the emphyseal image, use the pupil mask image as a label, and obtain the pupil outline and label outline based on the label and the pupil mask.
[0128] Specifically, after the segmented pupil mask is determined, it is necessary to obtain the pupil mask image corresponding to the emphyseal image. One feasible method is to mark the inner edge of the emphyseal image to obtain the inner loop curve circle of the iris, and then fill the inside of the inner loop curve circle of the iris with a fill value of 255 using a preset PyTorch tool, finally obtaining the pupil mask image. Next, the pupil shape of the segmented pupil mask is supervised, and the process is as follows:
[0129] The pupil mask image is used as the label. A 3x3 convolution kernel K1 is defined, with each element of the kernel being 1. The segmented pupil mask P1 is divided into n 3x3 blocks with a stride of 1, resulting in an nx3x3 tensor Q. Then, the minimum value Q among multiple pixel values in the 3x3 block is determined. i Specifically, it is determined by the following formula: Q i =min(f(Q) i In the formula K1), f represents a linear function. After determining the minimum value among multiple pixel values, each pixel value in the 3*3 block is replaced with this minimum value. Finally, the 3*3 block after replacement is restored to its original position before slicing, resulting in P2. Subtracting P2 from P1 yields the pupil outline P3. Additionally, the pupil mask image used as the label is processed in the same way to obtain the label outline B2.
[0130] S307: Based on the pupil contour and label contour, supervise the pupil shape corresponding to the pupil mask through a preset segmentation loss function, determine the adjusted second reconstruction feature, and perform feature reconstruction with the spatial transformation result output by the first spatial transformation layer to obtain the third reconstruction feature.
[0131] S308: Transpose and convolve the third reconstructed feature to obtain the corrected iris image.
[0132] Specifically, after the pupil outline and label outline are determined, the perimeter of the segmented pupil mask and the perimeter of the label outline are calculated based on the pupil outline and label outline, respectively. The pupil outline perimeter is calculated using the following formula:
[0133] d p =sum(1,where(select(P3)>0.5))
[0134] d p P3 represents the pupil outline, P3 represents the pupil outline, select represents a continuous region, where(select(P3)>0.5) represents the number of pixels in the continuous region of the pupil outline that are greater than 0.5, and sum represents the summation. Further explanation of formula d... p =sum(1,where(select(P3)>0.5)), which is mainly used to count the number of pixels (pixel count) in a continuous region of the pupil outline that are greater than 0.5. Pixels in a continuous region that are greater than 0.5 are incremented by 1, and the final perimeter of the pupil outline is obtained.
[0135] After determining the perimeters of the pupil contour and the label contour, a segmentation loss value is calculated using a segmentation loss function. During model training, this segmentation loss value is continuously minimized, thereby continuously reducing the difference between the ratio of the pupil contour and label contour perimeters and 1. This achieves supervision of pupil shape. The segmentation loss function is expressed as:
[0136]
[0137] In the formula, L BCE L represents the binary cross-entropy loss. m B1 represents the segmentation loss value, B2 represents the label, and sum(B2) represents the perimeter of the label outline.
[0138] During the process of minimizing the segmentation loss, the model is continuously trained, and the resulting second reconstructed features are constantly adjusted until the adjusted second reconstructed features are obtained. This minimizes the segmentation loss, avoids uncontrollable changes in the pupil and iris shape, and ensures a more accurate corrected iris image. Then, the adjusted second reconstructed features are combined with the spatial transformation result (the spatially transformed features) output from the first spatial transformation layer for feature reconstruction. This reconstruction is also performed using a feature reconstruction module, resulting in a third reconstructed feature. This third reconstructed feature is then transposed and convolved to obtain the corrected iris image.
[0139] S309: Apply similarity loss constraints to the corrected iris image based on the emphyseal image to obtain the reconstructed iris image.
[0140] S310: Based on the reconstructed iris image and the emphyseal image, semantic feature loss constraints are applied to the reconstructed iris image, and the initial correction model is adjusted to obtain the target correction model.
[0141] For details, please refer to steps S104-S105, which will not be repeated here.
[0142] In addition, based on the same inventive concept as the iris image correction model training method in the above embodiments, the present invention also provides an iris image correction method. The repeated parts can be implemented with reference to the specific implementation methods of the above embodiments, and will not be described again.
[0143] The iris image to be corrected and the target correction model obtained by the iris image correction model training method in any of the above embodiments are obtained.
[0144] The iris image to be corrected is input into the target correction model to obtain the corrected iris image.
[0145] Specifically, after the target correction model is determined, the actual iris image to be corrected is acquired through an image acquisition device. The iris image to be corrected is then input into the target correction model. After the target correction model corrects and reconstructs the iris image to be corrected, it can quickly predict a more accurate corrected iris image without having to perform multiple rotations during iris recognition and comparison. This improves the efficiency of distorted iris image correction and thus improves the recognition efficiency of iris images.
[0146] The implementation principle of the iris image correction model training method in this application embodiment is as follows: An emmetropic iris image and a corresponding distorted iris image are obtained. The distorted iris image is used as a sample to train an initial correction model. The initial correction model performs image correction processing and feature reconstruction on the distorted iris image to obtain reconstructed features. This compensates for the loss of iris texture information during the correction process, thereby making the corrected image more accurate. Next, pupil mask features are extracted from the reconstructed features to obtain a segmented pupil mask. A segmentation loss function is used to supervise and constrain the pupil shape corresponding to the segmented pupil mask to obtain the corrected iris image. After the corrected iris image is determined, a similarity loss constraint is applied between the corrected iris image and the emmetropic iris image to minimize the similarity loss during training, resulting in a reconstructed iris image that is closer to the emmetropic iris image. Finally, the semantic feature loss between the reconstructed iris image and the emphyseal image is constrained and supervised. The initial correction model is then trained to obtain the target correction model, which makes the corrected iris image predicted by the target correction model more accurate.
[0147] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0148] Please see Figure 7 This is a schematic diagram of the structure of the iris image correction model training device provided in this application embodiment. This iris image correction model training device can be implemented as all or part of the device through software, hardware, or a combination of both. The device 1 includes an image acquisition module 11, a feature reconstruction module 12, an image correction module 13, an image reconstruction module 14, and a model determination module 15.
[0149] Image acquisition module 11 is used to acquire at least one emphyseal image and a distorted iris image corresponding to each emphyseal image;
[0150] Feature reconstruction module 12 is used to input each distorted iris image into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features;
[0151] Image correction module 13 is used to obtain a segmented pupil mask based on the reconstructed features, and to supervise the pupil shape of the pupil mask through a preset segmentation loss function to obtain a corrected iris image.
[0152] Image reconstruction module 14 is used to apply similarity loss constraints to the corrected iris image based on the emphyseal image to obtain the reconstructed iris image;
[0153] The model determination module 15 is used to perform semantic feature loss constraints on the reconstructed iris image based on the reconstructed iris image and the emphyseal iris image, and to adjust the initial correction model to obtain the target correction model.
[0154] Optionally, the image acquisition module 11 is specifically used for:
[0155] Acquire at least one emerald image, and mark the outer edge of the iris in each emerald image to obtain the outer ring curve circle of the iris;
[0156] Establish a coordinate system, determine the four intersection points between the outer iris loop curve circle and the coordinate system, and rotate the rotation line around the origin of the coordinate system according to the preset rotation method. The origin of the coordinate system is the center of the outer iris loop curve circle.
[0157] Based on the intersection of the rotated line and the outer ring curve of the iris, four vertices are obtained;
[0158] Calculate the projection matrix between the four intersection points and the four vertices, invert the projection matrix to obtain the inverse matrix, and apply the inverse matrix to the emphysis image to obtain the distorted iris image corresponding to the emphysis image. The preset rotation method is: when the rotation line is a straight line, rotate the rotation line twice consecutively, or...
[0159] When the rotation line consists of two intersecting straight lines, rotate the rotation line once, or
[0160] When the rotation line is a ray, rotate the rotation line four times consecutively.
[0161] Optional, feature reconstruction module 12, specifically used for:
[0162] The distorted iris image is input into the initial correction model, and then downsampled through three feature extraction layers and transformed into feature space through three spatial transformation layers. Each spatial transformation layer outputs the spatial transformation result.
[0163] The spatial transformation result output from the third spatial transformation layer is input into the void space pyramid pooling layer, and feature reconstruction is performed to obtain the first reconstructed feature. The first reconstructed feature is then fused with the spatial transformation result output from the second spatial transformation layer, and feature reconstruction is performed to obtain the second reconstructed feature.
[0164] Optionally, the image correction module 13 is specifically used for:
[0165] The first pupil mask feature is extracted from the first reconstructed feature, the second pupil mask feature is extracted from the second reconstructed feature, and the first pupil mask feature is upsampled and then fused with the second pupil mask feature to obtain the pupil mask feature.
[0166] Transpose and convolve the pupil mask features to obtain the segmented pupil mask;
[0167] Obtain the pupil mask image corresponding to the emphyseal image, use the pupil mask image as a label, and obtain the pupil outline and label outline based on the label and pupil mask;
[0168] Based on the pupil contour and label contour, the pupil shape corresponding to the pupil mask is supervised by a preset segmentation loss function to determine the adjusted second reconstruction feature. The adjusted second reconstruction feature is then combined with the spatial transformation result output by the first spatial transformation layer to perform feature reconstruction and obtain the third reconstruction feature.
[0169] The third reconstructed feature is transposed and convolved to obtain the corrected iris image.
[0170] Optional, image reconstruction module 14, specifically used for:
[0171] Based on the emphyseal image, the similarity loss constraint is applied to the corrected iris image using a similarity loss function to obtain the reconstructed iris image;
[0172] The similarity loss function is expressed as:
[0173]
[0174] L c The similarity loss value is represented by N, which represents the total number of pixels in the corrected iris image or the frontal iris image, and I represents the frontal iris image. Let represent the corrected iris image, and i represent the i-th pixel. The total number of pixels in the corrected iris image and the emmetropic iris image are equal.
[0175] Optionally, the model determination module 15 is specifically used for:
[0176] Based on the reconstructed iris image and the emterior iris image, the semantic feature loss of the reconstructed iris image is constrained by the semantic loss function, and the initial correction model is adjusted to obtain the target correction model;
[0177] The semantic loss function is expressed as:
[0178]
[0179] L f denoted by , represents the semantic feature loss value; represents the length of the feature vector of the frontal iris image or the reconstructed iris image; ω represents the feature vector of the frontal iris image. represents the feature vector of the reconstructed iris image, and j represents the index of the element in the feature vector of the frontal iris image or the reconstructed iris image.
[0180] It should be noted that the iris image correction model training device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the iris image correction model training method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the iris image correction model training device and the iris image correction model training method embodiment provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiment, which will not be repeated here.
[0181] Please see Figure 8 This is a schematic diagram of the iris image correction device provided in an embodiment of this application. The iris image correction device can be implemented as all or part of a whole through software, hardware, or a combination of both. The device includes an information acquisition module 21 and an iris correction module 22.
[0182] Information acquisition module 21 is used to acquire the iris image to be corrected and the target correction model obtained by the iris image correction model training method in any of the above embodiments;
[0183] The iris correction module 22 inputs the iris image to be corrected into the target correction model to obtain the corrected iris image.
[0184] This application also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it employs an iris image correction model training method and a correction method as described in the above embodiments.
[0185] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.
[0186] The above-described iris image correction model training method and correction method are stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above method.
[0187] This 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, it employs the above-mentioned iris image correction model training method and correction method.
[0188] The electronic device can be a desktop computer, a laptop computer, or a cloud server, and the electronic device includes, but is not limited to, a processor and a memory. For example, the electronic device may also include input / output devices, network access devices, and buses.
[0189] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.
[0190] The memory can be an internal storage unit of an electronic device, such as a hard disk or RAM, or an external storage device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) equipped on the electronic device. Furthermore, the memory can 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 will be output. This application does not limit this.
[0191] In this electronic device, the iris image correction model training method and correction method of the above embodiments are stored in the memory of the electronic device and loaded and executed on the processor of the electronic device for convenient use.
[0192] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for training a correction model for iris images, characterized in that, The method includes: Acquire at least one emerald iris image and a corresponding distorted iris image for each emerald iris image; Each of the distorted iris images is input into an initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features. The initial correction model includes three feature extraction layers, three spatial transformation layers, and a hollow spatial pyramid pooling layer. The feature extraction layers and the spatial transformation layers are alternately distributed. The process includes: inputting the distorted iris image into the initial correction model; performing downsampling through the three feature extraction layers and feature spatial transformation through the three spatial transformation layers, wherein each spatial transformation layer outputs a spatial transformation result; inputting the spatial transformation result output by the third spatial transformation layer into the hollow spatial pyramid pooling layer and performing feature reconstruction to obtain a first reconstructed feature; fusing the first reconstructed feature with the spatial transformation result output by the second spatial transformation layer and performing feature reconstruction to obtain a second reconstructed feature. Based on the reconstructed features, a segmented pupil mask is obtained, and the pupil shape of the pupil mask is supervised by a preset segmentation loss function to obtain a corrected iris image. This includes: extracting a first pupil mask feature from the first reconstructed features, extracting a second pupil mask feature from the second reconstructed features, and upsampling the first pupil mask feature and fusing it with the second pupil mask feature to obtain a pupil mask feature; performing a transposed convolution on the pupil mask feature to obtain a segmented pupil mask; obtaining a pupil mask image corresponding to the emmetropic iris image, using the pupil mask image as a label, and obtaining a pupil contour and a label contour based on the label and the pupil mask; supervising the pupil shape corresponding to the pupil mask using a preset segmentation loss function based on the pupil contour and the label contour to determine an adjusted second reconstructed feature, and performing feature reconstruction with the adjusted second reconstructed feature and the spatial transformation result output by the first spatial transformation layer to obtain a third reconstructed feature; and performing a transposed convolution on the third reconstructed feature to obtain a corrected iris image. The reconstructed iris image is obtained by applying a similarity loss constraint to the corrected iris image based on the emphyseal iris image. Based on the reconstructed iris image and the emphyseal iris image, semantic feature loss constraints are applied to the reconstructed iris image, and the initial correction model is adjusted to obtain the target correction model.
2. The iris image correction model training method according to claim 1, characterized in that, The acquisition of at least one emphyseal image and a corresponding distorted iris image for each emphyseal image specifically includes: At least one emerald image is acquired, and the outer edge of the iris in each emerald image is marked to obtain the outer ring curve circle of the iris; Establish a coordinate system, determine the four intersection points between the outer ring curve circle of the iris and the coordinate system, and rotate the rotation line around the origin of the coordinate system according to a preset rotation method. The origin of the coordinate system is the center of the outer ring curve circle of the iris. Based on the intersection of the rotated line and the outer ring curve of the iris, four vertices are obtained; Calculate the projection matrix between the four intersection points and the four vertices, invert the projection matrix to obtain the inverse matrix, and apply the inverse matrix to the emphyseal image to obtain the distorted iris image corresponding to the emphyseal image. The preset rotation method is as follows: When the rotation line is a straight line, rotate the rotation line twice consecutively, or When the rotation line is two intersecting straight lines, rotate the rotation line once, or When the rotation line is a ray, the rotation line is rotated four times consecutively.
3. The iris image correction model training method according to claim 1, characterized in that, The segmentation loss function is expressed as: ; P1 represents the segmented pupil mask, B1 represents the label, B2 represents the label outline, sum(B2) represents the perimeter of the label outline, and d p L represents the circumference of the pupil's outline. BCE This represents the binary cross-entropy loss, P3 represents the pupil contour, and select represents the continuous region. L represents the number of pixels in a continuous region of the pupil outline that is greater than 0.
5. m represents the segmentation loss value, and sum represents the summation.
4. The method for training a correction model for iris images according to claim 1, characterized in that, The step of applying a similarity loss constraint to the corrected iris image based on the emphyseal image to obtain the reconstructed iris image specifically includes: Based on the emphyseal image, the corrected iris image is constrained by a similarity loss function to obtain a reconstructed iris image; The similarity loss function is expressed as: ; L c The similarity loss value is represented by N, which represents the total number of pixels in the corrected iris image or the frontal iris image, and I represents the frontal iris image. Let represent the corrected iris image, and i represent the i-th pixel. The total number of pixels in the corrected iris image and the emmetropic iris image are equal.
5. The method for training a correction model for iris images according to claim 1, characterized in that, The process of applying semantic feature loss constraints to the reconstructed iris image and the emphyseal image, and adjusting the initial correction model to obtain the target correction model, specifically includes: Based on the reconstructed iris image and the emterior iris image, the reconstructed iris image is subjected to semantic feature loss constraint through a semantic loss function, and the initial correction model is adjusted to obtain the target correction model; The semantic loss function is expressed as: ; L f The semantic feature loss value is represented by M, which represents the length of the feature vector of the orthogonal iris image or the reconstructed iris image. This represents the feature vector of a frontally viewed iris image. represents the feature vector of the reconstructed iris image, and j represents the index of the element in the feature vector of the frontal iris image or the reconstructed iris image.
6. A method for correcting iris images, characterized in that, include: Acquire an iris image to be corrected and a target correction model obtained using the iris image correction model training method as described in any one of claims 1 to 5; The iris image to be corrected is input into the target correction model to obtain the corrected iris image.
7. A training device for a correction model of iris images, characterized in that, A method for training a correction model for iris images according to any one of claims 1 to 5, comprising: Image acquisition module (11) is used to acquire at least one emphyseal image and a distorted iris image corresponding to each emphyseal image; The feature reconstruction module (12) is used to input each of the distorted iris images into the initial correction model for image correction processing and image feature reconstruction to obtain reconstructed features; The image correction module (13) is used to obtain the segmented pupil mask according to the reconstruction features, and to supervise the pupil shape of the pupil mask through a preset segmentation loss function to obtain a corrected iris image. The image reconstruction module (14) is used to perform similarity loss constraint on the corrected iris image based on the emphyseal image to obtain the reconstructed iris image; The model determination module (15) is used to perform semantic feature loss constraints on the reconstructed iris image based on the reconstructed iris image and the emphyseal iris image, and to adjust the initial correction model to obtain the target correction model.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded and executed by the processor, it employs the method described in any one of claims 1-5.
Citation Information
Patent Citations
Correction model training, correction and recognition method and device for non-front-view iris image
CN112651389A
Frontal view reconstruction for iris recognition
US20140355841A1