## 2 Materials and Methods
### The Design of a Task Method for the Restoration of Damaged Finger Vein Images  
To address the current problem of vein feature information loss in the restored finger vein images, we propose a feature-guided finger vein image restoration method, which consists of two stages: (1) finger vein texture feature restoration network; and (2) original image restoration network. As shown in Figure 5, both stages are based on a generative adversarial model consisting of a generator and a discriminator. Let \(G1\) and \(D1\) be the generator and discriminator for the finger vein texture feature generator, and \(G2\) and \(D2\) be the generator and discriminator for the original image restoration network, respectively. Specifically, we designed the generator for both stages to consist of an encoder that downsamples twice, 8 dilated convolution residual blocks that are replaced by the dilated convolution with an expansion factor of 2, and an up-sampled decoder. We use \(70\times 70\) PatchGAN architecture, which determines whether or not the overlapping image patches of size \(70\times 70\) are real. The damaged texture feature images input to the first stage of the texture feature inpainting network for restoration, which is trained to predict the texture information of the damaged area according to the weights. Then, the original image inpainting network further restores the damaged original image based on the restored texture image feature information as a guide. The method of guiding the restored original image through the features does not suffer from the loss of vein feature detail information. In the following discussion, the specific design ideas of the two stages and the design of the loss function are described separately. 2.1 The First Stage of the Finger Vein Image Damage Restoration Task: Finger Vein Feature Image Restoration  
Assuming that \(I_{R}\) is a region of interest (ROI) image of the finger vein without missing, we extracted the feature texture structure of \(I_{R}\) using the feature extraction method of maximum curvature [29] and obtained the feature texture image \(I_{t}\). We use a randomly generated mask image for \(I_{R}\). Assuming that the generated mask image is \(I_{m}\), then our input finger vein image with damage in this network is \(I_{R\_m}=(I_{R}\odot(1-I_{m}))+I_{m}\) and the corresponding damaged finger vein feature texture image is \(I_{t\_m}=(I_{t}\odot(1-I_{m}))\), where \(\odot\) is the matrix Hadamard product. Our generator network is designed to predict  
Figure 4: The DeblurGAN-v2 architecture of a discriminator. the finger vein texture information in the area covered by the mask image and obtain the repaired finger vein texture image \(I_{t\_p}\), which is defined as follows:  
\[I_{t\_p}=G_{1}(I_{m},I_{R\_m},I_{t\_m}) \tag{7}\]  
We use the generated image \(I_{t\_p}\) from the generator and the undamaged finger vein feature image \(I_{t}\) as input to the discriminator to predict whether the finger vein texture image is realistic or not. In summary, the network is trained and optimized based on the following loss functions, which include the adversarial loss \(\mathcal{L}_{adv,d_{1}}\) and feature-matching loss \(\mathcal{L}_{FM}\)[30]:  
\[\mathcal{L}_{adv,d_{1}}=\mathbb{E}_{(I_{t},I_{R})}[logD_{1}(I_{t},I_{R})]+ \mathbb{E}_{(I_{R})}\big{[}log\big{[}1-D_{1}\big{(}I_{t\_p},I_{R}\big{)}\big{]} \big{]} \tag{8}\]  
\[\mathcal{L}_{FM}=\mathbb{E}\Bigg{\{}\sum_{i=1}^{n}\frac{1}{N_{i}}\Big{\|}D_{1 }^{(i)}(I_{t})-D_{1}^{(i)}\big{(}I_{t\_p}\big{)}\Big{\|}\Bigg{\}} \tag{9}\]  
where the feature matching loss \(\mathcal{L}_{FM}\) is compared to the activation maps that go through the discriminator feature extraction process. This is similar to perceptual loss, where the activation maps are compared with the activation maps from the pre-trained VGG network. In Equation (9), \(n\) is the final convolution layer of the discriminator, \(N_{i}\) is the \(i\)th activation layer, and \(D_{1}^{(i)}\) is the activation in the \(i\)th layer of the discriminator.