{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,16]],"date-time":"2026-05-16T01:58:48Z","timestamp":1778896728818,"version":"3.51.4"},"reference-count":52,"publisher":"MDPI AG","issue":"15","license":[{"start":{"date-parts":[[2023,7,26]],"date-time":"2023-07-26T00:00:00Z","timestamp":1690329600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Research and Development of Key Technologies and Equipment of Aquaponics Intelligent Factory","award":["CSTB2022TIAD-ZXX0053"],"award-info":[{"award-number":["CSTB2022TIAD-ZXX0053"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>The online automated maturity grading and counting of tomato fruits has a certain promoting effect on digital supervision of fruit growth status and unmanned precision operations during the planting process. The traditional grading and counting of tomato fruit maturity is mostly done manually, which is time-consuming and laborious work, and its precision depends on the accuracy of human eye observation. The combination of artificial intelligence and machine vision has to some extent solved this problem. In this work, firstly, a digital camera is used to obtain tomato fruit image datasets, taking into account factors such as occlusion and external light interference. Secondly, based on the tomato maturity grading task requirements, the MHSA attention mechanism is adopted to improve YOLOv8\u2019s backbone to enhance the network\u2019s ability to extract diverse features. The Precision, Recall, F1-score, and mAP50 of the tomato fruit maturity grading model constructed based on MHSA-YOLOv8 were 0.806, 0.807, 0.806, and 0.864, respectively, which improved the performance of the model with a slight increase in model size. Finally, thanks to the excellent performance of MHSA-YOLOv8, the Precision, Recall, F1-score, and mAP50 of the constructed counting models were 0.990, 0.960, 0.975, and 0.916, respectively. The tomato maturity grading and counting model constructed in this study is not only suitable for online detection but also for offline detection, which greatly helps to improve the harvesting and grading efficiency of tomato growers. The main innovations of this study are summarized as follows: (1) a tomato maturity grading and counting dataset collected from actual production scenarios was constructed; (2) considering the complexity of the environment, this study proposes a new object detection method, MHSA-YOLOv8, and constructs tomato maturity grading models and counting models, respectively; (3) the models constructed in this study are not only suitable for online grading and counting but also for offline grading and counting.<\/jats:p>","DOI":"10.3390\/s23156701","type":"journal-article","created":{"date-parts":[[2023,7,27]],"date-time":"2023-07-27T02:14:48Z","timestamp":1690424088000},"page":"6701","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":111,"title":["Tomato Maturity Detection and Counting Model Based on MHSA-YOLOv8"],"prefix":"10.3390","volume":"23","author":[{"given":"Ping","family":"Li","sequence":"first","affiliation":[{"name":"Chongqing Academy of Agricultural Sciences, Chongqing 401329, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Jishu","family":"Zheng","sequence":"additional","affiliation":[{"name":"Chongqing Academy of Agricultural Sciences, Chongqing 401329, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Peiyuan","family":"Li","sequence":"additional","affiliation":[{"name":"Chongqing Academy of Agricultural Sciences, Chongqing 401329, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Hanwei","family":"Long","sequence":"additional","affiliation":[{"name":"Chongqing Academy of Agricultural Sciences, Chongqing 401329, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Mai","family":"Li","sequence":"additional","affiliation":[{"name":"Chongqing Academy of Agricultural Sciences, Chongqing 401329, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0005-4608-7724","authenticated-orcid":false,"given":"Lihong","family":"Gao","sequence":"additional","affiliation":[{"name":"Chongqing Academy of Agricultural Sciences, Chongqing 401329, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2023,7,26]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"431","DOI":"10.1016\/j.ifacol.2018.08.183","article-title":"Mature Tomato Fruit Detection Algorithm Based on Improved HSV and Watershed Algorithm","volume":"51","author":"Malik","year":"2018","journal-title":"IFAC PapersOnLine"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"171","DOI":"10.13031\/2013.27827","article-title":"Tomato Maturity Evaluation Using Color Image Analysis","volume":"38","author":"Choi","year":"1995","journal-title":"Trans. Am. Soc. Agric. Eng."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Li, B., Lecourt, J., and Bishop, G. (2018). Advances in Non-Destructive Early Assessment of Fruit Ripeness towards Defining Optimal Time of Harvest and Yield Prediction\u2014A Review. Plants, 7.","DOI":"10.3390\/plants7010003"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"35","DOI":"10.1007\/s11554-011-0222-9","article-title":"A Practical Solution for Ripe Tomato Recognition and Localisation","volume":"8","author":"Chen","year":"2013","journal-title":"J. Real Time Image Process."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"111287","DOI":"10.1016\/j.postharvbio.2020.111287","article-title":"Early Discrimination of Mature-and Immature-Green Tomatoes (Solanum lycopersicum L.) Using Fluorescence Imaging Method","volume":"169","author":"Fatchurrahman","year":"2020","journal-title":"Postharvest Biol. Technol."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"167985","DOI":"10.1109\/ACCESS.2020.3023894","article-title":"IHDS: Intelligent Harvesting Decision System for Date Fruit Based on Maturity Stage Using Deep Learning and Computer Vision","volume":"8","author":"Faisal","year":"2020","journal-title":"IEEE Access"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"144","DOI":"10.1016\/j.tifs.2017.12.010","article-title":"Innovative Nondestructive Imaging Techniques for Ripening and Maturity of Fruits\u2014A Review of Recent Applications","volume":"72","author":"Hussain","year":"2018","journal-title":"Trends Food Sci. Technol."},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Garillos-Manliguez, C.A., and Chiang, J.Y. (2021). Multimodal Deep Learning and Visible-Light and Hyperspectral Imaging for Fruit Maturity Estimation. Sensors, 21.","DOI":"10.3390\/s21041288"},{"key":"ref_9","unstructured":"Muthulakshmi, A., and Renjith, P.N. (2021, January 4\u20136). Comprehensive Systematic Review on Fruit Maturity Detection Technique. Proceedings of the Second International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore, India."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Abdelhamid, M.A., Sudnik, Y., Alshinayyin, H.J., and Shaaban, F. (2021). Non-Destructive Method for Monitoring Tomato Ripening Based on Chlorophyll Fluorescence Induction. J. Agric. Eng., 52.","DOI":"10.4081\/jae.2020.1098"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"1928","DOI":"10.1007\/s11947-019-02350-7","article-title":"Laser-Based Imaging for Cocoa Pods Maturity Detection","volume":"12","author":"Lockman","year":"2019","journal-title":"Food Bioprocess Technol."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"264","DOI":"10.1016\/j.biosystemseng.2021.10.009","article-title":"A Convolutional Neural Network Approach to Detecting Fruit Physiological Disorders and Maturity in \u2018Abb\u00e9 F\u00e9tel\u2019 Pears","volume":"212","author":"Bonora","year":"2021","journal-title":"Biosyst. Eng."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"106696","DOI":"10.1016\/j.compag.2022.106696","article-title":"Canopy-Attention-YOLOv4-Based Immature\/Mature Apple Fruit Detection on Dense-Foliage Tree Architectures for Early Crop Load Estimation","volume":"193","author":"Lu","year":"2022","journal-title":"Comput. Electron. Agric."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"1137","DOI":"10.1109\/TPAMI.2016.2577031","article-title":"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks","volume":"39","author":"Ren","year":"2017","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"1316","DOI":"10.1007\/s13197-013-1188-3","article-title":"Assessment of Banana Fruit Maturity by Image Processing Technique","volume":"52","year":"2015","journal-title":"J. Food Sci. Technol."},{"key":"ref_16","unstructured":"Kinjo, H., Oshiro, N., and Duong, S.C. (June, January 31). Fruit Maturity Detection Using Neural Network and an Odor Sensor: Toward a Quick Detection. Proceedings of the 10th Asian Control Conference (ASCC), Kota Kinabalu, Malaysia."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Hasanuddin, N.H., Wahid, M.H.A., Shahimin, M.M., Hambali, N.A.M.A., Yusof, N.R., Nazir, N.S., Khairuddin, N.Z., and Azidin, M.A.M. (2016, January 11\u201312). Metal Oxide Based Surface Acoustic Wave Sensors for Fruits Maturity Detection. Proceedings of the 2016 3rd International Conference on Electronic Design (ICED), Phuket, Thailand.","DOI":"10.1109\/ICED.2016.7804605"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Chen, L.Y., Wong, D.M., Fang, C.Y., Chiu, C.I., Chou, T.I., Wu, C.C., Chiu, S.W., and Tang, K.T. (2018, January 13\u201317). Development of an Electronic-Nose System for Fruit Maturity and Quality Monitoring. Proceedings of the 2018 IEEE International Conference on Applied System Invention (ICASI), Chiba, Japan.","DOI":"10.1109\/ICASI.2018.8394481"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"3008","DOI":"10.1007\/s13197-018-3220-0","article-title":"Evaluation of Plum Fruit Maturity by Image Processing Techniques","volume":"55","author":"Kaur","year":"2018","journal-title":"J. Food Sci. Technol."},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Fadchar, N.A., and Cruz, J.C.D. (2020, January 28\u201329). A Non-Destructive Approach of Young Coconut Maturity Detection Using Acoustic Vibration and Neural Network. Proceedings of the 2020 16th IEEE International Colloquium on Signal Processing & Its Applications (CSPA), Langkawi, Malaysia.","DOI":"10.1109\/CSPA48992.2020.9068723"},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"18315","DOI":"10.1038\/s41598-021-97857-5","article-title":"Classification of Oil Palm Fresh Fruit Maturity Based on Carotene Content from Raman Spectra","volume":"11","author":"Raj","year":"2021","journal-title":"Sci. Rep."},{"key":"ref_22","first-page":"2223","article-title":"On-Line Sorting Maturity of Cherry Tomato by Machine Vision","volume":"295","author":"Zhang","year":"2009","journal-title":"IFIP Adv. Inf. Commun. Technol."},{"key":"ref_23","first-page":"3616","article-title":"Vision-Based Judgment of Tomato Maturity under Growth Conditions","volume":"10","author":"Wang","year":"2011","journal-title":"Afr. J. Biotechnol."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"1892","DOI":"10.1016\/j.eswa.2014.09.057","article-title":"Using Machine Learning Techniques for Evaluating Tomato Ripeness","volume":"42","author":"Hassanien","year":"2015","journal-title":"Expert Syst. Appl."},{"key":"ref_25","unstructured":"Tanvi, M., Vinay, K., and Gupta, P. (2016, January 22\u201324). Maturity and Disease Detection in ToMato Using Computer Vision. Proceedings of the 2016 Fourth International Conference on Parallel, Distributed and Grid Computing (PDGC), Waknaghat, India."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"1721","DOI":"10.1007\/s12161-016-0734-9","article-title":"Rapid Assessment of Tomato Ripeness Using Visible\/Near-Infrared Spectroscopy and Machine Vision","volume":"10","author":"Lu","year":"2017","journal-title":"Food Anal. Methods"},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"123","DOI":"10.1016\/j.scienta.2014.12.037","article-title":"Detecting Maturity of Persimmon Fruit Based on Image Processing Technique","volume":"184","author":"Mohammadi","year":"2015","journal-title":"Sci. Hortic."},{"key":"ref_28","unstructured":"Abbas, M. (2023, June 27). Image Analysis for Mango Fruit Defect Identification and Maturity Detection. Available online: https:\/\/www.researchgate.net\/publication\/369025864_Image_Analysis_for_Mango_Fruit_Defect_Identification_and_Maturity_Detection."},{"key":"ref_29","first-page":"5","article-title":"Defect Identification and Maturity Detection of Mango Fruits Using Image Analysis","volume":"1","author":"Sahu","year":"2017","journal-title":"Am. J. Artif. Intell."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"247","DOI":"10.1016\/j.scienta.2019.03.033","article-title":"Maturity Detection and Volume Estimation of Apricot Using Image Processing Technique","volume":"251","author":"Khojastehnazhand","year":"2019","journal-title":"Sci. Hortic."},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"6","DOI":"10.1088\/1757-899X\/771\/1\/012022","article-title":"Murinto Dragon Fruit Maturity Detection Based-HSV Space Color Using Naive Bayes Classifier Method","volume":"771","author":"Khisanudin","year":"2020","journal-title":"IOP Conf. Ser. Mater. Sci. Eng."},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Zhao, J., and Chen, J. (2021). Detecting Maturity in Fresh Lycium barbarum L. Fruit Using Color Information. Horticulturae, 7.","DOI":"10.3390\/horticulturae7050108"},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"106265","DOI":"10.1016\/j.compag.2021.106265","article-title":"The Use of Digital Imaging, Chlorophyll Fluorescence and Vis\/NIR Spectroscopy in Assessing the Ripening Stage and Freshness Status of Bell Pepper Fruit","volume":"187","author":"Kasampalis","year":"2021","journal-title":"Comput. Electron. Agric."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"441","DOI":"10.1007\/s42979-021-00837-9","article-title":"Maturity Detection of Tomatoes Using Deep Learning","volume":"2","author":"Mutha","year":"2021","journal-title":"SN Comput. Sci."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Garillos-Manliguez, C.A., and Chiang, J.Y. (2021, January 10\u201312). Multimodal Deep Learning via Late Fusion for Non-Destructive Papaya Fruit Maturity Classification. Proceedings of the 2021 18th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City, Mexico.","DOI":"10.1109\/CCE53527.2021.9633060"},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"26702","DOI":"10.1109\/ACCESS.2021.3092210","article-title":"Research on Fast Identification and Location of Contour Features of Electric Vehicle Charging Port in Complex Scenes","volume":"10","author":"Quan","year":"2021","journal-title":"IEEE Access"},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"9403","DOI":"10.1007\/s11042-019-7648-7","article-title":"A Novel and High Precision Tomato Maturity Recognition Algorithm Based on Multi-Level Deep Residual Network","volume":"79","author":"Liu","year":"2020","journal-title":"Multimed. Tools Appl."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Zhou, X., Wang, P., Dai, G., Yan, J., and Yang, Z. (2021, January 27\u201331). Tomato Fruit Maturity Detection Method Based on YOLOV4 and Statistical Color Model. Proceedings of the 2021 IEEE 11th Annual International Conference on CYBER Technology in Automation, Control, and Intelligent Systems (CYBER), Jiaxing, China.","DOI":"10.1109\/CYBER53097.2021.9588129"},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"5170","DOI":"10.1007\/s11694-021-01074-7","article-title":"Fruit Maturity and Location Identification of Beef Tomato Using R-CNN and Binocular Imaging Technology","volume":"15","author":"Hsieh","year":"2021","journal-title":"J. Food Meas. Charact."},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Valiente, L.D., Parco, K.M.R., and Sangalang, G.C.P. (2021, January 15\u201317). Non-Destructive Image Processing Analysis for Defect Identification and Maturity Detection on Avocado Fruit. Proceedings of the 2021 5th International Conference on Communication and Information Systems (ICCIS), Chongqing, China.","DOI":"10.1109\/ICCIS53528.2021.9645970"},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"156","DOI":"10.1016\/j.biosystemseng.2018.09.004","article-title":"Detection of Passion Fruits and Maturity Classification Using Red-Green-Blue Depth Images","volume":"175","author":"Tu","year":"2018","journal-title":"Biosyst. Eng."},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Schumann, A.W., Mood, N.S., Mungofa, P.D.K., MacEachern, C., Zaman, Q.U., and Esau, T. (2010, January 7\u201310). Detection of Three Fruit Maturity Stages in Wild Blueberry Fields Using Deep Learning Artificial Neural Networks. Proceedings of the 2019 ASABE Annual International Meeting, Boston, MA, USA.","DOI":"10.13031\/aim.201900533"},{"key":"ref_43","doi-asserted-by":"crossref","unstructured":"MacEachern, C.B., Esau, T.J., Schumann, A.W., Hennessy, P.J., and Zaman, Q.U. (2021, January 12\u201316). Deep Learning Artificial Neural Networks for Detection of Fruit Maturity Stage in Wild Blueberries. Proceedings of the2021 ASABE Annual International Virtual Meeting, Virtual.","DOI":"10.13031\/aim.202100815"},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"100130","DOI":"10.1016\/j.atech.2022.100130","article-title":"Fruit Maturity Grading Framework for Small Dataset Using Single Image Multi-Object Sampling and Mask R-CNN","volume":"3","author":"Siricharoen","year":"2023","journal-title":"Smart Agric. Technol."},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"1515","DOI":"10.1007\/s11119-022-09895-2","article-title":"Citrus Fruits Maturity Detection in Natural Environments Based on Convolutional Neural Networks and Visual Saliency Map","volume":"23","author":"Chen","year":"2022","journal-title":"Precis. Agric."},{"key":"ref_46","doi-asserted-by":"crossref","unstructured":"Qiu, C., Tian, G., Zhao, J., Liu, Q., Xie, S., and Zheng, K. (2022). Grape Maturity Detection and Visual Pre-Positioning Based on Improved YOLOv4. Electronics, 11.","DOI":"10.3390\/electronics11172677"},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Zhang, L., Wu, L., and Liu, Y. (2022). Hemerocallis Citrina Baroni Maturity Detection Method Integrating Lightweight Neural Network and Dual Attention Mechanism. Electronics, 11.","DOI":"10.3390\/electronics11172743"},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"100038","DOI":"10.1016\/j.meafoo.2022.100038","article-title":"Maturity Detection of Tomatoes Using Transfer Learning","volume":"7","author":"Begum","year":"2022","journal-title":"Meas. Food"},{"key":"ref_49","doi-asserted-by":"crossref","unstructured":"Li, Z., Jiang, X., Shuai, L., Zhang, B., Yang, Y., and Mu, J. (2022). A Real-Time Detection Algorithm for Sweet Cherry Fruit Maturity Based on YOLOX in the Natural Environment. Agronomy, 12.","DOI":"10.3390\/agronomy12102482"},{"key":"ref_50","unstructured":"Reis, D., Kupec, J., Hong, J., and Daoudi, A. (2023). Real-Time Flying Object Detection with YOLOv8. arXiv."},{"key":"ref_51","first-page":"5999","article-title":"Attention Is All You Need","volume":"2017","author":"Vaswani","year":"2017","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_52","doi-asserted-by":"crossref","first-page":"100099","DOI":"10.1016\/j.atech.2022.100099","article-title":"Detection of Fruit Maturity Stage and Yield Estimation in Wild Blueberry Using Deep Learning Convolutional Neural Networks","volume":"3","author":"MacEachern","year":"2023","journal-title":"Smart Agric. Technol."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/15\/6701\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T20:19:38Z","timestamp":1760127578000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/15\/6701"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,7,26]]},"references-count":52,"journal-issue":{"issue":"15","published-online":{"date-parts":[[2023,8]]}},"alternative-id":["s23156701"],"URL":"https:\/\/doi.org\/10.3390\/s23156701","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,7,26]]}}}