# Biomedical Image Classification via Dynamically Early Stopped Artificial Neural Network
## 4 Numerical Experiments
### Biomedical Image Classification  
The second part of the numerical experiments involved two types of bidimensional biomedical image datasets for multi-class classification: MedMNIST2D OrganSMNIST ([[https://medmnist.com/](https://medmnist.com/)]([https://medmnist.com/](https://medmnist.com/)), accessed on 1 October 2022) and MedMNIST OCTMNIST ([[https://medmnist.com/](https://medmnist.com/)]([https://medmnist.com/](https://medmnist.com/)), accessed on 1 October 2022) [26; 27]. The former is composed of 25,221 abdominal CT images (the first panel of Figure 2) with labels from 0 to 10, each one corresponding to an organ or a bone of the abdomen. Each image is \(28\times 28\) pixels and the original dataset is split up into training, validation and test sets whose dimensions correspond to 70%, 9% and 21% of the total number of samples, respectively. The second one is made up of 109309 optical coherence tomography (OCT) images for retinal diseases (the second panel of Figure 2) and there are four labels of which three correspond to different diseases and one is related to normal health conditions. Each image is \(28\times 28\) pixels and the original dataset is divided similarly to the previous case.  
\begin{table}
\begin{tabular}{l l c c c c} \hline \hline
**CNN Model** & **Configuration** & \(p\) & \(p\) Decay & **Test Accuracy (\%)** & **\# Epochs** \\ \hline MobileNet & Original & - & - & 65.39 & 200.00 \\ MobileNet & LRBS & 15 & 2 & 65.73 & 80.60 \\ MobileNet & LRBS & 15 & 4 & 65.14 & 81.00 \\ MobileNet & LRBS & 20 & 2 & 65.63 & 91.80 \\ MobileNet & LRBS & 20 & 4 & 65.76 & 98.20 \\ ResNet18 & Original & - & - & 74.86 & 200.00 \\ ResNet18 & LRBS & 15 & 2 & 73.96 & 73.00 \\ ResNet18 & LRBS & 15 & 4 & 74.03 & 67.40 \\ ResNet18 & LRBS & 20 & 2 & 74.30 & 90.20 \\ ResNet18 & LRBS & 20 & 4 & 74.16 & 85.00 \\ VGG16 & Original & - & - & 71.24 & 200.00 \\ VGG16 & LRBS & 15 & 2 & 70.37 & 90.40 \\ VGG16 & LRBS & 15 & 4 & 69.63 & 72.40 \\ VGG16 & LRBS & 20 & 2 & 70.54 & 88.40 \\ VGG16 & LRBS & 20 & 4 & 70.55 & 101.20 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Results obtained on the three CNN models on the CIFAR-100 dataset.  
Figure 1: Performance of the various training for MobileNet on CIFAR-100. The blue bars represent the accuracy on the test set (left axis), the yellow squares report the number of epochs needed (right axis) and the red dotted line is the accuracy provided by the reference training.  
These two applications have been processed on MSI Sword 15 A11 UC-630 XIT with a GPU NVIDIA GeForce RTX 3050 Laptop, CPU i7-11800H, 8 GB of RAM, Windows 11 and Python 3.10.2. We opportunely modified the official code ([[https://github.com/MedMNIST/MedMNIST](https://github.com/MedMNIST/MedMNIST)]([https://github.com/MedMNIST/MedMNIST](https://github.com/MedMNIST/MedMNIST)), accessed on 1 October 2022) which implements various artificial neural networks, from the data splitting point of view. In particular, we divided the dataset into the following disjointed subsets: the 70% of the total examples gives the TS, the 9% is employed for the VS and the remaining 21% of the data forms the test set. Our code is publicly available ([[https://github.com/AmbraCategorzi/ResNet18_Biomedical.git](https://github.com/AmbraCategorzi/ResNet18_Biomedical.git)]([https://github.com/AmbraCategorzi/ResNet18_Biomedical.git](https://github.com/AmbraCategorzi/ResNet18_Biomedical.git)), accessed on 1 October 2022) for the sake of reproducibility.  
For all the experiments, we compared the performance of the ResNet18 model trained by means of:  
* The SG optimizer (3) with \(\beta=0.9\) (hereafter denoted by Original);
* The same optimizer but equipped with a classical early stopping technique (hereafter denoted by ES);
* Algorithm 1 (hereafter denoted by LRBS).  
The hyperparameters setting for all the three optimization techniques are discussed in the following section.