Palm print model training method and device, storage medium and computer equipment

By collaborative training between the server and the terminal to generate an adversarial network, negative sample palm print images are generated, which solves the problems of insufficient training data and adversarial sample attacks in the prior art, and improves the training effect and robustness of the palm print model.

CN119206797APending Publication Date: 2024-12-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310763012.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the existing palm print recognition technology, due to data privacy and difficulty in collecting, the training data is insufficient, and the model training effect is poor, especially the lack of negative samples, which is prone to adversarial sample attacks, affecting the accuracy of feature extraction.

Method used

By collaborative training between the server and the terminal, generate negative sample palm print images, increase the number and type of training samples, and use noise to enhance the generalization ability and robustness of the model to improve the training effect.

Benefits of technology

It effectively improves the training effect and robustness of the palm print model, enhances the resistance to counter samples, reduces the cost and time of manual collection of negative samples, and avoids data deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206797A_ABST
    Figure CN119206797A_ABST
Patent Text Reader

Abstract

The invention discloses a training method of a palm print model. The training method comprises the following steps: receiving a generative adversarial network sent by a server; performing local training on the generative adversarial network by using the sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network; sending local network parameters for the generative adversarial network to the server; receiving a first global network parameter sent by the server; updating network parameters of a local generative adversarial network based on the first global network parameters; and if the first training end condition is met, generating a negative sample palmprint image based on the input noise by using a generator in the trained target generative adversarial network, and training a palmprint model by using the negative sample palmprint image and the sample palmprint image. The negative sample palmprint image is generated through the generative adversarial network trained through cooperation of the server and the terminal, the number and types of training samples can be increased, then the palmprint model is trained based on the negative sample palmprint image, and the training effect of the palmprint model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a palmprint model training method, device, storage medium and computer equipment. Background Art

[0002] Palmprint recognition technology is a biometric technology based on human palmprints, which can be used for identity authentication and border security. In the process of palmprint recognition of the target object, the palmprint features (such as palmprint morphology and veins) need to be extracted from the palmprint image. Therefore, the quality of palmprint feature extraction often has a great impact on the performance of palmprint recognition.

[0003] At present, palmprint recognition methods are mainly based on deep learning to achieve palmprint feature extraction. After collecting the palmprint image corresponding to the target, the feature extraction model can be used to extract the palmprint image to obtain the palmprint features, and then the downstream tasks are performed based on the palmprint features. Since the collection of palmprint images is relatively difficult, the training samples in the data set for model training are insufficient and single. As a result, the training effect of the model is poor. Summary of the invention

[0004] The present application provides a palmprint model training method, device, storage medium and computer equipment. By generating negative samples through a trained generative adversarial network, the number and type of training samples can be increased, thereby improving the training effect of the palmprint model.

[0005] On the one hand, an embodiment of the present application provides a palmprint model training method, which is applied to any one of a plurality of terminals, wherein the plurality of terminals are all communicatively connected to a server, and each terminal is provided with a local training set. The method comprises: receiving a generative adversarial network sent by a server; locally training the generative adversarial network using sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network; sending local network parameters for the generative adversarial network to the server; receiving a first global network parameter sent by the server, wherein the first global network parameter is obtained by the server by fusing local network parameters from a plurality of terminals; updating the network parameters of the local generative adversarial network based on the first global network parameter; if a first training end condition is met, generating a negative sample palmprint image based on input noise using a generator in the trained target generative adversarial network, and training the palmprint model using the negative sample palmprint image and the sample palmprint image.

[0006] Therefore, by jointly training the generative adversarial network with the server and the terminal, a target generative adversarial network is obtained, and then a negative sample palmprint image is generated based on the input noise through the generator in the target generative adversarial network, thereby increasing the number and type of training samples. Furthermore, the palmprint model is trained using the negative sample palmprint images and sample palmprint images with noise, which can enhance the generalization ability and robustness of the palmprint model, thereby improving the training effect of the palmprint model.

[0007] On the other hand, an embodiment of the present application also provides a palmprint recognition method, which is applied to a terminal, and the method includes: extracting features of a target palmprint image through a target palmprint model to obtain target palmprint features; the target palmprint model is trained according to the training method of the palmprint model as described above; sending the target palmprint features to a server; receiving a palmprint recognition result returned by the server, and the server performs feature matching according to the target palmprint features to determine the palmprint recognition result.

[0008] On the other hand, an embodiment of the present application also provides a palmprint recognition method, which is applied to a server, and the method includes: receiving target palmprint features sent by a terminal; the terminal extracts features of a target palmprint image through a target palmprint model to obtain target palmprint features; the target palmprint model is trained according to the training method of the palmprint model as described above; feature matching is performed on the target palmprint features in a palmprint feature library to determine a palmprint recognition result for the target palmprint features; and the palmprint recognition result is sent to the terminal.

[0009] On the other hand, an embodiment of the present application also provides a palmprint model training device, which is applied to any one of a plurality of terminals, wherein the plurality of terminals are all communicatively connected to a server, and each terminal is provided with a local training set. The device comprises: a first network receiving module, which is used to receive a generative adversarial network sent by a server; a first local training module, which is used to perform local training on the generative adversarial network using sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network; a first parameter sending module, which is used to send local network parameters for the generative adversarial network to the server; a first parameter receiving module, which is used to receive a first global network parameter sent by the server, wherein the first global network parameter is obtained by the server by fusing local network parameters from a plurality of terminals; a first parameter updating module, which is used to update the network parameters of the local generative adversarial network based on the first global network parameter; and a palmprint model training module, which is used to generate a negative sample palmprint image based on input noise using a generator in a trained target generative adversarial network if a first training end condition is met, and to train the palmprint model using the negative sample palmprint image and the sample palmprint image.

[0010] On the other hand, an embodiment of the present application also provides a palmprint recognition device, which is applied to a terminal. The device includes: a feature extraction module, which is used to extract features of a target palmprint image through a target palmprint model to obtain target palmprint features; the target palmprint model is trained according to the training method of the palmprint model as mentioned above; a feature sending module, which is used to send the target palmprint features to a server; and a result receiving module, which is used to receive the palmprint recognition result returned by the server, and the server performs feature matching according to the target palmprint features to determine the palmprint recognition result.

[0011] On the other hand, an embodiment of the present application further provides a palmprint recognition device, which is applied to a server, and the device includes: a feature receiving module, which is used to receive a target palmprint feature sent by a terminal; the terminal extracts features of a target palmprint image through a target palmprint model to obtain a target palmprint feature; the target palmprint model is trained according to the training method of the palmprint model as described above; a feature matching module, which is used to perform feature matching on the target palmprint feature in a palmprint feature library to determine a palmprint recognition result for the target palmprint feature; and a result sending module, which is used to send the palmprint recognition result to the terminal.

[0012] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, wherein when the computer program is executed by a processor, the steps in the above-mentioned methods are executed.

[0013] On the other hand, an embodiment of the present application further provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program, and the computer program executes the steps in the above-mentioned methods when called by the processor.

[0014] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program stored in a storage medium; a processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the steps in the above-mentioned methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A schematic diagram of a system framework provided in an embodiment of the present application is shown.

[0017] Figure 2A timing diagram of a palmprint model training method provided in an embodiment of the present application is shown.

[0018] Figure 3 A network architecture diagram of a generative adversarial network provided in an embodiment of the present application is shown.

[0019] Figure 4 A training schematic diagram of a collaborative training generative adversarial network provided in an embodiment of the present application is shown.

[0020] Figure 5 A schematic flow chart of a palmprint model training method provided in an embodiment of the present application is shown.

[0021] Figure 6 A flowchart of a palmprint model training method provided in an embodiment of the present application is shown.

[0022] Figure 7 A timing diagram of a palmprint recognition method provided in an embodiment of the present application is shown.

