Ripe Tomato Detection Algorithm Based on Improved YOLOv9
Abstract
:1. Introduction
2. Materials
2.1. Collection
2.2. Data Augmentation
3. Methods
3.1. Framework of YOLOv9
- (1)
- Programmable Gradient Information (PGI) was introduced as a novel auxiliary supervision framework that generates reliable gradient information for updating network weights during training. PGI addresses the challenges posed by deep networks by supporting reversible branching and ensuring complete input information for computing the objective function [22];
- (2)
- A new gradient-based path planning network architecture, GELAN, was designed. GELAN improves parameter efficiency using only standard convolutional operators.
3.2. Improvement of Feature Extraction Module
3.3. Improvement of Down-Sampling Module
3.4. Evaluating Indicator
4. Experimental Results and Analysis
4.1. Ablation Experiment
4.2. Comparison Between Different Target Detection Networks
5. Discussion
6. Conclusions
- (1)
- By introducing the HGBlock module instead of the original RepNCSPELAN4 module, the model reduces model complexity while maintaining detectability;
- (2)
- This study improved the ADown module in the original YOLOv9 based on the SPD-conv module, which improved the accuracy of detecting small objects and low-resolution images as well as the robustness of the model;
- (3)
- By comparing different algorithmic models, this model can reduce model complexity while ensuring detection performance, which improves detection speed and accuracy.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Li, J.; Liu, F.; Wu, Y.; Tang, Z.; Zhang, D.; Lyu, J.; Khan, K.S.; Xiao, X.; Yu, J. Evaluation of nutritional composition, biochemical, and quality attributes of different varieties of tomato (Solanum lycopersicum L.). J. Food Compos. Anal. 2024, 132, 106384. [Google Scholar] [CrossRef]
- Ma, L.; Liu, Y.; Sahito, Z.A.; Liu, C.; Li, Z.; Yu, C.; Feng, Y.; Guo, W. Intraspecific variation in tomato: Impact on production quality and cadmium phytoremediation efficiency in intercropping systems with hyperaccumulating plant. Ecotoxicol. Environ. Saf 2024, 282, 116715. [Google Scholar] [CrossRef] [PubMed]
- Zheng, H.; Fu, L.Y.; Ye, Q.L. Flexible capped principal component analysis with applications in image recognition. Inf. Sci. 2022, 614, 289–310. [Google Scholar] [CrossRef]
- Badgujar, C.M.; Poulose, A.; Gan, H. Agricultural object detection with You Only Look Once (YOLO) Algorithm: A bibliometric and systematic literature review. Comput. Electron. Agric. 2024, 223, 109090. [Google Scholar] [CrossRef]
- Girshick, R. Fast R-CNN. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015. [Google Scholar] [CrossRef]
- Ren, S.Q.; He, K.M.; 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]
- Yu, Y.; Zhang, K.L.; Yang, L.; Zhang, D.X. Fruit detection for strawberry harvesting robot in non-structural environment based on Mask-RCNN. Comput. Electron. Agric. 2019, 163, 104846. [Google Scholar] [CrossRef]
- Lochan, R.N.; Tomar, A.S.; Srinivasan, R. Plant Detection and Classification Using Fast Region-Based Convolution Neural Networks. In Proceedings of the Artificial Intelligence and Evolutionary Computations in Engineering Systems, Chennai, India, 16–18 April 2020. [Google Scholar] [CrossRef]
- Gao, F.F.; Fu, L.S.; Zhang, X.; Majeed, Y.; Li, R.; Karkee, M.; Zhang, Q. Multi-class fruit-on-plant detection for apple in SNAP system using Faster R-CNN. Comput. Electron. Agric. 2020, 176, 105634. [Google Scholar] [CrossRef]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single Shot MultiBox Detector. In Proceedings of the COMPUTER VISION—ECCV 2016, Amsterdam, The Netherlands, 8–16 October 2016. [Google Scholar] [CrossRef]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.M.; Dollár, P. Focal Loss for Dense Object Detection. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017. [Google Scholar] [CrossRef]
- Ali, M.L.; Keller, C.; Huang, M. Fruits Detections Using Single Shot MultiBox Detector. In Proceedings of the 5th ACM International Symposium on Blockchain and Secure Critical Infrastructure, ACM BSCI, Melbourne, Australia, 10–14 July 2023. [Google Scholar] [CrossRef]
- Agarwal, D.; Bhargava, A. On-tree fruit detection system using Darknet-19 based SSD network. J. Food Meas. Charact. 2024, 18, 7067–7076. [Google Scholar] [CrossRef]
- Wang, X.; Liu, J. Tomato Anomalies Detection in Greenhouse Scenarios Based on YOLO-Dense. Front. Plant Sci. 2021, 12, 634103. [Google Scholar] [CrossRef]
- Redmon, J.; Divvala, S.K.; Girshick, R.B.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2015; pp. 779–788. [Google Scholar] [CrossRef]
- Lawal, M.O. Tomato detection based on modified YOLOv3 framework. Sci. Rep. 2021, 11, 1447. [Google Scholar] [CrossRef]
- Chen, Y.; Xu, H.; Zhang, X.; Gao, P.; Xu, Z.; Huang, X. An object detection method for bayberry trees based on an improved YOLO algorithm. Int. J. Digit. Earth 2023, 16, 781–805. [Google Scholar] [CrossRef]
- Yang, G.; Wang, J.; Nie, Z.; Yang, H.; Yu, S. A Lightweight YOLOv8 Tomato Detection Algorithm Combining Feature Enhancement and Attention. Agronomy 2023, 13, 1824. [Google Scholar] [CrossRef]
- Guo, W.; Qiao, S.; Zhao, C.; Zhang, T. Defect detection for industrial neutron radiographic images based on modified YOLO network. Nucl. Instrum. Methods Phys. Res. Sect. A Accel. Spectrometers Detect. Assoc. Equip. 2023, 1056, 168694. [Google Scholar] [CrossRef]
- Zhang, Y.; Guo, Z.Y.; Wu, J.Q.; Tian, Y.; Tang, H.T.; Guo, X.M. Real-Time Vehicle Detection Based on Improved YOLO v5. Sustainability 2022, 14, 12274. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Yeh, I.-H.; Liao, H.J.A. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. arXiv 2024, arXiv:2402.13616. [Google Scholar]
- An, R.; Zhang, X.; Sun, M.; Wang, G. GC-YOLOv9: Innovative smart city traffic monitoring solution. Alex. Eng. J. 2024, 106, 277–287. [Google Scholar] [CrossRef]
- Lv, W.; Xu, S.; Zhao, Y.; Wang, G.; Wei, J.; Cui, C.; Du, Y.; Dang, Q.; Liu, Y.J.A. DETRs Beat YOLOs on Real-time Object Detection. arXiv 2023, arXiv:2304.08069. [Google Scholar]
- Ding, Y.; Zhou, H.; Wu, H.; Ma, C.; Yuan, G. SCS-YOLO: A Defect Detection Model for Cigarette Appearance. Electronics 2024, 13, 3761. [Google Scholar] [CrossRef]
- Sunkara, R.; Luo, T. No More Strided Convolutions or Pooling: A New CNN Building Block for Low-Resolution Images and Small Objects. In Machine Learning and Knowledge Discovery in Databases; Amini, M.-R., Canu, S., Fischer, A., Guns, T., Kralj Novak, P., Tsoumakas, G., Eds.; Springer Nature: Cham, Switzerland, 2023; pp. 443–459. [Google Scholar] [CrossRef]
- Guna, R.T.A.; Sikha, O.K.; Benitez, R. Interpreting CNN predictions using conditional Generative Adversarial Networks. Knowl.-Based Syst. 2024, 302, 112340. [Google Scholar] [CrossRef]
- Gao, J.; Liang, J.; Li, J.; Sun, W.; Qu, G. White-light endoscopic colorectal lesion detection based on improved YOLOv7. Biomed. Signal Process. Control 2024, 90, 105897. [Google Scholar] [CrossRef]
- Chen, J.; Chen, H.; Xu, F.; Lin, M.; Zhang, D.; Zhang, L. Real-time detection of mature table grapes using ESP-YOLO network on embedded platforms. Biosyst. Eng. 2024, 246, 122–134. [Google Scholar] [CrossRef]
- Pinault, L.J.; Yano, H.; Okudaira, K.; Crawford, I.A. YOLO-ET: A Machine Learning model for detecting, localising and classifying anthropogenic contaminants and extraterrestrial microparticles optimised for mobile processing systems. Astron. Comput. 2024, 47, 100828. [Google Scholar] [CrossRef]
- Wu, L.; Lin, S.; Jin, W.; Weng, H.; Xu, J.; Zhang, L.; Xu, Y.; Xiang, L.; Sun, S.; Ye, D. CCHA YOLO for mycelium clamp connection (CC) and hyphae Autolysis (HA) detection under microscopy imaging and web deployment. Microchem. J. 2024, 201, 110483. [Google Scholar] [CrossRef]
- Fan, Q.; Li, Y.; Deveci, M.; Zhong, K.; Kadry, S. LUD-YOLO: A novel lightweight object detection network for unmanned aerial vehicle. Inf. Sci. 2024, 686, 121366. [Google Scholar] [CrossRef]
- Chetan, S.; Sourabh, K.S.; Lekshmi, V.; Sudhakar, S.; Manikandan, J. Design and Evaluation of Floating point Matrix Operations for FPGA based system design. Procedia Comput. Sci. 2020, 171, 959–968. [Google Scholar] [CrossRef]
- Ultralytics/Ultralytics: NEW—YOLOv8 in PyTorch > ONNX > OpenVINO > CoreML > TFLite. Available online: https://github.com/ultralytics/ultralytics (accessed on 18 August 2023).
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G.J.A. YOLOv10: Real-Time End-to-End Object Detection. arXiv 2024, arXiv:2405.14458. [Google Scholar]
- Giglioni, V.; García-Macías, E.; Venanzi, I.; Ierimonti, L.; Ubertini, F. The use of receiver operating characteristic curves and precision-versus-recall curves as performance metrics in unsupervised structural damage classification under changing environment. Eng. Struct. 2021, 246, 113029. [Google Scholar] [CrossRef]
- Zeng, T.; Li, S.; Song, Q.; Zhong, F.; Wei, X. Lightweight tomato real-time detection method based on improved YOLO and mobile deployment. Comput. Electron. Agric. 2023, 205, 107625. [Google Scholar] [CrossRef]
Parameter Name | Parameter Value |
---|---|
Maximum RGB Image Resolution | 1920 × 1080 |
Maximum Depth Image Resolution | 1280 × 720 |
Ideal Detection Range | 0.3 m~3 m |
RGB Image Frame Rate | 30 fps |
Power Supply and Data Transmission Method | USB3.0 |
Parameter Item | Parameter Value |
---|---|
Number of Training Rounds | 200 |
Number of Single Training Samples | 4 |
Initial Learning Rate | 0.01 |
Momentum | 0.937 |
Optimizer | SGD |
Model | SPD-ADown | HGBlock | [email protected] (%) | [email protected]:0.95 (%) | Precision (%) | Recall (%) |
---|---|---|---|---|---|---|
Base | ✕ | ✕ | 93.0 | 84.3 | 95.9 | 91.2 |
A | ✓ | ✕ | 97.8 | 85.2 | 96.7 | 91.8 |
B | ✕ | ✓ | 97.5 | 84.2 | 94.2 | 92.4 |
C | ✓ | ✓ | 98.0 | 85.4 | 97.2 | 92.3 |
Model | SPD-ADown | HGBlock | Inferring Time (ms) | Params (M) | FLOPs (G) |
---|---|---|---|---|---|
Base | ✕ | ✕ | 15.7 | 25.3 | 102.1 |
A | ✓ | ✕ | 17.1 | 31.6 | 118.7 |
B | ✕ | ✓ | 13.0 | 22.9 | 90.4 |
C | ✓ | ✓ | 14.7 | 29.1 | 105.9 |
Target Detection Algorithm | [email protected] (%) | [email protected]:0.95 (%) | Inferring Time (ms) | Params (M) | FLOPs (G) |
---|---|---|---|---|---|
SSD | 94.3 | 73.3 | 10.9 | 3.1 | 0.7 |
Faster-RCNN | 91.9 | 64.1 | 35.4 | 60.7 | 85.2 |
RetinaNet | 88.4 | 58.4 | 30.7 | 55.3 | 74.1 |
YOLOv8 | 97.5 | 84.3 | 24.4 | 43.6 | 165.4 |
RT-DETR | 95.6 | 81.9 | 29.1 | 61.8 | 191.4 |
YOLOv10 | 91.9 | 73.79 | 35.7 | 2.7 | 8.4 |
YOLOv11 | 97.0 | 79.3 | 28.4 | 2.6 | 6.6 |
YOLOv9-all | 98.0 | 85.4 | 14.7 | 29.1 | 105.9 |
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. |
© 2024 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
Wang, Y.; Rong, Q.; Hu, C. Ripe Tomato Detection Algorithm Based on Improved YOLOv9. Plants 2024, 13, 3253. https://doi.org/10.3390/plants13223253
Wang Y, Rong Q, Hu C. Ripe Tomato Detection Algorithm Based on Improved YOLOv9. Plants. 2024; 13(22):3253. https://doi.org/10.3390/plants13223253
Chicago/Turabian StyleWang, Yan, Qianjie Rong, and Chunhua Hu. 2024. "Ripe Tomato Detection Algorithm Based on Improved YOLOv9" Plants 13, no. 22: 3253. https://doi.org/10.3390/plants13223253
APA StyleWang, Y., Rong, Q., & Hu, C. (2024). Ripe Tomato Detection Algorithm Based on Improved YOLOv9. Plants, 13(22), 3253. https://doi.org/10.3390/plants13223253