A vein authentication method, medium, and device based on network pruning
By optimizing the vein authentication network through network pruning technology, the problem of redundant channels is solved, the ability to extract vein features and the accuracy of authentication are improved, and it is suitable for vein authentication devices in the field of computer vision.
Patent Information
- Application Number
- CN202410431292.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-04-11
AI Technical Summary
Existing convolutional neural networks for vein authentication have redundant channels, resulting in wasted resources and insufficient ability to extract low-level semantic features, which affects their deployment and practicality in industrial equipment.
A network pruning-based approach is adopted, which optimizes the vein authentication convolutional neural network through simulated annealing and an improved ADMM pruning algorithm. Redundant channels are automatically removed, and a vein feature protection layer is introduced to keep the feature dimension unchanged. Combined with global average pooling, the network's ability to extract vein features is improved.
The compression and optimization of the vein authentication network were achieved, which improved the expressive power of vein features, enhanced the robustness and deployment adaptability of the network, and ensured the authentication accuracy in different environments.
Smart Images

Figure CN118230369B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and more specifically, to a vein authentication method, medium, and device based on network pruning. Background Technology
[0002] In the field of biometrics based on physiological characteristics, researchers have studied features including face, iris, fingerprint, palm print, and vein. Among these, fingerprints and face are the most commonly used biometrics. However, as external biometrics, faces and fingerprints can be forged using stolen or copied images. Furthermore, adverse factors such as wear and tear and aging can also affect these characteristics. Veins, as an emerging biometric feature, offer convenient authentication devices similar to fingerprints, giving them certain advantages in authentication principles. In addition, veins are distributed under the skin, thus possessing high stability and security. Moreover, vein imaging relies on the absorption of near-infrared light by deoxyhemoglobin in blood cells, giving it the characteristic of liveness detection. Due to these advantages, vein authentication has received widespread attention.
[0003] Vein authentication relies on texture information present in both vein and non-vein regions of hand vein images for feature extraction. Early vein authentication research primarily relied on handcrafted features to extract vein characteristics. With the rapid development of deep learning, convolutional neural network-based methods have become the mainstream for vein feature extraction in recent years.
[0004] Based on our experience with convolutional neural network-based vein authentication, vein regions in vein images appear as shadow patterns, while non-vein regions appear as bright patterns. This textured shadow pattern is a prominent feature of vein patterns and is generally considered a low-level feature with limited semantic information. However, existing research has paid little attention to the automatic compression of convolutional neural networks for vein authentication, and current convolutional neural networks generally have redundant channels, resulting in unnecessary resource waste. Furthermore, lightweight convolutional neural networks enable fast inference and are highly valuable when deployed in industrial equipment.
[0005] Therefore, there is an urgent need to design a vein authentication method to improve the practicality of vein authentication convolutional neural networks and their ability to extract low-level semantic features. Summary of the Invention
[0006] To overcome the shortcomings and deficiencies of the existing technology, the present invention aims to provide a vein authentication method, medium and device based on network pruning; the method compresses the vein authentication convolutional neural network, automatically removes redundant channels, and ensures the network's ability to extract effective information about vein features.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solution: a vein authentication method based on network pruning, wherein the vein image to be authenticated is input into a vein authentication convolutional neural network based on network pruning for feature extraction, and the vein features to be authenticated are output; the similarity between the vein features to be authenticated and the vein features in the sample library is measured to obtain the authentication result;
[0008] The vein authentication convolutional neural network based on network pruning includes a backbone network, a vein feature protection layer, and global average pooling; the vein authentication convolutional neural network based on network pruning refers to a vein authentication convolutional neural network formed by training an initialized vein authentication convolutional neural network and then pruning and optimizing the network after training.
[0009] Preferably, training the initialized vein authentication convolutional neural network means: inputting a vein image into the initialized vein authentication convolutional neural network, and the initialized vein authentication convolutional neural network outputs vein features; then the vein features are fed into a classifier, and NLL loss is used for supervised training to improve the expressive power of the features.
[0010] Preferably, the network pruning employs a simulated annealing algorithm; the simulated annealing algorithm includes the following steps:
[0011] Step X1: Initialize the pruning rate sequence;
[0012] Step X2: Randomly generate a pruning rate perturbation sequence;
[0013] Step X3: Add the pruning rate sequence and the pruning rate perturbation sequence to obtain a new pruning rate sequence; generate a sampling sequence based on the new pruning rate sequence; sample the backbone network;
[0014] Step X4: Evaluate the performance of the sampled vein authentication convolutional neural network;
[0015] Step X5: Determine whether to accept the new pruning rate sequence based on whether the performance of the vein authentication convolutional neural network corresponding to the new pruning rate sequence is better than that of the vein authentication convolutional neural network corresponding to the original pruning rate sequence.
[0016] Step X6: Lower the temperature and repeat steps X2 to X5 for the next iteration until the temperature drops to the termination temperature.
[0017] Preferably, in step X1, the initialization of the pruning rate sequence is performed as follows: all layers of the backbone network are sorted according to the magnitude of the convolution kernel matrix of each layer of the current backbone network; a random generator is used to generate a random pruning rate sequence for each layer, and layers with large values have large pruning rates; the random pruning rate sequence of each layer is normalized according to the overall pruning rate of the layer.
[0018] Preferably, in step X4, evaluating the performance of the sampled vein authentication convolutional neural network refers to evaluating the equal error rate (EER) of the vein authentication convolutional neural network in the vein dataset.
[0019] Preferably, in step X5, the vein authentication convolutional neural network performance corresponding to the original pruning rate sequence is obtained in the following way:
[0020] In the first iteration, a sampling sequence is generated based on the original pruning rate sequence. The backbone network is sampled, and the performance of the vein authentication convolutional neural network after sampling is evaluated to obtain the vein authentication convolutional neural network performance corresponding to the original pruning rate sequence. In each iteration, the correspondence between the pruning rate sequence, the sampling sequence, and the vein authentication convolutional neural network performance is recorded. In subsequent iterations, the vein authentication convolutional neural network performance corresponding to the original pruning rate sequence is obtained by searching the records based on the correspondence between the original pruning rate sequence and the vein authentication convolutional neural network performance.
[0021] Determining whether to accept a new pruning rate sequence refers to:
[0022] If the performance of the vein authentication convolutional neural network corresponding to the new pruning rate sequence is better than that of the vein authentication convolutional neural network corresponding to the original pruning rate sequence, then the pruning rate sequence is updated to the new pruning rate sequence; otherwise, it is updated to the original pruning rate sequence. The probability of updating the pruning rate sequence to a new pruning rate sequence is ΔE; where ΔE is the increase in the equal error rate EER, and T is the current temperature.
[0023] Preferably, in the vein authentication convolutional neural network, the vein feature protection layer is selected with a 1×1 convolutional kernel, and the number of channels and the number of convolutional kernels are the same as the number of output channels of the last layer of the initialized backbone network.
[0024] Preferably, the network optimization employs an improved ADMM pruning algorithm; the improved ADMM pruning algorithm refers to:
[0025] Define the weights and biases of the i-th layer of the backbone network as W, respectively. i and b i The augmented Lagrangian method is used to decompose the optimization objective of the ADMM pruning algorithm into P rounds of iterations. Each round of iteration performs the following optimization problem in sequence:
[0026]
[0027]
[0028]
[0029] Among them, L N For NLL loss; LC The loss is centered; α and β are L N L C The weighting coefficient; ρ i Let N be the Lagrange multiplier; N is the training period of the optimization problem. These are the auxiliary variables for the k-th and k+1th iterations, respectively. Let be the dual variables of the k-th and k+1-th cycles, respectively; · F The norm can be represented (e.g., L1 norm, L2 norm, etc.); This is an auxiliary variable for the (k+1)th iteration of the loop; express In S i Mapping on; S i Let be the solution space containing the desired weights; is the network weight in the (k+1)th cycle.
[0030] A readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the aforementioned network-pruned vein authentication method.
[0031] A computer device includes a processor and a memory for storing a processor-executable program, wherein when the processor executes the program stored in the memory, it implements the above-described vein authentication method based on network pruning.
[0032] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0033] 1. The present invention first trains the initial convolutional neural network for vein authentication, and then performs network pruning and optimization after training. This can compress the convolutional neural network for vein authentication, automatically remove redundant channels, and ensure the network's ability to extract effective information about vein features.
[0034] 2. This invention uses a simulated annealing algorithm to automatically search for pruning rate sequences, which can automatically and effectively remove some redundant channels and filters, facilitating the deployment of venous networks;
[0035] 3. This invention employs an improved ADMM pruning algorithm for network optimization. Since image data in vein recognition is easily affected by scattering from the skin and tissues, ambient lighting, etc., the optimization algorithm must possess good robustness. The improved ADMM pruning algorithm of this invention introduces the augmented Lagrangian method to address the shortcomings of the ADMM algorithm, and introduces a regularization term, which is beneficial for enhancing the model's robustness to noise in multi-round stochastic gradient optimization. The improved ADMM pruning algorithm used in this invention can improve the problem of reduced network performance after pruning, making the vein authentication convolutional neural network more focused on vein modalities, thereby making the extracted vein features more expressive.
[0036] 4. The vein authentication convolutional neural network of the present invention has a vein feature protection layer, which maintains the dimensionality of the vein features stored in the sample library before and after pruning, making the pruning algorithm compatible with the pruning of the vein authentication convolutional neural network, and also making the pruning algorithm sufficient for pruning the network. Attached Figure Description
[0037] Figure 1 This is a flowchart of a vein authentication method based on network pruning according to the present invention;
[0038] Figure 2 This is a schematic diagram illustrating how the vein feature protection layer maintains the vein feature dimension unchanged during the network pruning process of this invention. Detailed Implementation
[0039] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0040] Example 1
[0041] This embodiment presents a vein authentication method based on network pruning. The vein image to be authenticated is input into a vein authentication convolutional neural network based on network pruning for feature extraction, and the vein features to be authenticated are output. The similarity between the vein features to be authenticated and the vein features in the sample library is measured to obtain the authentication result.
[0042] The vein authentication convolutional neural network based on network pruning includes a backbone network, a vein feature protection layer, and global average pooling. The vein authentication convolutional neural network based on network pruning refers to the vein authentication convolutional neural network formed by training an initial vein authentication convolutional neural network and then pruning and optimizing the network after training.
[0043] Training the initial convolutional neural network for vein authentication involves inputting a vein image into the initial convolutional neural network, which then outputs vein features. These vein features are then fed into a classifier, and supervised training is performed using NLL loss to improve the expressive power of the features.
[0044] Network pruning employs the simulated annealing algorithm. In this embodiment, the initial temperature during the simulated annealing algorithm execution is 100℃, the termination temperature is 20℃, and the cooling rate is 10%; other values can also be used in practical applications. The simulated annealing algorithm includes the following steps:
[0045] Step X1: Initialize the pruning rate sequence. The pruning rate sequence is initialized as follows: sort all layers of the backbone network according to the magnitude of the convolution kernel matrix of each layer of the current backbone network; generate random pruning rate sequences for each layer using a random generator, and make the layers with large values have large pruning rates; normalize the random pruning rate sequences of each layer according to the overall pruning rate of the layer.
[0046] Step X2: Randomly generate the pruning rate perturbation sequence; the pruning rate perturbation sequence is generated by a random generator, and each perturbation value of the pruning rate perturbation sequence is normalized to [-0.35, 0.35].
[0047] Step X3: Add the pruning rate sequence and the pruning rate perturbation sequence to obtain a new pruning rate sequence. This perturbation changes the pruning rate sequence and is a dependency of the simulated annealing algorithm search.
[0048] Based on the new pruning rate sequence, a sampling sequence is generated; the backbone network is sampled, i.e., the backbone network is pruned; the backbone network obtained after sampling is the more important part under the sampling sequence; the importance criterion can be any network filter importance judgment method, such as L2 norm filter importance judgment.
[0049] The vein feature protection layer of the vein authentication convolutional neural network uses 1×1 convolutional kernels. The number of channels and the total number of convolutional kernels are the same as the number of output channels of the last layer of the initialized backbone network. The network pruning algorithm does not prune the number of convolutional kernels in the vein feature protection layer. Figure 2 As shown.
[0050] With the backbone network layer n convolution kernel matrix M l The j-th output channel F l,j Removed, the output feature map x in backbone network layer n l The corresponding j-th output channel will also no longer be generated, and the vein feature protection layer convolution kernel matrix M EP Number of input channels n′ e Consequently, the number of filters in the vein feature protection layer is reduced; however, because the sampling does not prune the number of filters in the vein feature protection layer, the output feature map x of the vein feature protection layer... EP The number of channels is equal to the number of filters in the vein feature protection layer, so the output feature map x of the vein feature protection layer... EP The number of channels remains unchanged. The dimension of the vein features obtained after global average pooling is compared with the output feature map x of the vein feature protection layer. EPThe number of channels is equal. Therefore, after sampling, the dimension of the vein features is consistent with the dimension before sampling, meaning that the dimension of the vein features stored in the sample library remains unchanged before and after pruning. The pruning algorithm is compatible with pruning vein models. In addition, the introduced vein feature protection layer also ensures the sufficiency of the pruning algorithm in pruning the backbone network, without having to refrain from pruning the last module of the backbone network in order to keep the vein feature dimension consistent before and after pruning.
[0051] Step X4: Evaluate the performance of the vein authentication convolutional neural network after sampling; specifically, evaluate the equal error rate (EER) of the vein authentication convolutional neural network in the vein dataset to ensure the network's ability to extract vein features.
[0052] Step X5: Determine whether to accept the new pruning rate sequence based on whether the performance of the vein authentication convolutional neural network corresponding to the new pruning rate sequence is better than that of the vein authentication convolutional neural network corresponding to the original pruning rate sequence.
[0053] The performance of the vein authentication convolutional neural network corresponding to the original pruning rate sequence was obtained in the following way:
[0054] In the first iteration, a sampling sequence is generated based on the original pruning rate sequence. The backbone network is sampled, and the performance of the vein authentication convolutional neural network after sampling is evaluated to obtain the vein authentication convolutional neural network performance corresponding to the original pruning rate sequence. In each iteration, the correspondence between the pruning rate sequence, the sampling sequence, and the vein authentication convolutional neural network performance is recorded. In subsequent iterations, the vein authentication convolutional neural network performance corresponding to the original pruning rate sequence is obtained by searching the records based on the correspondence between the original pruning rate sequence and the vein authentication convolutional neural network performance.
[0055] Determining whether to accept a new pruning rate sequence refers to:
[0056] If the performance of the vein authentication convolutional neural network corresponding to the new pruning rate sequence is better than that of the vein authentication convolutional neural network corresponding to the original pruning rate sequence, then the pruning rate sequence is updated to the new pruning rate sequence; otherwise, it is updated to the original pruning rate sequence. The probability of updating the pruning rate sequence to a new pruning rate sequence is ΔE; where ΔE is the increase in the equal error rate EER, and T is the current temperature.
[0057] Step X6: Lower the temperature and repeat steps X2 to X5 for the next iteration until the temperature drops to the termination temperature.
[0058] Subsequently, the pruned vein authentication convolutional neural network was trained on a public vein dataset using the improved ADMM pruning algorithm, which improved its ability to extract low semantic features from vein images, thus making the pruned vein authentication convolutional neural network more expressive of vein features.
[0059] The existing ADMM pruning algorithm defines the loss function of a convolutional neural network as f({W i},{b i}), where W i and b i These are the weights and biases of the i-th layer, respectively; the network pruning problem can be defined as:
[0060]
[0061] subject to W i ∈S i ,for all i
[0062] Among them, S i Let be the solution space containing the desired weights;
[0063] The ADMM algorithm is used to optimize this problem, as shown below:
[0064]
[0065] subject to W i =Z i i = 1, 2, ..., N
[0066] in, Z i It is an auxiliary variable.
[0067] The improved ADMM pruning algorithm of this invention refers to:
[0068] Define the weights and biases of the i-th layer of the backbone network as W, respectively. i and b i The augmented Lagrangian method is used to decompose the optimization objective of the ADMM pruning algorithm into P rounds of iterations. Each round of iteration performs the following optimization problem in sequence:
[0069]
[0070]
[0071]
[0072] Among them, L N For NLL loss; L C The loss is centered; α and β are L N L C The weighting coefficient; ρ i Let N be the Lagrange multiplier; N is the training period of the optimization problem. These are the auxiliary variables for the k-th and k+1th iterations, respectively. Let be the dual variables of the k-th and k+1-th cycles, respectively; · F The norm can be represented (e.g., L1 norm, L2 norm, etc.); This is an auxiliary variable for the (k+1)th iteration of the loop; express In S i Mapping on; S i W represents the solution space containing the desired weights. i k+1 is the network weight in the (k+1)th cycle.
[0073] The improved ADMM pruning algorithm of this invention introduces the augmented Lagrangian method to address the shortcomings of the ADMM algorithm. It also introduces a regularization term, which is beneficial in multi-round stochastic gradient optimization, i.e., optimization problems. This invention enhances the model's robustness to noise. The improved ADMM algorithm used in this invention mitigates the performance degradation of the network after pruning, allowing the convolutional neural network to focus more on venous modalities, thereby making the extracted venous features more expressive.
[0074] The authentication result is obtained by measuring the similarity between the vein feature to be authenticated and the vein features in the sample library. This means that the vein feature to be authenticated is compared with the vein features in the sample library (the vein features in the sample library refer to the vein features extracted by the vein authentication convolutional neural network based on network pruning proposed in this invention during user registration and registered and saved in the sample library) using cosine distance. If the similarity is greater than the set threshold, the authentication is considered successful; otherwise, the authentication is considered unsuccessful.
[0075] Example 2
[0076] This embodiment provides a readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the vein authentication method based on network pruning as described in Embodiment 1.
[0077] Example 3
[0078] This embodiment discloses a computer device, including a processor and a memory for storing processor-executable programs. When the processor executes the program stored in the memory, it implements the vein authentication method based on network pruning as described in Embodiment 1.
[0079] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A network pruning based vein authentication method, characterized in that: The vein image to be authenticated is input into the vein authentication convolutional neural network based on network pruning for feature extraction, and vein features to be authenticated are output; similarity measurement is performed on the vein features to be authenticated and vein features in the sample library to obtain an authentication result; The vein authentication convolutional neural network based on network pruning comprises a backbone network, a vein feature protection layer and a global average pooling; the vein authentication convolutional neural network based on network pruning is a vein authentication convolutional neural network formed by training an initialized vein authentication convolutional neural network, and performing network pruning and network optimization after the training; the network pruning adopts an annealing algorithm; the annealing algorithm comprises the following steps: Step X1, initializing a pruning rate sequence; Step X2, randomly generating a pruning rate perturbation sequence; Step X3, adding the pruning rate sequence and the pruning rate perturbation sequence to obtain a new pruning rate sequence; generating a sampling sequence according to the new pruning rate sequence; and sampling the backbone network; Step X4, evaluating the performance of the vein authentication convolutional neural network after sampling; Step X5, determining whether to accept the new pruning rate sequence according to whether the performance of the vein authentication convolutional neural network corresponding to the new pruning rate sequence is better than the performance of the vein authentication convolutional neural network corresponding to the original pruning rate sequence; Step X6, reducing the temperature, and repeating steps X2 to X5 to perform the next iteration until the temperature is reduced to a termination temperature; In step X1, the initialization of the pruning rate sequence is performed in the following manner: the backbone network is sorted according to the amplitude of the convolution kernel matrix of each layer of the current backbone network; a random generator is used to generate a random pruning rate sequence for each layer, and the layers with large amplitudes have large pruning rates; and the random pruning rate sequence of each layer is normalized according to the overall pruning rate of the layer. In the vein authentication convolutional neural network, the vein feature protection layer selects a convolution kernel with a size of 1*1, and the number of channels and the number of convolution kernels are the same as the output channel number of the last layer of the initialized backbone network.
2. The network pruning based vein authentication method of claim 1, wherein: The training of the initialized vein authentication convolutional neural network comprises the following steps: inputting a vein image into the initialized vein authentication convolutional neural network, and outputting vein features from the initialized vein authentication convolutional neural network; then the vein features enter a classifier, and an NLL loss is used for supervised training.
3. The network pruning based vein authentication method of claim 1, wherein: In step X4, the evaluation of the performance of the vein authentication convolutional neural network after sampling refers to the evaluation of the equal error rate (EER) of the vein authentication convolutional neural network in a vein dataset.
4. The network pruning based vein authentication method of claim 3, wherein: In step X5, the performance of the vein authentication convolutional neural network corresponding to the original pruning rate sequence is obtained in the following manner: In the first iteration, a sampling sequence is generated according to the original pruning rate sequence, the backbone network is sampled, and the performance of the vein authentication convolutional neural network after sampling is evaluated to obtain the performance of the vein authentication convolutional neural network corresponding to the original pruning rate sequence; In each iteration process, a sequence of pruning rates, a sequence of samplings, and a corresponding relationship between the sequence of pruning rates and the performance of the vein authentication convolutional neural network are recorded; when the iteration is more than twice, the original sequence of pruning rates and the performance of the vein authentication convolutional neural network are looked up in the record according to the corresponding relationship, and the performance of the vein authentication convolutional neural network corresponding to the original sequence of pruning rates is obtained; The judgment whether to accept the new sequence of pruning rates is that: If the vein authentication convolutional neural network corresponding to the new pruning rate sequence performs better than the vein authentication convolutional neural network corresponding to the original pruning rate sequence, the pruning rate sequence is updated to the new pruning rate sequence; otherwise, the pruning rate sequence is updated to the new pruning rate sequence with a probability of ; wherein, ΔE is the equal error rate EER rising value, and T is the current temperature.
5. The network pruning based vein authentication method of claim 1, wherein: The network optimization adopts an improved ADMM pruning algorithm; the improved ADMM pruning algorithm is that: The weights and biases of the i-th layer of the backbone network are defined as W i and b i ; the optimization objective of the ADMM pruning algorithm is decomposed into P rounds of circulation by using the augmented Lagrangian method, and each round of circulation is executed in turn as follows: where L N is the NLL loss; L C is the center loss; a, b are the weight coefficients of L N , L C , respectively; p i is the Lagrange multiplier; N is the period of optimization problem training; are the auxiliary variables of the k, k+1 round of circulation, respectively, are the dual variables of the k, k+1 round of circulation, respectively; ‖·‖ F denotes the norm; is the auxiliary variable of the k+1 round of circulation; denotes the mapping on S i ; S i is the solution space where the expected weights are located; W i k+1 is the network weight of the k+1 round of circulation.
6. A readable storage medium characterized by, The storage medium stores a computer program, and the computer program causes the processor to execute the network pruning based vein authentication method in any one of claims 1-5 when the processor executes the computer program.
7. A computer device comprising a processor and a memory for storing a processor executable program, characterized in that, The processor executes the program stored in the memory, and the network pruning based vein authentication method in any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Method for constructing robust lightweight fall detection neural network under software and hardware constraints
CN115171160A
FECAGhostNet-based light-weight convolutional neural network finger vein recognition method
CN116311403A