[0023] Figure 8 A diagram showing an application scenario of a palmprint recognition method provided in an embodiment of the present application is shown.

[0024] Fig. 9 It is a module block diagram of a palmprint model training device provided in an embodiment of the present application.

[0025] Fig.10 This is a module block diagram of a palmprint recognition device provided in an embodiment of the present application.

[0026] Fig.11 This is a module block diagram of another palmprint recognition device provided in an embodiment of the present application.

[0027] Fig.12 It is a module block diagram of a computer device provided in an embodiment of the present application.

[0028] Fig.13 It is a module block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0030] In some processes described in the specification, claims and the above drawings, multiple steps appearing in a specific order are included, but it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, the descriptions such as "first" and "second" in this document are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0031] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with 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 of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0032] It should be noted that in the specific implementation of the present application, the local training set, negative sample palmprint images, palmprint feature library and other related data involved, when applied to the specific products or technologies of the embodiments of the present application, need to obtain user permission or consent, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and carry out subsequent data use and processing within the scope of authorization of laws, regulations and personal information subjects.

[0033] At present, existing technologies apply deep learning technology to palmprint recognition methods. The main idea is to use deep learning models to automatically extract features such as the shape, direction, and spacing of palm lines, and then use these features to identify and classify palmprints. Usually, the palmprint images of the target object (user) collected during the model training process are used as training samples.

[0034] However, deep learning requires a large amount of training data when building a neural network model. In actual application scenarios, it is difficult to obtain training data due to issues such as data privacy. For example, in access control systems based on palmprint recognition, most users do not trust the institutions that provide palm scanning services and are unwilling to provide palmprint information. This makes it relatively difficult to collect real palmprint images of users, which in turn leads to insufficient and single training samples in the data set for model training.

[0035] Specifically, the training data lacks negative samples, and the model training process may be attacked by adversarial samples or model deception attacks, which in turn affects the training effect of the model, making the trained model less accurate in feature extraction. In order to solve the above problems, the inventor has proposed a palmprint model training method provided in the embodiment of the present application after research.

[0036] The following first introduces the system architecture of the palmprint model training method involved in this application.

[0037] In the embodiment of the present application, the palmprint model training method can be applied to a computer system composed of a server and multiple terminals under the Client-Server (C / S) architecture. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud computing, cloud functions, cloud storage, cloud communications, network services, domain name services, middleware services, security services, CDN, blockchain, and big data and artificial intelligence platforms.

[0038] The terminal can be a device with storage and computing functions such as a smart phone, tablet computer, laptop computer, desktop computer, smart access control, and local server, which is not specifically limited here. The terminal can establish a communication link with the server through a wireless network or a wired network. Through this communication link, the server and multiple terminals and multiple terminals can collaborate to train models without sharing data to obtain the target generative adversarial network and target palmprint model. Each terminal stores its own local training set.

[0039] like Figure 1 As shown, the palmprint model training method provided in the embodiment of the present application can be applied in a computer system 100, and the computer system 100 can include a server 110 and multiple terminals. Figure 1 Three terminals are exemplarily shown, namely, a first terminal 120, a second terminal 140 and a third terminal 160. Among them, the server 110 can be a server cluster, including a training server 111 and a business server 113. The training server 111 can collaborate with multiple terminals to train a target generative adversarial network, and the training server 111 can collaborate with multiple terminals to train a target palmprint recognition. The business server 113 can collaborate with each terminal to perform palmprint recognition. In other embodiments, the server 110 can also be an independent server, which can collaborate with multiple terminals to train a target generative adversarial network and train a palmprint model on the one hand, and can collaborate with the terminal to perform palmprint recognition on the other hand.

[0040] For example, the training server 111 can send the generative adversarial network to the first terminal 120, the second terminal 140, and the third terminal 160 respectively through the Hyper Text Transfer Protocol (HTTP). After receiving the generative adversarial network, the first terminal 120, the second terminal 140, and the third terminal 160 can use the sample palm print images in the local training set to perform local training on the generative adversarial network to obtain local network parameters for the generative adversarial network.

[0041] Further, the first terminal 120, the second terminal 140, and the third terminal 160 can send their respective local network parameters for the generative adversarial network to the training server 111 via HTTP. The training server 111 merges the local network parameters from multiple terminals to obtain the first global network parameters, and sends the first global network parameters to the first terminal 120, the second terminal 140, and the third terminal 160 via HTTP. Then, the first terminal 120, the second terminal 140, and the third terminal 160 update the local network parameters of the generative adversarial network based on the first global network parameters, and obtain the target generative adversarial network when the first training end condition is met.

[0042] Furthermore, the first terminal 120, the second terminal 140 and the third terminal 160 can generate negative sample palmprint images based on input noise using the generators in their respective target generative adversarial networks, and train their respective target palmprint models using the negative sample palmprint images and the sample palmprint images in collaboration with the training server 111. Furthermore, the service server 113 can collaborate with each terminal to perform palmprint recognition.

[0043] Exemplarily, after obtaining the target palm print image from the palm print acquisition device, the third terminal 160 may use the target palm print model to extract features from the target palm print image, obtain target palm print features, and send the target palm print features to the business server 113 via HTTP. After receiving the target palm print features sent by the third terminal 160, the business server 113 may perform feature matching on the target palm print features in the palm print feature library, determine the palm print recognition result for the target palm print features, for example, the identity information of the target object, and then send the identity information of the target object to the third terminal 160 via HTTP. Optionally, the third terminal 160 may apply the identity information of the target object to scenarios such as online payment or online login.

[0044] For the palmprint model training method of the embodiment of the present application, the training data refers to the training samples used for training the generative adversarial network and the palmprint model. For the training of the generative adversarial network, the training samples include the sample palmprint images in the local training set. For the training of the palmprint model, the training samples include the sample palmprint images in the local training set and the negative sample palmprint images generated by the target generative adversarial network. Specifically, the terminal trains the generative adversarial network or the palmprint model based on the training data until the corresponding training end condition is met, and obtains the trained target generative adversarial network or the target palmprint model.

[0045] The training end condition may be: the total loss value of the target loss is less than a preset value, the total loss value of the target loss no longer changes, or the number of training times reaches a preset number of times, etc. The palm print model in the embodiment of the present application may specifically include a combination network of a feature representation layer and a multilayer perceptron (MLP), an autoencoder (Autoencoder), a convolutional neural network (CNN), a recurrent neural network (RNN) and other deep neural networks, which are not limited here.

[0046] It should be noted that Figure 1 It is only a schematic diagram of the architecture of a system provided in the embodiment of the present application. The architecture and application scenarios of the system described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Figure 1 Only three terminals are shown, but in different embodiments, there may be more or fewer terminals accessing the server. A person skilled in the art will appreciate that, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present invention are also applicable to solving similar technical problems.

[0047] The palm print model training method of the present application involves artificial intelligence (AI) technology, which is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.

[0048] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0049] Among them, deep learning (DL) is a sub-problem of machine learning, and its main purpose is to automatically learn effective feature representations from data. Through multi-layer feature conversion, the original data is transformed into a higher-level and more abstract representation. These learned representations can replace manually designed features, thereby avoiding "feature engineering". The abstract representation is further input into the prediction function to obtain the final result. For example, in an embodiment of the present application, the target palmprint model can perform feature extraction on the input palmprint image to obtain the corresponding palmprint features.

[0050] The various embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0051] See also Figure 2 , Figure 2 The timing diagram of the palmprint model training method provided by one embodiment of the present application is shown. In a specific embodiment, the palmprint model training method is applied to a computer system, which may include a server and multiple terminals, and the server and the multiple terminals may communicate over a network. Figure 2 As shown, the palmprint model training method may specifically include steps 110 to 170:

[0052] Step 110: Receive the generative adversarial network sent by the server.

