Palm vein image generation method and device, storage medium and electronic equipment

By acquiring and processing conditional control information to generate palm vein images, the problem of insufficient image data diversity in existing technologies is solved, high-quality and diverse data generation is achieved, and the training effect and recognition accuracy of the palm vein recognition model are improved.

CN120612565BActive Publication Date: 2025-10-10ZHUHAI HAOZE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511113492.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-10-10
Estimated Expiration
2045-08-11

AI Technical Summary

Technical Problem

The palm vein image data collected by existing technologies under standard environments lacks diversity and is difficult to cover complex scenarios in actual applications, resulting in a decrease in recognition accuracy.

Method used

By obtaining the initial noise image, diffusion steps and conditional control information, including individual identity, palm posture information and lighting information, the preset diffusion model is used to generate a conditional control embedding vector, the image is gradually updated, the target palm vein image is output, and a cross-attention layer is introduced to enhance the generation of vascular detail areas.

Benefits of technology

The generated palm vein image data is more in line with real scenes, improves the diversity and authenticity of image data, ensures the training effect and generalization ability of the palm vein recognition model, and solves the problem of image data scarcity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612565B_ABST
    Figure CN120612565B_ABST
Patent Text Reader

Abstract

The application discloses a palm vein image generation method and device, a storage medium and electronic equipment, and relates to the technical field of information. The method comprises the following steps: acquiring an initial noise image, a diffusion step number and condition control information, wherein the condition control information comprises an individual identity, palm posture information and illumination information for simulating a real scene; generating a condition control embedding vector according to the condition control information; inputting the initial noise image, the diffusion step number and the condition control embedding vector into a preset diffusion model to predict noise corresponding to each time step, wherein the preset diffusion model comprises a linear layer, a cross-attention layer and a multi-scale feature layer; and gradually updating an image according to the predicted noise corresponding to each time step, and finally outputting a target palm vein image under the condition control information. The application can make the generated palm vein image data fit various complex real scenes, thereby guaranteeing the diversity and practicality of the palm vein image data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information technology, in particular to a palm vein image generation method and device, a storage medium and an electronic device. BACKGROUND

[0002] Palm vein recognition has been widely concerned and applied in many scenarios such as financial payment, access control, public transportation, etc. due to its high security and stability. However, with the in-depth development and popularization of palm vein recognition technology, many technical problems need to be solved in the data acquisition and related processing links, which seriously restrict the further popularization and optimization of palm vein recognition technology.

[0003] At present, palm vein image data is mostly acquired in a standardized acquisition environment. However, the palm vein image data acquired in this way lacks diversity and is difficult to cover complex scenarios in actual applications, and the practicability of the image data is poor, thereby causing the trained model to be easily disturbed in real scenarios and the recognition accuracy to decrease. SUMMARY

[0004] Therefore, the present application provides a palm vein image generation method and device, a storage medium and an electronic device, which can make the generated palm vein image data fit various complex real scenarios, thereby ensuring the diversity and practicability of the palm vein image data.

[0005] According to a first aspect of the present application, a palm vein image generation method is provided, which comprises:

[0006] obtaining an initial noise image, a diffusion step number and condition control information, wherein the condition control information comprises an individual identity, palm posture information and illumination information for simulating a real scenario;

[0007] generating a condition control embedding vector according to the condition control information;

[0008] inputting the initial noise image, the diffusion step number and the condition control embedding vector into a preset diffusion model to predict a noise corresponding to each time step, wherein the preset diffusion model comprises a linear layer, a cross-attention layer and a multi-scale feature layer, and after the encoding vector corresponding to the diffusion step number and the condition control embedding vector are mapped through the linear layer, the mapping result is input into the cross-attention layer for calculation to obtain a fusion feature, and the fusion feature is added to the multi-scale feature layer through residual connection;

[0009] updating the image step by step according to the predicted noise corresponding to each time step, and finally outputting a target palm vein image under the condition control information.

[0010] According to a second aspect of the present application, a palm vein image generation device is provided, the device comprising:

[0011] an acquisition unit, configured to acquire an initial noise image, a diffusion step number, and condition control information, wherein the condition control information includes an individual identity identifier, and palm posture information and lighting information for simulating a real scene;

[0012] a generating unit, configured to generate a conditional control embedding vector according to the conditional control information;

[0013] a prediction unit, configured to input the initial noise image, the number of diffusion steps, and the conditional control embedding vector into a preset diffusion model to predict the noise corresponding to each time step, wherein the preset diffusion model includes a linear layer, a cross-attention layer, and a multi-scale feature layer; during prediction, the encoding vector corresponding to the number of diffusion steps and the conditional control embedding vector are mapped through the linear layer and then input into the cross-attention layer for calculation to obtain a fused feature, which is added to the multi-scale feature layer through a residual connection;

[0014] The output unit is used to gradually update the image according to the predicted noise corresponding to each time step, and finally output the target palm vein image under the conditional control information.

