## 2 Materials and Methods
### Neural Network Training and Model-Specific Overview  
It is essential to adjust the weights during model training to achieve the best classification results. The weights are gradually modified to increase the accuracy of the outcomes. Log loss/binary cross-entropy is a commonly used loss function for binary classification tasks. Various gradient-based optimization algorithms are available to optimize the learning process and thus lower the value of the loss function, including Adam and RMSprop. The learning rate needs to be manually set. Monitoring the loss function during training and adjusting the learning rate accordingly are essential. \begin{table}
\begin{tabular}{c c} \hline \hline
**Type of Model** & **Basic Architectural Attributes** \\ \hline \multirow{6}{*}{Standard VGG19 model} & \multirow{2}{*}{19 layers} & Input characteristics \\ \cline{3-3}  & & RGB images of size 224 \(\times\) 224 \\  & & Input matrix: (224, 224, 3) \\ \cline{3-3}  & & Output characteristics \\ \cline{3-3}  & & Softmax activation function \\ \hline \multirow{6}{*}{New VGG19-inspired model} & Eight new layers on top of a frozen, pre-trained VGG19 model \\  & & Input matrix: (128, 128, 3) \\  & & The new model has 75,074 trainable parameters \\ \hline \multirow{6}{*}{Standard InceptionResNetV2 model} & \multirow{2}{*}{164 layers} & Input characteristics \\ \cline{3-3}  & & RGB images of size 299 \(\times\) 299 \\  & & Input matrix: (299, 299, 3) \\ \cline{3-3}  & & Output characteristics \\ \cline{3-3}  & & Softmax activation function \\ \hline \multirow{6}{*}{New InceptionResNetV2-inspired model} & Four new layers on top of a frozen, pre-trained model \\  & & Input matrix: (128, 128, 3) \\ \cline{3-3}  & & The model has 54,673,507 trainable parameters \\ \hline \multirow{6}{*}{New custom CNN model} & \multirow{2}{*}{ \begin{tabular}{c} 54,673,507 trainable parameters \\ 960 non-trainable parameters \\ 1,898,202 parameters in total \\ \end{tabular}  } & Input characteristics \\ \cline{3-3}  & & \multicolumnCallbacks such as ModelCheckpoint and ReduceLROnPlateau can automate tasks and optimize the training process. ModelCheckpoint saves the model at a specific frequency at the end of every epoch. ReduceLROnPlateau reduces the learning rate if the monitored classification quality metric is not improving. Implementing these callbacks can help achieve better accuracy and faster training times. In summary, adjusting weights and loss function, selecting the appropriate learning rate, monitoring the training process, and using callbacks are essential components in optimizing a model's training process [25; 26; 27]. To ensure high-quality classification in all models, the accuracy and loss function were carefully monitored during the training. If the loss function value ceased to improve, the learning rate was automatically decreased in all cases. Once the training was complete, the best-performing epoch was identified, and the associated weights and the entire model were saved. The training parameters of different models are summarized in Table 4.  
During the binary classification training task, the performance of the first three distinct models was evaluated based on their validation accuracy (see Figures 3-5). The custom CNN model achieved the highest value for accuracy of 98.21%, followed by the InceptionResNetV2-based model with a score of 97.20%. This particular model performed the classification task by sorting the data into three distinct classes instead of two as in the other models. This is also why the appearance of the graphs (see Figure 4) was different. The VGG-19-based model had the lowest performance, with a validation accuracy of 83%. Based on the overall performance in the binary classification task, the custom CNN model was determined to be the most appropriate architecture for the investigated problem.