[0053] This application trains a Generative Adversarial Network (GAN) through collaboration between a server and multiple terminals without sharing data. The Generative Adversarial Network refers to a neural network pre-set by a palmprint recognition service provider, and the Generative Adversarial Network may include a Generator and a Discriminator.

[0054] As an implementation method, the generative adversarial network can be sent to each terminal after the server initializes the parameters. For example, the server can send the generative adversarial network after initializing the network weights to each terminal through the HTTP protocol. Furthermore, each terminal can receive the generative adversarial network sent by the server, and then each terminal can perform local training on the generative adversarial network based on the local training set.

[0055] Step 120: Perform local training on the generative adversarial network using sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network.

[0056] The sample palm print image in the local training set refers to the real palm print image of the collected human palm. Optionally, the collected palm print image of the human hand can be preprocessed (such as grayscale, geometric transformation and image enhancement, etc.) to obtain the sample palm print image, so as to suppress unnecessary deformation of the image or enhance important image features. The local training set can be stored in the corresponding terminal. The local network parameters include a first local network parameter for the generator of the generative adversarial network and a second local network parameter for the discriminator of the generative adversarial network.

[0057] As an implementation method, in order to ensure the data security of palm print images, the generative adversarial network can be trained locally based on the local training set on each target object's terminal to avoid data leakage caused by the palm print images used for training being transmitted to the server or during the transmission process. During the local training process, the generator and discriminator of the generative adversarial network can be trained alternately, that is, when the generative adversarial network is iteratively trained as a whole, each round of training will first train the generator and then the discriminator.

[0058] See also Figure 3 , Figure 3 Figure 2 shows a network architecture diagram of a generative adversarial network. Figure 3 The generative adversarial network shown includes a generator and a discriminator. The generator can generate a reference palmprint image based on the input noise, and then the discriminator can distinguish the authenticity of the sample palmprint image and the reference palmprint image to obtain the corresponding discrimination results. Usually, the generator is trained only when the discriminator's discrimination performance is strong enough (that is, it has the ability to distinguish between true and false palmprint images). Specifically, step 120 may include steps 121 to 123:

[0059] Step 121: fix the network parameters of the generator, and iterate and update the discriminator for the first number of iterations according to the sample palmprint images in the local training set and multiple reference palmprint images generated by the generator based on the input noise.

[0060] The input noise refers to random noise, which can be a random value randomly sampled from a prior distribution and represented in the form of a vector. The random value can affect a certain attribute of the false palmprint image (i.e., the reference palmprint image) generated by the generator. For example, the input noise [0.2, 1.5, 0.3], the element "0.2" may affect the palmprint vein morphology, the element "1.5" may affect the palmprint spacing, and the element "0.3" may affect the distribution of palmprint bifurcation points.

[0061] Optionally, the prior distribution can be an artificially defined uniform distribution (Uniform Distribution) or a normal distribution (Normal Distribution), which is not limited here. The first number of iterations refers to the number of times the discriminator is iteratively updated during a round of iterative training of the generative adversarial network by the terminal. Usually, the first number of iterations can be the number of training samples in each batch when the training samples are trained in batches (Batch Size). Step 121 is the first iterative update step, that is, the step of training the discriminator first.

[0062] In some embodiments, step 121 may include steps (1) to (5):

[0063] (1) The generator generates a sampled number of reference palmprint images based on the input noise.

[0064] The number of samples refers to the number of reference palmprint images synthesized by the generator, which can be set according to the needs of the actual training scenario and is not limited here.

[0065] For example, the terminal can randomly sample from the standard normal distribution N(0,1) to obtain m input noises {z 1 ,z 2 ,…,z m},m>0&m∈N * . Further, the i-th input noise z i Input generator, which is composed of the generator based on the input noise z i Generate the corresponding reference palmprint image The process can be expressed by the following formula (1):

[0066]

[0067] Among them, G represents the generator, so that m reference palmprint images can be obtained

[0068] (2) Obtain a sample number of sample palmprint images from the local training set.

[0069] In the training process of the generative adversarial network, the generator is mainly used to learn to make the images it generates more realistic so as to deceive the discriminator. The discriminator needs to distinguish the received images from true or false. To this end, the terminal needs to obtain sample palmprint images with the same number of samples as the reference palmprint image from the local training set. For example, the terminal samples m sample palmprint images {x 1 ,x 2 ,…,x m}.

[0070] (3) The discriminator performs authenticity discrimination on the sampled number of reference palmprint images and the sampled number of sample palmprint images to obtain a discrimination result for each palmprint image.

[0071] Among them, authenticity discrimination refers to using the discriminator to discriminate whether the input palmprint image is a real image (sample palmprint image) or a false image (reference palmprint image). The training goal is to make the discriminator score the sample palmprint image as high as possible, and the reference palmprint image as low as possible. To this end, the discriminator's discriminant score for the palmprint image can be used as the discrimination result.

[0072] For example, the terminal can input m sample palmprint images into the discriminator D and calculate the score S1 corresponding to each sample palmprint image. The calculation process can be expressed as the following formula (2):

[0073]

[0074] The terminal can input m reference palmprint images into the discriminator D to calculate the score S2 corresponding to each sample palmprint image. The calculation process can be expressed as the following formula (3):

[0075]

[0076] (4) Calculate the first loss based on the identification results of each palmprint image.

[0077] In the embodiment of the present application, the discriminator can be regarded as a classifier in the generative adversarial network, which is used to distinguish the authenticity of the sample image. To this end, the first loss corresponding to the discriminator can be constructed based on the cross entropy function, so as to measure the discriminator's ability to distinguish between real samples (that is, sample palmprint images) and false samples (that is, reference palmprint images) based on the first loss calculated based on the discrimination results of each palmprint image. Optionally, the first loss can also be constructed based on the mean square error function, which is not limited here.

[0078] For example, if the first loss is a cross entropy loss function, the terminal can calculate the first loss V1 corresponding to the judger according to the scores of m sample palmprint images and the scores of m reference palmprint images. The calculation process can be expressed as follows:

[0079]

[0080] (5) Fix the network parameters of the generator and update the network parameters of the discriminator according to the first loss.

[0081] The network parameters may be weight parameters or gradient parameters of the network. Optionally, the gradient parameters corresponding to the discriminator of the generative adversarial network may be determined based on the first loss, and further, the weight parameters of the discriminator of the generative adversarial network may be updated based on the gradient parameters and the learning rate. The learning rate may be set based on experimental experience.

[0082] For example, the terminal solves the partial derivative of the weight parameter of the discriminator based on the first loss V1 and obtains the corresponding gradient parameter Among them, θ d represents the weight parameter of the discriminator. Further, the terminal can be based on the gradient parameter The product of the learning rate η only affects the weight parameters θ of the discriminator. d To update the parameters, the calculation process can be expressed as follows:

[0083]

[0084] Step 122: fix the network parameters of the discriminator, and iteratively update the generator for a second number of iterations according to the sample palmprint images in the local training set and the reference palmprint images generated by the generator based on the input noise.

[0085] The second iteration number refers to the number of times the generator is iteratively updated during a round of iterative training of the generative adversarial network by the terminal. Usually, the second iteration number is 1, which can be set according to the needs of the training scenario and is not limited here. Step 122 is the second iterative update step, that is, the step of training the generator after training the discriminator first.

[0086] In some embodiments, step 122 may include steps (1) to (5):

[0087] (1) The generator generates a sampled number of reference palmprint images based on the input noise.

[0088] For example, the terminal can randomly sample from the standard normal distribution N(0,1) to obtain m input noises {u 1 ,u 2 ,…,u m},m>0&m∈N * . Further, the i-th input noise u i Input generator, which is composed of the generator based on the input noise u i Generate the corresponding reference palmprint image G(u i ), thus, we can obtain m reference palmprint images {G(u 1 ),G(u 2 ),…,G(u m )}.

[0089] (2) The discriminator performs authenticity discrimination on the sampled reference palmprint images to obtain the discrimination results of each palmprint image.

