# GAN-Based Inversion of Crosshole GPR Data to Characterize Subsurface Structures
## 2 Methodology
### Network Performance Evaluation  
We use the mean square error (MSE) as the loss function to evaluate the difference between the predicted defect reconstruction image and the ground truth; it is defined as  
\[\text{MSE}(P_{\text{pre}},P_{\text{real}})=\frac{1}{m}\sum_{i=1}^{m}(p_{\text{ pre},i}-p_{\text{real},i})^{2}, \tag{4}\]  
where \(P_{\text{pre}}\) and \(P_{\text{real}}\) denote the predicted and real images, respectively, and \(p_{\text{pre},i}\) and \(p_{\text{real},i}\) are the \(i\)-th pixel values of the predicted and real images, respectively. In the training stage, \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{2}{c}{**Low-Resolution Generator**} & \multicolumn{2}{c}{**High-Resolution Generator**} \\ \hline \multirow{2}{*}{**Model Layer**} & **Output Shape** & \multirow{2}{*}{**Model Layer**} & **Output Shape** \\  & **(W, H, C)** & & **(W, H, C)** \\ \hline Deconv2d\_14 & (32, 32, 32) & BN\_25 and Dropout\_25 & (16, 16, 128) \\ BN\_13 and Dropout\_13 & (32, 32, 32) & Deconv2d\_29 & (32, 32, 64) \\ Deconv2d\_15 & (64, 64, 1) & BN\_26 and Dropout\_26 & (32, 32, 64) \\ - & - & Deconv2d\_30 & (64, 64, 32) \\ - & - & BN\_27 and Dropout\_27 & (64, 64, 32) \\ - & - & Deconv2d\_31 & (128, 128, 16) \\ - & - & BN\_28 and Dropout\_28 & (128, 128, 16) \\ - & - & Deconv2d\_32 & (256, 256, 1) \\ - & - & BN\_29 and Dropout\_29 & (256, 256, 1) \\ \hline \multicolumn{2}{c}{**Low-Resolution Discriminator**} & \multicolumn{2}{c}{**High-Resolution Discriminator**} \\ \hline \multirow{2}{*}{**Model Layer**} & **Output Shape** & \multirow{2}{*}{**Model Layer**} & **Output Shape** \\  & **(W, H, C)** & & **(W, H, C)** \\ \hline FC\_2 & (64, 64, 256) & FC\_3 & (256, 256, 256) \\ Conv2d\_11 & (32, 32, 64) & Conv2d\_16 & (128, 128, 64) \\ Conv2d\_12 & (16, 16, 128) & Conv2d\_17 & (64, 64, 128) \\ Conv2d\_13 & (8, 8, 256) & Conv2d\_18 & (32, 32, 256) \\ Conv2d\_14 & (4, 4, 512) & Conv2d\_19 & (16, 16, 512) \\ Conv2d\_15 & (4, 4, 1) & Conv2d\_20 & (16, 16, 1) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._  
Figure 2: Target edge detection process: (**a**) inverted defect reconstruction image, (**b**) Gaussian-blur-algorithm-processed image, and (**c**) Canny-edge-detection algorithm-processed image. the MSE is calculated in each step to guide the weight parameters to be updated. The network reaches the optimum when the MSE no longer decreases [37]. We also introduce the structural similarity index measure (SSIM) to comprehensively evaluate the reconstruction ability of the inversion network [38; 39]; it is defined as  
\[\text{SSIM}(P_{\text{pre}},P_{\text{real}})=(\frac{2\mu_{\text{pre}}\mu_{\text{ real}}+C_{1}}{\mu_{\text{pre}}^{2}+\mu_{\text{real}}^{2}+C_{1}})^{\alpha}+( \frac{2\sigma_{\text{pre}}\sigma_{\text{real}}+C_{2}}{\sigma_{\text{pre}}^{2}+ \sigma_{\text{real}}^{2}+C_{2}})^{\beta}+(\frac{2\sigma_{\text{pre,real}}+C_{3}} {\sigma_{\text{pre}}\sigma_{\text{real}}+C_{3}})^{\gamma}, \tag{5}\]  
where \(\mu_{\text{pre}}\) and \(\mu_{\text{real}}\) are the mean pixel values of the predicted and real images, respectively; \(\sigma_{\text{pre}}\) and \(\sigma_{\text{real}}\) represent the pixel variances of the predicted and real images, respectively; \(\sigma_{\text{pre,real}}\) is the covariance between the predicted and real images; \(C_{1}\), \(C_{2}\), and \(C_{3}\) are constant coefficients that prevent the denominators from reaching zero; and \(\alpha\), \(\beta\), \(\gamma\) are coefficients, with \(\alpha\beta\gamma=1\). The expressions \((\frac{2\mu_{\text{pre}}\mu_{\text{real}}+C_{1}}{\mu_{\text{pre}}^{2}+\mu_{ \text{real}}^{2}+C_{1}})^{\alpha}\), \((\frac{2\sigma_{\text{pre}}\sigma_{\text{real}}+C_{2}}{\sigma_{\text{pre}}^{2} +\sigma_{\text{real}}^{2}+C_{2}})^{\beta}\), and \((\frac{2\sigma_{\text{pre,real}}+C_{3}}{\sigma_{\text{pre}}\sigma_{\text{real} }+C_{3}})^{\gamma}\) quantify the brightness, contrast, and structural similarities between the predicted and real images, respectively.