Tomato ripeness and stem recognition based on improved YOLOX - Yanwen Li; Juxia Li; Lei Luo; Lingqi Wang; Qingyu Zhi (Scientific Reports)
Abstract To address the challenges of unbalanced class labels with varying maturity levels of tomato fruits and low recognition accuracy for both fruits and stems in intelligent harvesting, we propose the YOLOX-SE-GIoU model for identifying tomato fruit maturity and stems. The SE focus module was incorporated into YOLOX to improve the identification accuracy, addressing the imbalance in the number of tomato fruits and stems. Additionally, we optimized the loss function to GIoU loss to minimize discrepancies across different scales of fruits and stems. The mean average precision (mAP) of the improved YOLOX-SE-GIoU model reaches 92.17%. Compared to YOLOv4, YOLOv5, YOLOv7, and YOLOX models, the improved model shows an improvement of 1.17–22.21%. The average precision (AP) for unbalanced semi-ripe tomatoes increased by 1.68–26.66%, while the AP for stems increased by 3.78–45.03%. Experimental results demonstrate that the YOLOX-SE-GIoU model exhibits superior overall recognition performance for unbalanced and scale-variant samples compared to the original model and other models in the same series. It effectively reduces false and missed detections during tomato harvesting, improving the identification accuracy of tomato fruits and stems. The findings of this work provide a technical foundation for developing advanced fruit harvesting techniques.