[0015] According to a third aspect of the present application, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned palm vein image generation method is implemented.

[0016] According to a fourth aspect of the present application, an electronic device is provided, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned palm vein image generation method when executing the program.

[0017] By the technical scheme, the palm vein image generation method, device, storage medium and electronic equipment provided by the application can generate palm vein image data under condition control, can make the generated image data more suitable for various complex real scenes, thereby ensuring the diversity and authenticity of the palm vein image data, and can provide high-quality and diversified data sources for the training, optimization and application of the palm vein recognition model, and can also solve the problem of scarcity of image data for model training, and ensure the training effect and generalization ability of the palm vein recognition model. In addition, the application introduces a cross-attention layer into the diffusion model, focuses on the generation of blood vessel detail areas, and strengthens the learning of subtle features, so as to generate image data that meets the training requirements of high-precision recognition models.

[0018] The above description is only a summary of the technical scheme of the application. In order to more clearly understand the technical means of the application, the application can be implemented according to the content of the specification, and in order to make the above and other purposes, features and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS

[0019] The drawings described herein are used to provide further understanding of the application, and form a part of the application. The schematic embodiments of the application and the description thereof are used to explain the application, and do not constitute an improper limitation on the application. In the drawings:

[0020] Figure 1 A flowchart of a palm vein image generation method provided by an embodiment of the application is shown;

[0021] Figure 2 A flowchart of a preset diffusion model training method provided by an embodiment of the application is shown;

[0022] Figure 3 A whole framework diagram of image data generation provided by an embodiment of the application is shown;

[0023] Figure 4 A framework diagram of a preset diffusion model training process provided by an embodiment of the application is shown;

[0024] Figure 5A schematic structural diagram of a palm vein image generating device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0025] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.

[0026] The existing palm vein image data collected under standard conditions is difficult to cover the complex scenarios in actual applications. The image data lacks diversity and has poor practicality, which makes the trained model susceptible to interference in real scenarios and reduces the recognition accuracy.

[0027] In order to solve the above problems, the embodiment of the present invention provides a palm vein image generation method, such as Figure 1 As shown, the method includes:

[0028] Step 101: Obtain an initial noise image, diffusion steps, and condition control information.

[0029] The condition control information includes individual identification, palm posture information, and lighting information used to simulate real-world scenarios. Individuals include people, and the individual identification can specifically be an ID used to distinguish individual identities. The palm posture information can specifically be a palm posture value, with different palm posture values ​​representing different palm postures, including slightly open fingers, tilted fingers, and naturally extended fingers. The lighting information can specifically be a lighting value, with different lighting values ​​representing different lighting conditions, including bright lighting and dim lighting. Furthermore, the diffusion step number specifically refers to the number of time steps in the diffusion model.

[0030] The embodiment of the present invention is mainly applicable to the scenario of generating palm vein image data for model training. The execution subject of the embodiment of the present invention is a device or equipment capable of generating palm vein image data, which can be specifically set on the server side.

[0031] In this embodiment of the present invention, users can pre-configure conditional control information on the user side, namely, individual identity, palm pose information, and illumination information. Specifically, to generate image data for an individual already in the training sample library, they can directly select the identity ID of the existing individual (e.g., ID001) to generate additional image data for the existing individual. To generate image data for an individual not in the training sample library (an unknown individual), they can select the unknown individual option. Subsequently, the identity of the unknown individual and its corresponding embedding vector are automatically generated using relevant algorithms. Furthermore, users can also configure the palm pose value, illumination value, and diffusion step number according to actual needs. For example, they can set the palm pose value to 15, the illumination value to 20, and the diffusion step number to 1000. After configuring the conditional control information and diffusion step number, they click the Data Generation button to send a data generation instruction to the server. This instruction carries the user-configured conditional control information and diffusion step number.

[0032] After receiving the data generation instruction, the server parses the data generation instruction to obtain the condition control information and the number of diffusion steps. At the same time, the standard normal distribution is used to sample x t ~ N (0, I), and get the initial noise image.

[0033] By introducing individual identity identifiers, the present invention enables precise control over the generation of palm vein image data in different configurations for the same individual. This ensures the consistency and uniqueness of biometric features, as well as the stability of palm vein features for the same individual under different conditions, thereby improving the recognition accuracy of the trained model. Furthermore, by simultaneously specifying a combination of "same individual / different individuals + different postures + different lighting conditions," the present invention ensures both precision and flexibility in conditional control, enabling precise control over image generation.

[0034] Step 102: Generate a conditional control embedding vector according to the conditional control information.

[0035] For an embodiment of the present invention, after the server obtains the initial noise image, the number of diffusion steps, and the conditional control information, a conditional control embedding vector is generated. For this process, step 102 specifically includes: determining the embedding vectors corresponding to the individual identity identifier, the palm posture value, and the illumination value respectively; horizontally splicing the embedding vectors corresponding to the individual identity identifier, the palm posture value, and the illumination value respectively to generate the conditional control embedding vector.

