An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment
The ripeness of tomatoes is a critical factor influencing both their quality and yield. Currently, the accurate and efficient detection of tomato ripeness in greenhouse environments, along with the implementation of selective harvesting, has become a topic of significant research interest. In respon...
Saved in:
| Main Authors: | , , , , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
MDPI AG
2025-04-01
|
| Series: | Agriculture |
| Subjects: | |
| Online Access: | https://www.mdpi.com/2077-0472/15/9/936 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1850030570559504384 |
|---|---|
| author | Haoran Sun Qi Zheng Weixiang Yao Junyong Wang Changliang Liu Huiduo Yu Chunling Chen |
| author_facet | Haoran Sun Qi Zheng Weixiang Yao Junyong Wang Changliang Liu Huiduo Yu Chunling Chen |
| author_sort | Haoran Sun |
| collection | DOAJ |
| description | The ripeness of tomatoes is a critical factor influencing both their quality and yield. Currently, the accurate and efficient detection of tomato ripeness in greenhouse environments, along with the implementation of selective harvesting, has become a topic of significant research interest. In response to the current challenges, including the unclear segmentation of tomato ripeness stages, low recognition accuracy, and the limited deployment of mobile applications, this study provided a detailed classification of tomato ripeness stages. Through image processing techniques, the issue of class imbalance was addressed. Based on this, a model named GCSS-YOLO was proposed. Feature extraction was refined by introducing the RepNCSPELAN module, which is a lightweight alternative that reduces model size. A multi-dimensional feature neck network was integrated to enhance feature fusion, and three Semantic Feature Learning modules (SGE) were added before the detection head to minimize environmental interference. Further, Shape_IoU replaced CIoU as the loss function, prioritizing bounding box shape and size for improved detection accuracy. Experiments demonstrated GCSS-YOLO’s superiority, achieving an average mean average precision mAP50 of 85.3% and F1 score of 82.4%, outperforming the SSD, RT-DETR, and YOLO variants and advanced models like YOLO-TGI and SAG-YOLO. For practical deployment, this study deployed a mobile application developed using the NCNN framework on the Android platform. Upon evaluation, the model achieved an RMSE of 0.9045, an MAE of 0.4545, and an R<sup>2</sup> value of 0.9426, indicating strong performance. |
| format | Article |
| id | doaj-art-62a8b85e03214a368f867314cf7a0b7b |
| institution | DOAJ |
| issn | 2077-0472 |
| language | English |
| publishDate | 2025-04-01 |
| publisher | MDPI AG |
| record_format | Article |
| series | Agriculture |
| spelling | doaj-art-62a8b85e03214a368f867314cf7a0b7b2025-08-20T02:59:11ZengMDPI AGAgriculture2077-04722025-04-0115993610.3390/agriculture15090936An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse EnvironmentHaoran Sun0Qi Zheng1Weixiang Yao2Junyong Wang3Changliang Liu4Huiduo Yu5Chunling Chen6College of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaCollege of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaCollege of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaCollege of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaCollege of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaCollege of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaCollege of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, ChinaThe ripeness of tomatoes is a critical factor influencing both their quality and yield. Currently, the accurate and efficient detection of tomato ripeness in greenhouse environments, along with the implementation of selective harvesting, has become a topic of significant research interest. In response to the current challenges, including the unclear segmentation of tomato ripeness stages, low recognition accuracy, and the limited deployment of mobile applications, this study provided a detailed classification of tomato ripeness stages. Through image processing techniques, the issue of class imbalance was addressed. Based on this, a model named GCSS-YOLO was proposed. Feature extraction was refined by introducing the RepNCSPELAN module, which is a lightweight alternative that reduces model size. A multi-dimensional feature neck network was integrated to enhance feature fusion, and three Semantic Feature Learning modules (SGE) were added before the detection head to minimize environmental interference. Further, Shape_IoU replaced CIoU as the loss function, prioritizing bounding box shape and size for improved detection accuracy. Experiments demonstrated GCSS-YOLO’s superiority, achieving an average mean average precision mAP50 of 85.3% and F1 score of 82.4%, outperforming the SSD, RT-DETR, and YOLO variants and advanced models like YOLO-TGI and SAG-YOLO. For practical deployment, this study deployed a mobile application developed using the NCNN framework on the Android platform. Upon evaluation, the model achieved an RMSE of 0.9045, an MAE of 0.4545, and an R<sup>2</sup> value of 0.9426, indicating strong performance.https://www.mdpi.com/2077-0472/15/9/936tomato detectionripenessYOLOv8sandroid deploymentgreenhouse environment |
| spellingShingle | Haoran Sun Qi Zheng Weixiang Yao Junyong Wang Changliang Liu Huiduo Yu Chunling Chen An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment Agriculture tomato detection ripeness YOLOv8s android deployment greenhouse environment |
| title | An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment |
| title_full | An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment |
| title_fullStr | An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment |
| title_full_unstemmed | An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment |
| title_short | An Improved YOLOv8 Model for Detecting Four Stages of Tomato Ripening and Its Application Deployment in a Greenhouse Environment |
| title_sort | improved yolov8 model for detecting four stages of tomato ripening and its application deployment in a greenhouse environment |
| topic | tomato detection ripeness YOLOv8s android deployment greenhouse environment |
| url | https://www.mdpi.com/2077-0472/15/9/936 |
| work_keys_str_mv | AT haoransun animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT qizheng animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT weixiangyao animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT junyongwang animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT changliangliu animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT huiduoyu animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT chunlingchen animprovedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT haoransun improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT qizheng improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT weixiangyao improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT junyongwang improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT changliangliu improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT huiduoyu improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment AT chunlingchen improvedyolov8modelfordetectingfourstagesoftomatoripeninganditsapplicationdeploymentinagreenhouseenvironment |