[0090] (3) Calculate the second loss based on the identification results of each palmprint image.

[0091] In the embodiment of the present application, the goal of the generator in the generative adversarial network is to transform the input random noise into a reference palmprint image similar to the real sample palmprint image through the generator, and in order to make the two images as similar as possible, the distance between the data distributions of the two images must be minimized. To this end, the distance can be calculated by a second loss, and optionally, the second loss can be based on a cross entropy function, a mean square error function, etc. On this basis, the discrimination results of each palmprint image are substituted into the second loss to calculate the distance between the data distributions of the two images.

[0092] For example, the terminal can input m reference palmprint images into the discriminator D, calculate the score corresponding to each sample palmprint image, and calculate the second loss V2 corresponding to the generator. The calculation process can be expressed as the following formula (6):

[0093]

[0094] (4) Fix the network parameters of the discriminator and update the network parameters of the generator according to the second loss.

[0095] For example, the terminal solves the partial derivative of the weight parameters of the discriminator based on the second loss V2 and obtains the corresponding gradient parameters Among them, θ g represents the weight parameter of the discriminator. Further, the terminal can be based on the gradient parameter The product of the learning rate η only affects the weight parameters θ of the discriminator. g To update the parameters, the calculation process can be expressed as follows:

[0096]

[0097] Step 123: Repeat the above steps 121 (first iterative update step) and 122 (second iterative update step) until the reference training end condition of the generative adversarial network is reached. When the reference training end condition of the generative adversarial network is reached, the network parameters of the generator are used as the first local network parameters, and the network parameters of the discriminator are used as the second local network parameters.

[0098] Among them, the reference training end condition refers to the condition under which the terminal ends the local training of the generator and discriminator of the generative adversarial network. The reference training end condition can be that the rounds of repeating the first iterative update step and the second iterative update step reach the round threshold. The reference training end condition can be determined according to the number of training samples. For example, when the training data in the local training set is divided into multiple batches for training, the number of training samples in each batch of training (Batch Size) can be used as the reference training end condition for each round of the update step.

[0099] Step 130: Send local network parameters for the generative adversarial network to the server.

[0100] Considering that when the server and multiple terminals collaborate to train models without sharing data, there may be malicious participants who attack and destroy the collaborative training model process by providing false model parameters. These false parameters are aggregated with normal parameters without verification, which will affect the final quality of the overall model and even cause training failure.

[0101] As an implementation method, the server and multiple terminals can encrypt the data transmitted to each other during the collaborative training of the model. Optionally, the encryption method may include secure multi-party computing, differential privacy, VerifyNet, etc., which are not limited here.

[0102] For example, the terminal can use SMPC to encrypt only the network parameters of the generator (i.e., the first local network parameters) and the network parameters of the discriminator (i.e., the second local network parameters), without the need to encrypt a large amount of user data, thereby significantly improving the efficiency of the collaborative training model between the server and multiple terminals. At the same time, the collaborative training model between the server and multiple terminals effectively improves the privacy protection of network training.

[0103] Step 140: local network parameters from multiple terminals are integrated to obtain a first global network parameter, and the integrated first global network parameter is returned to each terminal.

[0104] Considering that transmitting the palm print information (e.g., palm print image) of the target object to the server for training the generative adversarial network may leak the data privacy of the target object, the data security is not high enough. To this end, each terminal can locally train the generative adversarial network based on the local training set, and transmit the trained local network parameters to the server, which then integrates these local network parameters to generate new global network parameters, that is, the first global network parameters, and returns them to each terminal for further local training.

[0105] As an implementation method, the terminal may send the network parameters of the generator and the network parameters of the discriminator of the generative adversarial network to the server. The network parameters may be gradient parameters or weight parameters. Furthermore, the server may fuse the gradient parameters or weight parameters from multiple terminals to obtain the global gradient parameters or global weight parameters corresponding to the generator and the discriminator, and return the fused global gradient parameters or global weight parameters to each terminal.

[0106] For example, the server may decrypt the received gradient parameters of multiple terminals, and then calculate a weighted average based on the decrypted gradient parameters of each terminal, wherein the weight used in calculating the weighted average may be determined based on the contribution of each terminal parameter collaborative training. Optionally, the contribution may be determined based on the data quality and data volume of the local training data of the terminal.

[0107] Step 150: Receive a first global network parameter sent by the server.

[0108] Step 160: Based on the first global network parameters, update the network parameters of the local generative adversarial network.

[0109] As an implementation method, each terminal can receive the global gradient parameters corresponding to the generator and discriminator sent by the server. Furthermore, each terminal can update the weight parameters of the generator of the generative adversarial network by multiplying the global gradient parameters of the generator and the learning rate, and update the weight parameters of the discriminator of the generative adversarial network by multiplying the global gradient parameters of the discriminator and the learning rate.

[0110] As another implementation method, each terminal can receive the global weight parameters corresponding to the generator and the discriminator sent by the server. Furthermore, each terminal can directly update the weight parameters of the generator based on the received global weight parameters of the generator, and directly update the weight parameters of the discriminator based on the received global weight parameters of the discriminator.

[0111] Step 170: If the first training end condition is met, a generator in the trained target generative adversarial network is used to generate a negative sample palmprint image based on the input noise, and the negative sample palmprint image and the sample palmprint image are used to train a palmprint model.

[0112] During the entire training process of the generative adversarial network, the optimization goal is to make the images generated by the generator more realistic, while the discriminator can identify the authenticity of the images. As time goes by, the generator and the discriminator are constantly confronting each other, and finally the generator and the discriminator reach a dynamic equilibrium: the images generated by the generator are close to the distribution of real images, while the discriminator cannot identify true or false images.

[0113] To this end, the first training end condition may be that the probability that the discriminator of the generative adversarial network determines that a given palmprint image is true is substantially close to 0.5. Optionally, the first training end condition may also be that the number of rounds of alternating training between the server and the terminal reaches a preset number of rounds, and the preset number of rounds may be a training epoch determined based on the number of local sample palmprint images.

[0114] As an implementation method, during the collaborative training of a generative adversarial network by the server and the terminal, each terminal updates the network parameters of the local generative adversarial network based on the first global network parameters, and then determines whether the first training end condition is met. If the first training end condition is met, the training of the generative adversarial network can be terminated to obtain the target generative adversarial network.

[0115] Furthermore, the terminal can randomly sample in any prior distribution to obtain multiple input noises, and input each input noise into the generator of the target generative adversarial network, which then generates multiple negative sample palmprint images, and uses the negative sample palmprint images and sample palmprint images to train the palmprint model.

[0116] If the first training end condition is not met, the terminal can return to the step of locally training the generative adversarial network using the sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network, so as to iteratively jointly train the generative adversarial network until the first training end condition is met.

[0117] See also Figure 4 , Figure 4 A training diagram of a collaborative training generative adversarial network is shown. The server sends the generative adversarial network to each terminal, and each terminal performs local training on the generative adversarial network based on local training data to obtain local network parameters. Each terminal sends the local network parameters to the server, and then the server fuses each received local network parameter to obtain the global network parameter. Further, the server sends the global network parameter to each terminal. Thus, the collaborative training of the server and the terminal to generate the adversarial network is completed.

[0118] In the embodiment of the present application, the network training of the generative adversarial network is performed through the collaboration of the server and the terminal to obtain the target generative adversarial network. Since each terminal uses the sample palm print images in the local training set to train the generative object network, there is no need to share the sample palm print images between different terminals, and there is no need to transmit the sample palm print images between the server and the terminal, thereby ensuring the data security of the palm print images of the target object and preventing the leakage of the target object's privacy data. Moreover, since the server aggregates the local network parameters of the generative adversarial network of multiple terminals to obtain the first global network parameters, the server aggregates the training results of the generative adversarial network of different terminals using different local training sets, thereby ensuring that the prediction accuracy of the generative adversarial network updated based on the first global network parameters is higher.