[0036] Specifically, word embedding can be used to determine the embedding vectors corresponding to the individual identity, palm posture value, and illumination value, respectively. Then, the embedding vectors corresponding to the individual identity, palm posture value, and illumination value are horizontally spliced ​​to obtain the conditional control embedding vector.

[0037] For example, the embedding vector corresponding to the individual identity is , the embedding vector corresponding to the palm posture value is , the embedding vector corresponding to the illumination value is , and then Merge into conditional control vector .

[0038] By conditionally controlling the embedding vector, the present invention enables multi-dimensional control over the generated image data. Furthermore, by encoding an individual's ID as a feature vector, the present invention enables precise control over the generation of different palm vein image data for the same individual, thereby ensuring the consistency and uniqueness of the biometric features.

[0039] Furthermore, when specifically determining the embedding vector corresponding to the individual identity identifier, if the individual identity identifier is the same individual identity identifier (an existing individual identity identifier), the existing individual identity identifier (target identity identifier) ​​is directly obtained, and its corresponding embedding vector is determined as the embedding vector corresponding to the same individual identity identifier. For example, there is currently a palm vein image of individual A with palm posture a under lighting condition 1, and the identity identifier of individual A is ID001. Now we want to generate palm vein data of individual A with palm posture b under lighting condition 2. Since the image data generated is the same individual, when determining the embedding vector corresponding to the individual identity identifier, the identity identifier ID001 of individual A is directly obtained, and the embedding vector corresponding to ID001 is determined.

[0040] If the individual identity is a different individual identity, that is, an unknown individual identity, then the embedding vector corresponding to the different individual identity is generated by a linear interpolation algorithm based on the embedding vector corresponding to the existing individual identity. For example, the palm vein image data of individual A and individual B already exist in the current training sample library. The identity of individual A is ID001, and the embedding vector corresponding to ID001 is , the identity of individual B is ID002, and the embedding vector corresponding to ID002 is Now we want to generate palm vein image data of an unknown individual or virtual individual C. At this time, we can use the embedding vector corresponding to ID001 as The embedding vector corresponding to ID002 is , using the linear interpolation algorithm , calculate the embedding vector corresponding to the identity of virtual individual C.

[0041] In addition to using linear interpolation to generate embedding vectors corresponding to different individual identities, Gaussian sampling can also be used. , randomly generate embedding vectors corresponding to different individual identities, where the cosine similarity between the embedding vectors corresponding to different individual identities is less than the preset similarity. For example, the palm vein image data of individual A already exists in the current training sample library. Individual A’s identity is ID001, and the embedding vector corresponding to ID001 is Now we want to generate the palm vein image data of an unknown individual or virtual individual D. At this time, we can use Gaussian sampling to generate the embedding vector corresponding to the identity of individual D. , and The cosine similarity between them is less than 0.3.

[0042] By encoding individual IDs as feature vectors, this embodiment of the present invention can precisely control the generation of palm vein image data of different forms for the same individual, as well as for different individuals, thereby ensuring the consistency and uniqueness of biometric features. Furthermore, by employing linear interpolation or Gaussian sampling, this embodiment of the present invention can expand virtual individual IDs, thereby addressing the scarcity of training samples.

[0043] Step 103: Input the initial noise image, the number of diffusion steps, and the conditional control embedding vector into a preset diffusion model to predict the noise corresponding to each time step.

[0044] Among them, the preset diffusion model is a model that has been pre-trained and fine-tuned. The preset diffusion model can adopt the UNet network. The UNet network mainly includes a linear layer, a cross-attention layer and a multi-scale feature layer. During prediction, the encoding vector corresponding to the diffusion step number t and the conditional control embedding vector are mapped through the linear layer and input into the cross-attention layer for calculation to obtain the fused features. The fused features are added to the multi-scale feature layer through the residual connection.

[0045] In the embodiment of the present invention, the initial noise image x t , the diffusion step number t and the conditional control embedding vector c are input into the preset diffusion model to predict the noise ε corresponding to each time step θ .

[0046] Step 104: gradually update the image according to the predicted noise corresponding to each time step, and finally output the target palm vein image under the conditional control information.

[0047] For the embodiment of the present invention, the noise ε corresponding to each time step output by the preset diffusion model is θ The image is gradually updated using a Bayesian update algorithm to obtain a clear palm vein image, and the clear palm vein image is determined as the target palm vein image. The specific formula of the Bayesian update algorithm is as follows:

[0048]

