ADL-YOLOv8: A Field Crop Weed Detection Model Based on Improved YOLOv8
Abstract
:1. Introduction
2. Materials and Methods
2.1. Experimental Data
2.1.1. Data Collection and Annotation
2.1.2. Data Enhancement
2.2. YOLOv8 Algorithm Description
2.3. Improved YOLOv8 Algorithm
2.3.1. AKConv Model
2.3.2. DySample Upsampling Module in FPN
2.3.3. LSKA-Attention
2.4. Experimental Parameters and Evaluation Metrics
2.4.1. Experimental Parameters
2.4.2. Model Evaluation Indicators
3. Results
3.1. Ablation Experiment
3.2. Confusion Matrix
3.3. Comparison of Other Models
- Real-Time Performance
- Lightweight Design
- Accuracy
3.4. Different Models’ Detection Visualization Results Analysis
4. Discussion
4.1. Comparison among Different YOLO Versions
4.2. Current Research Challenges
- Variable appearance of weeds:
- 2.
- Improvement needed in the detection accuracy of small weeds or those with indistinct features:
4.3. Future Research Priorities
5. Conclusions
- During the model construction process, this method adopts the AKConv network. This network is lightweight and efficient and has unique advantages in processing targets of specific shapes. For example, when dealing with targets with elongated tubular structures, the AKConv network can better adapt to the shape characteristics of the targets, thereby extracting relevant feature information more accurately and effectively enhancing the performance of the entire model. This optimization for targets of specific shapes enables the model to handle complex-shaped weed targets more easily, providing a strong guarantee for the accuracy of weed detection.
- In the neck part of the model, its upsampling module adopts a super-lightweight and efficient dynamic upsampler named DySample. This dynamic upsampler plays an indispensable role in the model and has a significant effect on improving the accuracy and mean average precision (mAP) of the model. Through this special upsampling method, the model can restore the detailed information in the image more accurately, making the features of weed targets in the image more obvious, thereby improving the accuracy of the model in weed detection and making the weed detection results more reliable.
- Finally, the introduction of the attention mechanism is another highlight of this model. By introducing the attention mechanism, the model becomes more sensitive when detecting targets, especially when dealing with small targets. This attention mechanism can guide the model to focus on the key areas in the image, that is, the areas where weeds are located, thereby improving the detection accuracy of weeds. Specifically, this study integrates the high-performance LSKA-Attention into the C2f module of the original YOLOv8 model, thereby forming the C2f_LSKA_Attention module [45]. This newly formed module has multiple advantages. It can not only effectively reduce the computational complexity of the model and the consumption of computational resources during the model operation but also significantly improve the detection accuracy of the model for weeds, making the model more efficient and accurate when handling complex weed detection tasks.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Xiaoming, C.; Tianzeng, C.; Haomin, M.; Ziqi, Z.; Dehua, W.; Jianchao, S.; Jun, W. An improved algorithm based on YOLOv5 for detecting Ambrosia trifida in UAV images. Front. Plant Sci. 2024, 15, 1360419. [Google Scholar] [CrossRef] [PubMed]
- Gao, L.; Zhao, X.; Yue, X.; Yue, Y.; Wang, X.; Wu, H.; Zhang, X. A Lightweight YOLOv8 Model for Apple Leaf Disease Detection. Appl. Sci. 2024, 14, 6710. [Google Scholar] [CrossRef]
- Parra, L.; Marin, J.; Yousfi, S.; Rincón, G.; Mauri, P.V.; Lloret, J. Edge detection for weed recognition in lawns. Comput. Electron. Agric. 2020, 176, 105684. [Google Scholar] [CrossRef]
- Gée, C.; Denimal, E. RGB image-derived indicators for spatial assessment of the impact of broadleaf weeds on wheat biomass. Remote Sens. 2020, 12, 2982. [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: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part I 14. pp. 21–37. [Google Scholar]
- Zhao, M.; Su, Y.; Wang, J.; Liu, X.; Wang, K.; Liu, Z.; Liu, M.; Guo, Z. MED-YOLOv8s: A new real-time road crack, pothole, and patch detection model. J. Real-Time Image Process. 2024, 21, 26. [Google Scholar] [CrossRef]
- 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. 2016, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar]
- Gan, D.; Gromiha, P. Advanced Intelligent Computing Theories and Applications; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar]
- Zhang, R.; Wang, C.; Hu, X.; Liu, Y.; Chen, S. Weed location and recognition based on UAV imaging and deep learning. Int. J. Precis. Agric. Aviat. 2020, 3, 23–29. [Google Scholar] [CrossRef]
- Hu, D.; Ma, C.; Tian, Z.; Shen, G.; Li, L. Rice Weed detection method on YOLOv4 convolutional neural network. In Proceedings of the 2021 International Conference on Artificial Intelligence, Big Data and Algorithms (CAIBDA), Xi’an, China, 28–30 May 2021; pp. 41–45. [Google Scholar]
- Wang, A.; Peng, T.; Cao, H.; Xu, Y.; Wei, X.; Cui, B. TIA-YOLOv5: An improved YOLOv5 network for real-time detection of crop and weed in the field. Front. Plant Sci. 2022, 13, 1091655. [Google Scholar] [CrossRef]
- Gallo, I.; Rehman, A.U.; Dehkordi, R.H.; Landro, N.; La Grassa, R.; Boschetti, M. Deep object detection of crop weeds: Performance of YOLOv7 on a real case dataset from UAV images. Remote Sens. 2023, 15, 539. [Google Scholar] [CrossRef]
- Ding, Y.; Jiang, C.; Song, L.; Liu, F.; Tao, Y. RVDR-YOLOv8: A Weed Target Detection Model Based on Improved YOLOv8. Electronics 2024, 13, 2182. [Google Scholar] [CrossRef]
- Wang, A.; Zhang, W.; Wei, X. A review on weed detection using ground-based machine vision and image processing techniques. Comput. Electron. Agric. 2019, 158, 226–240. [Google Scholar] [CrossRef]
- Jing, J.; Zhai, M.; Dou, S.; Wang, L.; Lou, B.; Yan, J.; Yuan, S. Optimizing the YOLOv7-Tiny Model with Multiple Strategies for Citrus Fruit Yield Estimation in Complex Scenarios. Agriculture 2024, 14, 303. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar]
- Lin, T.-Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [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–23 June 2018; pp. 8759–8768. [Google Scholar]
- Ma, N.; Wu, Y.; Bo, Y.; Yan, H. Chili Pepper Object Detection Method Based on Improved YOLOv8n. Plants 2024, 13, 2402. [Google Scholar] [CrossRef] [PubMed]
- Hung, M.-H.; Ku, C.-H.; Chen, K.-Y. Application of Task-Aligned Model Based on Defect Detection. Automation 2023, 4, 327–344. [Google Scholar] [CrossRef]
- Zhang, Y.; Ni, Q. A novel weld-seam defect detection algorithm based on the s-yolo model. Axioms 2023, 12, 697. [Google Scholar] [CrossRef]
- Zhang, T.; Zhang, J.; Pan, P.; Zhang, X. YOLO-RRL: A Lightweight Algorithm for PCB Surface Defect Detection. Appl. Sci. 2024, 14, 7460. [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]
- Zhang, X.; Song, Y.; Song, T.; Yang, D.; Ye, Y.; Zhou, J.; Zhang, L. LDConv: Linear deformable convolution for improving convolutional neural networks. Image Vis. Comput. 2024, 149, 105190. [Google Scholar] [CrossRef]
- Tang, S.; Zhang, S.; Fang, Y. HIC-YOLOv5: Improved YOLOv5 for small object detection. In Proceedings of the 2024 IEEE International Conference on Robotics and Automation (ICRA), Yokohama, Japan, 13–17 May 2024; pp. 6614–6619. [Google Scholar]
- Huynh-The, T.; Hua, C.-H.; Pham, Q.-V.; Kim, D.-S. MCNet: An efficient CNN architecture for robust automatic modulation classification. IEEE Commun. Lett. 2020, 24, 811–815. [Google Scholar] [CrossRef]
- Jiang, T.; Zhou, J.; Xie, B.; Liu, L.; Ji, C.; Liu, Y.; Liu, B.; Zhang, B. Improved YOLOv8 Model for Lightweight Pigeon Egg Detection. Animals 2024, 14, 1226. [Google Scholar] [CrossRef]
- Liu, W.; Lu, H.; Fu, H.; Cao, Z. Learning to upsample by learning to sample. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Paris, France, 1–6 October 2023; pp. 6027–6037. [Google Scholar]
- Yang, W.; Qiu, X. A lightweight and efficient model for grape bunch detection and biophysical anomaly assessment in complex environments based on YOLOv8s. Front. Plant Sci. 2024, 15, 1395796. [Google Scholar] [CrossRef] [PubMed]
- Khaniki, M.A.L.; Mirzaeibonehkhater, M.; Manthouri, M. Enhancing Pneumonia Detection using Vision Transformer with Dynamic Mapping Re-Attention Mechanism. In Proceedings of the 2023 13th International Conference on Computer and Knowledge Engineering (ICCKE), Mashhad, Iran, 1–2 November 2023; pp. 144–149. [Google Scholar]
- Zheng, Z.; Ge, Z.; Tian, Z.; Yang, X.; Zhou, Y. WoodGLNet: A multi-scale network integrating global and local information for real-time classification of wood images. J. Real-Time Image Process. 2024, 21, 147. [Google Scholar] [CrossRef]
- Lau, K.W.; Po, L.-M.; Rehman, Y.A.U. Large separable kernel attention: Rethinking the large kernel attention design in cnn. Expert Syst. Appl. 2024, 236, 121352. [Google Scholar] [CrossRef]
- Cong, S.; Zhou, Y. A review of convolutional neural network architectures and their optimizations. Artif. Intell. Rev. 2023, 56, 1905–1969. [Google Scholar] [CrossRef]
- Wang, J.; Wang, Y.; Sun, A.; Zhang, Y. A Lightweight Network FLA-Detect for Steel Surface Defect Detection. Res. Sq. 2024; preprint. [Google Scholar] [CrossRef]
- Chen, X.; Lv, J.; Fang, Y.; Du, S. Online detection of surface defects based on improved YOLOV3. Sensors 2022, 22, 817. [Google Scholar] [CrossRef]
- Yang, J.; Hu, Q.; Cheng, M.-M.; Wang, L.; Liu, Q.; Bai, X.; Meng, D. Computer Vision: Second CCF Chinese Conference, CCCV 2017, Tianjin, China, October 11–14, 2017, Proceedings, Part III; Springer: Berlin/Heidelberg, Germany, 2017; Volume 773. [Google Scholar]
- Du, W.; Jiang, G.; Xu, W.; Ma, J. Sequential patent trading recommendation using knowledge-aware attentional bidirectional long short-term memory network (KBiLSTM). J. Inf. Sci. 2023, 49, 814–830. [Google Scholar] [CrossRef]
- Hou, Q.; Zhou, D.; Feng, J. Coordinate attention for efficient mobile network design. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 13713–13722. [Google Scholar]
- Gao, H.; Sun, Y.; Shi, W. The Internet of Things Drives Smart City Management: Enhancing Urban Infrastructure Efficiency and Sustainability. J. Organ. End User Comput. (JOEUC) 2024, 36, 1–17. [Google Scholar] [CrossRef]
- Deng, X.; Liu, Q.; Deng, Y.; Mahadevan, S. An improved method to construct basic probability assignment based on the confusion matrix for classification problem. Inf. Sci. 2016, 340, 250–261. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Yeh, I.-H.; Liao, H.-Y.M. Yolov9: Learning what you want to learn using programmable gradient information. arXiv 2024, arXiv:2402.13616. [Google Scholar]
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. Yolov10: Real-time end-to-end object detection. arXiv 2024, arXiv:2405.14458. [Google Scholar]
- Uygun, T.; Ozguven, M.M. Real-Time Detection of Shot-Hole Disease in Cherry Fruit Using Deep Learning Techniques via Smartphone. Appl. Fruit Sci. 2024, 66, 875–885. [Google Scholar] [CrossRef]
- Tang, Z.; Zhang, W.; Li, J.; Liu, R.; Xu, Y.; Chen, S.; Fang, Z.; Zhao, F. LTSCD-YOLO: A Lightweight Algorithm for Detecting Typical Satellite Components Based on Improved YOLOv8. Remote Sens. 2024, 16, 3101. [Google Scholar] [CrossRef]
Category Code | Weed Category | Quantity |
---|---|---|
0 | Bluegrass | 2763 |
1 | chenopodium album | 1460 |
2 | cirsium setosum | 1498 |
3 | Corn | 2676 |
4 | Sedge | 2542 |
5 | portulaca oleracea | 126 |
AKConv | DySample | LSKA-Attention | Precision (%) | Recall (%) | mAP50 (%) | mAP50:95 (%) | Model Size (MB) | GFLOPS |
---|---|---|---|---|---|---|---|---|
89.93 | 86.16 | 91.64 | 72.53 | 5.96 | 8.2 | |||
√ | 88.34 | 89.01 | 93.43 | 73.12 | 5.51 | 7.8 | ||
√ | 91.37 | 87.79 | 94.42 | 73.20 | 5.98 | 8.2 | ||
√ | 88.60 | 88.77 | 93.52 | 74.57 | 5.37 | 7.6 | ||
√ | √ | 89.49 | 88.56 | 93.72 | 75.20 | 5.52 | 5.4 | |
√ | √ | 90.81 | 86.44 | 92.41 | 70.38 | 10.16 | 5.2 | |
√ | √ | √ | 92.13 | 88.61 | 94.71 | 74.43 | 5.02 | 7.3 |
Model | Precision (%) | Recall (%) | mAP50 (%) | mAP50:95 (%) | GFLOPS | Model Size (MB) |
---|---|---|---|---|---|---|
SSD | 41.26 | 48.31 | 61.69 | 37.67 | 68.2 | 105 |
Faster R-CNN | 58.00 | 62.31 | 81.38 | 52.64 | 78.8 | 628.7 |
YOLO v5n | 89.03 | 85.85 | 92.40 | 73.26 | 7.1 | 5.04 |
YOLO v5s | 88.65 | 89.54 | 94.90 | 75.40 | 23.8 | 17.6 |
YOLO v7_tiny | 86.50 | 83.20 | 86.10 | 63.90 | 13.2 | 12.3 |
YOLO v7 | 85.40 | 85.20 | 89.40 | 68.20 | 105.2 | 74.8 |
YOLO v9t | 91.47 | 87.51 | 93.72 | 75.88 | 7.6 | 4.43 |
YOLO v10n | 89.74 | 87.32 | 93.09 | 74.35 | 8.2 | 5.5 |
ADL-YOLOv8 | 92.13 | 88.61 | 94.71 | 74.43 | 7.3 | 5.02 |
Model | Precision (%) | Recall (%) | mAP50 (%) | mAP50:95 (%) | GFLOPS | Model Size (MB) |
---|---|---|---|---|---|---|
RVDR-YOLOv8 | 91.88 | 87.24 | 93.34 | 73.64 | 7.4 | 5.43 |
YOLO v11s | 92.14 | 88.32 | 94.09 | 74.35 | 7.2 | 5.27 |
ADL-YOLOv8 | 92.13 | 88.61 | 94.71 | 74.43 | 7.3 | 5.02 |
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
Jia, Z.; Zhang, M.; Yuan, C.; Liu, Q.; Liu, H.; Qiu, X.; Zhao, W.; Shi, J. ADL-YOLOv8: A Field Crop Weed Detection Model Based on Improved YOLOv8. Agronomy 2024, 14, 2355. https://doi.org/10.3390/agronomy14102355
Jia Z, Zhang M, Yuan C, Liu Q, Liu H, Qiu X, Zhao W, Shi J. ADL-YOLOv8: A Field Crop Weed Detection Model Based on Improved YOLOv8. Agronomy. 2024; 14(10):2355. https://doi.org/10.3390/agronomy14102355
Chicago/Turabian StyleJia, Zhiyu, Ming Zhang, Chang Yuan, Qinghua Liu, Hongrui Liu, Xiulin Qiu, Weiguo Zhao, and Jinlong Shi. 2024. "ADL-YOLOv8: A Field Crop Weed Detection Model Based on Improved YOLOv8" Agronomy 14, no. 10: 2355. https://doi.org/10.3390/agronomy14102355
APA StyleJia, Z., Zhang, M., Yuan, C., Liu, Q., Liu, H., Qiu, X., Zhao, W., & Shi, J. (2024). ADL-YOLOv8: A Field Crop Weed Detection Model Based on Improved YOLOv8. Agronomy, 14(10), 2355. https://doi.org/10.3390/agronomy14102355