[0119] Furthermore, through the generator in the target generative adversarial network, negative sample palmprint images are generated based on input noise, the number and type of training samples are increased, and the negative sample palmprint images and sample palmprint images are used to train the palmprint model. Since the generator in the target generative adversarial network trained in a collaborative training model between the server and multiple terminals can generate negative sample palmprint images that are very similar to real palmprint images, the negative sample palmprint images are used to train the palmprint model, which can enhance the generalization ability and robustness of the palmprint model, thereby improving the training effect of the palmprint model.

[0120] See also Figure 5 , Figure 5 A flow chart of a palmprint model training method provided by another embodiment of the present application is shown. In a specific embodiment, the palmprint model training method is applied to a computer system, which may include a server and multiple terminals, and the server and the multiple terminals may communicate over a network. Figure 5 As shown, the palmprint model training method may specifically include steps 210 to 270:

[0121] Step 210: Generate a negative sample palmprint image based on input noise using the generator in the trained target generative adversarial network.

[0122] Since the number of training samples in the local training data is small and the quality is low, the effect of local training of the palmprint model by the terminal is not ideal. Therefore, the target generative adversarial network can be used to generate negative sample palmprint images and train the palmprint model together with the sample palmprint images. The training process of the target generative adversarial network can refer to the contents of steps 110 to 170 in the above embodiment, which will not be repeated here.

[0123] As an implementation method, the terminal may perform random sampling in any prior distribution to obtain n input noises {z 1 ,z 2 ,…,zn},n>0&n∈N * Furthermore, each input noise is input into the generator of the target generative adversarial network, and then the generator generates n negative sample palmprint images accordingly. Then, the palmprint model can be trained using the negative sample palmprint images and the sample palmprint images.

[0124] Step 220: Receive the palm print model sent by the server.

[0125] The palmprint model refers to a neural network model pre-set by the palmprint recognition service provider, and the palmprint model can be a different type of deep neural network (DNN), which can be set according to the actual application scenario and is not limited here. For example, in the embodiment of the present application, the training process of the palmprint model is explained by taking an automatic encoder as an example.

[0126] As an implementation method, the palmprint model can be sent to each terminal after the server initializes the parameters. For example, the server can send the palmprint model after the network weights are initialized to each terminal. Further, each terminal can receive the palmprint model sent by the server, and then each terminal can perform local training on the palmprint model based on the sample palmprint images and negative sample palmprint images in the local training set.

[0127] Step 230: Locally train the palmprint model using sample palmprint images in the local training set and negative sample palmprint images generated by the generator in the target generative adversarial network to obtain local network parameters for the palmprint model.

[0128] As an implementation method, the palmprint model can perform feature extraction on sample palmprint images and negative sample palmprint images to obtain training features of each palmprint image. Furthermore, based on the training features, the third loss corresponding to the palmprint model is determined, and the gradient parameters of the palmprint model are determined according to the third loss, and the gradient parameters are used as local network parameters of the palmprint model.

[0129] Exemplarily, the palmprint model can be an automatic encoder composed of an encoder and a decoder. The encoder can map input data to a vector space, and the decoder can map the representation from the vector space to a reconstruction space. The sample palmprint images and the negative sample palmprint images generated by the generator of the target generative adversarial network constitute a new local training set {p1, p2, p3, …, p n}, where n is the number of samples, n>0&n∈N * .

[0130] For example, the terminal can send the jth sample palmprint image p jThe palmprint image p is input to the encoder of the palmprint model, and then encoded by the encoder. j Hidden representation in vector space The calculation process can be expressed as follows:

[0131]

[0132]

[0133] Where K is the number of encoder layers. The terminal obtains the hidden representation Afterwards, the decoder can be used to reversely calculate the output reconstruction, that is, to reconstruct the palm print image The reconstructed palmprint image It can be used as a training feature. Furthermore, the terminal can minimize the error between the input and the reconstruction, and construct a third loss function V3. The calculation process can be expressed as the following formula (10):

[0134]

[0135] Furthermore, the terminal can solve the partial derivative of the weight parameter W of the palmprint model based on the third loss V3 to obtain the corresponding gradient parameter The gradient parameter is used as the local network parameter of the palmprint model. Optionally, the terminal can also use the gradient parameter The weight parameter W is updated and the updated weight parameter is used as the local network parameter.

[0136] Step 240: Send local network parameters for the palmprint model to the server.

[0137] As an implementation method, when the terminal obtains the local network parameters, it can first perform an encryption operation on the local network parameters, and further send the encrypted local network parameters to the server. Optionally, the encryption operation can use an encryption algorithm such as Homomorphic Encryption (HE), which is not limited here.

[0138] Step 250: receiving a second global network parameter sent by the server, where the second global network parameter is obtained by fusing local network parameters for palmprint models from multiple terminals by the server.

[0139] As an implementation method, when receiving the local network parameters sent by each terminal, the server can fuse all the local network parameters, for example, weighted average, to obtain the second global network parameter. For example, the server can perform weighted summation on the gradient parameters sent by all terminals, calculate the average of the gradient parameters as the global gradient parameter, and send the global gradient parameter to each terminal, so that each terminal can receive the global gradient parameter sent by the server.

[0140] Step 260: Based on the second global network parameters, update the network parameters of the local palmprint model.

[0141] As an implementation manner, the terminal may perform parameter update W←W+τπ on only the weight parameter W of the palmprint model based on the product of the received global gradient parameter π and the learning rate τ.

[0142] As another implementation, the terminal may calculate the global weight parameter W of the received palmprint model based on the received palmprint model. ′ Directly update the weight parameters of the palmprint network W←W ′ .

[0143] Step 270: If the second training end condition is met, the palmprint model with updated parameters is used as the target palmprint model.

[0144] The second training end condition may be that the total loss value of the third loss V3 is less than a preset value, the total loss value of the third loss V3 no longer changes, or the number of training times reaches a preset number of times, etc. Optionally, an optimizer may be used to optimize the third loss V3, and the learning rate, the batch size during training, and the training period may be set based on experimental experience.

[0145] As an implementation method, during the collaborative training of the palmprint model by the server and the terminal, each terminal updates the network parameters of the local palmprint model based on the second global network parameters, and then determines whether the second training end condition is met. If the second training end condition is met, the training of the palmprint model can be ended to obtain the target palmprint model. If the second training end condition is not met, the process can return to step 230 to iteratively perform joint training on the palmprint model until the second training end condition is met.

[0146] See also Figure 6 , Figure 6 A flow chart showing a palmprint model training method. Figure 6The training method of the palmprint model is described by taking the data interaction between the server and a terminal as an example. In some embodiments, the server and the terminal may first collaborate to train a target generative adversarial network, and then the terminal uses the target generative adversarial network to generate a negative sample palmprint image. Further, the server and the terminal may collaborate to train a target palmprint model based on the negative sample palmprint image and the sample palmprint image.

[0147] Specifically, step 01: the server can initialize the generative adversarial network; step 02: the server then sends the generative adversarial network to the terminal; step 03: the terminal receives and deploys the generative adversarial network; step 04: the terminal determines whether to continue to perform local training on the generative adversarial network according to the first training end condition; step 05: if the first training end condition is not met, the terminal performs local training on the generative adversarial network based on the sample palm print images in the local training set, including firstly performing local training on the discriminator of the generative adversarial network, and then performing local training on the generator of the generative adversarial network, and executing step 06. If the first training end condition is met, the terminal ends the local training and obtains the target generative adversarial network;

[0148] Further, step 06: the terminal encrypts the local network parameters obtained by the local training of the generative adversarial network and sends them to the server. Step 07: the server receives and decrypts the local network parameters sent by the terminal, and merges the local network parameters with the local network parameters sent by other terminals to obtain the first global network parameters; step 08: the server sends the first global network parameters to the terminal; step 09: the terminal receives the first global network parameters, updates the parameters of the generative adversarial network based on the first global network parameters, and returns to execute step 04.

