Training method of palmprint recognition model, palmprint recognition method and related equipment
By preprocessing and building positive and negative samples on palm print images on different devices, and training and comparative learning models, the accuracy of palm print recognition caused by device differences is solved, and efficient recognition across devices is achieved.
Patent Information
- Application Number
- CN202411185606.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The existing palm print recognition technology has failed to effectively optimize the inconsistent palm print image quality caused by device differences, affecting the reliability of palm print recognition across devices.
By acquiring palm print images on different devices for preprocessing, image features are extracted, and positive and negative sample pairs are constructed based on users and devices, input into the comparison learning model for training, and a palm print recognition model adapted to different devices is generated.
It improves the accuracy of palm print recognition across devices, making the model more adaptable and can seamlessly identify and verify palm prints between different devices.
Smart Images

Figure CN118982848A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a palmprint recognition model training method, a palmprint recognition method and related equipment. Background Art
[0002] Palmprint recognition already has some similar products and applications in the financial field. For example, financial institutions have begun to use palmprint recognition technology as a means of identity verification and transaction authentication. In addition, some mobile payment platforms have also begun to introduce palmprint payment as a convenient payment method.
[0003] In palmprint payment scenarios and financial transaction scenarios, there may be situations where users register their palmprints on a mobile device, but the actual verification scenario is not on the mobile device. Device differences may lead to inconsistent palmprint image acquisition conditions. For example, factors such as light intensity, angle, and image quality between different devices may lead to inconsistent palmprint image quality. Existing palmprint recognition technology has not been optimized for the problems that may be caused by differences between different devices, so that when performing palmprint recognition across devices, the device differences may affect palmprint recognition, affecting the reliability of palmprint recognition. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a training method for a palmprint recognition model, a palmprint recognition method and related equipment that can be applied to financial technology or other related fields, and its main purpose is to improve the accuracy of palmprint recognition across devices.
[0005] The technical solution of the present invention is as follows:
[0006] A first aspect of the present invention provides a palmprint recognition model training method, comprising:
[0007] Acquire palmprint images collected from different devices, and perform corresponding preprocessing on the palmprint images based on the type of the collection device;
[0008] Inputting the preprocessed palmprint image into a feature extraction network to extract image features of the palmprint image;
[0009] Based on the user and acquisition device of the palmprint image, constructing positive and negative sample pairs for the image features to obtain a training sample set;
[0010] The training sample set is input into a pre-built contrastive learning model for training until a preset convergence condition is met, and the model training is completed to obtain a palmprint recognition model.
[0011] In one embodiment, the preprocessing of the palmprint image based on the type of acquisition device includes:
[0012] Confirm whether the palmprint image acquisition device is a mobile terminal;
[0013] When the acquisition device is a mobile terminal, preprocessing the palmprint image according to a first preprocessing strategy;
[0014] When the acquisition device is not a mobile terminal, the palmprint image is preprocessed according to a second preprocessing strategy.
[0015] In one embodiment, preprocessing the palmprint image according to the first preprocessing strategy includes:
[0016] Adjusting the size of the palmprint image to a target size suitable for the mobile terminal;
[0017] Adaptively adjusting the brightness and contrast of the palmprint image;
[0018] The palmprint image after adaptive adjustment is subjected to denoising processing.
[0019] In one embodiment, preprocessing the palmprint image according to the second preprocessing strategy includes:
[0020] Adjusting the size of the palmprint image to a target size consistent with the mobile terminal;
[0021] A histogram equalization process is performed on the palmprint image, and a color space of the palmprint image is converted into a specified color space.
[0022] In one embodiment, constructing positive and negative sample pairs of the image features based on the user and acquisition device to which the palmprint image belongs to, and obtaining a training sample set, includes:
[0023] The image features collected by the same user on different devices are used as positive samples to construct positive sample pairs;
[0024] Selecting a negative sample different from the positive sample from image features collected by other users on any device, and constructing a negative sample pair with the positive sample;
[0025] The positive sample pairs and negative sample pairs are constructed into positive and negative sample pairs to obtain a training sample set.
[0026] A second aspect of the present invention provides a palmprint recognition method, comprising:
[0027] Acquire a palmprint image to be identified, and extract image features of the palmprint image to be identified;
[0028] Input the image features of the palmprint image to be identified into a pre-trained palmprint recognition model, perform palmprint comparison and recognition with a palmprint library of registered users, and output a palmprint recognition result of the palmprint image to be identified;
[0029] Wherein, the pre-trained palmprint recognition model is obtained by adopting the training method as described above.
[0030] A third aspect of the present invention provides a palmprint recognition model training device, comprising:
[0031] A data collection and processing module, which obtains palmprint images collected from different devices and performs corresponding preprocessing on the palmprint images based on the type of the collection device;
[0032] A feature extraction module, used for inputting the pre-processed palmprint image into a feature extraction network to extract image features of the palmprint image;
[0033] A sample construction module, used to construct positive and negative sample pairs for the image features based on the user and acquisition device to which the palmprint image belongs, to obtain a training sample set;
[0034] The model training module is used to input the training sample set into a pre-built contrast learning model for training until the preset convergence condition is met, and then the model training is completed to obtain a palmprint recognition model.
[0035] A fourth aspect of the present invention provides a palmprint recognition device, comprising:
[0036] An image acquisition module, used to acquire a palmprint image to be identified and extract image features of the palmprint image to be identified;
[0037] A recognition module, used for inputting the image features of the palmprint image to be recognized into a pre-trained palmprint recognition model, performing palmprint comparison and recognition with a palmprint library of registered users, and outputting a palmprint recognition result of the palmprint image to be recognized;
[0038] Wherein, the pre-trained palmprint recognition model is obtained by adopting the training method as described above.
[0039] A fifth aspect of the present invention provides an electronic device, comprising at least one processor; and
[0040] a memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method of the palmprint recognition model or execute the palmprint recognition method.
[0042] A sixth aspect of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned palmprint recognition model training method or execute the above-mentioned palmprint recognition method.
[0043] Beneficial effects: The present invention discloses a palmprint recognition model training method, a palmprint recognition method and related equipment. Compared with the prior art, the embodiment of the present invention obtains palmprint images collected from different devices, and performs corresponding preprocessing on the palmprint images based on the type of the collection device; the preprocessed palmprint images are input into a feature extraction network to extract image features of the palmprint images; based on the user and collection device to which the palmprint images belong, positive and negative sample pairs are constructed for the image features to obtain a training sample set; the training sample set is input into a pre-constructed comparative learning model for training until the preset convergence conditions are met, and the model training is completed to obtain a palmprint recognition model. By using different feature processing methods for palmprint images collected on different devices and constructing positive and negative sample pairs for comparative learning, the trained palmprint recognition model has stronger cross-device adaptability, thereby improving the accuracy of cross-device palmprint recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0045] Figure 1 A flow chart of a palmprint recognition model training method provided by an embodiment of the present invention;
[0046] Figure 2 A flowchart of step S300 in the palmprint recognition model training method provided by an embodiment of the present invention;
[0047] Figure 3 A flow chart of a palmprint recognition method provided by an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of functional modules of a palmprint recognition model training device provided by an embodiment of the present invention;
[0049] Figure 5 A schematic diagram of the functional modules of a palmprint recognition device provided by an embodiment of the present invention;
[0050] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below in conjunction with the accompanying drawings.
[0052] Palmprint recognition already has some similar products and applications in the financial field. For example, financial institutions have begun to use palmprint recognition technology as a means of identity verification and transaction authentication. In addition, some mobile payment platforms have also begun to introduce palmprint payment as a convenient payment method.
[0053] In palmprint payment scenarios and financial transaction scenarios, there may be situations where users register their palmprints on a mobile device, but the actual verification scenario is not on the mobile device. Device differences may lead to inconsistent palmprint image acquisition conditions. For example, factors such as light intensity, angle, and image quality between different devices may lead to inconsistent palmprint image quality. Existing palmprint recognition technology has not been optimized for the problems that may be caused by differences between different devices, so that when performing palmprint recognition across devices, the device differences may affect palmprint recognition, affecting the reliability of palmprint recognition.
[0054] In order to solve the above problems, the present invention proposes a palmprint recognition model training method and a palmprint recognition method. The system architecture of the palmprint recognition model training method or palmprint recognition method provided in this embodiment may include a first terminal device, a second terminal device, a third terminal device, a network and a server. The network is used to provide a medium for a communication link between the first terminal device, the second terminal device, the third terminal device and the server. The network may include various connection types, such as wired and / or wireless communication links, etc.
[0055] The user may use the first terminal device, the second terminal device, and the third terminal device to interact with the server through the network to receive or send messages, etc. Various communication client applications may be installed on the first terminal device, the second terminal device, and the third terminal device, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only as examples).
[0056] The first terminal device, the second terminal device, and the third terminal device may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0057] The server may be a server that provides various services, such as a background management server that provides support for the content browsed by the user using the first terminal device, the second terminal device, and the third terminal device (for example only). The background management server may analyze and process the received data such as the user request, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.
[0058] It should be noted that the palmprint recognition model training method or palmprint recognition method provided in the embodiment of the present invention can generally be executed by the first terminal device, the second terminal device or the third terminal device. Correspondingly, the palmprint recognition model training device or palmprint recognition device provided in the embodiment of the present invention can also be set in the first terminal device, the second terminal device or the third terminal device.
[0059] Alternatively, the palmprint recognition model training method or palmprint recognition method provided in the embodiment of the present invention may also be generally executed by a server. Accordingly, the palmprint recognition model training device or palmprint recognition device provided in the embodiment of the present invention may generally be arranged in a server. The palmprint recognition model training method or palmprint recognition method provided in the embodiment of the present invention may also be executed by a server or server cluster that is different from the server and can communicate with the first terminal device, the second terminal device, the third terminal device and / or the server. Accordingly, the palmprint recognition model training device or palmprint recognition device provided in the embodiment of the present invention may also be arranged in a server or server cluster that is different from the server and can communicate with the first terminal device, the second terminal device, the third terminal device and / or the server.
[0060] It should be understood that the numbers of the above terminal devices, networks and servers are only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0061] See also Figure 1 , Figure 1 The flowchart of one embodiment of the palmprint recognition model training method provided by the present invention. Figure 1 As shown, the method specifically comprises the following steps:
[0062] S100: Acquire palmprint images collected from different devices, and perform corresponding preprocessing on the palmprint images based on the type of the collecting device.
[0063] In this embodiment, during the data collection and preprocessing stage, palm print images of multiple users are collected through different devices. For example, palm print images of the same user can be collected through mobile terminals, POS machines, ATM machines, access control devices, smart door locks and other devices, thereby collecting a large-scale cross-device palm print image data set to ensure diversity and representativeness.
[0064] Preprocessing is performed on palmprint images collected from multiple devices by multiple users, for example, image normalization, cropping and enhancement, etc. For example, the image can be adjusted to a fixed size, the brightness and contrast can be adjusted, and histogram equalization and other operations can be performed. The image quality can be adjusted through the preprocessing process to adapt to the requirements of the palmprint recognition algorithm, and the noise and artifacts in the image can be reduced, thereby improving the robustness of the palmprint recognition system under various environmental conditions. At the same time, due to differences in equipment, the acquisition conditions of the palmprint image may be inconsistent. For example, different devices may work in different environmental conditions including illumination, background noise, etc. In order to improve the adaptability of the preprocessing to different devices, this embodiment distinguishes the types of acquisition devices, and performs corresponding preprocessing on the palmprint images collected by different devices, so that the preprocessing process can adapt to the characteristics of different types of devices, and improve the cross-device adaptability and accuracy of palmprint recognition.
[0065] In one embodiment, the preprocessing of the palmprint image based on the type of acquisition device includes:
[0066] Confirm whether the palmprint image acquisition device is a mobile terminal;
[0067] When the acquisition device is a mobile terminal, preprocessing the palmprint image according to a first preprocessing strategy;
[0068] When the acquisition device is not a mobile terminal, the palmprint image is preprocessed according to a second preprocessing strategy.
[0069] In this embodiment, when the collected palmprint image data set is preprocessed in a targeted manner, it is distinguished by whether the acquisition device is a mobile terminal. Mobile terminals can specifically include smart phones, laptops, tablet computers, etc., and non-mobile terminals can specifically include, for example, POS machines, ATM machines, access control devices, smart door locks, etc. If the acquisition device of the palmprint image is a mobile terminal, the palmprint image is preprocessed according to the first preprocessing strategy, otherwise the palmprint image is preprocessed according to the second preprocessing strategy. Since the images taken by mobile terminals may be affected by more environmental factors, such as unstable lighting, jitter of handheld devices, etc., and non-mobile terminals usually work in a more controlled environment, the palmprint image is preprocessed in a targeted manner according to whether the acquisition device is a mobile terminal, which can adapt to the imaging conditions of different devices, and thus better adapt to the features in the image. And through different preprocessing strategies, it can ensure that image data from different types of terminals can be seamlessly integrated into a unified recognition system, thereby improving the accuracy of cross-device palmprint recognition.
[0070] In one embodiment, preprocessing the palmprint image according to the first preprocessing strategy includes:
[0071] Adjusting the size of the palmprint image to a target size suitable for the mobile terminal;
[0072] Adaptively adjusting the brightness and contrast of the palmprint image;
[0073] The palmprint image after adaptive adjustment is subjected to denoising processing.
[0074] In this embodiment, for the palm print image collected by the mobile terminal, the mobile terminal usually has a smaller screen resolution, so the size of the palm print image is adjusted to adapt to the target size of the mobile terminal, so as to adapt to the size of the mobile screen, such as 200x200 pixels. Then, the brightness and contrast of the palm print image are adaptively adjusted. Since the ambient lighting conditions of the mobile terminal may be different, the brightness and contrast of the palm print image can be adaptively adjusted, for example, by compressing the dynamic range to adjust the brightness and contrast, so that the image has good visibility at different brightness levels, or by using machine learning or deep learning models, the optimal strategy for brightness and contrast adjustment is learned based on a large amount of image data to automatically adapt to different images, or by setting a feedback loop, the brightness and contrast parameters are fine-tuned according to the adjusted image effect until a satisfactory effect is achieved, so as to improve the clarity and recognizability of the image. Then, the palm print image after adaptive adjustment is denoised. Since the camera of the mobile terminal may introduce some noise, a denoising algorithm, such as mean filtering or median filtering, can be used to reduce the impact of image noise on palm print recognition.
[0075] In one embodiment, preprocessing the palmprint image according to the second preprocessing strategy includes:
[0076] Adjusting the size of the palmprint image to a target size consistent with the mobile terminal;
[0077] A histogram equalization process is performed on the palmprint image, and a color space of the palmprint image is converted into a specified color space.
[0078] In this embodiment, for the palmprint image collected by the non-mobile terminal, the palmprint image is first adjusted to the same size as the mobile terminal, and the histogram equalization method is used to enhance the contrast of the image, making the palmprint texture more obvious, which is convenient for feature extraction and recognition. Then, according to the color space requirements of the device, the color space of the palmprint image is converted into a specified color space, such as from the RGB color space to a grayscale image or an HSV color space, etc., to facilitate subsequent processing and feature extraction, so as to improve the cross-device adaptability of palmprint recognition.
[0079] S200: Input the preprocessed palmprint image into a feature extraction network to extract image features of the palmprint image.
[0080] In this embodiment, a deep neural network is used as a feature extractor, such as MobileNetV3 or ResNet, wherein MobileNetV3 is a lightweight deep learning architecture that optimizes the model size and computational efficiency, making it suitable for running on resource-constrained devices. The ResNet residual network allows the signal in the network to directly skip one or more layers by introducing a residual module, which helps to solve the gradient vanishing problem in the deep network and can extract features at different levels in the image. The feature extraction network can be flexibly set according to the needs. Specifically, the weight parameters of the feature extraction network can use the pre-trained network weights, or the network weights can be directly initialized first, and then trained on a large-scale public image data set to obtain better feature extraction capabilities. The pre-processed palm print image is subjected to feature extraction through the trained feature extraction network, and the palm print image is input into the feature extraction network to obtain the feature vector corresponding to the palm print image. These image features will be used in subsequent comparative learning tasks to achieve reliable and accurate palm print recognition.
[0081] S300: Based on the user and acquisition device to which the palmprint image belongs, construct positive and negative sample pairs for the image features to obtain a training sample set.
[0082] In this embodiment, based on the image features extracted from the palmprint image data set, positive and negative sample pairs are constructed for all image features according to the user and acquisition device to which the palmprint image belongs, and a training sample set consisting of multiple groups of positive and negative sample pairs is obtained for the comparative learning of the subsequent model, wherein the positive sample pairs refer to data pairs that should be considered similar or belong to the same category in the feature space, and in the comparative learning, the model is trained to increase the similarity of these data pairs; the negative sample pairs refer to data pairs that should be considered dissimilar or belong to different categories in the feature space. Through the construction of positive and negative sample pairs, the model learning is guided during the training process, so that the model can learn the similarity of the palmprint images collected by the user on different devices based on the positive and negative sample pairs, so that the model can adapt to different acquisition environments and thus improve the palmprint recognition across devices.
[0083] In one embodiment, Figure 2 As shown, based on the user and acquisition device to which the palmprint image belongs, constructing positive and negative sample pairs for the image features to obtain a training sample set includes:
[0084] The image features collected by the same user on different devices are used as positive samples to construct positive sample pairs;
[0085] Selecting a negative sample different from the positive sample from image features collected by other users on any device, and constructing a negative sample pair with the positive sample;
[0086] The positive sample pairs and negative sample pairs are constructed into positive and negative sample pairs to obtain a training sample set.
[0087] In this embodiment, when constructing a training sample set, the image features collected on different devices may be first aligned to reduce the differences between the devices. For example, a feature alignment algorithm, including Procrustes analysis or a registration algorithm, may be used to align the image features on different devices so that they are more consistent in the feature space. Then, positive and negative sample pairs are constructed based on the user and acquisition device to which the palm print image belongs. For the image features collected by the same user on different devices, since they belong to the same user and represent the same palm print features, they are taken as positive samples, and one or more pairs are randomly selected from all the positive samples as positive sample pairs; at the same time, negative samples different from the positive samples are selected from the image features collected by other users on any device or randomly sampled images, and negative sample pairs are constructed with any positive sample. They represent different palm print features, that is, the negative sample pairs are palm print image feature pairs from different users, which may come from the same type of acquisition device or from different types of acquisition devices. Based on the generated positive sample pairs and negative sample pairs, positive and negative sample pairs are constructed to obtain a training sample set for contrastive learning. In contrastive learning, the model is trained to increase the similarity of positive sample pairs and reduce the similarity of negative sample pairs, helping the palmprint recognition system to better distinguish and recognize the palmprints of different people when there are changes in the palmprint images (such as angle, light, blur, etc.).
[0088] Preferably, in order to increase the diversity and generalization ability of training samples, sample augmentation operations can also be performed on the collected image features. For example, operations such as image rotation, translation, scaling, or adding noise can be applied to generate multiple deformed image features as training samples, thereby increasing the diversity and richness of the training sample set and further improving the accuracy of palmprint recognition.
[0089] S400, inputting the training sample set into a pre-built contrastive learning model for training, and completing the model training until a preset convergence condition is met to obtain a palmprint recognition model.
[0090] In this embodiment, a contrastive learning model is pre-built, such as a Siamese network or a Triplet network. The contrastive learning model learns the differences between different data points by comparing them. This model is usually used in unsupervised learning or semi-supervised learning tasks, especially when there is a large amount of unlabeled data in the data set. Since the goal of the contrastive learning model is to identify and distinguish different patterns or categories, even if these categories do not have clear labels, a key feature of the contrastive learning model is that it emphasizes the relative relationship between data rather than absolute values. This allows the contrastive learning model to be used in palmprint recognition tasks. It can well learn the similarities of palmprint images collected by the same user from different devices to improve cross-device adaptability. And based on the contrastive learning method, there is no need to store the original palmprint image, only relatively small feature vectors need to be stored, which further enhances the privacy protection capability.
[0091] Input the constructed training sample set into the contrastive learning model for training. In the contrastive learning model, the contrastive learning loss function can be used, such as the twin network loss or the triplet loss. During training, for each sample pair, the loss is calculated by comparing the similarity or difference between the two features, and the loss function is optimized to make the feature pairs of the same user closer and the feature pairs of different users more separated. That is, the contrastive learning model optimizes the value of the loss function to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs, so that the palm print images from the same person but different devices (positive sample pairs) are closer in the feature space, while the palm print images from different people (negative sample pairs) are farther away in the feature space. Through contrastive learning, the trained palm print recognition model can better distinguish and identify the palm prints of different people when there are multiple acquisition devices, and improve the cross-device adaptability and reliability of palm print recognition.
[0092] It should be noted that there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.
[0093] Another embodiment of the present invention provides a palmprint recognition method, such as Figure 3 As shown, the method comprises the following steps:
[0094] S500, obtaining a palmprint image to be identified, and extracting image features of the palmprint image to be identified;
[0095] S600: inputting the image features of the palmprint image to be identified into a pre-trained palmprint recognition model, performing palmprint comparison and recognition with a palmprint library of registered users, and outputting a palmprint recognition result of the palmprint image to be identified;
[0096] Wherein, the pre-trained palmprint recognition model is obtained by adopting the training method as mentioned above.
[0097] In this embodiment, after the palmprint recognition model is obtained by training through the training method described above, cross-device palmprint recognition can be realized in a variety of application scenarios, such as collecting the user's palmprint image on the mobile terminal, and performing recognition and verification of the palmprint image on the POS machine. At this time, the palmprint image collected on the POS machine is used as the palmprint image to be recognized, and the image features of the palmprint image to be recognized are extracted using the feature extraction network, and the image features of the palmprint image to be recognized are input into the pre-trained palmprint recognition model. The palmprint recognition model compares the image features with the image features in the palmprint library of the registered user, and the model can determine whether the palmprint image to be recognized is successfully matched by calculating the cosine similarity or Euclidean distance between the image features. Since the palmprint recognition model adopts different feature processing methods for images collected by different devices during the training stage, and obtains the model through comparative learning training, it has strong cross-device adaptability. Even if there are differences in the palmprint images collected on different devices, the model can learn more robust feature representations to improve cross-device recognition accuracy.
[0098] Another embodiment of the present invention provides a training device for a palmprint recognition model, such as Figure 4 As shown, the training device 1 comprises:
[0099] The data collection and processing module 11 obtains the palm print images collected from different devices and performs corresponding preprocessing on the palm print images based on the type of the collection device;
[0100] A feature extraction module 12, used for inputting the pre-processed palmprint image into a feature extraction network to extract image features of the palmprint image;
[0101] A sample construction module 13 is used to construct positive and negative sample pairs for the image features based on the user and acquisition device to which the palmprint image belongs, to obtain a training sample set;
[0102] The model training module 14 is used to input the training sample set into a pre-built contrast learning model for training until the preset convergence condition is met, and then the model training is completed to obtain a palmprint recognition model.
[0103] The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the training execution process of the palmprint recognition model than a program. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.
[0104] In one embodiment, the data collection and processing module 11 includes:
[0105] A type confirmation unit, used to confirm whether the palmprint image acquisition device is a mobile terminal;
[0106] A first preprocessing unit, configured to preprocess the palmprint image according to a first preprocessing strategy when the acquisition device is a mobile terminal;
[0107] The second preprocessing unit is used to preprocess the palmprint image according to a second preprocessing strategy when the acquisition device is not a mobile terminal.
[0108] In one embodiment, the first pre-processing unit includes:
[0109] A first size adjustment unit, used for adjusting the size of the palmprint image to a target size suitable for the mobile terminal;
[0110] An adaptive adjustment unit, used for adaptively adjusting the brightness and contrast of the palmprint image;
[0111] The denoising unit is used to perform denoising processing on the palmprint image after adaptive adjustment.
[0112] In one embodiment, the second pre-processing unit includes:
[0113] A second size adjustment unit, used for adjusting the size of the palmprint image to a target size consistent with the mobile terminal;
[0114] The equalization and conversion unit is used to perform histogram equalization processing on the palmprint image and convert the color space of the palmprint image into a specified color space.
[0115] In one embodiment, the sample construction module 13 includes:
[0116] A positive sample pair construction unit, used to use image features collected by the same user on different devices as positive samples to construct positive sample pairs;
[0117] A negative sample pair construction unit, used to select a negative sample different from the positive sample from image features collected by other users on any device, and construct a negative sample pair with the positive sample;
[0118] The sample set construction unit is used to construct the positive sample pairs and the negative sample pairs into positive and negative sample pairs to obtain a training sample set.
[0119] Another embodiment of the present invention provides a palmprint recognition device, such as Figure 5 As shown, the device 2 comprises:
[0120] The image acquisition module 21 is used to acquire the palmprint image to be identified and extract the image features of the palmprint image to be identified;
[0121] The recognition module 22 is used to input the image features of the palmprint image to be recognized into a pre-trained palmprint recognition model, compare and recognize the palmprints with the palmprint library of registered users, and output the palmprint recognition result of the palmprint image to be recognized;
[0122] Wherein, the pre-trained palmprint recognition model is obtained by adopting the training method as described above.
[0123] The image acquisition module 21 is connected to the recognition module 22. The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the palmprint recognition execution process than a program. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.
[0124] Another embodiment of the present invention provides an electronic device, such as Figure 6 As shown, the electronic device 10 includes:
[0125] One or more processors 110 and memory 120, Figure 6 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0126] The processor 110 is used to complete various control logics of the electronic device 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.
[0127] The memory 120, 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 program instructions corresponding to the palmprint recognition model training method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the electronic device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the palmprint recognition model training method or palmprint recognition method in the above method embodiment.
[0128] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the electronic device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the electronic device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0129] One or more units are stored in the memory 120, and when executed by one or more processors 110, the palmprint recognition model training method in any of the above method embodiments is executed, for example, the following steps are executed:
[0130] Acquire palmprint images collected from different devices, and perform corresponding preprocessing on the palmprint images based on the type of the collection device;
[0131] Inputting the preprocessed palmprint image into a feature extraction network to extract image features of the palmprint image;
[0132] Based on the user and acquisition device of the palmprint image, constructing positive and negative sample pairs for the image features to obtain a training sample set;
[0133] The training sample set is input into a pre-built contrastive learning model for training until a preset convergence condition is met, and the model training is completed to obtain a palmprint recognition model.
[0134] In one embodiment, the preprocessing of the palmprint image based on the type of acquisition device includes:
[0135] Confirm whether the palmprint image acquisition device is a mobile terminal;
[0136] When the acquisition device is a mobile terminal, preprocessing the palmprint image according to a first preprocessing strategy;
[0137] When the acquisition device is not a mobile terminal, the palmprint image is preprocessed according to a second preprocessing strategy.
[0138] In one embodiment, preprocessing the palmprint image according to the first preprocessing strategy includes:
[0139] Adjusting the size of the palmprint image to a target size suitable for the mobile terminal;
[0140] Adaptively adjusting the brightness and contrast of the palmprint image;
[0141] The palmprint image after adaptive adjustment is subjected to denoising processing.
[0142] In one embodiment, preprocessing the palmprint image according to the second preprocessing strategy includes:
[0143] Adjusting the size of the palmprint image to a target size consistent with the mobile terminal;
[0144] A histogram equalization process is performed on the palmprint image, and a color space of the palmprint image is converted into a specified color space.
[0145] In one embodiment, constructing positive and negative sample pairs of the image features based on the user and acquisition device to which the palmprint image belongs to, and obtaining a training sample set, includes:
[0146] The image features collected by the same user on different devices are used as positive samples to construct positive sample pairs;
[0147] Selecting a negative sample different from the positive sample from image features collected by other users on any device, and constructing a negative sample pair with the positive sample;
[0148] The positive sample pairs and negative sample pairs are constructed into positive and negative sample pairs to obtain a training sample set.
[0149] Alternatively, the palmprint recognition method in any of the above method embodiments is executed, for example, the following steps are executed:
[0150] Acquire a palmprint image to be identified, and extract image features of the palmprint image to be identified;
[0151] Input the image features of the palmprint image to be identified into a pre-trained palmprint recognition model, perform palmprint comparison and recognition with a palmprint library of registered users, and output a palmprint recognition result of the palmprint image to be identified;
[0152] Wherein, the pre-trained palmprint recognition model is obtained by adopting the training method as described above.
[0153] The embodiment of the present invention further provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the palmprint recognition model training method in any of the above method embodiments is executed, for example, the following steps are performed:
[0154] Acquire palmprint images collected from different devices, and perform corresponding preprocessing on the palmprint images based on the type of the collection device;
[0155] Inputting the preprocessed palmprint image into a feature extraction network to extract image features of the palmprint image;
[0156] Based on the user and acquisition device of the palmprint image, constructing positive and negative sample pairs for the image features to obtain a training sample set;
[0157] The training sample set is input into a pre-built contrastive learning model for training until a preset convergence condition is met, and the model training is completed to obtain a palmprint recognition model.
[0158] In one embodiment, the preprocessing of the palmprint image based on the type of acquisition device includes:
[0159] Confirm whether the palmprint image acquisition device is a mobile terminal;
[0160] When the acquisition device is a mobile terminal, preprocessing the palmprint image according to a first preprocessing strategy;
[0161] When the acquisition device is not a mobile terminal, the palmprint image is preprocessed according to a second preprocessing strategy.
[0162] In one embodiment, preprocessing the palmprint image according to the first preprocessing strategy includes:
[0163] Adjusting the size of the palmprint image to a target size suitable for the mobile terminal;
[0164] Adaptively adjusting the brightness and contrast of the palmprint image;
[0165] The palmprint image after adaptive adjustment is subjected to denoising processing.
[0166] In one embodiment, preprocessing the palmprint image according to the second preprocessing strategy includes:
[0167] Adjusting the size of the palmprint image to a target size consistent with the mobile terminal;
[0168] A histogram equalization process is performed on the palmprint image, and a color space of the palmprint image is converted into a specified color space.
[0169] In one embodiment, constructing positive and negative sample pairs of the image features based on the user and acquisition device to which the palmprint image belongs to, and obtaining a training sample set, includes:
[0170] The image features collected by the same user on different devices are used as positive samples to construct positive sample pairs;
[0171] Selecting a negative sample different from the positive sample from image features collected by other users on any device, and constructing a negative sample pair with the positive sample;
[0172] The positive sample pairs and negative sample pairs are constructed into positive and negative sample pairs to obtain a training sample set.
[0173] Alternatively, the palmprint recognition method in any of the above method embodiments is executed, for example, the following steps are executed:
[0174] Acquire a palmprint image to be identified, and extract image features of the palmprint image to be identified;
[0175] Input the image features of the palmprint image to be identified into a pre-trained palmprint recognition model, perform palmprint comparison and recognition with a palmprint library of registered users, and output a palmprint recognition result of the palmprint image to be identified;
[0176] Wherein, the pre-trained palmprint recognition model is obtained by adopting the training method as described above.
[0177] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0178] In summary, the training method of the palmprint recognition model, the palmprint recognition method and the related equipment disclosed in the present invention include: obtaining palmprint images collected from different devices, and preprocessing the palmprint images accordingly based on the type of the collection device; inputting the preprocessed palmprint images into the feature extraction network to extract the image features of the palmprint images; constructing positive and negative sample pairs for the image features based on the user and collection device to which the palmprint images belong to obtain a training sample set; inputting the training sample set into a pre-constructed comparative learning model for training until the preset convergence conditions are met, and the model training is completed to obtain a palmprint recognition model. By adopting different feature processing methods for palmprint images collected on different devices and constructing positive and negative sample pairs for comparative learning, the trained palmprint recognition model has stronger cross-device adaptability, thereby improving the accuracy of cross-device palmprint recognition.
[0179] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.
[0180] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A palmprint recognition model training method, characterized in that: include: Acquire palmprint images collected from different devices, and perform corresponding preprocessing on the palmprint images based on the type of the collection device; Inputting the preprocessed palmprint image into a feature extraction network to extract image features of the palmprint image; Based on the user and acquisition device of the palmprint image, constructing positive and negative sample pairs for the image features to obtain a training sample set; The training sample set is input into a pre-built contrastive learning model for training until a preset convergence condition is met, and the model training is completed to obtain a palmprint recognition model.
2. The palmprint recognition model training method according to claim 1, characterized in that: The performing corresponding preprocessing on the palmprint image based on the type of acquisition device includes: Confirm whether the palmprint image acquisition device is a mobile terminal; When the acquisition device is a mobile terminal, preprocessing the palmprint image according to a first preprocessing strategy; When the acquisition device is not a mobile terminal, the palmprint image is preprocessed according to a second preprocessing strategy.
3. The palmprint recognition model training method according to claim 2, characterized in that: The preprocessing of the palmprint image according to the first preprocessing strategy includes: Adjusting the size of the palmprint image to a target size suitable for the mobile terminal; Adaptively adjusting the brightness and contrast of the palmprint image; The palmprint image after adaptive adjustment is subjected to denoising processing.
4. The palmprint recognition model training method according to claim 2, characterized in that: The preprocessing of the palmprint image according to the second preprocessing strategy includes: Adjusting the size of the palmprint image to a target size consistent with the mobile terminal; A histogram equalization process is performed on the palmprint image, and a color space of the palmprint image is converted into a specified color space.
5. The palmprint recognition model training method according to claim 1, characterized in that: The method of constructing positive and negative sample pairs of the image features based on the user and the acquisition device to which the palmprint image belongs, and obtaining a training sample set, comprises: The image features collected by the same user on different devices are used as positive samples to construct positive sample pairs; Selecting a negative sample different from the positive sample from image features collected by other users on any device, and constructing a negative sample pair with the positive sample; The positive sample pairs and negative sample pairs are constructed into positive and negative sample pairs to obtain a training sample set.
6. A palmprint recognition method, characterized in that: include: Acquire a palmprint image to be identified, and extract image features of the palmprint image to be identified; Input the image features of the palmprint image to be identified into a pre-trained palmprint recognition model, perform palmprint comparison and recognition with a palmprint library of registered users, and output a palmprint recognition result of the palmprint image to be identified; Wherein, the pre-trained palmprint recognition model is obtained by using the training method according to any one of claims 1-5.
7. A palmprint recognition model training device, characterized in that: include: A data collection and processing module, which obtains palmprint images collected from different devices and performs corresponding preprocessing on the palmprint images based on the type of the collection device; A feature extraction module, used for inputting the pre-processed palmprint image into a feature extraction network to extract image features of the palmprint image; A sample construction module, used to construct positive and negative sample pairs for the image features based on the user and acquisition device to which the palmprint image belongs, to obtain a training sample set; The model training module is used to input the training sample set into a pre-built contrast learning model for training until the preset convergence condition is met, and then the model training is completed to obtain a palmprint recognition model.
8. A palmprint recognition device, characterized in that: include: An image acquisition module, used to acquire a palmprint image to be identified and extract image features of the palmprint image to be identified; A recognition module, used for inputting the image features of the palmprint image to be recognized into a pre-trained palmprint recognition model, performing palmprint comparison and recognition with a palmprint library of registered users, and outputting a palmprint recognition result of the palmprint image to be recognized; Wherein, the pre-trained palmprint recognition model is obtained by using the training method according to any one of claims 1-5.
9. An electronic device, characterized in that: comprising at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the palmprint recognition model training method described in any one of claims 1-5, or execute the palmprint recognition method described in claim 6.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the palmprint recognition model training method described in any one of claims 1 to 5, or execute the palmprint recognition method described in claim 6.