[0049] in, is the initial noise image corresponding to time step t, is the noise image corresponding to time step t-1, is the cumulative noise factor, , , , this formula represents cumulative multiplication, the time interval is s to t, The value at time s is expressed as , is the value set according to actual needs, ε θ is the noise predicted by the preset diffusion model, is randomly sampled Gaussian noise. Therefore, by gradually updating and iterating according to the above Bayesian update algorithm, after completing T steps of iteration, the clear image x0 can be restored and output as the target palm vein data image. This allows the generation of diverse and practical palm vein generation data, thus expanding the training sample data.

[0050] In specific application scenarios, when generating palm vein image data for the same individual, the individual's identity can be fixed. By adjusting the palm pose and illumination values, palm vein image data for the same individual in different poses under different lighting conditions can be generated. For example, by controlling the palm pose value, image data for the same individual with the palm rotated 10 degrees and 15 degrees can be generated. When generating image data, the image data for the same individual share the initial noise seed z, and only the non-identity parameters (palm pose and illumination values) in the conditional control information need to be adjusted.

[0051] When generating palm vein image data for different individuals, linear interpolation or Gaussian sampling can be used to generate embedding vectors corresponding to the virtual individual's identity. By controlling the palm pose and illumination values, palm vein image data with mixed features can be generated, thereby improving the model's generalization capabilities. When generating image data, different noise perturbations z can be introduced into the image data of different individuals to generate palm vein image data with subtle structural variations, enhancing the recognition model's ability to resist interference.

[0052] An embodiment of the present invention provides a palm vein image generation method that generates palm vein image data through conditional control, making the generated image data more suitable for various complex real-world scenarios, thereby ensuring the diversity and authenticity of the palm vein image data. This provides a high-quality, diverse data source for the training, optimization, and application of palm vein recognition models. This method also addresses the scarcity of image data used for model training, ensuring the training effectiveness and generalization capabilities of the palm vein recognition model. Furthermore, by introducing a cross-attention layer into the diffusion model, the embodiment of the present invention focuses on the generation of vascular detail areas, enhancing the learning of subtle features, and generating image data that meets the training requirements of high-precision recognition models.

[0053] Furthermore, before using the preset diffusion model to generate palm vein image data, the embodiment of the present invention needs to train the diffusion model in advance. For the training process of the diffusion model, such as Figure 2 As shown, the method includes:

[0054] Step 105: Collect real palm vein images of different individuals with different palm postures under different lighting conditions.

[0055] For this embodiment of the present invention, real palm vein images were collected from different individuals (aged 18-70, left and right hands) to construct a raw data set. After data collection, low-quality samples with blur, occlusion, and severe artifacts were manually filtered to remove, retaining clear and complete palm vein data. This ensured that a single individual contained at least three real palm vein images in different postures (e.g., slightly open, tilted, and naturally extended fingers) and different lighting conditions.

[0056] Step 106: Construct a noise image sample based on the real palm vein image.

[0057] In this embodiment of the present invention, after acquiring a real palm vein image, noise image samples are constructed to train a diffusion model. Regarding the process of constructing the noise image samples, the method includes: preprocessing the real palm vein image to obtain a preprocessed real palm vein image; adding an identity identifier to the preprocessed real palm vein image to obtain real palm vein image samples, wherein the real palm vein image samples of the same individual have the same identity identifier; and gradually adding Gaussian noise to the real palm vein image samples to obtain noise image samples.

[0058] Specifically, the collected real palm vein images are uniformly processed. The central region of the image is cropped to a fixed size of 256×256 pixels. The cropped image is then grayscale normalized, mapping the pixel values ​​to the range of 0-255 to eliminate the effects of illumination variations. High-frequency noise is then removed using Gaussian filtering to obtain the preprocessed real palm vein image. After preprocessing, a unique identifier (such as ID001 and ID002) is added to each individual's set of real image data. A mapping relationship between the image and the identifier is established, ultimately resulting in a real palm vein image sample.

[0059] Furthermore, from the real palm vein image samples Starting from, by gradually adding Gaussian noise , construct a noisy image sequence , where the noise variance Time step Finally, the above noise image sequence is used as a sample. The specific formula is as follows:

[0060]

[0061] in, is the noise image sample corresponding to time step t, is the cumulative noise factor .

[0062] Step 107: construct an initial diffusion model, and pre-train the initial diffusion model based on the noise image sample to obtain a pre-trained diffusion model.

[0063] The initial diffusion model includes a UNet network, which is used for denoising. The UNet network mainly consists of a linear layer, a cross-attention layer, and a multi-scale feature layer. During prediction, the encoding vector corresponding to the diffusion step (time step) t and the conditional control embedding vector are mapped through the linear layer and input into the cross-attention layer for calculation to obtain fused features. The fused features are then added to the multi-scale feature layer through a residual connection.

[0064] In the embodiment of the present invention, the noise image sample is first used to pre-train the initial diffusion model. Specifically, the noise image sample and the time step (such as T=1000) are input into the initial diffusion model to perform noise prediction, and the predicted sample noise is obtained. Then, the noise image sample is pre-trained according to the predicted sample noise. and the real sample noise ε, construct the noise loss, and finally pre-train the initial diffusion model based on the noise loss, that is, optimize the network parameters so that the model has the ability to recover the image from the noise. Among them, the noise loss function L1 is as follows:

