## 2 Materials and Methods
### Design of the Experiments  
In this section, we describe the experimental methodology followed in the comparative study: how the training and test sets were designed with the available data, the training strategy, and the parameters selected for each model. We have tried to design an experimental framework that is as similar as possible for all models so that their efficiency results can be comparable. For the training of all models used in this work, the initial set of 739 images was randomly divided into training and test sets with a ratio of 80/20, respectively. * Training set: 290 retinographies of glaucoma and 301 of healthy eyes;
* Test set: 73 glaucoma retinographies and 75 healthy eyes. Figure 14: Architecture of ResMLP. Figure 13: Architecture of ConViT. The training set was further divided into five different training and validation sets following a 5-fold approach. The selected CNN models (VGG19, ResNet50, InceptionV3, and Xception) are available in the Keras module of the Tensorflow v2 package [47]. To adapt these neural network models to our classification problem, we replaced the top layer of each network with a DropOut layer, followed by a Flatten layer, followed by a Dense layer with 128 neurons with RELU activation, followed by a DropOut layer, and finally, a Dense layer with two outputs using the SoftMax activation function. This modification to the original CNNs' architectures has been made because we have found in previous works that it improves the classification efficiency of the CNNs. For VGG19, the DropOut was set to 0.5. For InceptionV3, ResNet50, and Xception, the DropOut was set to 0.2. As for the size of the input layer, it was set to 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 CNN models. First, starting from the pre-trained ImageNet weights, we freeze the base model and train the new top layer for 200 epochs using an Adam optimiser, with a learning rate of 1e-6 and categorical cross-entropy as a loss function (fine tuning). Second, we unfroze the base model and trained the entire model end-to-end for 250 epochs using the same optimiser, with a learning rate of \(10^{-5}\) and the same loss function as before (deep tuning). In all cases, a batch size of 8 was used. Regarding the pre-processing step, we applied the pre-processing function included in Keras to each of the networks. To avoid overfitting, we applied data augmentation to the input samples, consisting of random contrast with a factor of \(+/-\pm 0.3\), random brightness with a factor of \(\pm 0.3\), random horizontal flip, random rotation \(\pm 45^{\circ}\) with \"nearest\" fill mode, random horizontal and vertical translation with a factor of \(\pm 0.05\) with \"nearest\" fill mode, and random zoom with a factor of \(\pm 0.2\) preserving the aspect ratio with \"nearest\" fill mode. The final weights for each model were chosen from the epoch that maximised the validation accuracy among the five folds. This results in 5 different models per CNN architecture, or 20 models in total. On the other hand, the original ViT model is integrated into the Torchvision library of Pytorch [48]. The rest of the ViT models, hybrid systems, and ResMLP network have been obtained from the GitHub of the research groups that created them: CaiT, DeiT, and ResMLP from [49], CeiT from [50], the Swin models from [51], Twins-PCPVT from [52], and ConViT from [53]. We have retained the original architecture of each model, modifying only the last layer to adapt it to our two-class classification problem. For this reason, we replaced the top layer with a dense layer with two outputs. Regarding the DropOut, we have not added additional layers, and it is only used in the models that already have it integrated with its default values. Regarding the size of the input layer, it was set to 224 \(\times\) 224 \(\times\) 3 for all models.