# An Evaluation of Image Slicing and YOLO Architectures for Object Detection in UAV Images
## 4 Performance Metrics  
Confusion matrices are widely used in deep learning to evaluate the performance of classification algorithms. They provide a matrix that compares the true and predicted labels of a dataset and summarizes the effectiveness of a model. The true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN) numbers make up the confusion matrix (TN). Several evaluation metrics can be computed using the following variables: accuracy, precision, recall, and F1-score. The confusion matrix is crucial in evaluating the performance of a model for classification by helping identify which classes the model classifies as true and which are false. Table 3 illustrates the structure of the confusion matrix for three classes: A, B, and C. The definitions of the matrix elements are as follows:  
* TP stands for True Positive and indicates that the predictions labeled as true are correct. * FP for False Positive, and indicates that the predictions labeled as true are actually false. * FN for False Negative, and indicates that the predictions labeled as false are actually true. * TN for True Negative and indicates that the predictions labeled as false are correct. Figure 7: The network structure of the YOLOv9 algorithm. The Intersection over Union (IoU) metric is frequently used in object detection methods to evaluate the precision of predicted bounding boxes. This is determined as the intersection area between the predicted bounding box and the actual bounding box divided by the combined area of the two boxes. IoU values above 0.5 are classed as TP and those below as FP to distinguish between true optimistic (TP) and false positive (FP) predictions. When the model fails to recognize an object that is present in the underlying reality, false negatives (FN) occur. However, true negatives (TN) are not considered during the evaluation process. Recall, often called sensitivity or true positive rate, quantifies the percentage of right detections among all ground truth objects. Precision, a measure of the proportion of correct predictions among all model-generated predictions, is frequently employed in object detection evaluation. Precision and recall are balanced by the F1 Score, a weighted harmonic mean of the two criteria. The mean Average Precision (mAP) evaluation metric, on the other hand, takes precisions and recalls for all object classes into account and averages the results to produce a single overall score. The computations for the sensitivity and specificity metrics are shown in Equations (7) and (8), respectively. \[\text{Precision }=\frac{TP}{TP+FP} \tag{7}\]  
\[\text{Recall }=\frac{TP}{TP+FN} \tag{8}\]  
A performance metric known as Average Precision (AP) is commonly utilized in binary classification tasks to analyze a model's accuracy. As determined by comparing the true positive rate, also known as sensitivity, against the false positive rate, also known as 1-specificity, on a receiver operating characteristic (ROC) curve, AP is derived as the average accuracy values for various recall levels. The ROC curve is produced by changing the classification threshold of the model and charting the associated true positive rate versus the false positive rate. The area under the accuracy-recall curve, which illustrates the connection between precision and recall at different classification levels, is used to calculate AP. The AP formula is provided as shown by Equation (9). \[AP=\int_{0}^{1}p(r)dr \tag{9}\]  
The mean average precision (mAP) is a commonly used metric for evaluating the performance of object detection and image segmentation models. It is calculated as the Average of mean Precision (AP) scores across all classes. The AP score measures the precision at different recall levels, where precision (r) is the precision at a given recall level r, and change in recall (r) is the recall difference between two consecutive recall levels. By considering the precision and recall values at different recall levels, the AP score comprehensively assesses the model's performance.