Sperm bank identity verification system and method based on face recognition
By normalizing facial feature information and iteratively training the identity recognition model, combined with prior information and multi-view analysis, the problem of identity verification of 3D face recognition devices under different angles and postures was solved, achieving more efficient sperm bank identity verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF ANHUI MEDICAL UNIV
- Filing Date
- 2025-01-15
- Publication Date
- 2026-05-01
AI Technical Summary
Existing 3D face recognition devices cannot complete identity verification under different angles and postures, and the error caused by a single viewpoint cannot guarantee more accurate extraction and mapping of facial feature points into 3D space, which slows down the system's recognition speed and increases user waiting time.
By collecting facial feature information in real time, normalizing it, and iteratively training the identity recognition model using training and test sets, a converged identity recognition model is output. Using sperm bank-related personnel information as prior information, feature attention analysis is performed on facial feature information. Combining encoder, decoder, CBAM attention mechanism and BiFPN feature fusion network, the accuracy of identity recognition is improved.
Without affecting the accuracy of verification, the accuracy of sperm bank identity verification has been improved, the computational load of the model has been reduced, the operating burden of the equipment has been alleviated, the recognition difficulties under different angles and postures have been overcome, and the recognition time has been shortened.
Smart Images

Figure CN120014681B_ABST
Abstract
Description
A sperm bank identity verification system and method based on facial recognition. Technical Field
[0001] This invention belongs to the field of information management technology, specifically relating to a sperm bank identity verification system and method based on facial recognition. Background Technology
[0002] A sperm bank is a medical institution that collects, tests, preserves, and provides sperm using ultra-low temperature freezing technology for the purposes of treating infertility, preventing genetic diseases, and providing reproductive insurance. The sperm source in a sperm bank primarily comes from volunteer donors. Sperm banks must strictly protect the information of donors and users to prevent information leakage. This includes taking appropriate technical and management measures to protect personal information during the storage, use, and disposal of sperm.
[0003] Chinese patent CN112270783B discloses a sperm bank identity verification and process management system based on 3D facial recognition technology, belonging to the field of information management technology. It includes a 3D facial recognition device, a PC, an ID card reader, an embedded facial recognition terminal, a reception area, a medical examination room, a specimen receiving area, a sperm collection room, and a database. The PC is connected to the 3D facial recognition device and the ID card reader. However, existing systems cannot complete identity verification under different angles and postures, and the error caused by a single viewpoint cannot guarantee accurate extraction and mapping of facial feature points into 3D space, slowing down system recognition speed and user waiting time. To address these issues, we propose a sperm bank identity verification system and method based on facial recognition. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a sperm bank identity verification system and method based on facial recognition. This solves the problems that existing 3D facial recognition devices cannot complete identity verification under different angles and postures, and that errors caused by a single viewpoint cannot guarantee more accurate extraction and mapping of facial feature points into 3D space, thus delaying the system's recognition speed and user waiting time.
[0005] Existing 3D face recognition systems cannot complete identity verification under different angles and postures, and the error caused by a single viewpoint cannot guarantee more accurate extraction and mapping of facial feature points into 3D space, thus slowing down the system's recognition speed and increasing user waiting time. To address these issues, we propose a sperm bank identity verification system and method based on face recognition. The method first collects facial feature information in real time, normalizes the facial feature information, and then iteratively trains the identity recognition model using training and testing sets to output a converged identity recognition model. Then, the identity recognition model uses the sperm bank's associated personnel information as prior information to identify and analyze facial feature information, outputs the identity recognition result, and finally determines whether the identity recognition result meets a preset risk threshold. If the identity recognition result meets the preset risk threshold... In this embodiment of the invention, the identity recognition model is iteratively trained using training and testing sets. The identity recognition model uses information about personnel associated with the sperm bank as prior information to identify and analyze facial feature information. Without affecting the accuracy of verification, the model uses information about personnel associated with the sperm bank as prior information to perform feature attention analysis on facial feature information under multiple perspective poses, thereby improving the accuracy of sperm bank identity verification. At the same time, it reduces the computational load of the model and alleviates the burden of the identity recognition model on the operation of the equipment.
[0006] The present invention is implemented as follows: a sperm bank identity verification method based on facial recognition, including real-time acquisition of facial feature information and normalization processing of facial feature information;
[0007] An identity verification database is pre-built based on information of personnel associated with sperm banks. The identity verification database is traversed, and a modeling sample set is derived from the identity verification database. The modeling sample set is divided into a training set and a test set. The identity recognition model is iteratively trained using the training set and the test set, and a converged identity recognition model is output.
[0008] The normalized facial feature information is loaded, and the identity recognition model is executed using the facial feature information as input. The identity recognition model uses the information of personnel associated with the sperm bank as prior information to identify and analyze the facial feature information and output the identity recognition result.
[0009] Load the identity verification result and determine whether the identity verification result meets the preset risk threshold. If the identity verification result meets the preset risk threshold, the identity verification is successful.
[0010] If the identity verification result does not meet the preset risk threshold, the sperm bank will issue a risk warning.
[0011] The method for normalizing facial feature information specifically includes:
[0012] Load facial feature information, perform a moving average filtering algorithm on the facial feature information, perform target region feature detection, and generate at least one set of feature images;
[0013] Obtain the feature image set, filter the feature image set based on the moving average filter, and call the PyTorch library function to calculate the mean image of the filtered image feature set.
[0014] Traverse the feature image set, calculate the difference target between the feature image set and the mean image, and calculate the mean and standard deviation of the difference target based on the OpenCV library function cv2.bi atera l field().
[0015] The segmentation threshold for the difference target is calculated based on the mean and standard deviation of the difference target.
[0016] The segmentation threshold is calculated using the following formula:
[0017] T d =μ d +α×δ d (1)
[0018]
[0019] Among them, T d μ represents the segmentation threshold for the difference target. d Let δ be the mean of the difference target. d The standard deviation of the difference target is represented by α, where α is the threshold segmentation coefficient. d For signal-to-noise ratio, σ d f is the variance of the difference objective. d The modulus of the difference target;
[0020] Load the segmentation threshold of the difference target, and segment the difference target based on the segmentation threshold to obtain the binary segmented target;
[0021] Using binary segmented targets as input, the K-Means algorithm is used to cluster the binary segmented targets and generate detection anchor boxes for the binary segmented targets;
[0022] Integrate at least one set of detection anchor boxes and binary segmentation targets, and output normalized facial feature information.
[0023] The method of iteratively training the identity recognition model using a training set and a test set specifically includes:
[0024] Load the initial model, training set, and test set of the identity recognition model;
[0025] Define the training epochs, loss function, and hyperparameters of the initial model, and iteratively train the initial model using the training set to generate identity recognition models from different perspectives;
[0026] The isolated forest is used to learn the local binarization features of the identity recognition model, and a global linear regression analysis is performed on the identity recognition model.
[0027] Determine whether the identity recognition model has converged. If the identity recognition model has converged, output the identity recognition model.
[0028] Load the test set, use the test set as input, execute the identity recognition model, and the identity recognition model outputs the bias angle estimate of the test set;
[0029] The deviation angle estimate is calculated using the following formula:
[0030]
[0031] Where, p c For bias angle estimation, N is the number of test sets, L is the number of feature points, Δc represents the tilt angle of the current feature point, and q t r represents the weight of the current feature point. dis q0 represents the distance between the current feature point and related feature points, and q0 represents the initial weight of the current feature point.
[0032] Determine whether the deviation angle estimation of the test set meets the preset deviation threshold. If it meets the preset deviation threshold, output the identity recognition model that has been iteratively trained.
[0033] The identity recognition model uses the YOLOv5 network model as the initial model. The initial model consists of an input layer, a feature extraction layer, a feature fusion layer, and a target prediction layer. When constructing the identity recognition model, the input layer of the initial model is frozen. An encoder and a decoder are introduced into the input layer. The encoder is used to downsample and reduce the dimensionality of facial feature information, and the decoder is used to upsample and increase the dimensionality of facial feature information. The feature extraction layer consists of a Focus module, a CSP module, a CBL module, and an SPP module. The CBL module and the SPP module of the feature extraction layer are frozen, and the CBAM attention mechanism is used to replace the CBL module and the SPP module. The feature fusion layer is a BiFPN feature fusion network. The BiFPN feature fusion network introduces three sets of 3×3, 5×5, and 13×13 max pooling layers for multi-scale feature fusion.
[0034] The identity recognition model uses information about individuals associated with the sperm bank as prior information, and the method for facial feature information recognition and analysis specifically includes:
[0035] Load information on personnel associated with the sperm bank and their facial features, using the standard images of personnel associated with the sperm bank as prior information;
[0036] The encoder acquires facial feature information, performs downsampling and dimensionality reduction on the facial feature information, and outputs the downsampling result.
[0037] The decoder loads the downsampling result, upsamples and upscales the downsampling result, and outputs the decoded information set.
[0038] The feature extraction layer extracts features from the decoded information set and uses the CBAM attention mechanism to process the decoded information set to obtain the feature attention output;
[0039] The BiFPN feature fusion network obtains the feature attention output and performs feature fusion on the feature attention output to output a feature fusion set.
[0040] Using standard images of sperm bank-related personnel as prior information, the prior probabilities of the feature fusion set and the standard images are calculated, and the prior probabilities are used as the output recognition and analysis results.
[0041] The feature attention output is represented as follows:
[0042] S C =Sigmoid(MLP(Maxpool(F))+MLP(Avgpool(F)))(5)
[0043] Among them, S C F is the feature attention output, and F is the feature extraction result of the feature extraction layer on the decoded information set;
[0044] The formula for calculating the feature fusion set is as follows:
[0045]
[0046] Among them, F out Represents the feature fusion set, Conv(·) is the convolution operation, w i The feature attention output is the weight value after the activation function, Resize(·) is the pooling operation, S C+1 The fusion result is the feature attention output of the BiFPN feature fusion network after passing through the activation function, where ε is a preset minimum value.
[0047] On the other hand, the present invention also provides a sperm bank identity verification system based on facial recognition, wherein the sperm bank identity verification system based on facial recognition specifically includes:
[0048] The information acquisition module is used to collect facial feature information in real time and normalize the facial feature information.
[0049] The verification database is pre-built based on the information of personnel associated with the sperm bank. The identity verification database is traversed, and a modeling sample set is derived from the identity verification database. The modeling sample set is divided into a training set and a test set. The identity recognition model is iteratively trained using the training set and the test set, and a converged identity recognition model is output.
[0050] The identity recognition module is used to load normalized facial feature information, take the facial feature information as input, execute the identity recognition model, and use the sperm bank-related personnel information as prior information to identify and analyze the facial feature information and output the identity recognition result.
[0051] The risk assessment module is used to load the identity verification results and determine whether the identity verification results meet the preset risk threshold. If the identity verification results meet the preset risk threshold, the identity verification is successful. If the identity verification results do not meet the preset risk threshold, the sperm bank will trigger a risk warning.
[0052] The information collection module includes:
[0053] The feature detection unit is used to load facial feature information, perform a moving average filtering algorithm on the facial feature information, perform target region feature detection, and generate at least one set of feature images.
[0054] The image filtering unit is used to acquire a feature image set, filter the feature image set based on a moving average filter, and call PyTorch library functions to calculate the mean image of the filtered image feature set.
[0055] The target calculation unit is used to traverse the feature image set and calculate the difference target between the feature image set and the mean image. It calculates the mean and standard deviation of the difference target based on the OpenCV library function cv2.bilitera_File().
[0056] The binary segmentation unit calculates the segmentation threshold of the difference target based on the mean and standard deviation of the difference target, loads the segmentation threshold of the difference target, and segments the difference target based on the segmentation threshold of the difference target to obtain the binary segmented target;
[0057] The target clustering unit takes the binary segmentation target as input, clusters the binary segmentation target based on the K-Means algorithm and generates detection anchor boxes for the binary segmentation target, integrates at least one set of detection anchor boxes and binary segmentation targets, and outputs normalized facial feature information.
[0058] Compared with the prior art, the embodiments of this application have the following main advantages:
[0059] In this embodiment of the invention, the identity recognition model is iteratively trained using training and testing sets. The identity recognition model uses information about sperm bank-related personnel as prior information to identify and analyze facial feature information. Without affecting the accuracy of verification, the model uses information about sperm bank-related personnel as prior information to perform feature attention analysis on facial feature information under multiple perspectives and poses. This improves the accuracy of sperm bank identity verification, while reducing the computational load of the model and alleviating the burden on the device. It overcomes the problems of existing 3D face recognition devices being unable to complete identity verification under different angles and poses, and the errors caused by a single perspective failing to guarantee more accurate extraction and mapping of facial feature points into 3D space, thus delaying the system's recognition speed and user waiting time.
[0060] In this embodiment of the invention, by normalizing facial feature information, the impact of individual differences, environmental influences, and noise on sperm bank identity verification can be reduced, thereby improving the generalization ability of sperm bank identity verification. Furthermore, during preprocessing, the difference target is segmented based on the segmentation threshold of the difference target to obtain a binary segmentation target. The generation of the binary segmentation target simplifies the data preprocessing steps, making subsequent image analysis and feature extraction more efficient. Normalization helps to standardize the input data, enabling the identity recognition model to achieve consistent performance on different datasets.
[0061] In this embodiment of the invention, an identity recognition model and its iterative training method are provided. The identity recognition model uses the YOLOv5 network model as the initial model and introduces an encoder, decoder, CBAM attention mechanism, and Bi FPN feature fusion network. By combining the encoder, decoder, CBAM attention mechanism and Bi FPN feature fusion network, the identity recognition model can more comprehensively utilize facial feature information under different perspectives and poses, thereby improving the generalization ability under different scenes and poses. Attached Figure Description
[0062] Figure 1 is a schematic diagram of the implementation process of the sperm bank identity verification method based on face recognition provided by the present invention.
[0063] Figure 2 shows a schematic diagram of the implementation process of the facial feature information normalization method.
[0064] Figure 3 illustrates the implementation process of the method for iteratively training an identity recognition model using training and test sets.
[0065] Figure 4 shows a schematic diagram of the implementation process of the facial feature information recognition and analysis method using sperm bank-related personnel information as prior information in the identity recognition model.
[0066] Figure 5 shows a schematic diagram of the architecture of a sperm bank identity verification system based on facial recognition. Detailed Implementation
[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0068] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0069] Existing 3D face recognition systems cannot complete identity verification under different angles and postures, and the error caused by a single viewpoint cannot guarantee more accurate extraction and mapping of facial feature points into 3D space, thus slowing down the system's recognition speed and increasing user waiting time. To address these issues, we propose a sperm bank identity verification system and method based on face recognition. The method first collects facial feature information in real time, normalizes the facial feature information, and then iteratively trains the identity recognition model using training and testing sets to output a converged identity recognition model. Then, the identity recognition model uses the sperm bank's associated personnel information as prior information to identify and analyze facial feature information, outputs the identity recognition result, and finally determines whether the identity recognition result meets a preset risk threshold. If the identity recognition result meets the preset risk threshold... In this embodiment of the invention, the identity recognition model is iteratively trained using training and testing sets. The identity recognition model uses information about sperm bank-related personnel as prior information to identify and analyze facial feature information. Without affecting the accuracy of verification, the model uses information about sperm bank-related personnel as prior information to perform feature attention analysis on facial feature information under multiple perspectives and poses. This improves the accuracy of sperm bank identity verification, while reducing the computational load of the model and alleviating the burden on the device. It overcomes the problems of existing 3D face recognition devices being unable to complete identity verification under different angles and poses, and the errors caused by a single perspective failing to guarantee more accurate extraction and mapping of facial feature points into 3D space, thus delaying the system's recognition speed and user waiting time.
[0070] This invention provides a sperm bank identity verification method based on facial recognition. Figure 1 shows a schematic diagram of the implementation process of the sperm bank identity verification method based on facial recognition. The sperm bank identity verification method based on facial recognition specifically includes:
[0071] Step S10: Collect facial feature information in real time and normalize the facial feature information.
[0072] It should be noted that facial feature information refers to facial images and videos from multiple perspectives, including but not limited to features of the eyes, mouth, nose, ears, and eyebrows.
[0073] Step S20: Based on the sperm bank-related personnel information, pre-construct an identity verification database, traverse the identity verification database, export the modeling sample set from the identity verification database, divide the modeling sample set into a training set and a test set, use the training set and the test set to iteratively train the identity recognition model, and output a converged identity recognition model.
[0074] Step S30: Load the normalized facial feature information, use the facial feature information as input, execute the identity recognition model, use the sperm bank-related personnel information as prior information, identify and analyze the facial feature information, and output the identity recognition result.
[0075] Step S40: Load the identity recognition result and determine whether the identity recognition result meets the preset risk threshold;
[0076] In this embodiment, the preset risk threshold can be set to 0.4-0.45.
[0077] Step S50: If the identity recognition result meets the preset risk threshold, the identity verification is successful;
[0078] Step S60: If the identity verification result does not meet the preset risk threshold, a risk warning for the sperm bank is triggered.
[0079] In this embodiment, the identity recognition model is iteratively trained using training and testing sets. The model uses information about individuals associated with the sperm bank as prior information to identify and analyze facial features. Without affecting the accuracy of verification, the model uses information about individuals associated with the sperm bank as prior information to perform feature attention analysis on facial features from multiple perspectives and poses. This improves the accuracy of sperm bank identity verification while reducing the computational load on the model and alleviating the burden on the device. It overcomes the problems of existing 3D face recognition devices being unable to complete identity verification from different angles and poses, and the errors caused by a single perspective failing to guarantee more accurate extraction and mapping of facial feature points into 3D space, thus delaying the system's recognition speed and user waiting time.
[0080] This invention provides a method for normalizing facial feature information. Figure 2 shows a schematic diagram of the implementation process of the method for normalizing facial feature information. The method for normalizing facial feature information specifically includes:
[0081] Step S101: Load facial feature information, perform moving average filtering algorithm on facial feature information, perform target region feature detection, and generate at least one set of feature images;
[0082] It should be noted that moving average filtering is a simple smoothing technique that reduces noise by calculating the average value of data within a certain window. In facial feature information processing, smoothing the coordinates of feature points or feature vectors can improve the stability and accuracy of subsequent analysis. When performing target region feature detection, the face-api.js detection method can be used to extract target region features and generate at least one set of feature images.
[0083] Step S102: Obtain the feature image set, filter the feature image set based on the moving average filter, and call the PyTorch library function to calculate the mean image of the filtered image feature set.
[0084] Step S103: Traverse the feature image set, calculate the difference target between the feature image set and the mean image, and calculate the mean and standard deviation of the difference target based on the OpenCV library function cv2.bilater_Fitter().
[0085] Step S104: Calculate the segmentation threshold of the difference target based on the mean and standard deviation of the difference target;
[0086] The segmentation threshold is calculated using the following formula:
[0087] T d =μ d +α×δ d (1)
[0088]
[0089] Among them, T d μ represents the segmentation threshold for the difference target. d Let δ be the mean of the difference target. d The standard deviation of the difference target is represented by α, where α is the threshold segmentation coefficient. d For signal-to-noise ratio, σ d f is the variance of the difference objective. d The modulus of the difference target.
[0090] Step S105: Load the segmentation threshold of the difference target, and segment the difference target based on the segmentation threshold to obtain the binary segmented target;
[0091] It should be noted that obtaining the binary segmentation target helps simplify the subsequent feature extraction and matching process, because the binary image only contains black and white pixels, reducing the complexity of the data. Furthermore, by using a segmentation threshold based on the difference target, facial features can be more accurately distinguished from the background, thereby improving the accuracy of the facial recognition system.
[0092] Step S106: Using the binary segmented target as input, cluster the binary segmented target based on the K-Means algorithm and generate the detection anchor boxes of the binary segmented target;
[0093] Step S107: Integrate at least one set of detection anchor boxes and binary segmentation targets, and output normalized facial feature information.
[0094] In this embodiment of the invention, by normalizing facial feature information, the impact of individual differences, environmental influences, and noise on sperm bank identity verification can be reduced, thereby improving the generalization ability of sperm bank identity verification. Furthermore, during preprocessing, the difference target is segmented based on the segmentation threshold of the difference target to obtain a binary segmentation target. The generation of the binary segmentation target simplifies the data preprocessing steps, making subsequent image analysis and feature extraction more efficient. Normalization helps to standardize the input data, enabling the identity recognition model to achieve consistent performance on different datasets.
[0095] This invention provides a method for iteratively training an identity recognition model using a training set and a test set. Figure 3 shows a schematic diagram of the implementation process of the method for iteratively training an identity recognition model using a training set and a test set. The method for iteratively training an identity recognition model using a training set and a test set specifically includes:
[0096] Step S201: Load the initial model, training set, and test set of the identity recognition model;
[0097] Step S202: Define the training rounds, loss function and hyperparameters of the initial model, and iteratively train the initial model using the training set to generate identity recognition models from different perspectives;
[0098] In this embodiment, the initial model can be trained 100-120 times, the loss function can be the cross-entropy loss function, and the learning rate hyperparameter is set to 0.002.
[0099] Step S203: Use isolated forest to learn the local binarization features of the identity recognition model, and perform global linear regression analysis on the identity recognition model;
[0100] The Isolation Forest algorithm effectively detects outliers in a dataset. By removing these outliers, the quality and consistency of the data can be improved, thus providing cleaner and more reliable training data for identity recognition models. Local binarization features, on the other hand, are effective texture descriptors that capture local structural information in images. Applying these features to identity recognition models can enhance their ability to represent facial features.
[0101] Step S204: Determine whether the identity recognition model has converged. If the identity recognition model has converged, output the identity recognition model.
[0102] Step S205: Load the test set. Using the test set as input, execute the identity recognition model. The identity recognition model outputs the deviation angle estimate of the test set. In this embodiment of the invention, by analyzing the deviation angle estimate on the test set, the performance of the identity recognition model under different angle conditions can be understood, and the identity recognition model can be improved in a targeted manner. The deviation threshold sets a performance benchmark for the identity recognition model, which helps to compare the effects of different identity recognition models or algorithms.
[0103] The deviation angle estimate is calculated using the following formula:
[0104]
[0105] Where, p c For bias angle estimation, N is the number of test sets, L is the number of feature points, Δc represents the tilt angle of the current feature point, and q t r represents the weight of the current feature point. dis Let q0 be the distance between the current feature point and its associated feature points, and let q0 be the initial weight of the current feature point. The initial weight of the feature point can be set and determined based on expert consultation or principal component analysis.
[0106] Step S206: Determine whether the deviation angle estimation of the test set meets the preset deviation threshold. In this embodiment, the deviation threshold can be 0.1-0.15.
[0107] Step S207: If the preset deviation threshold is met, output the identity recognition model that has been iteratively trained.
[0108] If the preset deviation threshold is not met, return to step S202 and continue iterative training of the identity recognition model.
[0109] In this embodiment, the identity recognition model uses the YOLOv5 network model as the initial model. The initial model consists of an input layer, a feature extraction layer, a feature fusion layer, and a target prediction layer. When constructing the identity recognition model, the input layer of the initial model is frozen. An encoder and a decoder are introduced into the input layer. The encoder is used to downsample and reduce the dimensionality of facial feature information, and the decoder is used to upsample and increase the dimensionality of facial feature information. The feature extraction layer consists of a Focus module, a CSP module, a CBL module, and an SPP module. The CBL module and the SPP module of the feature extraction layer are frozen, and the CBAM attention mechanism is used to replace the CBL module and the SPP module. The feature fusion layer is a Bi FPN feature fusion network. The Bi FPN feature fusion network introduces three sets of 3×3, 5×5, and 13×13 max pooling layers for multi-scale feature fusion. Bi FPN (Bidirectional Feature Pyramid Network) is a bidirectional feature pyramid network that can effectively fuse features of different scales, thereby improving the model's ability to recognize multi-scale facial features. This feature fusion strategy helps improve the model's performance when dealing with complex backgrounds and different lighting conditions.
[0110] In this embodiment of the invention, an identity recognition model and its iterative training method are provided. The identity recognition model uses the YOLOv5 network model as the initial model and introduces an encoder, decoder, CBAM attention mechanism, and Bi FPN feature fusion network. By combining the encoder, decoder, CBAM attention mechanism and Bi FPN feature fusion network, the identity recognition model can more comprehensively utilize facial feature information under different perspectives and poses, thereby improving the generalization ability under different scenes and poses.
[0111] This invention provides a method for facial feature recognition and analysis using sperm bank-related personnel information as prior information in an identity recognition model. Figure 4 shows a schematic diagram of the implementation process of the method for facial feature recognition and analysis using sperm bank-related personnel information as prior information. The method for facial feature recognition and analysis using sperm bank-related personnel information as prior information specifically includes:
[0112] Step S301: Load sperm bank-related personnel information and facial feature information, using the standard image of the sperm bank-related personnel information as prior information;
[0113] Step S302: Obtain facial feature information; the encoder performs downsampling and dimensionality reduction on the facial feature information and outputs the downsampling result.
[0114] In this embodiment, the encoder consists of three convolutional layers responsible for extracting spatial features from the input image. Each convolutional layer is followed by a ReLU activation function to introduce non-linearity, enabling the model to learn more complex features.
[0115] Step S303: Load the downsampling result, the decoder upsamples and upscales the downsampling result, and outputs the decoded information set;
[0116] Step S304: The feature extraction layer extracts features from the decoded information set and uses the CBAM attention mechanism to process the decoded information set to obtain the feature attention output.
[0117] Step S305: Obtain the feature attention output. The Bi FPN feature fusion network performs feature fusion on the feature attention output and outputs a feature fusion set.
[0118] Step S306: Using the standard image of the information entered by the sperm bank's associated personnel as prior information, calculate the prior probability of the feature fusion set and the standard image, and use the prior probability as the output recognition analysis result.
[0119] It should be noted that the personnel associated with the sperm bank can be sperm donors, institutional technicians, or institutional service personnel. The information entered into the sperm bank's personnel database includes, but is not limited to, basic information, health information, and image information. For facial feature recognition under multi-view poses, prior probabilities can help the model adapt to different viewpoint changes, improving the stability of recognition.
[0120] In this embodiment, the feature attention output is represented as:
[0121] S C =Sigmoid(MLP(Maxpool(F))+MLP(Avgpool(F)))(5)
[0122] Among them, S C F is the feature attention output, and F is the feature extraction result of the feature extraction layer on the decoded information set;
[0123] The formula for calculating the feature fusion set is as follows:
[0124]
[0125] Among them, F out Represents the feature fusion set, Conv(·) is the convolution operation, w i The feature attention output is the weight value after the activation function, Resize(·) is the pooling operation, S C+1The fusion result is the feature attention output of the BiFPN feature fusion network after passing through the activation function. ε is a preset minimum value, which can be 0.01-0.05.
[0126] This invention provides a sperm bank identity verification system based on facial recognition. Figure 5 shows a schematic diagram of the architecture of the sperm bank identity verification system based on facial recognition. Specifically, the sperm bank identity verification system based on facial recognition includes:
[0127] Information acquisition module 100 is used to acquire facial feature information in real time and normalize the facial feature information.
[0128] The verification database 200 is pre-built based on the information of personnel associated with the sperm bank. The identity verification database is traversed, and a modeling sample set is exported from the identity verification database. The modeling sample set is divided into a training set and a test set. The identity recognition model is iteratively trained using the training set and the test set, and a converged identity recognition model is output.
[0129] The identity recognition module 300 is used to load the normalized facial feature information, take the facial feature information as input, execute the identity recognition model, and use the sperm bank-related personnel information as prior information to recognize and analyze the facial feature information and output the identity recognition result.
[0130] The risk assessment module 400 is used to load the identity recognition results and determine whether the identity recognition results meet the preset risk threshold. If the identity recognition results meet the preset risk threshold, the identity verification is passed. If the identity recognition results do not meet the preset risk threshold, the sperm bank will trigger a risk warning.
[0131] It should be noted that the information collection module 100, verification database 200, identity recognition module 300, and risk assessment module 400 can be connected via Bluetooth or LoRa communication to achieve data interaction and transmission. The sperm bank identity verification system based on face recognition in this embodiment of the invention corresponds to the sperm bank identity verification method based on face recognition described above. The explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding content in the sperm bank identity verification method based on face recognition, and will not be repeated here.
[0132] In this embodiment, the information acquisition module 100 includes:
[0133] Feature detection unit 110 is used to load facial feature information, perform a moving average filtering algorithm on the facial feature information, perform target region feature detection, and generate at least one set of feature images.
[0134] Image filtering unit 120 is used to acquire a feature image set, filter the feature image set based on a moving average filter, and call PyTorch library functions to calculate the mean image of the filtered image feature set.
[0135] The target calculation unit 130 is used to traverse the feature image set, calculate the difference target between the feature image set and the mean image, and calculate the mean and standard deviation of the difference target based on the OpenCV library function cv2.bilitera_File().
[0136] Binary segmentation unit 140 calculates the segmentation threshold of the difference target based on the mean and standard deviation of the difference target, loads the segmentation threshold of the difference target, and segments the difference target based on the segmentation threshold of the difference target to obtain the binary segmented target;
[0137] The target clustering unit 150 takes the binary segmentation target as input, clusters the binary segmentation target based on the K-Means algorithm and generates detection anchor boxes for the binary segmentation target, integrates at least one set of detection anchor boxes and binary segmentation targets, and outputs normalized facial feature information.
[0138] On the other hand, embodiments of the present invention also provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, implements the method of any of the above embodiments.
[0139] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the sperm bank identity verification method based on face recognition in the embodiments of this application. The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created by using the sperm bank identity verification method based on face recognition, etc. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0140] In another aspect, the present invention provides a computer-readable storage medium storing computer program instructions that can be executed by a processor. When executed, the computer program instructions implement the method of any of the above embodiments.
[0141] Finally, it should be noted that the computer-readable storage medium (e.g., memory) described herein can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. By way of example, and not limitation, non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which can act as external cache memory. By way of example, and not limitation, RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices disclosed herein are intended to include, but are not limited to, these and other suitable types of memory.
[0142] In summary, this invention provides a sperm bank identity verification system and method based on facial recognition. In the embodiments of this invention, the identity recognition model is iteratively trained using training and testing sets. The identity recognition model uses the sperm bank-related personnel information as prior information to identify and analyze facial feature information. Without affecting the verification accuracy, the model uses the sperm bank-related personnel information as prior information to perform feature attention analysis on facial feature information under multiple perspectives and poses, thereby improving the accuracy of sperm bank identity verification. At the same time, it reduces the computational load of the model, alleviates the burden of the identity recognition model on the device's operation, and overcomes the problems of existing 3D facial recognition devices being unable to complete identity verification under different angles and poses, and the errors caused by a single perspective failing to guarantee more accurate extraction and mapping of facial feature points into 3D space, thus delaying the system's recognition speed and user waiting time.
[0143] It should be noted that, for the sake of simplicity, the foregoing embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to the present invention. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0144] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on these embodiments, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can still combine, add, delete, or otherwise adjust the features of the various embodiments of the present invention according to the circumstances without conflict or creative effort, thereby obtaining different technical solutions that do not fundamentally depart from the concept of the present invention. These technical solutions also fall within the scope of protection of the present invention.
Claims
1. A sperm bank identity verification method based on facial recognition, characterized in that: This includes real-time acquisition of facial feature information and normalization processing of facial feature information; An identity verification database is pre-constructed based on information about personnel associated with the sperm bank. The database is traversed, and a modeling sample set is derived from it. The modeling sample set is divided into a training set and a test set. The identity recognition model is iteratively trained using the training set and the test set, and a converged identity recognition model is output. Normalized facial feature information is loaded, and the identity recognition model is executed with the facial feature information as input. The identity recognition model uses information about personnel associated with the sperm bank as prior information to identify and analyze the facial feature information and output the identity recognition result. The method for iteratively training the identity recognition model using training and test sets specifically includes: loading the initial model, training set, and test set of the identity recognition model; defining the training epochs, loss function, and hyperparameters of the initial model; iteratively training the initial model using the training set to generate identity recognition models from different perspectives; using an isolated forest to learn the local binarization features of the identity recognition model and performing global linear regression analysis on the identity recognition model; determining whether the identity recognition model has converged; if the identity recognition model has converged, outputting the identity recognition model; loading the test set, using the test set as input, executing the identity recognition model, and outputting the bias angle estimate of the test set; wherein, the bias angle estimate is calculated using the following formula: in, For deviation angle estimation, The number of test sets. The number of feature points, Indicates the tilt angle of the current feature point. The current feature point weights, The distance between the current feature point and related feature points. The initial weights of current feature points are determined; it is judged whether the deviation angle estimation of the test set meets the preset deviation threshold. If it meets the preset deviation threshold, the identity recognition model after iterative training is output; the identity recognition model uses sperm bank-related personnel information as prior information and the method for facial feature information recognition and analysis specifically includes: loading sperm bank-related personnel information and facial feature information, using the standard image of sperm bank-related personnel information as prior information; acquiring facial feature information, the encoder downsamples and reduces the dimensionality of the facial feature information, and outputs the downsampling result; loading the downsampling result, the decoder upsamples and increases the dimensionality of the downsampling result, and outputs the decoded information set; the feature extraction layer extracts features from the decoded information set and uses the CBAM attention mechanism to process the decoded information set to obtain the feature attention output; acquiring the feature attention output, the BiFPN feature fusion network fuses the feature attention output to output the feature fusion set; using the standard image of sperm bank-related personnel information as prior information, the prior probability of the feature fusion set and the standard image is calculated, and the prior probability is used as the output recognition analysis result.
2. The sperm bank identity verification method based on face recognition as described in claim 1, characterized in that: The sperm bank identity verification method based on facial recognition further includes: loading the identity recognition result, determining whether the identity recognition result meets a preset risk threshold, and if the identity recognition result meets the preset risk threshold, the identity verification is passed; if the identity recognition result does not meet the preset risk threshold, a sperm bank risk warning is triggered.
3. The sperm bank identity verification method based on facial recognition as described in claim 1, characterized in that: The method for normalizing facial feature information specifically includes: loading facial feature information, performing a moving average filtering algorithm on the facial feature information, detecting target region features, and generating at least one set of feature images; acquiring the feature image set, filtering the feature image set based on the moving average filter, and calling PyTorch library functions to calculate the mean image of the filtered image feature set; traversing the feature image set, calculating the difference target between the feature image set and the mean image, and calculating the mean and standard deviation of the difference target based on the OpenCV library function cv2.bilateralFilter(); and calculating the segmentation threshold of the difference target based on the mean and standard deviation of the difference target; wherein, the segmentation threshold is calculated using the following formula: in, This represents the segmentation threshold for the difference target. The mean of the difference target, The standard deviation of the difference target is represented by... The threshold segmentation coefficient is used. For signal-to-noise ratio, The variance of the difference target. The modulus of the difference target.
4. The sperm bank identity verification method based on face recognition as described in claim 3, characterized in that: The method for normalizing facial feature information further includes: loading a segmentation threshold for the difference target; segmenting the difference target based on the segmentation threshold to obtain a binary segmented target; using the binary segmented target as input, clustering the binary segmented target based on the K-Means algorithm and generating detection anchor boxes for the binary segmented target; integrating at least one set of detection anchor boxes and binary segmented targets, and outputting the normalized facial feature information.
5. The sperm bank identity verification method based on face recognition as described in claim 4, characterized in that: The identity recognition model uses the YOLOv5 network model as the initial model. The initial model consists of an input layer, a feature extraction layer, a feature fusion layer, and a target prediction layer. When constructing the identity recognition model, the input layer of the initial model is frozen. An encoder and a decoder are introduced into the input layer. The encoder is used to downsample and reduce the dimensionality of facial feature information, and the decoder is used to upsample and increase the dimensionality of facial feature information. The feature extraction layer consists of a Focus module, a CSP module, a CBL module, and an SPP module. The CBL module and the SPP module of the feature extraction layer are frozen, and the CBAM attention mechanism is used to replace the CBL module and the SPP module. The feature fusion layer is a BiFPN feature fusion network. The BiFPN feature fusion network introduces three sets of 3×3, 5×5, and 13×13 max pooling layers for multi-scale feature fusion.
6. The sperm bank identity verification method based on face recognition as described in claim 5, characterized in that: The feature attention output is represented as follows: in, For feature attention output, The feature extraction layer extracts features from the decoded information set; the formula for calculating the feature fusion set is as follows: in, Represents the feature fusion set, For convolution operations, The feature attention output is the weight value after the activation function. For pooling operations, The feature attention output of the BiFPN feature fusion network is the fused result after the activation function. This is the preset minimum value.
7. A sperm bank identity verification system based on facial recognition, used to implement the sperm bank identity verification method based on facial recognition as described in any one of claims 1-6, characterized in that: The sperm bank identity verification system based on facial recognition specifically includes: an information acquisition module for real-time acquisition of facial feature information and normalization processing of the facial feature information; a verification database, which is pre-constructed based on sperm bank-related personnel information, traversing the identity verification database, deriving a modeling sample set from the identity verification database, dividing the modeling sample set into a training set and a test set, iteratively training the identity recognition model using the training set and the test set, and outputting a converged identity recognition model; an identity recognition module for loading the normalized facial feature information, using the facial feature information as input, executing the identity recognition model, which uses sperm bank-related personnel information as prior information, identifies and analyzes the facial feature information, and outputs the identity recognition result; and a risk judgment module for loading the identity recognition result, judging whether the identity recognition result meets a preset risk threshold. If the identity recognition result meets the preset risk threshold, the identity verification is passed; if the identity recognition result does not meet the preset risk threshold, a sperm bank risk warning is triggered.
8. The sperm bank identity verification system based on facial recognition as described in claim 7, characterized in that: The information acquisition module includes: a feature detection unit, used to load facial feature information, perform a moving average filtering algorithm on the facial feature information, perform target region feature detection, and generate at least one set of feature images; an image filtering unit, used to acquire the feature image set, filter the feature image set based on the moving average filter, and call PyTorch library functions to calculate the mean image of the filtered image feature set; a target calculation unit, used to traverse the feature image set, calculate the difference target between the feature image set and the mean image, and calculate the mean and standard deviation of the difference target based on the OpenCV library function cv2.bilateralFilter(); a binary segmentation unit, used to calculate the segmentation threshold of the difference target based on the mean and standard deviation of the difference target, load the segmentation threshold of the difference target, segment the difference target based on the segmentation threshold of the difference target, and obtain the binary segmented target; and a target clustering unit, used as input, used the binary segmented target to cluster the binary segmented target based on the K-Means algorithm and generate detection anchor boxes of the binary segmented target, integrate at least one set of detection anchor boxes and binary segmented targets, and output normalized facial feature information.
Citation Information
Patent Citations
Sperm bank identity verification and process management system based on 3D facial recognition technology
CN112270783B
Face recognition method and device
CN119068527A