# Generative Adversarial Networks in Retinal Image Classification
## 4 Experimental Analysis  
We present and discuss the results of the experimental analysis we performed. The goal of this experiment is to determine whether GANs can pose a threat to deep learning-based retina image classification. To achieve this, we exploited a DCGAN to generate a series of synthetic retina images. They then trained multiple classifiers to discern between real-world retina images and artificially generated ones. Thus, we investigate whether the classifiers could accurately differentiate between real and fake retina images. Since the DCGAN generates a new dataset of retina images  
Figure 2: The fake retina image detection step. with each training epoch, the performance of the classifiers was tracked over time. The objective was to assess whether the classifiers' ability to distinguish between real-world and synthetic images would decrease as the training progressed and the generated images presumably became more similar to real retina images. By monitoring the performance of the classifiers, we determine whether the classifiers were successful in correctly identifying real images and distinguishing them from synthetic ones. If the classifiers' performance declined as the training epochs increased, it would indicate that the classifiers struggled to differentiate between real and fake retina images. Overall, the experiment aimed to evaluate the potential threat posed by GANs to deep learning-based retina image classification by examining the classifiers' ability to discern between real-world and artificially generated images as the GAN training progressed. For experimental purposes, we exploit the RetinaMNIST dataset, freely available for research purposes [[https://medmnist.com/](https://medmnist.com/)]([https://medmnist.com/](https://medmnist.com/)) (accessed on 18 August 2023), based on the DeepDRiD challenge, which provides a dataset of 1600 retina fundus images. The retina images are related to the five-level grading of diabetic retinopathy severity. The source images are center-cropped and resized to 3 \(\times\) 28 \(\times\) 28 [16, 17]. In the experimental analysis, the DCGAN was trained for a total of 50 epochs. Each epoch took around 25 seconds to complete, utilizing the computational power of an NVIDIA T4 Tensor Core GPU. For each epoch, the DCGAN generated a batch of 1000 synthetic retina images. In Figure 3 we show a set of images generated by the DCGAN at different epochs and the original input images used for the DCGAN for the fake retina image generation. From the images shown in Figure 3 we consider two different (original) input images (i.e., Real Image Sample #1 and Real Image Sample #2): we can note that at epoch #1 the DCGAN generated only noise (and this is an expected behavior), while in the 25 th epoch the fake images obtained from both sample #1 and #2 are closer to the real images. In the last, the 50 th one, we can note that the images are quite similar to the real ones. To assess the performance of the classifiers, several metrics were considered. These metrics include Precision, Recall, and F-Measure. Precision is a measure of the accuracy of the classifier in identifying true positives among the samples it predicted as positive. It represents the ratio of true positives to the sum of true positives and false positives. A higher precision indicates a lower rate of false positives. It is computed as follows:  
\[\textit{Precision}=\frac{tp}{tp+fp}\]  
where _tp_ indicates the number of true positives and _fp_ indicates the number of false positives. Figure 3: Examples of images generated by the DCGAN at several epochs (i.e., at the 1 st, the 25 th, and the 50 th ones), with the related real images. Recall, also known as sensitivity or true positive rate, measures the ability of the classifier to identify all positive instances correctly. It is calculated as the ratio of true positives to the sum of true positives and false negatives. A higher recall indicates a lower rate of false negatives.