[0065]

[0066] wherein, is the predicted sample noise, and ε is the real sample noise.

[0067] Step 108, constructing a target palm vein image sample.

[0068] For the embodiment of the present application, after pre-training the initial diffusion model, in order to make the image data generated by the trained diffusion model more consistent with the collected data of the real scene, it is also necessary to fine-tune the pre-trained diffusion model. The overall data processing flow of the embodiment of the present application is as shown in Figure 3 Specifically, part of the real palm vein image samples collected before can be extracted as the target palm vein image sample, so as to fine-tune the pre-trained diffusion model based on the target palm vein image sample.

[0069] Step 109, fine-tuning the pre-trained diffusion model according to the target palm vein image sample to obtain the preset diffusion model.

[0070] For the embodiment of the present application, when fine-tuning the pre-trained diffusion model, step 109 specifically includes: gradually adding Gaussian noise to the target palm vein image sample to obtain a target noise image sample; for any one of the target noise image samples, determining a first sample condition control embedding vector according to the any one of the target noise image samples and its corresponding target identity identifier; inputting the any one of the target noise image samples and the first sample condition control embedding vector into the pre-trained diffusion model for processing to obtain a first generated image; determining a second sample condition control embedding vector according to other target noise image samples also having the target identity identifier; inputting the other target noise image samples and the second sample condition control embedding vector into the pre-trained diffusion model for processing to obtain a second generated image; extracting feature vectors corresponding to the first generated image and the second generated image respectively by using a preset palm vein recognition model; calculating an identity consistency loss according to the feature vectors corresponding to the first generated image and the second generated image respectively; determining a total loss according to the noise loss and the identity consistency loss; fine-tuning the pre-trained diffusion model based on the total loss to obtain the preset diffusion model.

[0071] Specifically, when determining the first sample condition control embedding vector corresponding to any one of the target noise image samples, an identity embedding vector , which is used to distinguish individual identities. At the same time, the palm keypoint model is used to calculate the palm pose value corresponding to any noisy image sample. The palm keypoint model adopts the OpenPose model architecture. OpenPose first extracts image features corresponding to the noisy image sample using a convolutional neural network (CNN). It then uses a series of convolutional and upsampling layers to predict a heatmap of palm keypoints. In the heatmap, the value of each pixel represents the probability that the location belongs to a keypoint on the hand (such as a fingertip or palm). The heatmap is then post-processed by finding the local maximum points in the heatmap to determine the position coordinates of each keypoint in the image. Finally, based on the position coordinates of the extracted keypoints, the palm pose value is calculated. This is done by comparing the angle between the line connecting the palm keypoints (such as the thumb tip, index finger tip, palm, etc.) and a reference direction (such as the horizontal or vertical axis of the image) to calculate the rotation angle of the hand. Specifically, the vector dot product formula can be used to calculate the angle between two vectors. Assume that vector A is the vector from the palm to the tip of the index finger, and vector B is the reference direction (for example, a horizontal vector pointing to the right), then the angle between the two vectors is (Palm posture value ) can be calculated by the following formula,

[0072]

[0073] Furthermore, the overall grayscale value corresponding to any noise image sample is calculated, and based on this grayscale value, the illumination value is determined. Specifically, the grayscale histogram of the noise image sample is determined, and the mean of the grayscale histogram is calculated. The mean of the histogram can approximately represent the average brightness of the image and can be used as the illumination value.

[0074] Furthermore, after determining the palm posture value and illumination value, the embedding vector corresponding to the palm posture value is determined respectively. Embedding vector corresponding to the light value , and then embed the identity into the vector , the embedding vector corresponding to the palm posture value , the embedding vector corresponding to the illumination value Merge into the first sample conditional control embedding vector Then, any noise image sample, the first sample conditional control embedding vector and the number of time steps (such as T=1000) are input into the pre-trained diffusion model for processing, and the first generated image is finally obtained. Continue to select other noise image samples with the same identity as any noise image sample, that is, the two noise image samples come from the same individual, and perform the above operation on other noise image samples to obtain the second generated image Furthermore, the feature vectors corresponding to the first generated image are extracted using the preset palm vein recognition model. and the feature vector corresponding to the second generated image , where the preset palm vein recognition model can be specifically ResNet-18, which can be used as an image feature editor. The extracted feature vector has two characteristics: the cosine similarity between the feature vectors of different images of the same individual is greater than the first preset similarity (such as 0.9), and the cosine similarity between the feature vectors of different individual images is less than the second preset similarity (such as 0.3). This part can be used for the following consistency loss constraint to further improve the training accuracy of the diffusion model. Then, according to the feature vector corresponding to the first generated image and the feature vector corresponding to the second generated image , calculate the identity consistency loss L2, the specific formula is as follows:

