## 2 Materials and Methods
### Validation of the Trained Models  
According to [PERSON] et al. [21], a confusion matrix is used to evaluate these metrics. The matrix, as shown in Figure 6, collects the number of samples that fall in each category. True Positive (TP) is when the system classifies a positive object as positive. It also means that the system correctly classifies a positive object. On the other hand, False Positive (FP) means that the system classifies a positive object as negative. This means that the system incorrectly classifies a positive object. Moreover, True Negative (TN) is when the system classifies a negative object as negative, which also means that the system correctly classifies a negative object or an empty image. Lastly, False Negative (FN) means that the system classifies a positive object as negative, which also means that the system fails to detect and classify a positive object.  
The trained models were validated using 450 samples or 23.08% of the total samples used in this study. The metrics used to evaluate the performance of the machine learning-based classifier systems were accuracy, precision, sensitivity, and F1. According to [PERSON] [19], accuracy is defined by the following equation:  
\[Accuracy=\frac{TP+TN}{TP+FN+TN+FP} \tag{3}\]  
where:  
\(TP\) is the true positive sample.  
Figure 6: Confusion matrix used to evaluate the machine learning models.  
_TN_ is the true negative sample.  
_FN_ is the false negative sample.  
_FP_ is the false positive sample.  
It measures performance by obtaining the ratio of the correct prediction to the total number of samples. On the other hand, precision is defined by the following equation:  
\[Precision=\frac{TP}{TP+FP} \tag{4}\]  
where:  
_TP_ is the true positive sample.  
_FP_ is the false positive sample.  
It measures the performance of the system in classifying the detected objects in the image. It is defined as the ratio of correctly classified objects to the total number of detected images. Moreover, sensitivity is defined by the following equation:  
\[Sensitivity=\frac{TP}{TP+FN} \tag{5}\]  
where:  
_TP_ is the true positive sample.  
_FN_ is the false negative sample.  
It is the ratio of correctly classified objects to the number of correctly classified objects and undetected objects within the image. Lastly, F1 is defined by the following equation:  
\[F1=\frac{2\times Precision\times Sensitivity}{Precision+Sensitivity} \tag{6}\]  
It measures the predictive accuracy of the classifier system by taking the harmonic mean of sensitivity and precision.  
Models are evaluated using accuracy, which measures the capability of the model to predict objects correctly. Accuracy is used to evaluate the model's performance, i.e., to determine whether it performed well or not based on a given dataset. According to [PERSON] [22] and [PERSON] [23], a model performs poorly if its accuracy is below 70%. In this case, other models that will perform better should be considered. Moreover, if the model's accuracy is between 70 and 90%, then the model is good and compliant with the industry standard. However, if the model's accuracy is greater than 90%, there is most likely an overfitting in the training or evaluation process. Moreover, a confidence score is used, along with the accuracy metric, which measures the confidence of the model to predict the object. It is a system-generated score that numerically evaluates the detected object. The value can range from 0 to 1, where 0.5 is set to be the standard threshold for accepting this score. A value of at least 0.5 will be accepted and anything below it will be rejected [24].