# Single-Pixel Imaging Based on Enhanced Multi-Network Prior
## 3 Multi-Network Prior Reconstruction Method
### Single-Pixel Imaging Based on EMNP  
There are some limitations in extracting prior information from single-channel networks. SAE and Unet have different advantages in single-pixel imaging reconstruction. SAE has a strong ability to extract global information, and Unet has a strong ability to extract detailed information. Therefore, multi-network single-pixel reconstruction selects SAE for preliminary reconstruction and Unet for deep reconstruction. The output of SAE is concatenated with the output of Unet, and the result of the concatenation is output after fusion. The training process will adjust the fusion weights of the two networks. The fusion of the two networks uses an adaptive regularization coefficient adjustment method (ARCA) [26]. The EMNP-SPI reconstruction block diagram is shown in Figure 4.  
The loss function uses MSE loss. During training, we minimize the output of the multi-network, D(x), to satisfy Equation (4). \[\text{Loss}_{\text{MSE}}=\text{E}_{\text{x}}\Big{[}\|\text{D}(\text{x})-\text {x}\|^{2}\Big{]} \tag{4}\]  
The total loss refers to the loss between the final output and the target, the SAE loss refers to the loss between the SAE network output and the target, and the Unet loss refers to the loss between the Unet network output and the target. In order to give full play to the advantages of different networks, the loss function uses the sum of total loss, SAE loss and Unet loss. The loss function of the two networks has an adjustable coefficient, as shown in Equation (5). \[\text{Loss}_{final}=\text{Loss}_{total}+\text{aLoss}_{SAE}+\text{bLoss}_{ Unet} \tag{5}\]  
Figure 3: This is the structure of the UNet Network. (**a**) The detailed structure of Unet network. (**b**) The symbol legend of Unet network. There are a variety of solving methods, such as the augmented Lagrange multiplier (ALM), the alternating direction augmented Lagrange multiplier method (ADMM), and the gradient descent method [46; 47; 48]. Among them, the solving of augmented ALM and ADMM is decomposed into minimum value solving problems without penalty terms. The number of iterations is very large, resulting in the reconstruction time showing an exponential growth trend with the size of the image. However, the reconstruction time of the gradient descent method is much less than that of the previous two, so we finally choose the gradient descent method to solve the above formula. The solving algorithm steps are shown in Algorithm 1. ```
1: Initialization: \(x^{0}\)
2: for \(k=1,2,...,K\)do
3:\(\
abla f(x^{k})\approx\frac{f(x^{k}+a)-f(x^{k}-a)}{2\mu}\)
4: while the following equation is satisfied to stop iterating:
5:\(\
abla f\left(x^{k}\right)<loss\_max\)
6: end(while)
7: update\(x^{k+1}=x^{k}-\
abla f(x)\times leaning\_rate\)
8: end(for)
9: Output: \(x^{k+1}\)
```  
**Algorithm 1** The algorithm steps for solving with the gradient method  
The key to the gradient descent method is the accuracy of gradient solving. There are two traditional methods for calculating gradients: the analytical method and the numerical method. The method is to find the expression of the gradient function and find its limit value. However, it is difficult to find the expression of most functions, and it is easy to make mistakes. Considering the accuracy of gradient calculation, we choose the numerical method, which calculates the gradient by estimating the derivative through the calculation of the infinitesimal change of the variable. In the research process, it is necessary to use the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) of the reconstructed image and the original image to analyze and discuss the experimental results. The calculation formula is as follows:  
\[\text{PSNR}=2\text{log}_{10}\frac{\text{Max}(\hat{\kappa})}{\left\|\text{x}- \hat{\kappa}\right\|_{2}} \tag{6}\]  
Figure 4: This is the structure of EMNP-SPI. In Equation (6), x is the original image and \(\hat{\kappa}\) is the reconstructed image.