[0075] L2 = 1 - cos ( , )

[0076] From this, we can get the total loss function L, the specific formula is as follows:

[0077] L = L1 + λL2

[0078] Here, λ is the weight coefficient, which can be set according to actual business needs, such as setting λ=0.5.

[0079] Finally, according to the calculated total loss, the pre-trained diffusion model is fine-tuned to obtain the preset diffusion model. The overall training process of the model is as follows: Figure 4 When fine-tuning the model, the embodiment of the present invention embeds c into the multi-scale feature layer of the pre-trained diffusion model through the cross attention layer, thereby achieving multi-dimensional control of the generated image.

[0080] The diffusion model trained in the embodiment of the present invention can accurately generate palm vein image data of the same individual or different individuals by controlling the input conditions. The trained diffusion model can parse the input identity information. For example, through a specific identity code or embedding vector, when generating image data of the same individual, the diffusion model can lock the individual identity characteristics, ensuring that although the generated multiple images have certain changes in posture, lighting conditions, etc., the core identity characteristics remain consistent. When generating image data of different individuals, the model can generate palm vein image data with clear distinction based on different identity identification inputs, thereby meeting the palm vein recognition model's requirements for learning diverse individual characteristics.

[0081] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in this embodiment provides a palm vein image generation device, such as Figure 5As shown, the device includes: an acquisition unit 31, a generation unit 32, a prediction unit 33 and an output unit 34.

[0082] The acquisition unit 31 may be used to acquire an initial noise image, diffusion steps, and condition control information, wherein the condition control information includes an individual identity identifier, and palm posture information and lighting information for simulating a real scene.

[0083] The generating unit 32 may be configured to generate a conditional control embedding vector according to the conditional control information.

[0084] The prediction unit 33 can be used to input the initial noise image, the diffusion step number and the conditional control embedding vector into a preset diffusion model to predict the noise corresponding to each time step, wherein the preset diffusion model includes a linear layer, a cross-attention layer and a multi-scale feature layer. During prediction, the encoding vector corresponding to the diffusion step number and the conditional control embedding vector are mapped through the linear layer and input into the cross-attention layer for calculation to obtain a fused feature, and the fused feature is added to the multi-scale feature layer through a residual connection.

[0085] The output unit 34 may be configured to gradually update the image according to the predicted noise corresponding to each time step, and ultimately output the target palm vein image under the conditional control information.

[0086] In some embodiments, the palm gesture information includes a palm gesture value, the illumination information includes an illumination value, and the generating unit 32 includes a determining module and a generating module.

[0087] The determination module may be configured to determine embedding vectors corresponding to the individual identity identifier, the palm posture value, and the illumination value, respectively.

[0088] The generation module can be used to horizontally splice the embedding vectors corresponding to the individual identity identifier, the palm posture value, and the illumination value to generate the conditional control embedding vector.

[0089] In some embodiments, when the individual identity identifier is the same individual identity identifier, the determination module can be specifically used to obtain the embedding vector corresponding to the target identity identifier, and determine the embedding vector corresponding to the target identity identifier as the embedding vector corresponding to the same individual identity identifier.

[0090] In some embodiments, when the individual identity identifier is a different individual identity identifier, the determination module can also be specifically used to generate the embedding vector corresponding to the different individual identity identifier through a linear interpolation algorithm based on the embedding vector corresponding to the existing individual identity identifier; or randomly generate the embedding vector corresponding to the different individual identity identifier through Gaussian sampling, wherein the cosine similarity between the embedding vectors corresponding to the different individual identity identifiers is less than a preset similarity.

[0091] In some embodiments, the output unit 34 can be specifically used to gradually update the image through a Bayesian update algorithm according to the predicted noise corresponding to each time step, to obtain a clear palm vein image, and determine the clear palm vein image as the target palm vein image.

[0092] In some embodiments, the acquisition unit 31 may be specifically configured to obtain the initial noise image by sampling using a standard normal distribution.

[0093] In some embodiments, the apparatus further comprises: a construction unit, a pre-training unit, an extraction unit, and a fine-tuning unit.

[0094] The acquisition unit 31 may also be used to collect real palm vein images of different individuals with different palm postures under different lighting conditions.

[0095] The construction unit can be used to construct a noise image sample based on the real palm vein image.

[0096] The pre-training unit can be used to construct an initial diffusion model and pre-train the initial diffusion model based on the noise image sample to obtain a pre-trained diffusion model.

[0097] The extraction unit can be used to construct a target palm vein image sample.

[0098] The fine-tuning unit may be configured to fine-tune the pre-trained diffusion model according to the target palm vein image sample to obtain the preset diffusion model.

