Simultaneous Identification on Tomato Variety and Maturity Based on Local and Global Feature Fusion
Abstract
1. Introduction
2. Related Work
3. Materials and Methods
3.1. Dataset
3.2. The Proposed Improved YOLOv8n
3.2.1. Adopting Frequency-Adaptive Dilated Convolution (FADC) Module in Backbone
3.2.2. Improvements on PANet Structure in Neck
3.2.3. Improvement of IoU Loss Function
3.2.4. Improvements to the Detection Head
3.3. Experimental Environment and Model Hyperparameters
3.4. Model Evaluation Indicators
4. Experiments and Results
4.1. YOLOv8 Models of Different Scales
4.2. Selection of Loss Function
4.3. Effect of FADC Module on Feature Extraction and HSPAN on Feature Fusion
4.4. Analysis of DyHead Detection
4.5. Ablation Experiments
4.6. Comparison Experiment
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Prasad, K.; Jacob, S.; Siddiqui, M.W. Fruit Maturity, Harvesting, and Quality Standards. In Preharvest Modulation of Postharvest Fruit and Vegetable Quality; Elsevier: Amsterdam, The Netherlands, 2018; pp. 41–69. [Google Scholar]
- Anjali; Jena, A.; Bamola, A.; Mishra, S.; Jain, I.; Pathak, N.; Sharma, N.; Joshi, N.; Pandey, R.; Kaparwal, S.; et al. State-of-the-Art Non-Destructive Approaches for Maturity Index Determination in Fruits and Vegetables: Principles, Applications, and Future Directions. Food Prod. Process. Nutr. 2024, 6, 56. [Google Scholar] [CrossRef]
- Tenorio, G.L.; Caarls, W. Automatic Visual Estimation of Tomato Cluster Maturity in Plant Rows. Mach. Vis. Appl. 2021, 32, 78. [Google Scholar] [CrossRef]
- Liu, J.; Pi, J.; Xia, L. A Novel and High Precision Tomato Maturity Recognition Algorithm Based on Multi-Level Deep Residual Network. Multimed. Tools Appl. 2020, 79, 9403–9417. [Google Scholar] [CrossRef]
- Lu, T.; Han, B.; Chen, L.; Yu, F.; Xue, C. A Generic Intelligent Tomato Classification System for Practical Applications Using DenseNet-201 with Transfer Learning. Sci. Rep. 2021, 11, 15824. [Google Scholar] [CrossRef] [PubMed]
- Sun, J.; He, X.; Wu, M.; Wu, X.; Shen, J.; Lu, B. Detection of Tomato Organs Based on Convolutional Neural Network under the Overlap and Occlusion Backgrounds. Mach. Vis. Appl. 2020, 31, 31. [Google Scholar] [CrossRef]
- Hsieh, K.-W.; Huang, B.-Y.; Hsiao, K.-Z.; Tuan, Y.-H.; Shih, F.-P.; Hsieh, L.-C.; Chen, S.; Yang, I.-C. Fruit Maturity and Location Identification of Beef Tomato Using R-CNN and Binocular Imaging Technology. Food Meas. 2021, 15, 5170–5180. [Google Scholar] [CrossRef]
- Huang, Y.-P.; Wang, T.-H.; Basanta, H. Using Fuzzy Mask R-CNN Model to Automatically Identify Tomato Ripeness. IEEE Access 2020, 8, 207672–207682. [Google Scholar] [CrossRef]
- Das, P.; Yadav, J.P.S. Automated Tomato Maturity Grading System Using CNN. In Proceedings of the 2020 International Conference on Smart Electronics and Communication (ICOSEC), Trichy, India, 11–12 September 2020; pp. 136–142. [Google Scholar]
- Hu, C.; Liu, X.; Pan, Z.; Li, P. Automatic Detection of Single Ripe Tomato on Plant Combining Faster R-CNN and Intuitionistic Fuzzy Set. IEEE Access 2019, 7, 154683–154696. [Google Scholar] [CrossRef]
- Xu, P.; Fang, N.; Liu, N.; Lin, F.; Yang, S.; Ning, J. Visual Recognition of Cherry Tomatoes in Plant Factory Based on Improved Deep Instance Segmentation. Comput. Electron. Agric. 2022, 197, 106991. [Google Scholar] [CrossRef]
- Hernández, G.A.A.; Olguin, J.C.; Vasquez, J.I.; Uriarte, A.V.; Torres, M.C.V. Detection of Tomato Ripening Stages Using Yolov3-Tiny. arXiv 2023, arXiv:2302.00164. [Google Scholar] [CrossRef]
- Yasmine, G.; Maha, G.; Hicham, M. Overview of Single-Stage Object Detection Models: From Yolov1 to Yolov7. In Proceedings of the 2023 International Wireless Communications and Mobile Computing (IWCMC), Marrakesh, Morocco, 19–23 June 2023; pp. 1579–1584. [Google Scholar]
- Wang, C.; Wang, C.; Wang, L.; Wang, J.; Liao, J.; Li, Y.; Lan, Y. A Lightweight Cherry Tomato Maturity Real-Time Detection Algorithm Based on Improved YOLOV5n. Agronomy 2023, 13, 2106. [Google Scholar] [CrossRef]
- Zhang, J.; Xie, J.; Zhang, F.; Gao, J.; Yang, C.; Song, C.; Rao, W.; Zhang, Y. Greenhouse Tomato Detection and Pose Classification Algorithm Based on Improved YOLOv5. Comput. Electron. Agric. 2024, 216, 108519. [Google Scholar] [CrossRef]
- Liu, G.; Hou, Z.; Liu, H.; Liu, J.; Zhao, W.; Li, K. TomatoDet: Anchor-Free Detector for Tomato Detection. Front. Plant Sci. 2022, 13, 942875. [Google Scholar] [CrossRef] [PubMed]
- Li, P.; Zheng, J.; Li, P.; Long, H.; Li, M.; Gao, L. Tomato Maturity Detection and Counting Model Based on MHSA-YOLOv8. Sensors 2023, 23, 6701. [Google Scholar] [CrossRef]
- Zheng, S.; Jia, X.; He, M.; Zheng, Z.; Lin, T.; Weng, W. Tomato Recognition Method Based on the YOLOv8-Tomato Model in Complex Greenhouse Environments. Agronomy 2024, 14, 1764. [Google Scholar] [CrossRef]
- Wei, J.; Ni, L.; Luo, L.; Chen, M.; You, M.; Sun, Y.; Hu, T. GFS-YOLO11: A Maturity Detection Model for Multi-Variety Tomato. Agronomy 2024, 14, 2644. [Google Scholar] [CrossRef]
- Ju, Y.; Jia, S.; Cai, J.; Guan, H.; Lyu, S. GLFF: Global and Local Feature Fusion for AI-Synthesized Image Detection. IEEE Trans. Multimed. 2023, 26, 4073–4085. [Google Scholar] [CrossRef]
- Lv, Y.; Zhang, X.; Xiong, W.; Cui, Y.; Cai, M. An End-to-End Local-Global-Fusion Feature Extraction Network for Remote Sensing Image Scene Classification. Remote Sens. 2019, 11, 3006. [Google Scholar] [CrossRef]
- Waseem, M.; Huang, C.-H.; Sajjad, M.M.; Naqvi, L.H.; Majeed, Y.; Rehman, T.U.; Nadeem, T. Automated Tomato Maturity Estimation Using an Optimized Residual Model with Pruning and Quantization Techniques. arXiv 2025, arXiv:2503.10940. [Google Scholar] [CrossRef]
- Nahak, P.; Pratihar, D.K.; Deb, A.K. Tomato Maturity Stage Prediction Based on Vision Transformer and Deep Convolution Neural Networks. Int. J. Hybrid Intell. Syst. 2025, 21, 61–78. [Google Scholar] [CrossRef]
- Roman, T. LaboroTomato: Instance Segmentation Dataset. Available online: https://github.com/laboroai/LaboroTomato#readme (accessed on 15 June 2024).
- Chen, L.; Gu, L.; Zheng, D.; Fu, Y. Frequency-Adaptive Dilated Convolution for Semantic Segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Columbus, OH, USA, 24–27 June 2024; pp. 3414–3425. [Google Scholar]
- Liu, S.; Qi, L.; Qin, H.; Shi, J.; Jia, J. Path Aggregation Network for Instance Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 8759–8768. [Google Scholar]
- Chen, Y.; Zhang, C.; Chen, B.; Huang, Y.; Sun, Y.; Wang, C.; Fu, X.; Dai, Y.; Qin, F.; Peng, Y. Accurate Leukocyte Detection Based on Deformable-DETR and Multi-Level Feature Fusion for Aiding Diagnosis of Blood Diseases. Comput. Biol. Med. 2024, 170, 107917. [Google Scholar] [CrossRef]
- Liu, C.; Wang, K.; Li, Q.; Zhao, F.; Zhao, K.; Ma, H. Powerful-IoU: More Straightforward and Faster Bounding Box Regression Loss with a Nonmonotonic Focusing Mechanism. Neural Netw. 2024, 170, 276–284. [Google Scholar] [CrossRef]
- Dai, X.; Chen, Y.; Xiao, B.; Chen, D.; Liu, M.; Yuan, L.; Zhang, L. Dynamic Head: Unifying Object Detection Heads With Attentions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Virtual, 19–25 June 2021; pp. 7373–7382. [Google Scholar]
- Bau, D.; Zhou, B.; Khosla, A.; Oliva, A.; Torralba, A. Network Dissection: Quantifying Interpretability of Deep Visual Representations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 6541–6549. [Google Scholar]
- Wang, C.-Y.; Yeh, I.-H.; Mark Liao, H.-Y. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. In Computer Vision—ECCV 2024; Leonardis, A., Ricci, E., Roth, S., Russakovsky, O., Sattler, T., Varol, G., Eds.; Lecture Notes in Computer Science; Springer Nature: Cham, Switzerland, 2025; Volume 15089, pp. 1–21. ISBN 978-3-031-72750-4. [Google Scholar]
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-Time End-to-End Object Detection. Adv. Neural Inf. Process. Syst. 2024, 37, 107984–108011. [Google Scholar] [CrossRef]
- Khanam, R.; Hussain, M. YOLOv11: An Overview of the Key Architectural Enhancements. arXiv 2024, arXiv:2410.17725. [Google Scholar] [CrossRef]
- Tian, Y.; Ye, Q.; Doermann, D. YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv 2025, arXiv:2502.12524. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
- Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. DETRs Beat YOLOs on Real-Time Object Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 24–27 June 2024; pp. 16965–16974. [Google Scholar]











