## 4 Experimental Results
### Image Generation Results  
The CGAN model was trained on the original dataset described in Section 3.2.2, which contains three classes: COVID-19, pneumonia, and normal. Figure 7 shows the CGAN training process in terms of the loss scores of the generator and the discriminator. The training process required about 16 h. The number of epochs, i.e., 2000, was chosen based on the quality of the generated images. We started with 500 epochs and increased the number until we obtained good quality images.  
The generator and discriminator are competing in an adversarial manner; the generator tries to reduce the loss function to fool the discriminator, and the discriminator tries to increase the loss function to distinguish between real and fake images. Our proposed CGAN generated 2790 images for all three classes, COVID-19, pneumonia, and normal, producing 930 images for each. To obtain an overview of the images generated by the CGAN, we present samples of the three classes in Figure 8.  
Figure 7: Generator and discriminator scores of the CGAN through the training process. The CGAN is trained on the whole dataset containing the three classes and then generates images for a given class (given label).  
To validate the images, the VGG16 model was trained on the generated images and tested on the real images only, i.e., Train on Synthetic, Test on Real (TSTR) method. Table 4 shows the performance metrics of the VGG16 for the three classes in terms of recall, precision, and F1-score. Also, the confusion matrix is shown in Figure 9. Focusing on the COVID-19 class, which is the main target of this study. The high values of the VGG16 performance measures indicate that the quality of the generated model is good enough and that the CGAN was able to produce images similar to an extent to the real images. Thus, the generated images were combined with the real images in the training and testing dataset in the following phase to perform COVID-19 detection.  
An experiment was conducted: two measures were used to ensure that the generated images were distinct: MSE and SSIM. To this end, 500 images were randomly selected to calculate these two measures. A value of zero for MSE indicates perfect similarity. A value greater than one implies less similarity and will continue to grow as the average difference between pixel intensities increases as well. The SSIM value can vary between -1 and 1, where the latter indicates perfect similarity.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Recall** & **Precision** & **F1-Score** \\ \hline COVID-19 & 92.4 & 99.1 & 95.63 \\ Normal & 98 & 87.5 & 92.45 \\ Pneumonia & 87 & 91.8 & 89.34 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Performance metrics of image validation using VGG16.  
Figure 8: Sample of the generated images from the three classes by the CGAN.  
In total, the comparison experiment required 124,750 comparisons between these images. The average MSE and SSIM were 5593.47 and 0.22677, respectively. Since the value of MSE is greater than one, and SSIM obtained a number near zero, this means that the CGAN was able to generate distinct images. To obtain an overview of the results, Figure 10 shows samples of the MSE and SSIM values between one image and the remaining images.