# A THz Passive Image Generation Method Based on Generative Adversarial Networks
## 4 Results Analyses  
In this section, the performance of the proposed Res-WGAN-GP model and the original WGAN-GP model on the terahertz passive image generation task is evaluated and compared. It is worth noting that due to the particularity of terahertz passive images, there is no public dataset; and to the best of our knowledge, there are currently no research reports on terahertz passive image generation methods, which means that no general evaluation method for terahertz passive image generation can be directly applied. In addition, the Inception Score [19] and Frechet Inception Distance [20] evaluation metrics, commonly used in the optical imagery field, cannot be used in the terahertz passive image generation task. Thus, this section draws on relevant literature to propose an objective evaluation method suitable for the current task. \begin{table}
\begin{tabular}{c c} \hline \hline
**Environments** & **Environment Configuration** \\ \hline \multirow{5}{*}{Software Development Environment} & Windows 10 \\  & Python 3.7.9 \\  & PyTorch 1.7.1 \\  & CUDA 10.1 \\  & CuDNN 7.6.5 \\ \hline \multirow{5}{*}{Hardware Environment} & CPU: Intel core i3-8100 \\  & GPU: Nvidia 2080 Ti \\ \cline{1-1}  & RAM: 32 GB \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The experiment environments. Figure 7: Samples of THz passive image dataset. (**a**) Category 1: carrying a gun model. (**b**) Category 2: carrying a cell phone. (**c**) Category 3: carrying two objects. To verify that the three separately trained models can accurately generate realistic images of the corresponding classes, the cross and hybrid tests are performed, respectively [11]. First, the original dataset is classified according to categories and then train a classification model. Here, the GoogLeNet [21] model is used as the pretrained classification model. Then, 100 fake images for each category are used as the test set. The classification accuracy is the result of the cross test. Secondly, a hybrid test is performed. A batch of generated images is mixed into the real dataset for retraining, and then another batch of generated images is used as a test set to verify whether the classification performance of the network has been improved, which is closer to the actual application scenario. The statistical results of the cross test and the hybrid test are shown in Table 2. It can be seen that the images generated by Res-WGAN-GP model has higher classification accuracy than the original WGAN-GP model, which indicates that the generated images basically belong to the desired category and satisfy the second requirement. In order to verify the diversity of generated images, that is, that the model does not generate one or several images repeatedly, the SSIM indicator [22] is used to evaluate the similarity between the generated images. The calculation formula of SSIM can be expressed as  
\[\text{SSIM}(g_{1},g_{0})=\frac{(2\mu_{1}\mu_{0}+C_{1})(2\sigma_{1,0}+C_{2})}{ \left(\mu_{1}^{2}+\mu_{0}^{2}+C_{1}\right)\left(\sigma_{1}^{2}+\sigma_{0}^{2} +C_{2}\right)} \tag{6}\]  
where \(g_{0}\) is the reference image; \(g_{1}\) denotes the image to be evaluated. \((\mu_{1},\mu_{0})\),\((\sigma_{1},\sigma_{0})\) and \(\sigma_{1,0}\) represent the mean, variance and covariance of the two images, respectively. \(C_{1}\) and \(C_{2}\) are constants, which are used to ensure the stability of the calculation process and can be expressed as  
\[C_{1}=(K_{1}L)^{2},C_{2}=(K_{2}L)^{2} \tag{7}\]  
where \(K_{1}=0.01\), \(K_{2}=0.03\) and \(L\)= 255. Generally, SSIM is a value between 0 and 1. The larger the SSIM value, the higher the similarity between the image to be evaluated and the reference image. If the two images are exactly the same, the SSIM is equal to 1. Specifically, a batch of images was generated for each category, and randomly selected a pair of images to calculate the SSIM value. If the SSIM of the two is equal to 1, it means there is a repeated generation.