| Parameter | Value |
|---|---|
| Image Size | 640 × 640 |
| Learning Rate | 0.01 |
| Weight Delay | 0.0005 |
| Momentum | 0.937 |
| Optimizer | SGD |
| Batch Size | 4 |
| Epoch | 150 |
| Name | mAP@.50 | mAP@.50:.95 | Parameters (M) | GFLOPs |
|---|---|---|---|---|
| YOLOv8n | 0.804 | 0.645 | 3.006 | 8.1 |
| YOLOv8s | 0.748 | 0.646 | 11.127 | 28.4 |
| YOLOv8m | 0.765 | 0.606 | 25.843 | 78.7 |
| YOLOv8l | 0.771 | 0.639 | 43.611 | 164.8 |
| YOLOv8x | 0.781 | 0.655 | 68.129 | 257.4 |
| Name | F1-Score | mAP@.50 | mAP@.50:.95 | |
|---|---|---|---|---|
| YOLOv8n | +CIoU | 0.764 | 0.824 | 0.663 |
| +GIoU | 0.762 | 0.819 | 0.660 | |
| +DIoU | 0.749 | 0.818 | 0.657 | |
| +EIoU | 0.768 | 0.827 | 0.666 | |
| +PIoUv2 | 0.759 | 0.816 | 0.652 | |
| +PIoU | 0.774 | 0.835 | 0.666 |
| FADC | HSPAN | DyHead | PIoU | F1-Score | mAP@.50 | mAP@.50:.95 | Parameters (M) | GFLOPs | |
|---|---|---|---|---|---|---|---|---|---|
| YOLOv8n | 0.747 | 0.804 | 0.645 | 3.006 | 8.1 | ||||
| √ | 0.753 | 0.808 | 0.649 | 3.024 | 8.0 | ||||
| √ | 0.754 | 0.814 | 0.657 | 2.082 | 7.1 | ||||
| √ | 0.752 | 0.816 | 0.662 | 3.486 | 9.6 | ||||
| √ | √ | 0.761 | 0.821 | 0.663 | 2.099 | 7.0 | |||
| √ | √ | 0.760 | 0.819 | 0.662 | 3.508 | 9.6 | |||
| √ | √ | 0.762 | 0.818 | 0.662 | 2.828 | 9.1 | |||
| √ | √ | √ | 0.764 | 0.824 | 0.663 | 2.841 | 8.9 | ||
| Ours | √ | √ | √ | √ | 0.774 | 0.835 | 0.666 | 2.841 | 8.9 |
| Name | mAP@.50 | mAP@.50:.95 | Parameters (M) | GFLOPs | FPS |
|---|---|---|---|---|---|
| YOLOv9t | 0.774 | 0.613 | 1.971 | 7.6 | 185.2 |
| YOLOv10n | 0.739 | 0.584 | 2.696 | 8.2 | 173.9 |
| YOLOv11n | 0.787 | 0.622 | 2.583 | 6.3 | 198.4 |
| YOLOv12n | 0.769 | 0.591 | 2.509 | 5.8 | 207.6 |
| Faster-RCNN | 0.813 | 0.646 | 41.374 | 178.0 | 28.6 |
| RT-DETR-r18 | 0.404 | 0.280 | 20.093 | 58.3 | 65.5 |
| YOLOv8n | 0.804 | 0.645 | 3.006 | 8.1 | 177.7 |
| Ours | 0.835 | 0.667 | 2.841 | 8.9 | 165.4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bian, S.; Zhou, J.; Gao, Q.; Yi, C.; Chen, W.; Huang, F. Simultaneous Identification on Tomato Variety and Maturity Based on Local and Global Feature Fusion. Sensors 2025, 25, 7313. https://doi.org/10.3390/s25237313
Bian S, Zhou J, Gao Q, Yi C, Chen W, Huang F. Simultaneous Identification on Tomato Variety and Maturity Based on Local and Global Feature Fusion. Sensors. 2025; 25(23):7313. https://doi.org/10.3390/s25237313
Chicago/Turabian StyleBian, Shaohuang, Jun Zhou, Qinxiu Gao, Chengxi Yi, Wenzhuo Chen, and Feng Huang. 2025. "Simultaneous Identification on Tomato Variety and Maturity Based on Local and Global Feature Fusion" Sensors 25, no. 23: 7313. https://doi.org/10.3390/s25237313
APA StyleBian, S., Zhou, J., Gao, Q., Yi, C., Chen, W., & Huang, F. (2025). Simultaneous Identification on Tomato Variety and Maturity Based on Local and Global Feature Fusion. Sensors, 25(23), 7313. https://doi.org/10.3390/s25237313

