# Nano Aerial Vehicles for Tree Pollination
## 4 Results  
### Methodology  
The selection of appropriate metrics to evaluate deep learning models depends on the specific problem at hand. Metrics offer distinct perspectives on the performance of a deep learning model and are often used in combination to gain a comprehensive understanding of its behaviour. The metrics listed below are commonly used to evaluate the outcomes of object detection and classification.  
To determine the type of detection, it is necessary to understand the differences between a \"correct detection\" and an \"incorrect detection\". One way is to use the intersection over union (IoU).  
Intersection over Union (IoU) is based on the Jaccard Index, which measures the similarity coefficient for two datasets. In this paper, the IoU is used to measure the area of overlap between two bounding boxes using the ground-truth and predicted bounding boxes.  
We can classify a detection as valid or invalid by comparing the IoU with a given threshold \(t\). If the IoU \(\geq t\), the detection is considered valid and if the IoU \(<t\), it is considered invalid. To determine the types of detections, we utilised the concepts defined below:  
* True Positive (TP): A valid detection of a ground-truth bounding box, i.e., IoU \(\geq t\);
* False Positive (FP): An invalid detection (incorrect detection of a non-existent object or incorrect detection of a ground-truth bounding box), i.e., IoU \(<t\);
* False Negative (FN): An invalid detection of a ground-truth bounding box;
* True Negative (TN): Not applicable in object detection. There is no need to find infinite bounding boxes in each image during object detection.  
The evaluation of the object detection methods mainly involved the concepts of precision and recall:  
* Accuracy calculates the ratio of the number of correct predictions to the total number of predictions:  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN} \tag{1}\]
* Precision measures the ability of the model to identify only the relevant objects, i.e., the percentage of valid detections out of all detections and is calculated by:  
\[Precision=\frac{TP}{TP+FP} \tag{2}\]
* Recall measures the ability of the model to find all ground-truth bounding boxes, i.e., the percentage of valid detections out of all ground truths and is calculated by:  
\[Recall=\frac{TP}{TP+FN} \tag{3}\]
* F1 score represents the harmonic mean between precision and recall and is used to evaluate performance; it is calculated by:  
\[F1\,score=2*\frac{Precision*Recall}{Precision+Recall} \tag{4}\]  
The precision \(\times\) recall curve is a way to evaluate the performance of an object detector. This procedure plots a curve as confidence changes for each object class. A good object detector maintains high precision as recall increases. In other words, by varying the confidence threshold, precision and recall should remain high. A poor object detector for recovering all ground-truth objects (increasing recall) needs to increase the number of detected objects (increasing FP, which implies decreasing precision) to retrieve all ground-truth objects (high recall). Therefore, an optimal detector identifies only the relevant objects (FP = 0, indicating high precision) while finding all ground-truth objects (FN = 0, implying high recall).  
The Average Precision (AP) is another way to evaluate the quality of the object detector. AP compares the performance of object detectors to calculate the area under the precision \(\times\) recall curve. AP is the average precision of all recall values between 0 and 1. Therefore, a high area represents both high precision and recall.  
The mean Average Precision (mAP) is a metric used to measure the accuracy of object detectors across all classes. The mAP is the average AP across all classes. In this case, mAP and AP represent the same value since only one class exists.