YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness
Open Access
Abstract
This study addresses the challenges of tomato maturity recognition in natural environments, such as occlusion caused by branches and leaves, and the difficulty in detecting stacked fruits. To overcome these issues, we propose a novel YOLOv8n-CA method for tomato maturity recognition, which defines four maturity stages: unripe, turning color, turning ripe, and fully ripe. The model is based on the YOLOv8n architecture, incorporating the coordinate attention (CA) mechanism into the backbone network to enhance the model’s ability to capture and express features of the tomato fruits. Additionally, the C2f-FN structure was utilized in both the backbone and neck networks to strengthen the model’s capacity to extract maturity-related features. The CARAFE up-sampling operator was integrated to expand the receptive field for improved feature fusion. Finally, the SIoU loss function was used to solve the problem of insufficient CIoU of the original loss function. Experimental results showed that the YOLOv8n-CA model had a parameter count of only 2.45 × 106, computational complexity of 6.9 GFLOPs, and a weight file size of just 4.90 MB. The model achieved a mean average precision (mAP) of 97.3%. Compared to the YOLOv8n model, it reduced the model size slightly while improving accuracy by 1.3 percentage points. When compared to seven other models—Faster R-CNN, YOLOv3s, YOLOv5s, YOLOv5m, YOLOv7, YOLOv8n, YOLOv10s, and YOLOv11n—the YOLOv8n-CA model was the smallest in size and demonstrated superior detection performance.Keywords
Funding Information
- Education Department of Jiangsu Province: the Postgraduate Research & Practice Innovation Program of Jiangsu Province (SJCX24_2211)
- Yangzhou University: High-end Talent Support Program of Yangzhou University (SJCX24_2211)
This publication has 21 references indexed in Scilit:
- Object detection and tracking in Precision Farming: a systematic reviewComputers and Electronics in Agriculture, 2024
- Machine vision algorithm for detection and maturity prediction of BrinjalSmart Agricultural Technology, 2024
- Comprehensive visual information acquisition for tomato picking robot based on multitask convolutional neural networkBiosystems Engineering, 2024
- Detection of tomato plant phenotyping traits using YOLOv5-based single stage detectorsComputers and Electronics in Agriculture, 2023
- Machine vision system for real-time debris detection on mechanical wild blueberry harvestersSmart Agricultural Technology, 2022
- In-field pose estimation of grape clusters with combined point cloud segmentation and geometric analysisComputers and Electronics in Agriculture, 2022
- Real-time growth stage detection model for high degree of occultation using DenseNet-fused YOLOv4Computers and Electronics in Agriculture, 2022
- Automatic visual estimation of tomato cluster maturity in plant rowsMachine Vision and Applications, 2021
- Development of a sweet pepper harvesting robotJournal of Field Robotics, 2020
- Integrating machine vision-based row guidance with GPS and compass-based routing to achieve autonomous navigation for a rice field weeding robotPrecision Agriculture, 2019