A palm feature recognition method, device, equipment and storage medium
By using a four-dimensional tensor data format and a biometric recognition model based on the MobileNetV2 architecture, combined with a feature recognition module and the FReLU activation function, the impact of hand pose changes on recognition accuracy was addressed, the risk of overfitting was reduced, and the accuracy of hand feature recognition was improved.
Patent Information
- Application Number
- CN202310440290.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing hand feature recognition models suffer from high risk of overfitting and low recognition accuracy due to the significant impact of hand posture changes and the introduction of numerous nonlinear transformations.
A four-dimensional tensor data format is used to input the palm feature recognition model. The biometric recognition model with MobileNetV2 structure and FReLU activation function is combined with the feature recognition module, including convolutional layers and batch normalization layers, for training. A preset loss function and cosine similarity score are used to reduce the risk of overfitting.
It improves the accuracy of palm feature recognition, reduces the risk of overfitting during training, and enhances the accuracy of the recognition model.
Smart Images

Figure CN116469137B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of identification, and more particularly to a palm feature identification method, device, equipment and storage medium. BACKGROUND
[0002] With the continuous development of information technology, information mining is of interest to many researchers, and useful information is mined from massive information. For different objects, there are corresponding unique features, such as fingerprints and palm prints of people, and researchers can extract feature information from complex information of finger images or palm images to determine a specific object. For the identification extraction method of extracting features from images, researchers can design algorithms or train feature models to enable the algorithms and models to extract features from images, thereby achieving feature extraction. Generally, before the image is input into the algorithm / model, the image needs to be processed to conform to the data input format of the algorithm / model, such as the format of four-dimensional tensor data.
[0003] In the current palm feature identification model, the palm posture change greatly affects the model's recognition of features, and the activation function in the model introduces a lot of nonlinear transformation operations, which makes the model have a high risk of training overfitting, so that the accuracy of identifying the palm is not high. SUMMARY
[0004] In view of the above problems, the present application is proposed to provide a palm feature identification method, device, equipment and storage medium to reduce the risk of training overfitting and improve the accuracy of identifying the palm.
[0005] In order to achieve the above purpose, the specific scheme is as follows:
[0006] A palm feature identification method comprises:
[0007] Obtaining a plurality of palm images, and constructing four-dimensional tensor data based on the plurality of palm images, the four-dimensional tensor data containing information of the number of palm images, information of the number of input channels, information of the width of the image and information of the height of the image;
[0008] Inputting the four-dimensional tensor data into a trained palm feature identification model to output an identification feature corresponding to each palm image, each identification feature containing a dimension feature with the same number of output channels of the palm feature identification model, wherein the number of output channels is greater than the number of input channels;
[0009] The training process of the palm feature identification model comprises:
[0010] Obtaining a palm image set, the palm image set comprising a plurality of palm images with class object labels;
[0011] The set of hand images is preprocessed to obtain a training sample dataset, and a four-dimensional tensor training dataset is constructed based on the training sample dataset.
[0012] Under the constraint of a preset loss function, the biometric recognition model is trained using the four-dimensional tensor training data as training samples to obtain a palm feature recognition model. The biometric recognition model consists of a main model structure and a feature recognition module. The main model structure is a MobileNetV2 structure, and the activation function used in the main model structure is the FReLU activation function. The feature recognition module is connected to the end of the main model structure and includes a first convolutional layer, a first batch normalization layer, a first max pooling layer, a second convolutional layer, a second batch normalization layer, and a second max pooling layer.
[0013] Optionally, the set of hand images is preprocessed to obtain a training sample dataset, including:
[0014] For each hand image in the set of hand images, color augmentation and perspective transformation augmentation are applied to the hand image to obtain an augmented hand image;
[0015] For each augmented palm image, a center image of a preset size is cropped from the center of the augmented palm image, and the pixel values of the center image are normalized to obtain the target image;
[0016] Construct a training sample dataset for each target image.
[0017] Optionally, the preset loss function is:
[0018]
[0019] Where m is the optimization interval between different object categories, s is the preset optimization value, y is the index of the object category, and i is the index of the hand image batch for each target image batch of the object category during stochastic gradient descent. For each target image, the recognition features are compared with the y-th... i The angle between the center vectors of the objects in each category, where n is the total number of objects in each category, θ j Let be the feature vector of the recognition features of each target image, and the angle between it and the center vector of the j-th category object.
[0020] Optionally, after training the biometric recognition model using the four-dimensional tensor training data as training samples under the constraint of a preset loss function to obtain the palm feature recognition model, the method further includes:
[0021] A plurality of test palm images of the same target object are acquired, each of the test palm images is input into the palm feature recognition model, and a recognition feature corresponding to each of the test palm images is output;
[0022] Two recognition features of each two test palm images are taken as a group of recognition features, for each group of recognition features, a cosine similarity score between the two recognition features is calculated as the cosine similarity score of the group of recognition features;
[0023] The cosine similarity scores of the groups of recognition features are calculated and evaluated by an roc algorithm, and an error rate of the palm feature recognition model is determined.
[0024] A palm feature recognition device, comprising:
[0025] A palm image acquisition unit is configured to acquire a plurality of palm images, and construct four-dimensional tensor data based on the plurality of palm images, wherein the four-dimensional tensor data comprises information of the number of palm images, information of the number of input channels, information of the width of an image, and information of the height of an image;
[0026] A feature recognition unit is configured to input the four-dimensional tensor data into a palm feature recognition model that has been trained, and output a recognition feature corresponding to each palm image, wherein each recognition feature comprises a same number of dimension features as an output channel number of the palm feature recognition model, and the output channel number is greater than the input channel number;
[0027] An image set acquisition unit is configured to acquire a palm image set, wherein the palm image set comprises a plurality of palm images with category object labels;
[0028] A preprocessing unit is configured to preprocess the palm image set to obtain a training sample data set, and construct four-dimensional tensor training data based on the training sample data set;
[0029] A model training unit is configured to train a biological feature recognition model based on the four-dimensional tensor training data as a training sample under the constraint of a preset loss function to obtain a palm feature recognition model, wherein a model structure of the biological feature recognition model is composed of a model main structure and a feature recognition module, the model main structure is a MobileNetV2 structure, an activation function used by the model main structure is a FReLU activation function, the feature recognition module is connected to a tail end of the model main structure, and the feature recognition module comprises a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
[0030] Optionally, the preprocessing unit comprises:
[0031] an expansion unit, configured to apply color expansion and perspective transformation expansion to each palm image in the set of palm images, to obtain an expanded palm image;
[0032] a cropping and normalization unit, configured to crop a center image of a preset size from the center of each expanded palm image, and normalize each pixel value of the center image, to obtain a target image;
[0033] a training sample data construction unit, configured to construct a training sample data set of each target image.
[0034] Optionally, the apparatus further comprises:
[0035] a test data feature recognition unit, configured to, after obtaining a palm feature recognition model by training a biological feature recognition model under the constraint of a preset loss function and using the four-dimensional tensor training data as training samples, input a plurality of test palm images of the same target object into the palm feature recognition model, and output respective recognition features corresponding to each test palm image;
[0036] a cosine similarity score calculation unit, configured to take two recognition features of each two test palm images as a group of recognition features, calculate a cosine similarity score between the two recognition features as the cosine similarity score of the group of recognition features, for each group of recognition features;
[0037] an error rate evaluation calculation unit, configured to calculate and evaluate the cosine similarity scores of each group of recognition features by using a roc algorithm, and determine the error rate of the palm feature recognition model.
[0038] An apparatus for recognizing palm features, comprising a memory and a processor;
[0039] The memory is configured to store a program.
[0040] The processor is configured to execute the program to implement each step of the method for recognizing palm features.
[0041] A storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement each step of the method for recognizing palm features.
[0042] Using the above technical solution, this application acquires several palm images and constructs four-dimensional tensor data based on these palm images. The four-dimensional tensor data includes information on the number of palm images, the number of input channels, the image width, and the image height. Further, the four-dimensional tensor data is input into a pre-trained palm feature recognition model, which outputs recognition features corresponding to each palm image. Each recognition feature contains dimensional features with the same number of output channels as the palm feature recognition model, wherein the number of output channels is greater than the number of input channels. The training process of the palm feature recognition model includes acquiring a set of palm images, which includes several palm images labeled with different object categories. Further, the four-dimensional tensor data is used to identify the palm images. The image set is preprocessed to obtain a training sample dataset. Based on this dataset, a four-dimensional tensor training dataset is constructed. Under the constraint of a preset loss function, the four-dimensional tensor training dataset is used as training samples to train the biometric recognition model, resulting in a palm feature recognition model. The biometric recognition model consists of a main model structure and a feature recognition module. The main model structure is a MobileNetV2 structure, using the FReLU activation function. The feature recognition module is connected to the end of the main model structure and includes a first convolutional layer, a first batch normalization layer, a first max pooling layer, a second convolutional layer, a second batch normalization layer, and a second max pooling layer. Therefore, because the biometric recognition model incorporates a feature recognition module, it can align biometric features corresponding to biological poses, thus aligning features corresponding to the palm. Since the FReLU activation function in the main model structure is linear, it reduces the risk of overfitting during training and improves the accuracy of the palm feature recognition model in recognizing biometric features. Attached Figure Description
[0043] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0044] Figure 1 A schematic diagram of a process for recognizing palm features provided in an embodiment of this application;
[0045] Figure 2 A flowchart illustrating a training method for a palm feature recognition model provided in this application embodiment;
[0046] Figure 3 A flowchart illustrating the process of evaluating the error rate of a palm feature recognition model, provided for an embodiment of this application;
[0047] Figure 4 A structural diagram of a device for identifying palm features is provided for an embodiment of the present application.
[0048] Figure 5 A structural diagram of a device for identifying palm features is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0050] The present application scheme can be realized based on a terminal with data processing capability, which can be a computer, a server, a cloud, etc.
[0051] Next, the palm feature identification method of the present application can include the following steps in combination with Figure 1 The palm feature identification method of the present application can include the following steps in combination with
[0052] Step S110, a plurality of palm images are acquired, and a four-dimensional tensor data is constructed based on the plurality of palm images.
[0053] The plurality of palm images can be obtained from an existing palm information database.
[0054] Specifically, the format of the four-dimensional tensor data can be represented as [A, B, C, D]. A is information of the number of palm images, which can represent batch information of the palm images or information of the number of palm images required to input the palm feature identification model. B is information of the number of input channels, which can represent the number of channels of the four-dimensional tensor data inputting the palm feature identification model, and each channel can correspond to each feature dimension of the palm image. C is information of the image width, which can represent the pixel value of the palm image in the width direction. D is information of the image height, which can represent the pixel value of the palm image in the height direction. Therefore, the four-dimensional tensor data can be generated based on A palm images with a width of C and a height of D, and the input channel parameter B of the palm feature identification model, so that the four-dimensional tensor data conforms to the input format of the palm feature identification model.
[0055] Step S120, the four-dimensional tensor data is input into the trained palm feature identification model, and an identification feature corresponding to each palm image is output.
[0056] Specifically, each identification feature can include the same dimension feature as the number of output channels of the palm feature identification model, wherein the number of output channels can be greater than the number of input channels.
[0057] The training process of the palm feature recognition model is as shown in Figure 2 The process can include:
[0058] Step S210, a palm image set is obtained.
[0059] Specifically, the palm image set can include several palm images, and each palm image can have a category object label.
[0060] It can be understood that the palmprint of each object is unique, and therefore the category object label carried by each palm image can represent the palm feature belonging object of the palm image.
[0061] Step S220, the palm image set is preprocessed to obtain a training sample data set, and a four-dimensional tensor training data is constructed based on the training sample data set.
[0062] It can be understood that before the training sample is input into the biological feature recognition model to be trained, the input format of the training sample needs to be standardized, and therefore the palm image set needs to be preprocessed, such as image size cropping, input channel setting, input palm image batch defining, four-dimensional tensor construction, etc.
[0063] Step S230, under the constraint of a preset loss function, the biological feature recognition model is trained with the four-dimensional tensor training data as the training sample, and a palm feature recognition model is obtained.
[0064] The model structure of the biological feature recognition model can be composed of a model main structure and a feature recognition module. The model main structure is a MobileNetV2 structure, and the activation function used by the model main structure is a FReLU activation function. The feature recognition module can be connected to the end of the model main structure, and the feature recognition module can include a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
[0065] It can be understood that the feature recognition module can expand the feature dimension of the image of the four-dimensional tensor data from the input channel number to the output channel number through the convolution function of the convolutional layer, and therefore the feature recognition module can accept the input of the four-dimensional tensor data with the input channel number, output the four-dimensional tensor data with the output channel number, provide more rich feature information of the image, and provide more rich experience values for the biological feature recognition model in the training process.
[0066] The palm feature recognition method provided by the embodiment comprises the following steps: acquiring a plurality of palm images, and constructing four-dimensional tensor data based on the plurality of palm images, wherein the four-dimensional tensor data comprises information of the number of palm images, information of the number of input channels, information of the width of the image, and information of the height of the image; further, the four-dimensional tensor data is input into a palm feature recognition model that has been trained, and recognition features corresponding to each palm image are output, wherein each recognition feature comprises a dimension feature with the same number of output channels of the palm feature recognition model, and the number of output channels is greater than the number of input channels; the training process of the palm feature recognition model comprises the following steps: acquiring a palm image set, wherein the palm image set comprises a plurality of palm images with a category object label; further, the palm image set is preprocessed to obtain a training sample data set, and four-dimensional tensor training data is constructed based on the training sample data set; under the constraint of a preset loss function, the biological feature recognition model is trained by taking the four-dimensional tensor training data as a training sample, and the palm feature recognition model is obtained, wherein the model structure of the biological feature recognition model is composed of a model main structure and a feature recognition module, the model main structure is a MobileNetV2 structure, the activation function adopted by the model main structure is a FReLU activation function, the feature recognition module is connected to the end of the model main structure, and the feature recognition module comprises a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer. As can be seen, since the biological feature recognition model introduces the feature recognition module, the biological features at the corresponding positions of the biological gestures can be aligned, and thus the features at the corresponding positions of the palm can be aligned; since the FReLU activation function in the model main structure is a linear function, the overfitting risk of the biological feature recognition model is reduced in the training process, and the recognition accuracy of the palm feature recognition model for biological features is improved.
[0067] In some embodiments of the present application, the process of pre-processing the palm image set to obtain the training sample data set mentioned in the above embodiments is introduced, which can include the following steps:
[0068] S1, for each palm image in the palm image set, color augmentation and perspective transformation augmentation are applied to the palm image to obtain an augmented palm image.
[0069] Specifically, the width and height of each palm image in the palm image set can be a first preset pixel and a second preset pixel, respectively, such as 224 pixels in height and 192 pixels in width. The contrast, brightness, hue, and saturation of each palm image can be adjusted, and then each palm image can be subjected to rotation, scaling, translation, skewing, and perspective distortion transformation, wherein the angle of palm part rotation augmentation can be uniformly sampled in the range of -11 degrees to 11 degrees when the palm image is subjected to rotation transformation.
[0070] S2, for each augmented palm image, a center image of a preset size is cropped from the center of the augmented palm image, and each pixel value of the center image is normalized to obtain a target image.
[0071] It can be understood that each augmented palm image is increased in size relative to the image size before rotation augmentation, such as the width size and the height size, which can be increased to 256 pixels or more. On this basis, an image region of 256 pixels in height and 256 pixels in width can be cropped from the center of the augmented palm image, the pixels not in the image region can be filled with 0 pixel values, and then each pixel value in the image region is normalized between 0 and 1 to obtain a target image, the width size and the height size of each target image meet the parameter input requirements of the biometric recognition model.
[0072] S3, a training sample data set of each target image is constructed.
[0073] Specifically, the training sample data set can be constructed by each target image, and each target image can be input to the biometric recognition model to be trained as the same batch of image data.
[0074] The palm feature recognition method provided in the embodiment first applies color augmentation and perspective transformation augmentation to each palm image in the palm image set to obtain an augmented palm image, then crops a center image of a preset size from the center of the augmented palm image to obtain a target image by normalizing each pixel value of the center image, and finally constructs a training sample data set of each target image, so that the width size and the height size of each target image in the training sample data set meet the parameter input requirements of the biometric recognition model.
[0075] In some embodiments of the application, the preset loss function mentioned in the above embodiment is introduced, which can be an ArcFace loss function, and the specific implementation is as follows:
[0076]
[0077] Wherein, m is the optimization interval value between different categories of objects, s is the preset optimization value, for example, m = 0.5, s = 30, y is the index of the category object, i is the index of the palm image batch when each target image batch of the category object is subjected to random gradient descent, is the angle between the recognition feature of each target image and the center vector of the y i th category object, n is the total number of category objects, and θ j is the angle between the feature vector of the recognition feature of each target image and the center vector of the j th category object.
[0078] Specifically, before the biometric feature recognition model is trained, an error rate can be initialized on a verification set in advance, and the initialized value of the error rate can be infinite. During the training of the biometric feature recognition model, a preset number of iteration calculations are required, which can be customized, such as 210,000 times. Each iteration calculation can be:
[0079] S1, randomly read a plurality of target images and their labels from the four-dimensional tensor training data.
[0080] S2, input the read target images and their labels into the biometric feature recognition model in the training process to extract palm features.
[0081] S3, calculate the loss value corresponding to each target image through a preset loss function.
[0082] S4, calculate the gradient value between the loss value corresponding to each target image and the model parameters of the biometric feature recognition model with respect to the preset loss function.
[0083] S5, based on the calculated gradient value, the gradient descent method is used to learn the model parameters of the biometric feature recognition model.
[0084] S6, if the current iteration number is a multiple of the preset standard number, the error rate of the biometric feature recognition model is verified, and if the error rate is less than the locally stored error rate, the locally stored error rate is updated.
[0085] Wherein, the preset standard number can represent the biometric feature recognition model in the training process, which can be customized, such as 5000 times. The error rate can be stored in the model parameter file.
[0086] The palm feature recognition method provided in this embodiment, under the constraint of ArcFace loss function, learns the model parameters through gradient descent method, promotes the biometric feature recognition model to be trained with higher recognition accuracy, and verifies the error rate of the model after every preset standard number, which can supervise the error rate of the biometric feature recognition model in real time and fully.
[0087] In some embodiments of the present application, considering evaluating the feature recognition effect of the palm feature recognition model trained, the error rate of the palm feature recognition model can be tested by testing palm images, such as Figure 3 As shown, the calculation process of the error rate can include:
[0088] Step S310, obtain a plurality of test palm images of the same target object, input each test palm image into the palm feature recognition model, and output the respective recognition features corresponding to each test palm image.
[0089] Step S320, taking two recognition features of every two test palm images as a set of recognition features, for each set of recognition features, calculating the cosine similarity score between the two recognition features as the cosine similarity score of the set of recognition features.
[0090] Step S330, calculating and evaluating the cosine similarity scores of each set of recognition features by the roc algorithm to determine the error rate of the palm feature recognition model.
[0091] Specifically, the error rate can be the error rate at FAR=1e-5.
[0092] Under the training mode of 21 million iterations, 6052 palm image numbers of four-dimensional tensor training data, and 128 class object label IDs, the error rate performance evaluation of the palm feature recognition model trained is as follows:
[0093] EER FAR = 1 e-3 FAR = 1 e-4 FAR = 1 e-5 FAR = 1 e-6 FAR = 0 Error rate 0.4550% 0.6676% 1.1316% 1.5760% 2.1411% 3.4387%
[0094] For other similar models, for example, a general linear recognition model M1, the model main structure of which is different from that of the biometric feature recognition model in that the end of the model main structure is a general linear module linear_fc flattened into a vector, the error rate performance evaluation of the M1 model is as follows:
[0095] EER FAR = 1 e-3 FAR = 1 e-4 FAR = 1 e-5 FAR = 1 e-6 FAR = 0 Error rate 0.4667% 0.6530% 1.1992% 1.9499% 2.5855% 3.7470%
[0096] For example, a nonlinear recognition model M2 based on a feature recognition module, which is different from the biometric feature recognition model in that the activation function used in the model main structure is a nonlinear activation function relu, the error rate performance evaluation of the M2 model is as follows:
[0097] EER FAR = 1 e-3 FAR = 1 e-4 FAR = 1 e-5 FAR = 1 e-6 FAR = 0 Error rate 0.4957% 0.7904% 1.3646% 2.1634% 3.1743% 4.2772%
[0098] For example, a nonlinear recognition model M3 based on a feature recognition module, which is different from the biometric feature recognition model in that the activation function used in the model main structure is a nonlinear activation function prelu, the error rate performance evaluation of the M3 model is as follows:
[0099] EER FAR = 1 e-3 FAR = 1 e-4 FAR = 1 e-5 FAR = 1 e-6 FAR = 0 Error rate 0.4774% 0.6683% 1.3304% 2.1599% 3.1289% 4.6972%
[0100] For example, a nonlinear recognition model M4 based on a feature recognition module, which is different from the biometric feature recognition model in that the activation function used in the model main structure is a nonlinear activation function frelu, the error rate performance evaluation of the M4 model is as follows:
[0101] EER FAR = 1 e-3 FAR = 1 e-4 FAR = 1 e-5 FAR = 1 e-6 FAR = 0 Error rate 0.5290% 0.7674% 1.4427% 2.2290% 3.4708% 8.6277%
[0102] It can be seen that the error rate of the palm feature recognition model is improved compared with the above models.
[0103] The device for identifying palm features provided by the embodiments of the present application is described below. The device for identifying palm features described below can be referred to the method for identifying palm features described above.
[0104] Referring to Figure 4 , Figure 4 The device for identifying palm features provided by the embodiments of the present application is described below. The device for identifying palm features described below can be referred to the method for identifying palm features described above.
[0105] As Figure 4 shown, the device can include:
[0106] The palm image acquisition unit 11 is configured to acquire a plurality of palm images, and construct four-dimensional tensor data based on the plurality of palm images, wherein the four-dimensional tensor data contains information of the number of palm images, information of the number of input channels, information of the width of images, and information of the height of images.
[0107] The feature identification unit 12 is configured to input the four-dimensional tensor data into a trained palm feature identification model, and output an identification feature corresponding to each palm image, wherein each identification feature contains a same number of dimension features as the number of output channels of the palm feature identification model, and the number of output channels is greater than the number of input channels.
[0108] The image set acquisition unit 13 is configured to acquire a palm image set, wherein the palm image set includes a plurality of palm images with category object labels.
[0109] The preprocessing unit 14 is configured to pre-process the palm image set to obtain a training sample data set, and construct four-dimensional tensor training data based on the training sample data set.
[0110] The model training unit 15 is configured to train a biological feature identification model based on the four-dimensional tensor training data as training samples under the constraint of a preset loss function to obtain a palm feature identification model, wherein a model structure of the biological feature identification model is composed of a model main structure and a feature identification module, the model main structure is a MobileNetV2 structure, an activation function used by the model main structure is a FReLU activation function, the feature identification module is connected to the end of the model main structure, and the feature identification module includes a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
[0111] Optionally, the preprocessing unit includes:
[0112] The amplification unit is configured to apply color amplification and perspective transformation amplification to each palm image in the palm image set to obtain an amplified palm image.
[0113] cropping and normalizing unit, configured to, for each augmented palm image, crop a center image of a preset size from the center of the augmented palm image, and normalize each pixel value of the center image to obtain a target image;
[0114] a training sample data construction unit, configured to construct a training sample data set of each target image.
[0115] Optionally, the apparatus further comprises:
[0116] a test data feature recognition unit, configured to, after obtaining a palm feature recognition model by training a biological feature recognition model under the constraint of the preset loss function and by taking the four-dimensional tensor training data as training samples, acquire a plurality of test palm images of the same target object, input each test palm image into the palm feature recognition model, and output respective recognition features corresponding to each test palm image;
[0117] a cosine similarity score calculation unit, configured to take two recognition features of each two test palm images as a group of recognition features, calculate a cosine similarity score between the two recognition features as the cosine similarity score of the group of recognition features for each group of recognition features;
[0118] an error rate evaluation calculation unit, configured to calculate and evaluate the cosine similarity scores of each group of recognition features by using an roc algorithm, and determine the error rate of the palm feature recognition model.
[0119] The apparatus for recognizing palm features provided in the embodiments of the present application can be applied to a device for recognizing palm features, such as a terminal, a mobile phone, a computer, and the like. Optionally, Figure 5 a hardware structure block diagram of the device for recognizing palm features is shown, and the hardware structure of the device for recognizing palm features can include at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4; Figure 5
[0120] In the embodiments of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 complete communication with each other through the communication bus 4;
[0121] The processor 1 can be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application, etc.
[0122] The memory 3 can include a high-speed RAM memory and can also include a non-volatile memory such as at least one disk memory;
[0123] The memory stores a program, and the processor can call the program stored in the memory, and the program is used for:
[0124] A plurality of palm images are acquired, and four-dimensional tensor data is constructed based on the plurality of palm images, the four-dimensional tensor data including information of a number of palm images, information of a number of input channels, information of a width of an image, and information of a height of an image;
[0125] The four-dimensional tensor data is input into a trained palm feature recognition model, and recognition features corresponding to each palm image are output, each recognition feature including a same number of dimensional features as a number of output channels of the palm feature recognition model, wherein the number of output channels is greater than the number of input channels;
[0126] The training process of the palm feature recognition model includes:
[0127] A palm image set is acquired, the palm image set including a plurality of palm images with category object labels;
[0128] The palm image set is preprocessed to obtain a training sample data set, and four-dimensional tensor training data is constructed based on the training sample data set;
[0129] Under the constraint of a preset loss function, a palm feature recognition model is obtained by training a biological feature recognition model with the four-dimensional tensor training data as training samples, wherein a model structure of the biological feature recognition model is composed of a model main structure and a feature recognition module, the model main structure is a MobileNetV2 structure, an activation function used by the model main structure is a FReLU activation function, the feature recognition module is connected to a tail end of the model main structure, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
[0130] Optionally, the refinement function and the expansion function of the program can refer to the description above.
[0131] The embodiments of the present application also provide a storage medium which can store a program suitable for execution by a processor, and the program is used for:
[0132] A plurality of palm images are acquired, and four-dimensional tensor data is constructed based on the plurality of palm images, the four-dimensional tensor data including information of a number of palm images, information of a number of input channels, information of a width of an image, and information of a height of an image;
[0133] inputting the four-dimensional tensor data into the trained palm feature recognition model, and outputting a recognition feature corresponding to each palm image, each recognition feature including a same number of dimension features as an output channel number of the palm feature recognition model, wherein the output channel number is greater than the input channel number;
[0134] The training process of the palm feature recognition model includes:
[0135] obtaining a palm image set including a plurality of palm images with category object labels;
[0136] preprocessing the palm image set to obtain a training sample data set, and constructing four-dimensional tensor training data based on the training sample data set;
[0137] training a biological feature recognition model to obtain a palm feature recognition model under the constraint of a preset loss function and by taking the four-dimensional tensor training data as training samples, wherein a model structure of the biological feature recognition model is composed of a model main structure and a feature recognition module, the model main structure is a MobileNetV2 structure, an activation function used by the model main structure is a FReLU activation function, the feature recognition module is connected to a tail end of the model main structure, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
[0138] Optionally, the refinement function and the expansion function of the program can refer to the description above.
[0139] Finally, it should be noted that in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0140] The various embodiments in the specification are described in a progressive manner, each embodiment focuses on the difference from other embodiments, and each embodiment can be combined as needed, and the same and similar parts refer to each other.
[0141] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and, while certain embodiments according to the principles set forth herein are shown and described, it is to be understood that the same are not limiting of the scope of the application as it is set forth in the appended claims, and that various modifications are made within the scope of the appended claims. Therefore, it is contemplated to cover the application in its broadest scope, including all features that can be made or used in the embodiments described herein.
Claims
1. A method of recognizing a palm feature, characterized by, The method comprises the following steps: obtaining a plurality of palm images, and constructing four-dimensional tensor data based on the plurality of palm images, wherein the four-dimensional tensor data comprises information of the number of palm images, information of the number of input channels, information of the width of the image, and information of the height of the image; inputting the four-dimensional tensor data into a trained palm feature recognition model, and outputting a recognition feature corresponding to each palm image, wherein each recognition feature comprises a dimension feature with the same number of output channels of the palm feature recognition model, and the number of output channels is greater than the number of input channels; the training process of the palm feature recognition model comprises the following steps: obtaining a palm image set comprising a plurality of palm images with category object labels; preprocessing the palm image set to obtain a training sample data set, and constructing four-dimensional tensor training data based on the training sample data set; training a biological feature recognition model under the constraint of a preset loss function by taking the four-dimensional tensor training data as a training sample to obtain a palm feature recognition model, wherein the model structure of the biological feature recognition model is composed of a model main structure and a feature recognition module, the model main structure is a MobileNetV2 structure, the activation function adopted by the model main structure is a FReLU activation function, the feature recognition module is connected to the end of the model main structure, and the feature recognition module comprises a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
2. The method of claim 1, wherein, The preprocessing of the palm image set to obtain a training sample data set comprises the following steps: applying color augmentation and perspective transformation augmentation to each palm image in the palm image set to obtain augmented palm images; for each augmented palm image, a center image with a preset size is cropped from the center of the augmented palm image, and each pixel value of the center image is normalized to obtain a target image; constructing a training sample data set of each target image.
3. The method of claim 2, wherein, The preset loss function is: wherein m is an optimization interval value between different categories of objects, s is a preset optimization value, y is an index of a category of objects, i is an index of the palm image batch when each target image batch of the category of objects is subjected to random gradient descent, is an angle between the recognition feature of each target image and a center vector of the y i th category of objects, n is a total number of categories of objects, and θ j is an angle between a feature vector of the recognition feature of each target image and a center vector of the j th category of objects.
4. The method according to any one of claims 1 to 3, characterized in that, after training the biological feature recognition model under the constraint of the preset loss function by taking the four-dimensional tensor training data as a training sample to obtain a palm feature recognition model, the method further comprises the following steps: obtaining a plurality of test palm images of the same target object, inputting each test palm image into the palm feature recognition model, and outputting a recognition feature corresponding to each test palm image; taking two recognition features of each two test palm images as a group of recognition features, calculating a cosine similarity score between the two recognition features as the cosine similarity score of the group of recognition features for each group of recognition features; calculating and evaluating the cosine similarity scores of each group of recognition features by an roc algorithm to determine the error rate of the palm feature recognition model.
5. A palmprint feature recognition apparatus, characterized by comprising: The method comprises the following steps: a palm image acquisition unit is configured to obtain a plurality of palm images, and construct four-dimensional tensor data based on the plurality of palm images, wherein the four-dimensional tensor data comprises information of the number of palm images, information of the number of input channels, information of the width of the image, and information of the height of the image; The feature recognition unit is configured to input the four-dimensional tensor data into a trained palm feature recognition model, and output recognition features corresponding to each palm image, each recognition feature including dimension features with a same number of output channels of the palm feature recognition model, wherein the number of the output channels is greater than the number of the input channels. The image set acquisition unit is configured to acquire a palm image set including a plurality of palm images with category object labels. The preprocessing unit is configured to preprocess the palm image set to obtain a training sample data set, and construct four-dimensional tensor training data based on the training sample data set. The model training unit is configured to train a biometric feature recognition model based on the four-dimensional tensor training data as training samples under the constraint of a preset loss function, to obtain the palm feature recognition model, wherein a model structure of the biometric feature recognition model is composed of a model main structure and a feature recognition module, the model main structure is a MobileNetV2 structure, an activation function used by the model main structure is a FReLU activation function, the feature recognition module is connected to a tail end of the model main structure, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum value pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum value pooling layer.
6. The apparatus of claim 5, wherein, The preprocessing unit includes: The amplification unit is configured to apply color amplification and perspective transformation amplification to each palm image in the palm image set to obtain an amplified palm image. The cropping and normalization unit is configured to crop a center image with a preset size from a center of the amplified palm image to obtain a target image, and normalize each pixel value of the center image. The training sample data construction unit is configured to construct a training sample data set of each target image.
7. The apparatus of claim 6, wherein, The preset loss function is: Where m is the optimization interval between different object categories, s is the preset optimization value, y is the index of the object category, and i is the index of the hand image batch for each target image batch of the object category during stochastic gradient descent. For each target image, the recognition features are compared with the y-th... i The angle between the center vectors of the objects in each category, where n is the total number of objects in each category, θ j Let be the feature vector of the recognition features of each target image, and the angle between it and the center vector of the j-th category object.
8. The device of any one of claims 5-7, wherein, Further including: The test data feature recognition unit is configured to input a plurality of test palm images of a same target object into the palm feature recognition model to output recognition features corresponding to each test palm image after training the biometric feature recognition model based on the four-dimensional tensor training data as training samples under the constraint of the preset loss function. The cosine similarity score calculation unit is configured to calculate a cosine similarity score between two recognition features of each two test palm images as a group of recognition features, and calculate the cosine similarity score between the two recognition features as a cosine similarity score of the group of recognition features. The error rate evaluation calculation unit is configured to calculate and evaluate the cosine similarity scores of each group of recognition features by an roc algorithm to determine an error rate of the palm feature recognition model.
9. A palm feature recognition apparatus characterized by comprising: The memory is configured to store programs. The processor is configured to execute the programs to implement each step of the palm feature recognition method of any one of claims 1-4. 10. A storage medium having stored thereon a computer program, characterized in that The computer program, when executed by a processor, implements the individual steps of the method for recognizing palm features according to any one of claims 1 to 4.
Citation Information
Patent Citations
Palm image recognition method, system and device
CN111382712A
Method and system for retrieving and extracting operation video clip based on artificial intelligence
CN113742527A
Deep palmprint recognition device and method
CN115830652A
Image recognition method and device, equipment and storage medium
CN115908985A