On-tree mango detection and size estimation using attention-enhanced mangoYOLO5 and XGBoost regression
摘要
Accurate estimation of mango size during harvesting is essential for optimizing harvest timing, resource allocation, quality control, and profitability in mango cultivation. This paper presents a computer vision based on-tree mango detection using an upgraded MangoYOLO5 model and size estimation from the detected bounding boxes using XGBoost regression analysis. As the accuracy of size estimation depends on the precision of the rendered bounding box, we have focused on improving the detection accuracy by adding spatial and channel attention modules into the MangoYOLO5, a customized YOLOv5 model for mango detection proposed in our previous work. The proposed Attention Enhanced MangoYOLO5 (AE-MangoYOLO5) model focuses on the most relevant parts of the input image, reducing false positives and improving detection accuracy in scenarios involving occlusion and overlapping. The detected bounding box parameters, such as height and width, are correlated with the actual mango dimensions measured using a Vernier Caliper. XGBoost regression with positional loss is used to get the correlation, and an empirical study is conducted by comparing its results with traditional XGBoost, linear, and logistic regression models. A coefficient of determination (