# Food Waste Detection in Canteen Plates Using YOLOv11
## 3 Methods and Methodology
### Methodology
#### 3.2.3 YOLO Benchmarking  
We consider benchmarking as a fundamental practice for evaluating and comparing the performance of different models [35], algorithms, or versions of a system. In object detection tasks, such as identifying FW on canteen plates, selecting the appropriate model can have a significant impact on the accuracy, processing time, and efficiency of the system. The goal of this benchmarking is to provide a fair and detailed comparison between different versions of the model, allowing for the identification of the most suitable solution for the given problem. In order to select the version of YOLO that best suit the project, benchmarking was performed between three versions of the YOLO model, one of the most widely used models for object detection tasks. The versions analyzed were YOLOv5, YOLOv8, and YOLOv11, each with specific characteristics relative to the others. The metrics used for this comparison were the following:  
Figure 4: Example of the rotating DA in the dataset. Precision: Quantifies how many of the positive predictions made by the model are correct, calculated as true positives/(true positives + false positives) [36]. It indicates the model's ability to avoid false alarms. * Recall: Measures how many real positive objects the model was able to detect, calculated as true positives/(true positives + false negatives) [36]. It indicates the model's ability to find all relevant instances. * mAP50 (mean average precision at 50% Intersection over Union (IoU)): Represents the average precision of the model for detections with at least 50% overlap (Intersection over Union, IoU) between the predicted and real bounding boxes [37]. This is a common metric for object detection performance, particularly for general detection accuracy. * mAP50-95 (mean average precision across multiple IoU thresholds): This metric provides a more rigorous evaluation by averaging the precision of the model at several IoU thresholds, ranging from 50% to 95% (e.g., at 0.05 increments). It defines the model's performance across various levels of localization accuracy. These metrics can be calculated using the following Equations (1)-(5) [38]. \[\text{Precision}=\frac{TP}{TP+FP} \tag{1}\]  
\[\text{Recall}=\frac{TP}{TP+FN} \tag{2}\]  
\[\text{mAP}=\frac{1}{N}\sum_{i=1}^{N}AP_{i} \tag{3}\]  
\[\text{mAP50}=\frac{1}{N}\sum_{i=1}^{N}AP_{i50} \tag{4}\]  
\[\text{mAP50-95}=\frac{1}{N}\sum_{i=1}^{N}\frac{1}{10}\sum_{j=1}^{10}AP_{i50+ j5} \tag{5}\]  
The YOLOv5 version was evaluated in our dataset [29], and the results obtained indicate satisfactory performance, especially in the precision metric 0.72 and recall 0.06. The loss graph shows a steady reduction throughout the training, and the model managed to stabilize at a reasonable loss value. The mAP metrics indicate that version 5 obtained results with a mAP50 of 0.061 and mAP50-95 of 0.038, reflecting a relatively low generalization ability (as presented in Figure 5). YOLOv8 showed a slight improvement over YOLOv5, with more stable loss behavior during training. The precision was 0.50 and the recall was 0.23, with the recall showing an improvement compared to the previous version. The mAP50 0.233 and mAP50-95 0.185 indicate that the model has a slightly superior ability to detect objects correctly, but there is still a gap compared to the YOLOv11 version (as presented in Figure 6). The YOLOv11 version demonstrated the best performance among the tested versions, with the lowest loss rate across all metrics, reflecting efficient training and better data fitting. YOLOv11 surpassed the previous versions in terms of recall with a value of 0.33 and nearly matched YOLOv5 in precision with a value of 0.71, with the best score in mAP50 at 0.335 and mAP50-95 at 0.292. This indicates an improved ability to detect objects, especially in cases of lower confidence in predictions, which is crucial for applications such as FW detection (as presented in Figure 7). Figure 5: Training and validation loss and metrics for YOLOv5. Figure 6: Training and validation loss and metrics for YOLOv8.