[0149] Step 10: The terminal can generate multiple negative sample palmprint images based on the input noise using the generator of the target generative adversarial network; Step 11: The server can initialize the palmprint model and send the palmprint model to the terminal; Step 12: The terminal can receive and deploy the palmprint model; Step 13: The terminal can determine whether to continue to perform local training on the palmprint model according to the second training end condition; Step 14: If the second training end condition is not met, the terminal performs local training on the palmprint model based on the sample palmprint images and negative sample palmprint images in the local training set, and executes step 15. If the second training end condition is met, the terminal ends the local training and obtains the target palmprint model;

[0150] Further, step 15: the terminal encrypts the local network parameters obtained by the local training of the palmprint model and sends them to the server. Step 16: the server receives and decrypts the local network parameters sent by the terminal, and merges the local network parameters with the local network parameters sent by other terminals to obtain the second global network parameters; step 17: the server sends the second global network parameters to the terminal; step 18: the terminal receives the second global network parameters, updates the parameters of the palmprint model based on the second global network parameters, and returns to execute step 13.

[0151] In the embodiment of the present application, a negative sample palmprint image is generated based on input noise by a generator in a target generative adversarial network, thereby increasing the number and type of training samples. Furthermore, the palmprint model is trained using negative sample palmprint images and sample palmprint images, thereby enhancing the generalization ability of the palmprint model. At the same time, since the negative sample palmprint image generated based on the input noise contains more noise and abnormal features, the trained palmprint model can filter out the palmprint image data forged by the attacker and the illegally collected palm images, thereby improving the robustness of the palmprint model. In addition, generating negative sample palmprint images based on the generator in the target generative adversarial network can reduce the cost and time of manually collecting negative samples and avoid data deviation problems caused by manual labeling errors.

[0152] See also Figure 7 , Figure 7 The timing diagram of the palmprint recognition method provided by an embodiment of the present application is shown. In a specific embodiment, the palmprint model training method is applied to a computer system, which may include a server and multiple terminals, and the server and the multiple terminals may communicate over a network. Figure 7 The timing flow shown is combined with Figure 8 The application scenario shown is described in detail.

[0153] For example, a palmprint recognition service provider can provide target users with palmprint recognition technology services in different application scenarios, such as access control systems, identity authentication, and online payment. In the palmprint recognition service scenario, the service side may include a central server, which can collaborate with the client terminal on the application side to complete the palmprint recognition service process. Optionally, the central server can also collaborate with the client terminal to complete the training of the palmprint model and the generative adversarial network.

[0154] It should be noted that Figure 8This is only one application scenario provided by the embodiment of the present application. The application scenario described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. For example, in other cases, the palm print image can be directly stored in the central server. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new application scenarios, the technical solution provided by the embodiment of the present application is also applicable to solving similar technical problems. Figure 7 As shown, the palmprint recognition method may specifically include steps 310 to 360:

[0155] Step 310: extracting features of the target palmprint image using the target palmprint model to obtain target palmprint features.

[0156] The training process of the target palmprint model may refer to the contents of step 210 to step 270 in the aforementioned embodiment, which will not be described in detail here.

[0157] Exemplarily, the target object needs to undergo palmprint recognition to complete the identity authentication of the access control system. The access control system of the client terminal can collect the target palmprint image of the target object through an image acquisition device, and use the target palmprint model to perform feature extraction on the target palmprint image to obtain the corresponding target palmprint feature. For example, the network structure of the target palmprint model can be an automatic encoder, and the encoder of the automatic encoder can be used to extract palmprint features from the target palmprint image to obtain the target palmprint feature.

[0158] In some embodiments, considering the possibility of illegal users forging palm print images, palm print detection may be performed on the collected target palm print image before feature extraction is performed on the target palm print image to determine whether the target palm print image is legal.

[0159] Specifically, the access control system of the client terminal can perform palm image detection on the target palm print image through the discriminator in the trained generative adversarial network to obtain the detection result. If the detection result indicates that the target palm print image is a legitimate palm print image, the target palm print image can be feature extracted through the target palm print model. If the detection result indicates that the target palm print image is a forged palm print image, a prompt message is generated. The prompt message is used to indicate that the currently collected palm print image is illegal. Optionally, when the prompt message is generated multiple times in a row, an abnormal message can be sent to the palm print recognition service provider.

[0160] Step 320: Send the target palmprint features to the server.

[0161] Step 330: receiving the target palmprint features sent by the terminal.

[0162] Exemplarily, when the client terminal extracts the target palmprint features of the target palmprint image, it can use an encryption algorithm to encrypt the target palmprint features, and then send the encrypted target palmprint features to the central server, and then the central server can receive the encrypted target palmprint features.

[0163] Step 340: performing feature matching on the target palmprint feature in the palmprint feature library to determine a palmprint recognition result for the target palmprint feature.

[0164] The palmprint feature database refers to a database used to store the palmprint image features of different target objects. The palmprint feature database can be directly deployed on the server. Considering the possibility of leaking palmprint image features on the server, the palmprint feature database can be deployed in a third-party trusted institution, which can be a public service department with a higher security level and managed by relevant units.

[0165] Exemplarily, the central server may decrypt the encrypted target palmprint feature and perform feature matching of the target palmprint feature in a palmprint feature library, for example, by calculating the similarity between the target palmprint feature and the palmprint feature in the palmprint feature library. Finally, the palmprint recognition result for the target palmprint feature is determined, that is, the central server finds a palmprint feature that matches the target palmprint feature in the palmprint feature library. Further, the central server may determine the corresponding object identity based on the matched palmprint feature, and use the object identity as the palmprint recognition result.

[0166] Step 350: Send the palmprint recognition result to the terminal.

[0167] Step 360: Receive the palmprint recognition result returned by the server.

[0168] Exemplarily, the central server can encrypt the palmprint recognition result, that is, the object identity, and then send it to the client terminal. After the client terminal receives the palmprint recognition result, it aligns and decrypts it to obtain the object identity, and then the access control system can unlock the door according to the object identity.

[0169] The embodiment of the present application can perform palm print detection on the target palm print image through the discriminator in the trained generative adversarial network to obtain the detection result. If the detection result indicates that the target palm print image is a legal palm print image, the target palm print image is then feature extracted through the target palm print model to obtain the target palm print feature, and the target palm print feature is sent to the server, and then the palm print recognition result returned by the server is received. The server performs feature matching based on the target palm print feature to determine the palm print recognition result. Thus, the palm print image before palm print recognition can be detected by the discriminator, so that the terminal can effectively filter the attacker's forged data and illegal palm print collection, thereby improving the security and accuracy of palm print recognition.

[0170] See also Fig. 9 , which shows a structural block diagram of a palmprint model training device 400 provided in an embodiment of the present application. The palmprint model training device 400 is applied to any one of a plurality of terminals; the plurality of terminals are all connected to the server for communication; each terminal is provided with a local training set, and the palmprint model training device 400 includes:

[0171] The network receiving module 410 is used to receive the generative adversarial network sent by the server;

[0172] A local training module 420 is used to perform local training on the generative adversarial network using sample palmprint images in a local training set to obtain local network parameters for the generative adversarial network;

[0173] A parameter sending module 430, configured to send local network parameters for the generative adversarial network to the server;

[0174] The parameter receiving module 440 is used to receive a first global network parameter sent by the server, where the first global network parameter is obtained by the server by fusing local network parameters from multiple terminals;

[0175] A parameter updating module 450, configured to update a local network parameter of a generative adversarial network based on the first global network parameter;

[0176] The palmprint model training module 460 is used to generate negative sample palmprint images based on input noise using the generator in the trained target generative adversarial network if the first training end condition is met, and train the palmprint model using the negative sample palmprint images and the sample palmprint images.

