YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness
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 f...
Saved in:
Main Authors: | , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2025-01-01
|
Series: | Agronomy |
Subjects: | |
Online Access: | https://www.mdpi.com/2073-4395/15/1/188 |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
_version_ | 1832589376790462464 |
---|---|
author | Xin Gao Jieyuan Ding Ruihong Zhang Xiaobo Xi |
author_facet | Xin Gao Jieyuan Ding Ruihong Zhang Xiaobo Xi |
author_sort | Xin Gao |
collection | DOAJ |
description | 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 × 10<sup>6</sup>, 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. |
format | Article |
id | doaj-art-0d51b64fae9346439c5fe15b5880f0a0 |
institution | Kabale University |
issn | 2073-4395 |
language | English |
publishDate | 2025-01-01 |
publisher | MDPI AG |
record_format | Article |
series | Agronomy |
spelling | doaj-art-0d51b64fae9346439c5fe15b5880f0a02025-01-24T13:17:06ZengMDPI AGAgronomy2073-43952025-01-0115118810.3390/agronomy15010188YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of RipenessXin Gao0Jieyuan Ding1Ruihong Zhang2Xiaobo Xi3School of Mechanical Engineering, Yangzhou University, Yangzhou 225127, ChinaSchool of Mechanical Engineering, Yangzhou University, Yangzhou 225127, ChinaSchool of Mechanical Engineering, Yangzhou University, Yangzhou 225127, ChinaSchool of Mechanical Engineering, Yangzhou University, Yangzhou 225127, ChinaThis 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 × 10<sup>6</sup>, 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.https://www.mdpi.com/2073-4395/15/1/188tomatoesmaturity detectionimage recognitionYOLOv8 |
spellingShingle | Xin Gao Jieyuan Ding Ruihong Zhang Xiaobo Xi YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness Agronomy tomatoes maturity detection image recognition YOLOv8 |
title | YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness |
title_full | YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness |
title_fullStr | YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness |
title_full_unstemmed | YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness |
title_short | YOLOv8n-CA: Improved YOLOv8n Model for Tomato Fruit Recognition at Different Stages of Ripeness |
title_sort | yolov8n ca improved yolov8n model for tomato fruit recognition at different stages of ripeness |
topic | tomatoes maturity detection image recognition YOLOv8 |
url | https://www.mdpi.com/2073-4395/15/1/188 |
work_keys_str_mv | AT xingao yolov8ncaimprovedyolov8nmodelfortomatofruitrecognitionatdifferentstagesofripeness AT jieyuanding yolov8ncaimprovedyolov8nmodelfortomatofruitrecognitionatdifferentstagesofripeness AT ruihongzhang yolov8ncaimprovedyolov8nmodelfortomatofruitrecognitionatdifferentstagesofripeness AT xiaoboxi yolov8ncaimprovedyolov8nmodelfortomatofruitrecognitionatdifferentstagesofripeness |