## 3 Materials and Methods
### Transfer Learning Models  
Transfer learning is frequently employed when training neural networks to produce the best results [42; 62]. It can be explained as training a model from start to finish on a dataset with the right amount of data from a related field, then using the target dataset's insufficient data to fine-tune it. Instead of beginning from scratch, this approach initializes the model with a strong foundation [63; 64].  
One of CNN's main flaws is the requirement for a sizable number of training samples. Its depth and number of parameters decide the data volume needed for a network; the more layers and parameters a network has, the more data it needs [65; 66]. Otherwise, there would be a performance-decreasing overfitting issue. However, a significant obstacle in creating DL models for the medical industry is data scarcity. Consequently, it would be advantageous to apply the transfer learning principle to medical projects [12; 67].  
The second iteration of Google's MobileNet network is known as MobileNetV2. The main goal in creating this network is to keep costs and complexity low, making it easy to  
\begin{table}
\begin{tabular}{c c c c c} \hline \multirow{2}{*}{**Dataset**} & \multicolumn{2}{c}{**Class 0**} & \multicolumn{2}{c}{**Class 1**} \\ \cline{2-5}  & **Actual** & **Data Augmented** & **Actual** & **Data Augmented** \\ \hline APTOS & 1805 & 1805 & 295 & 1770 \\ EyePACS & 2010 & 2010 & 708 & 2124 \\ ODIR & 2873 & 2873 & 1608 & 3216 \\ \hline \end{tabular}
\end{table}
Table 2: The data distribution in each class for the three datasets before and after applying data augmentation.  
use for detection and classification on mobile devices or other devices with constrained resources like memory and energy. Low energy consumption models can benefit medical devices and resource-constrained developing nations. It demonstrates potency in extracting features, segmentation, and object detection [68].  
The Visual Geometry Group (VGG) at Oxford University created the model known as VGG16 in 2014. The primary framework VGGNet has given rise to several modifications, including VGG1, VGG13, VGG16, and VGG19. Among those models, the last two versions, VGG16 and VGG19, are considered more common. Medical applications frequently employ the VGG16 architecture to recognize and categorize diverse clinical images [31]. The model's learnable parameter layers are represented by the model's weighted layers, which total 16. Despite having a modest kernel size, it has a very long processing time [19].  
Google created InceptionV3 in 2015 as a third iteration of the InceptionV1 network, also known as GoogLeNet, based on the CNN model [69]. The goal of this version is to use less computational power than earlier versions. It has been demonstrated that Inception models are more efficient than VGG regarding memory usage, calculations, and several noticeably reduced parameters [62].  
Strong gradient flow, efficient computing, smooth error signal propagation, and reduced feature complexity are benefits of the DenseNet121 model. The vanishing gradient problem is the primary goal of this network's construction for the first time [19]. As the number of layers rises, this issue arises. The more information is lost or deleted, the deeper the network is. DenseNet121 resolves this issue by interconnecting the network's layers [52]. The overview of the transfer learning model is depicted in Figure 2.