[0177] In some embodiments, the palmprint model training device 400 may further include an iterative training module, which is used to return to the step of performing local training on the generative adversarial network using sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network if the first training end condition is not met, so as to iteratively perform joint training on the generative adversarial network until the first training end condition is met.

[0178] In some embodiments, the generative adversarial network includes a generator and a discriminator; the local network parameters include a first local network parameter for the generator and a second local network parameter for the discriminator; the first local training module 420 may include a first iteration unit, a second iteration unit, and an update unit:

[0179] The first iteration unit is used to perform a first iteration update step: fix the network parameters of the generator, and iteratively update the discriminator for a first number of iterations according to the sample palmprint images in the local training set and the multiple reference palmprint images generated by the generator based on the input noise;

[0180] The second iteration unit is used to perform a second iteration update step: fix the network parameters of the discriminator, and iteratively update the generator for a second number of iterations according to the sample palmprint images in the local training set and the negative sample palmprint images generated by the generator based on the input noise;

[0181] An updating unit is used to repeat the above-mentioned first iterative updating step and the second iterative updating step until the reference training end condition of the generative adversarial network is reached; when the reference training end condition of the generative adversarial network is reached, the network parameters of the generator are used as the first local network parameters, and the network parameters of the discriminator are used as the second local network parameters.

[0182] In some embodiments, the first iteration unit may perform each round of iteration update on the discriminator, and the first iteration unit may include: a generation subunit, an acquisition subunit, a discrimination subunit, a calculation subunit, and an update subunit.

[0183] A generating subunit, configured to generate a number of reference palmprint images sampled based on input noise by a generator;

[0184] An acquisition subunit is used to acquire a sample number of sample palmprint images from a local training set;

[0185] The discriminator unit is used to discriminate the authenticity of each palmprint image in the sampled number of reference palmprint images and the sampled number of sample palmprint images, and obtain the discrimination result of each palmprint image;

[0186] A calculation subunit, used for calculating a first loss according to the discrimination results of each palmprint image;

[0187] The updating subunit is used to fix the network parameters of the generator and update the network parameters of the discriminator according to the first loss.

[0188] In some embodiments, the network parameters of the discriminator include weight parameters, and the updating subunit can be specifically used to: determine the gradient parameters corresponding to the discriminator of the generative adversarial network according to the first loss; and update the weight parameters of the discriminator of the generative adversarial network based on the gradient parameters and the learning rate.

[0189] In some embodiments, the second iteration unit can perform each round of iteration update on the generator, and the second iteration unit can be specifically used for: the generator generates a sampled number of reference palmprint images based on input noise; the discriminator performs authenticity judgment on the sampled number of reference palmprint images to obtain the judgment results of each palmprint image; the second loss is calculated based on the judgment results of each palmprint image; the network parameters of the discriminator are fixed, and the network parameters of the generator are updated according to the second loss.

[0190] In some embodiments, the palmprint model training module 460 may include a model receiving unit, a local training unit, a parameter sending unit, a parameter receiving unit, a parameter updating unit, and a model determining unit.

[0191] A model receiving unit, used for receiving a palm print model sent by a server;

[0192] A local training unit, used to perform local training on the palmprint model using sample palmprint images in a local training set and negative sample palmprint images generated by a generator in a target generative adversarial network, to obtain local network parameters for the palmprint model;

[0193] A parameter sending unit, used for sending local network parameters for the palmprint model to the server;

[0194] A parameter receiving unit, configured to receive a second global network parameter sent by the server, where the second global network parameter is obtained by fusing local network parameters for palmprint models from multiple terminals by the server;

[0195] A parameter updating unit, used for updating the network parameters of the local palmprint model based on the second global network parameters;

[0196] The model determination unit is used to use the palmprint model with updated parameters as the target palmprint model if the second training end condition is met.

[0197] In some embodiments, the local training unit can be specifically used to: perform feature extraction on sample palmprint images and negative sample palmprint images by a palmprint model to obtain training features of each palmprint image; determine a third loss corresponding to the palmprint model based on the training features; determine a gradient parameter of the palmprint model based on the third loss, and use the gradient parameter as a local network parameter of the palmprint model.

[0198] The present application provides an embodiment, which performs network training on a generative adversarial network by jointly training a server and a terminal to obtain a target generative adversarial network, and then generates negative sample palmprint images based on input noise through a generator in the target generative adversarial network, thereby increasing the number and types of training samples, and further, using negative sample palmprint images and sample palmprint images to train a palmprint model, which can enhance the generalization ability and robustness of the palmprint model, thereby improving the training effect of the palmprint model.

[0199] See also Fig.10 , which shows a structural block diagram of a palmprint recognition device 500 provided in an embodiment of the present application. The palmprint recognition device 500 is applied to a terminal, and the palmprint recognition device 500 may include:

[0200] A feature extraction module 510 is used to extract features of a target palmprint image using a target palmprint model to obtain target palmprint features; the target palmprint model can be obtained by training based on the palmprint model training device 400;

[0201] A feature sending module 520 is used to send the target palmprint feature to the server;

[0202] The result receiving module 530 is used to receive the palmprint recognition result returned by the server, and the server performs feature matching according to the target palmprint feature to determine the palmprint recognition result.

[0203] In some embodiments, the palmprint recognition device 500 may further include: a detection module, used to perform palm image detection on the target palmprint image through the discriminator in the trained generative adversarial network to obtain a detection result; a processing module, used to perform the step of extracting features of the target palmprint image through the target palmprint model to obtain target palmprint features if the detection result indicates that the target palmprint image is a legitimate palmprint image. In some embodiments, the palmprint recognition device 500 may further include: a prompt module, used to generate prompt information if the detection result indicates that the target palmprint image is a forged palmprint image.

[0204] See also Fig.11 , which shows a structural block diagram of another palmprint recognition device 600 provided in an embodiment of the present application. The palmprint recognition device 600 is applied to a server, and the palmprint recognition device 600 may include: a feature receiving module 610, for receiving a target palmprint feature sent by a terminal; the terminal extracts features of a target palmprint image through a target palmprint model to obtain the target palmprint feature; the target palmprint model may be obtained by training based on a palmprint model training device 400; a feature matching module 620, for matching the target palmprint feature in a palmprint feature library to determine a palmprint recognition result for the target palmprint feature; and a result sending module 630, for sending the palmprint recognition result to the terminal.

[0205] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0206] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0207] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0208] like Fig.12 As shown, the embodiment of the present application also provides a computer device 700, which includes a processor 710, a memory 720, a power supply 730 and an input unit 740. The memory 720 stores a computer program. When the computer program is called by the processor 710, the various method steps provided in the above embodiment can be implemented. Those skilled in the art can understand that the structure of the computer device shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0209] The processor 710 may include one or more processing cores. The processor 710 uses various interfaces and lines to connect various parts of the entire battery management system, and by running or executing instructions, programs, instruction sets or program sets stored in the memory 720, calls the data stored in the memory 720, executes various functions of the battery management system and processes data, and executes various functions and processes data of the computer device, thereby controlling the computer device as a whole. Optionally, the processor 710 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 710 can integrate one or more combinations of a central processing unit 710 (CPU), a graphics processing unit 710 (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 710, but may be implemented separately through a communication chip.

[0210] The memory 720 may include a random access memory 720 (Random Access Memory, RAM), and may also include a read-only memory 720 (Read-Only Memory). The memory 720 may be used to store instructions, programs, instruction sets or program sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data (such as a phone book and audio and video data) created by the computer device during use. Accordingly, the memory 720 may also include a memory controller to provide the processor 710 with access to the memory 720.

[0211] The power supply 730 can be logically connected to the processor 710 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 730 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0212] The input unit 740 can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0213] Although not shown, the computer device 700 may also include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 710 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 720 according to the following instructions, and the processor 710 will run the data stored in the memory 720, such as the phone book and audio and video data, to implement the various method steps provided in the aforementioned embodiments.

