Tomato detection in natural environment based on improved YOLOv8 network
Abstract
In this paper, an improved lightweight YOLOv8 method is proposed to detect the ripeness of tomato fruits, given the problems of subtle differences between neighboring stages of ripening and mutual occlusion of branches, leaves, and fruits. The method replaces the backbone network of the original YOLOv8 with a more lightweight MobileNetV3 structure to reduce the number of parameters of the model; at the same time, it integrates the convolutional attention mechanism module (CBAM) in the feature extraction network, which enhances the network's capability of extracting features of tomato fruits. At the same time, it introduces the SCYLLA-IoU (SIoU) as a bounded YOLOv8 frame regression loss function, effectively solving the mismatch problem between the predicted frame and the actual frame and improving recognition accuracy. Compared with the current mainstream models Resnet50, VGG16, YOLOv3, YOLOv5, YOLOv7, etc., the model is in an advantageous position regarding precision rate, recall rate, and detection accuracy. The research and experimental results show that the mean values of precision, recall rate, and average precision of the improved MCS-YOLOv8 model under the test set are 91.2%, 90.2%, and 90.3%, respectively. The detection speed of a single image is 5.4ms, and the model occupies less memory by 8.7 M. The model has a clear advantage in both detection speed and precision rate and also shows that the improved MCS-YOLOv8 model can provide strong technical support for tomato-picking robots in complex environments in the field.
Keywords
Supporting Agencies
Hebei Province
References
- Chakroun, I., Haber, T., Ashby, T.J., 2017). SW-SGD: the sliding window stochastic gradient descent algorithm. Procedia Comput. Sci. 108:2318-2322. DOI: https://doi.org/10.1016/j.procs.2017.05.082
- Chen, Q., Yin, C., Guo, Z., Wang, J., Zhou, H., Jiang, X., 2023. Research status and development trend of key technology of apple picking robot. T. CSAE 39:1-15.
- Ge, Z., Liu, S., Wang, F., Li, Z., Sun, J., 2021. Yolox: Exceeding yolo series in 2021. arXiv :2107.08430.
- He, K., Zhang, X., Ren, S., Sun, J., 2016. Deep residual learning for image recognition. Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Las Vegas; pp. 770-778. DOI: https://doi.org/10.1109/CVPR.2016.90
- Hou, Q., Zhou, D., Feng, J., 202). Coordinate attention for efficient mobile network design. Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Nashville.; pp. 13713-13722.
- Li, P., Zheng, J., Li, P., Long, H., Li, M., Gao, L., 2023. Tomato maturity detection and counting model based on MHSA-YOLOv8. Sensors (Basel) 23:6701. DOI: https://doi.org/10.3390/s23156701
- Liu, Y., Shao, Z., Hoffmann, N., 2021. Global attention mechanism: retain information to enhance channel-spatial interactions. arXiv: 2112.0556.
- Long, Y., Yang, Z., He, M., 2023.[ Recognizing apple targets before thinning using improved YOLOv7.[ [Article in Chinese with English abstract]. T. CSAE 39:191-199.
- Luo, Q., Wu, C., Wu, G., Li, W., 2024. A small target strawberry recognition method based on improved YOLOv8n model. IEEE Access 12:14987-14995. DOI: https://doi.org/10.1109/ACCESS.2024.3356869
- Luo, Z., He, C., Chen, D., Li, P., Sun, Q., 2024. A rapid detection model for passion fruit based on lightweight YOLOv8. T. J. Agr. Machin. 1-12.
- Lv, Q., Lin, G., Jiang, J., Wang, M., Zhang, H., Yi, S., 2024. Green citrus fruit detection in natural scenes based on improved YOLOv5s model. T. CSAE 40:147-154.
- Mazen, F.M.A., Nashat, A.A., 2019. Ripeness classification of bananas using an artificial neural network. Arab. J. Sci. Eng. 44:6901-6910. DOI: https://doi.org/10.1007/s13369-018-03695-5
- Miao R, Li Z, Wu J. 2023. A lightweight cherry tomato ripening detection method based on improved YOLO v7. T. J. Agr. Machin. 54:225-233.
- Mim, F.S., Galib, S.M., Hasan, M.F., Jerin, S.A., 2018. Automatic detection of mango ripening stages application of information technology to botany. Sci. Hortic. 237:156-163. DOI: https://doi.org/10.1016/j.scienta.2018.03.057
- Mulyani, E.D.S., Susanto, J.P., 2017. Classification of maturity level of fuji apple fruit with fuzzy logic method. Proc. 5th Int. Conf. on Cyber and IT Service Management (CITSM), Denpasa; pp. 1-4. DOI: https://doi.org/10.1109/CITSM.2017.8089294
- Ouyang, D., He, S., Zhang, G., Luo, M., Guo, H., Zhan, J., Huang, Z., 2023. Efficient multi-scale attention module with cross-spatial learning. Proc. IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), Rhodes Island; pp. 1-5. DOI: https://doi.org/10.1109/ICASSP49357.2023.10096516
- Peng, X., Pan, Q., Tian, N., 2023. WCF-MobileNetV3:Lightweight image recognition network for CXR images of new coronary pneumonia. Comput. Eng. Appl. 59:224-231.
- Qian, S., Ning, C., Hu, Y., 2021. MobileNetV3 for image classification. Proc. 2nd Int. Conf. on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), Nanchang; pp. 490-497 DOI: https://doi.org/10.1109/ICBAIE52039.2021.9389905
- Qiu, Z., Huang, Z., Mo, D., Tian, X., Tian, X., 2024 . GSE-YOLO: a lightweight and high-precision model for identifying the ripeness of pitaya (dragon fruit) based on the YOLOv8n improvement. Horticulturae 10:852. DOI: https://doi.org/10.3390/horticulturae10080852
- Ren, S., He, K., Girshick, R., Sun, J., 2016. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE T. Pattern Anal. 39: 1137-1149. DOI: https://doi.org/10.1109/TPAMI.2016.2577031
- Rezatofighi, H., Tsoi, N., Gwak, J.Y., Sadeghian, A., Reid, I., Savarese, S., 2019. Generalized intersection over union: a metric and a loss for bounding box regression. Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition; pp. 658-666. DOI: https://doi.org/10.1109/CVPR.2019.00075
- Roy, A.M., Bose, R., Bhaduri, J., 2022. A fast accurate fine-grain object detection model based on YOLOv4 deep neural network. Neural Comput. Appl. 34:3895-3921. DOI: https://doi.org/10.1007/s00521-021-06651-x
- Sandler, M., Howard, A., Zhu, M., Andrey, Z., Chen, L., 2018. Mobilenetv2: Inverted residuals and linear bottlenecks. Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition; pp. 4510-4520. DOI: https://doi.org/10.1109/CVPR.2018.00474
- Simonyan, K., Zissermann, A., 2014. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556.
- Sun, Y., He, J., Wei, F., Yang, W., 2023. Development of tomato industry in China and evaluation of its international competitiveness in the 13th Five-Year Plan. China Cucurbit 36:112-116.
- Tan, H., Ma, W., Tian, Y., Zhang, Q., Li, M., Li, M., Yang, X., 2024. Target detection method for balsam pear based on improved YOLOv8n. T. CSAE 40:178-185.
- Tian, Y., Qin, S., Yan, Y., Wang, .J, Jiang, F., 2024. Detection of blueberry ripeness in field complex environment based on improved YOLOv8. T. CSAE 40:153-162.
- Wang, A., Chen, H., Liu, L., Chen, K., Lin, Z., Han, J., Ding, G., 202). Yolov10: Real-time end-to-end object detection. arXiv:2405.14458.
- Wang, Q., Wu, B., Zhu, P., Li, P., Zuo, W., Hu, Q., 2020. ECA-Net: Efficient channel attention for deep convolutional neural networks. Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition; pp. 11534-11542. DOI: https://doi.org/10.1109/CVPR42600.2020.01155
- Wang, X., Song, J., 2021. ICIoU: Improved loss based on complete intersection over union for bounding box regression[J]. IEEE Access 9: 05686-105695. DOI: https://doi.org/10.1109/ACCESS.2021.3100414
- Woo, S., Park, J., Lee, J.Y., Kweon, I.S., 2018. Cbam: Convolutional block attention module. In: Ferrari, V., Hebert, M., Sminchisescu, C., Weiss, Y. (eds.), Computer Vision – ECCV 2018. ECCV 2018. Lecture Notes in Computer Science, vol 11211. Cham, Springer. DOI: https://doi.org/10.1007/978-3-030-01234-2_1
- Xu, X., Zhang, L., Yue, J., Zhong, H., Wang, Y., Liu, J., Qiao, H., 2024. Parallel splicing recognition algorithm for UAV images in farmland environment T. CSAE 40:154-163.
- Zhao, B., Liu, S., Zhang, W., Zhu, L., Han, Z., Feng, X., Wang, R., 2024. Performance optimization of lightweight Transformer architecture for cherry tomato picking. Chin. J. Agr. Machin. 1-13.
- Zheng, Z., Wang, P., Ren, D., Liu, W., Ye, R., Hu, Q., Zuo, W., 2021. Enhancing geometric factors in model learning and inference for object detection and instance segmentation. IEEE T. Cybernetics 52:8574-8586. DOI: https://doi.org/10.1109/TCYB.2021.3095305
Metrics
Citations and online attention from Dimensions, Altmetric and PlumX.
License
Copyright (c) 2025 the Author(s)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
PAGEPress has chosen to apply the Creative Commons Attribution NonCommercial 4.0 International License (CC BY-NC 4.0) to all manuscripts to be published.