[0099] In some embodiments, the construction unit can be specifically used to preprocess the real palm vein image to obtain a preprocessed real palm vein image; add an identity identifier to the preprocessed real palm vein image to obtain a real palm vein image sample, wherein the real palm vein image samples of the same individual have the same identity identifier; and gradually add Gaussian noise to the real palm vein image sample to obtain a noise image sample.

[0100] In some embodiments, the pre-training unit can be specifically used to input the noise image sample and time step number into the initial diffusion model for noise prediction to obtain predicted sample noise; construct a noise loss based on the predicted sample noise and the actual sample noise; and pre-train the initial diffusion model based on the noise loss to obtain the pre-trained diffusion model.

[0101] In some embodiments, the fine-tuning unit can be specifically used to gradually add Gaussian noise to the target palm vein image sample to obtain a target noise image sample; for any one noise image sample among the target noise image samples, determine a first sample conditional control embedding vector based on the any one noise image sample and its corresponding target identity identifier; input the any one noise image sample and the first sample conditional control embedding vector into the pre-trained diffusion model for processing to obtain a first generated image; determine a second sample conditional control embedding vector based on other noise image samples that also have the target identity identifier; input the other noise image samples and the second sample conditional control embedding vector into the pre-trained diffusion model for processing to obtain a second generated image; use a preset palm vein recognition model to extract feature vectors corresponding to the first generated image and the second generated image respectively; calculate identity consistency loss based on the feature vectors corresponding to the first generated image and the second generated image respectively; determine the total loss based on the noise loss and the identity consistency loss; based on the total loss, fine-tune the pre-trained diffusion model to obtain the preset diffusion model.

[0102] It should be noted that for other corresponding descriptions of the functional units involved in the palm vein image generation device provided in this embodiment, please refer to Figure 1 and Figure 2 The corresponding description in will not be repeated here.

[0103] Based on the above Figure 1 and Figure 2 The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, this embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The palm vein image generation method shown.

[0104] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), and includes a number of instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0105] Based on the above Figure 1 and Figure 2 The method shown, and Figure 5 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides an electronic device, which can be a personal computer, a tablet computer, a server, or other network equipment, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The palm vein image generation method shown.

[0106] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and the like. The user interface may include a display screen and an input unit such as a keyboard. Optional user interfaces may also include a USB interface and a card reader interface. Optionally, the network interface may include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0107] Those skilled in the art will understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0108] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device, supporting the execution of information processing programs and other software and / or programs. The network communication module is used to enable communication between components within the storage medium, as well as with other hardware and software within the physical information processing device.

