Tomato Maturity Detection and Counting Model Based on MHSA-YOLOv8.
Ping Li1, Jishu Zheng1, Peiyuan Li1
1Chongqing Academy of Agricultural Sciences, Chongqing 401329, China.
Sensors (Basel, Switzerland)
|August 12, 2023
Summary
This study introduces MHSA-YOLOv8 for automated tomato grading and counting, improving efficiency in agriculture. The AI model accurately assesses fruit maturity and quantity, aiding digital supervision and precision farming operations.
Area of Science:
- Agricultural Engineering
- Computer Vision
- Artificial Intelligence
Background:
- Manual tomato grading and counting are labor-intensive, time-consuming, and prone to human error.
- Digital supervision and precision agriculture require automated solutions for fruit growth monitoring.
- Integrating artificial intelligence and machine vision offers a promising approach to overcome manual limitations.
Purpose of the Study:
- To develop an automated system for tomato fruit maturity grading and counting.
- To enhance the capabilities of object detection models for agricultural applications.
- To improve the efficiency and accuracy of tomato harvesting and grading processes.
Main Methods:
- Collected a tomato fruit image dataset from real production environments, accounting for occlusion and lighting variations.
- Proposed MHSA-YOLOv8, an object detection model incorporating the MHSA attention mechanism to improve feature extraction.
- Developed and evaluated models for both tomato maturity grading and fruit counting.
Main Results:
- The MHSA-YOLOv8 model achieved high performance in tomato maturity grading (Precision: 0.806, Recall: 0.807, F1-score: 0.806, mAP50: 0.864).
- The counting model demonstrated excellent accuracy (Precision: 0.990, Recall: 0.960, F1-score: 0.975, mAP50: 0.916).
- The developed models are effective for both online and offline detection scenarios.
Conclusions:
- The MHSA-YOLOv8 based system significantly enhances automated tomato maturity grading and counting.
- The proposed method offers a robust solution for complex agricultural environments.
- This technology can substantially boost harvesting and grading efficiency for tomato growers.


