## 3 Materials and Methods
### Deep Learning Models  
In this section, we explain how the CNN models used in this work were trained. To do so, we describe how the training and test sets were obtained from the available data, the training strategy, and the parameters selected for each CNN. In training the CNNs for this study, the initial set of 739 images underwent a random division into training and test sets, maintaining an 80/20 proportion, respectively. The training set comprised 290 retinographies of glaucoma and 301 of healthy eyes, while the test set included 73 retinographies of glaucoma and 75 of healthy eyes. Additionally, the training set was further partitioned into five distinct training and validation subsets, employing a 5-fold approach. We selected four prominent convolutional neural network architectures, namely VGG19 [29], ResNet50 [30], InceptionV3 [31], and Xception [32]. The selection of architectures was guided by specific algorithmic features: ResNet50 employs residual connections to facilitate the training of deeper networks; Xception utilizes depthwise separable convolutions to optimize computational efficiency; InceptionV3 benefits from multi-scale feature extraction via parallel convolutions; and VGG19 offers a simpler sequential design known for its performance consistency. These complementary design principles offer diverse algorithmic trade-offs, enriching our analysis pipeline and enabling comparative evaluation across design paradigms. These architectures are widely adopted and have been extensively utilized in the domain of glaucoma diagnosis and other medical fields. They have also been evaluated in similar studies, such as the works analyzed in Section 2. All specified neural network architectures are accessible in the Keras module of the Tensorflow v2 package [33]. To tailor these models to our specific problem, we modified the top layer of each network. The adaptation involved introducing a DropOut layer, succeeded by a Flatten layer, and then a Dense layer featuring 128 neurons with ReLU \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Dataset** & **No. of Healthy Images** & **No. of Glaucoma Images** & **Min. Resolution** & **Max. Resolution** \\ \hline RIM-ONE DL & 313 & 172 & 274 \(\times\) 274 & 793 \(\times\) 793 \\ HUC RGB & 63 & 191 & 520 \(\times\) 520 & 1035 \(\times\) 1035 \\ REFUGE & 1080 & 120 & 268 \(\times\) 268 & 562 \(\times\) 562 \\ DRISHTI-GS1 & 31 & 70 & 450 \(\times\) 450 & 722 \(\times\) 722 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of the datasets used in this work, indicating the number (No.) of healthy images, the number of glaucoma images, and the minimum (Min.) and maximum (Max.) resolution of the cropped images per dataset. activation. Subsequently, another DropOut layer was added, followed by a final Dense layer with two outputs utilizing the SoftMax activation function. The hyperparameters for each model were empirically selected based on the accuracy values obtained for the corresponding validation subset during training. For VGG19, the DropOut rate was set to 0.5, while for InceptionV3, ResNet50, and Xception, it was set to 0.2. Additionally, in these three networks, the BatchNormalization layers were maintained in inference mode to prevent the non-trainable weights from being updated during the training phase. Concerning the size of the Input layer, it was configured as 224 \(\times\) 224 \(\times\) 3 for ResNet50 and VGG19, and 299 \(\times\) 299 \(\times\) 3 for InceptionV3 and Xception. Our training strategy is the same for all the models. First, starting with the pre-trained weights from ImageNet, the base model was frozen and we trained the new top layer for 200 epochs using an Adam optimizer, with a learning rate of 1 \(\times\) 10\({}^{-6}\), and categorical cross-entropy as the loss function. Second, we unfroze the base model, except for the BatchNormalization layers, and trained the entire model end-to-end for 250 epochs, using the same optimizer, with a learning rate of 1 \(\times\) 10\({}^{-5}\), and the same loss function as before.