[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware.

[0110] The embodiments of the present invention generate palm vein image data through conditional control, making the generated image data more suitable for various complex real-world scenarios, thereby ensuring the diversity and authenticity of the palm vein image data. This in turn provides a high-quality, diverse data source for the training, optimization, and application of palm vein recognition models. This also addresses the scarcity of image data used for model training, ensuring the training effectiveness and generalization capabilities of the palm vein recognition model. Furthermore, by introducing a cross-attention layer into the diffusion model, the embodiments of the present invention focus on the generation of vascular detail areas, enhancing the learning of subtle features, and generating image data that meets the training requirements of high-precision recognition models.

[0111] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.

[0112] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.

Claims

1. A palm vein image generation method, characterized in that: include: Acquire an initial noise image, a diffusion step number, and condition control information, wherein the condition control information includes an individual identity identifier, and palm posture information and lighting information for simulating a real scene; generating a conditional control embedding vector according to the conditional control information; Inputting the initial noise image, the diffusion step number, and the conditional control embedding vector into a preset diffusion model to predict the noise corresponding to each time step, wherein the preset diffusion model includes a linear layer, a cross attention layer, and a multi-scale feature layer. During prediction, the encoding vector corresponding to the diffusion step number and the conditional control embedding vector are mapped through the linear layer and then input into the cross attention layer for calculation to obtain a fused feature, which is added to the multi-scale feature layer through a residual connection; The image is gradually updated based on the predicted noise corresponding to each time step, and ultimately a target palm vein image under the conditional control information is output. When generating target palm vein images of the same individual, the image data shares an initial noise seed, and only the palm posture information and the illumination information are adjusted. When generating target palm vein images of different individuals, embedding vectors corresponding to the identity identifiers of the different individuals are determined, and the palm posture information and the illumination information are adjusted simultaneously.

2. The method according to claim 1, characterized in that The palm posture information includes a palm posture value, the illumination information includes an illumination value, and generating a conditional control embedding vector according to the conditional control information includes: Determining embedding vectors corresponding to the individual identity identifier, the palm posture value, and the illumination value, respectively; The embedding vectors corresponding to the individual identity identifier, the palm posture value, and the illumination value are horizontally spliced ​​to generate the conditional control embedding vector.

3. The method according to claim 2, characterized in that When the individual identity identifiers are the same individual identity identifier, determining the embedding vector corresponding to the individual identity identifier includes: Obtaining an embedding vector corresponding to a target identity, and determining the embedding vector corresponding to the target identity as the embedding vector corresponding to the same individual identity; When the individual identity identifiers are different individual identity identifiers, determining the embedding vector corresponding to the individual identity identifiers includes: Generate embedding vectors corresponding to the different individual identities using a linear interpolation algorithm based on the embedding vectors corresponding to the existing individual identities; or Embedding vectors corresponding to the different individual identity identifiers are randomly generated through Gaussian sampling, wherein the cosine similarity between the embedding vectors corresponding to the different individual identity identifiers is less than a preset similarity.

4. The method according to claim 1, wherein The step of gradually updating the image according to the predicted noise corresponding to each time step, and finally outputting the target palm vein image under the conditional control information, includes: According to the predicted noise corresponding to each time step, the image is gradually updated by a Bayesian update algorithm to obtain a clear palm vein image, and the clear palm vein image is determined as the target palm vein image; and / or Get the initial noise image, including: The initial noise image is obtained by sampling from a standard normal distribution.

5. The method according to any one of claims 1 to 4, characterized in that Before inputting the initial noise image, the number of diffusion steps, and the conditional control embedding vector into a preset diffusion model to predict the noise corresponding to each time step, the method further includes: Collect real palm vein images of different individuals with different palm postures under different lighting conditions; constructing a noise image sample according to the real palm vein image; Constructing an initial diffusion model, and pre-training the initial diffusion model based on the noise image sample to obtain a pre-trained diffusion model; Construct target palm vein image samples; The pre-trained diffusion model is fine-tuned according to the target palm vein image sample to obtain the preset diffusion model.

6. The method according to claim 5, characterized in that The step of constructing a noise image sample according to the real palm vein image includes: Preprocessing the real palm vein image to obtain a preprocessed real palm vein image; adding an identity identifier to the preprocessed real palm vein image to obtain a real palm vein image sample, wherein the real palm vein image samples of the same individual have the same identity identifier; gradually adding Gaussian noise to the real palm vein image samples to obtain noise image samples; and / or The pre-training of the initial diffusion model based on the noise image sample to obtain the pre-trained diffusion model includes: Inputting the noise image sample and the time step number into the initial diffusion model to perform noise prediction to obtain predicted sample noise; Constructing a noise loss according to the predicted sample noise and the actual sample noise; The initial diffusion model is pre-trained based on the noise loss to obtain the pre-trained diffusion model.

7. The method according to claim 6, characterized in that The step of fine-tuning the pre-trained diffusion model according to the target palm vein image sample to obtain the preset diffusion model includes: gradually adding Gaussian noise to the target palm vein image samples to obtain target noise image samples; For any one of the target noise image samples, determining a first sample conditional control embedding vector according to the any one noise image sample and its corresponding target identity; Inputting the arbitrary noise image sample and the first sample conditional control embedding vector into the pre-trained diffusion model for processing to obtain a first generated image; Determining a second sample conditional control embedding vector based on other noise image samples that also have the target identity identifier; Inputting the other noise image samples and the second sample conditional control embedding vector into the pre-trained diffusion model for processing to obtain a second generated image; extracting feature vectors corresponding to the first generated image and the second generated image respectively using a preset palm vein recognition model; Calculating identity consistency loss based on feature vectors corresponding to the first generated image and the second generated image respectively; determining a total loss based on the noise loss and the identity consistency loss; Based on the total loss, the pre-trained diffusion model is fine-tuned to obtain the preset diffusion model.

8. A palm vein image generating device, characterized in that: include: an acquisition unit, configured to acquire an initial noise image, a diffusion step number, and condition control information, wherein the condition control information includes an individual identity identifier, and palm posture information and lighting information for simulating a real scene; a generating unit, configured to generate a conditional control embedding vector according to the conditional control information; a prediction unit, configured to input the initial noise image, the number of diffusion steps, and the conditional control embedding vector into a preset diffusion model to predict the noise corresponding to each time step, wherein the preset diffusion model includes a linear layer, a cross-attention layer, and a multi-scale feature layer; during prediction, the encoding vector corresponding to the number of diffusion steps and the conditional control embedding vector are mapped through the linear layer and then input into the cross-attention layer for calculation to obtain a fused feature, which is added to the multi-scale feature layer through a residual connection; The output unit is configured to gradually update the image based on the predicted noise corresponding to each time step, and ultimately output a target palm vein image under the conditional control information. When generating target palm vein images of the same individual, the image data shares an initial noise seed, and only the palm posture information and the illumination information are adjusted. When generating target palm vein images of different individuals, embedding vectors corresponding to the identity identifiers of the different individuals are determined, and the palm posture information and the illumination information are adjusted simultaneously.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Identity consistency palm vein image generation method and system

    CN118710758A

  • Trusted surface defect detection method and equipment based on Bayesian condition diffusion model

    CN119399210A