[0214] like Fig.13 As shown, the embodiment of the present application further provides a computer-readable storage medium 800, in which a computer program 810 is stored. The computer program 810 can be called by a processor to execute various method steps provided in the embodiment of the present application.

[0215] The computer readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium includes a non-volatile computer readable storage medium (Non-Transitory Computer-Readable Storage Medium). The computer readable storage medium 800 has storage space for a computer program that executes any of the method steps in the above embodiments. These computer programs can be read from or written to one or more computer program products. The computer program can be compressed in an appropriate form.

[0216] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes various method steps provided in the above embodiments.

[0217] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.

Claims

1. A palmprint model training method, characterized in that: Applicable to any one of a plurality of terminals; the plurality of terminals are all in communication connection with a server; Each of the terminals is provided with a local training set, and the method comprises: Receive the generative adversarial network sent by the server; Using the sample palmprint images in the local training set to perform local training on the generative adversarial network to obtain local network parameters for the generative adversarial network; Sending local network parameters for the generative adversarial network to the server; Receiving a first global network parameter sent by the server, where the first global network parameter is obtained by the server by fusing local network parameters from a plurality of the terminals; Based on the first global network parameters, updating the local network parameters of the generative adversarial network; If the first training end condition is met, a generator in the trained target generative adversarial network is used to generate a negative sample palmprint image based on the input noise, and the negative sample palmprint image and the sample palmprint image are used to train the palmprint model.

2. The method according to claim 1, characterized in that The method further comprises: If the first training end condition is not met, return to the step of locally training the generative adversarial network using the sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network, so as to iteratively jointly train the generative adversarial network until the first training end condition is met.

3. The method according to claim 1 or 2, characterized in that: The generative adversarial network includes a generator and a discriminator; the local network parameters include a first local network parameter for the generator and a second local network parameter for the discriminator; The locally training the generative adversarial network using the sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network includes: The first iterative updating step: fixing the network parameters of the generator, and iteratively updating the discriminator for a first number of iterations according to the sample palmprint images in the local training set and a plurality of reference palmprint images generated by the generator based on input noise; The second iterative updating step: fixing the network parameters of the discriminator, and iteratively updating the generator for a second number of iterations according to the sample palmprint images in the local training set and the negative sample palmprint images generated by the generator based on the input noise; Repeat the above-mentioned first iterative update step and the second iterative update step until the reference training end condition of the generative adversarial network is reached; when the reference training end condition of the generative adversarial network is reached, the network parameters of the generator are used as the first local network parameters, and the network parameters of the discriminator are used as the second local network parameters.

4. The method according to claim 3, characterized in that In the first iterative updating step, the discriminator is iteratively updated in each round according to the following steps: The generator generates a first number of reference palmprint images based on input noise; Acquire the first number of sample palmprint images from the local training set; The discriminator performs authenticity discrimination on each of the first number of reference palmprint images and the first number of sample palmprint images to obtain a discrimination result for each palmprint image; Calculating a first loss according to the identification results of each palmprint image; The network parameters of the generator are fixed, and the network parameters of the discriminator are updated according to the first loss.

5. The method according to claim 4, characterized in that The network parameters of the discriminator include weight parameters, and updating the network parameters of the discriminator according to the first loss includes: Determining, according to the first loss, a gradient parameter corresponding to a discriminator of the generative adversarial network; The weight parameters of the discriminator of the generative adversarial network are updated based on the gradient parameters and the learning rate.

6. The method according to claim 3, characterized in that In the second iterative updating step, the generator is iteratively updated in each round according to the following steps: The generator generates a second number of reference palmprint images based on the input noise; The discriminator performs authenticity discrimination on the second number of reference palmprint images to obtain discrimination results for each palmprint image; Calculating a second loss according to the identification results of each palmprint image; The network parameters of the discriminator are fixed, and the network parameters of the generator are updated according to the second loss.

7. The method according to any one of claims 1 to 6, characterized in that: The method of training a palmprint model using the negative sample palmprint image and the sample palmprint image comprises: Receive the palmprint model sent by the server; Performing local training on the palmprint model using sample palmprint images in a local training set and negative sample palmprint images generated by a generator in the target generative adversarial network to obtain local network parameters for the palmprint model; Sending local network parameters for the palmprint model to the server; receiving a second global network parameter sent by the server, where the second global network parameter is obtained by the server fusing local network parameters for the palmprint model from a plurality of the terminals; Based on the second global network parameters, updating the local network parameters of the palmprint model; If the second training end condition is met, the palmprint model with updated parameters is used as the target palmprint model.

8. The method according to claim 7, characterized in that The palmprint model is locally trained using sample palmprint images in a local training set and negative sample palmprint images generated by a generator in the target generative adversarial network to obtain local network parameters for the palmprint model, including: The palmprint model performs feature extraction on the sample palmprint image and the negative sample palmprint image to obtain training features of each palmprint image; Based on the training features, determining a third loss corresponding to the palmprint model; The gradient parameters of the palmprint model are determined according to the third loss, and the gradient parameters are used as local network parameters of the palmprint model.

9. A palmprint recognition method, characterized in that: Applied to a terminal, the method comprises: Extracting features of a target palmprint image using a target palmprint model to obtain target palmprint features; the target palmprint model is obtained by training according to the method described in any one of claims 1 to 8; Sending the target palmprint feature to the server; The palmprint recognition result returned by the server is received, and the server performs feature matching according to the target palmprint feature to determine the palmprint recognition result.

10. The method according to claim 9, characterized in that Before extracting features from the target palmprint image using the target palmprint model to obtain the target palmprint features, the method further includes: Perform palm print detection on the target palm print image through the discriminator in the trained generative adversarial network to obtain the detection result; If the detection result indicates that the target palmprint image is a legal palmprint image, the step of extracting features of the target palmprint image using a target palmprint model to obtain target palmprint features is performed.

11. The method according to claim 10, characterized in that After performing palm print detection on the target palm print image by the discriminator in the trained generative adversarial network and obtaining the detection result, the method further includes: If the detection result indicates that the target palmprint image is a forged palmprint image, a prompt message is generated.

12. A palm print model training device, characterized in that: Applicable to any one of a plurality of terminals; the plurality of terminals are all in communication connection with a server; Each of the terminals is provided with a local training set, and the device comprises: The network receiving module is used to receive the generative adversarial network sent by the server; A local training module, used to perform local training on the generative adversarial network using the sample palmprint images in the local training set to obtain local network parameters for the generative adversarial network; A parameter sending module, used to send local network parameters for the generative adversarial network to the server; A parameter receiving module, configured to receive a first global network parameter sent by the server, where the first global network parameter is obtained by the server by fusing local network parameters from a plurality of the terminals; A parameter updating module, configured to update the local network parameters of the generative adversarial network based on the first global network parameters; The palmprint model training module is used to generate negative sample palmprint images based on input noise using the generator in the trained target generative adversarial network if the first training end condition is met, and train the palmprint model using the negative sample palmprint images and the sample palmprint images.

13. A palmprint recognition device, characterized in that: Applied to a terminal, the device comprises: A feature extraction module, used for extracting features of a target palmprint image through a target palmprint model to obtain target palmprint features; the target palmprint model is trained according to the method according to any one of claims 1 to 8; A feature sending module, used for sending the target palmprint feature to the server; The result receiving module is used to receive the palmprint recognition result returned by the server, and the server performs feature matching according to the target palmprint feature to determine the palmprint recognition result.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be called by a processor to execute the method according to any one of claims 1 to 11.

15. A computer device, characterized in that: include: Memory; One or more processors coupled to the memory; One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more computer programs are configured to execute the method according to any one of claims 1 to 11.

16. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a storage medium; a processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Model training method, prediction method, device, equipment and medium

    CN120186039A