## 2 Materials and Methods
### The Design of a Method for Finger Vein Image Deblurring Restoration Tasks
#### 2.1.2 The DeblurGAN-v2 Architecture of Discriminator and Loss Function  
To solve the problem of varying degrees of blurring in images being captured in real situations, we use GAN that can be trained to generate images by finding the best filter using weights trained from the training data, and the trained network is still robust and generalizable. The traditional GAN consists of two models: the discriminator \(D\) and the generator \(G\). The objective function of the traditional GAN network is shown as follows:  
\[\begin{split} min_{C}min_{D}V(D,G)=\mathbb{E}_{x\sim P_{data}(x )}[logD(x)]\\ +\mathbb{E}_{z\sim P_{z}(z)}[log(1-D(G(z)))]\end{split} \tag{3}\]  
It must be noted that the objective function described above is difficult to optimize and can also produce pattern collapse or gradient disappearance during training. To address this shortcoming, in order to improve gradient disappearance and stabilize the training model, Least Squares GAN (LSGAN) [26] attempts to introduce a loss function that provides smoother and unsaturated gradients. Better training stability is obtained by introducing the \(\mathcal{L}_{2}\) loss into LSGAN, where the \(\mathcal{L}_{2}\) loss provides a gradient proportional to that distance, so that false samples further away from the boundary are penalised more. Specifically, the LSGAN function is shown in Equations (4) and (5) as follows:  
\[\begin{split} min_{D}V(D)=\frac{1}{2}\mathbb{E}_{x\sim P_{data}(x )}\Big{[}(D(x)-1)^{2}\Big{]}+\frac{1}{2}\mathbb{E}_{z\sim P_{z}(z)}\Big{[}(D( G(z)))^{2}\Big{]}\end{split} \tag{4}\]  
\[\begin{split} min_{D}V(G)=\frac{1}{2}\mathbb{E}_{z\sim P_{z}(z)} \Big{[}(D(G(z))-1)^{2}\Big{]}\end{split} \tag{5}\]  
Meanwhile, the relativistic discriminator [27] was used on LSGAN to estimate the probability that the provided real data are more real than the randomly sampled fake data. The relativistic discriminator showed more stable and computationally efficient training results. Accordingly, this discriminator network design idea was adopted in this paper. The loss function of the discriminator is expressed as shown in Equation (6):  
\[\begin{split}\mathcal{L}_{D}^{Relativistic}=\mathbb{E}_{x\sim P _{data}(x)}\Big{[}\Big{(}D(x)-\mathbb{E}_{z\sim P_{z}(z)}[(D(G(z))-1)]\Big{)} ^{2}\Big{]}\\ +\mathbb{E}_{z\sim P_{z}(z)}\Big{[}D(G(z))-\mathbb{E}_{x\sim P_{ data}(x)}[D(x)-1]\Big{]}\end{split} \tag{6}\]  
Discriminator networks are used to determine the degree of counterfeiting of the generated images. The processing of local images produces clearer images than the standard discriminator that processes the global image. Most restoration networks currently use the PatchGAN discriminator [28], which operates on image blocks of size \(70\times 70\). However, research has demonstrated that a standard discriminator for processing global images is still essential for images where serious blurring exists [11]. Therefore, in order to exploit the global and local features of finger vein images, we designed a double-scale discriminator that comprises a local discriminator and a global discriminator. The local discriminator uses the PatchGAN structure, which divides the finger vein image into \(70\times 70\) image blocks as the input to the discriminator; the global discriminator is a direct input of the global finger vein image, as shown in Figure 4.