A Lightweight Cotton Field Weed Detection Model Enhanced with EfficientNet and Attention Mechanisms
Open Access
Abstract
Cotton is a crucial crop in the global textile industry, with major production regions including China, India, and the United States. While smart agricultural mechanization technologies, such as automated irrigation and precision pesticide systems, have improved crop management, weeds remain a significant challenge. These weeds not only compete with cotton for nutrients but can also serve as hosts for diseases, affecting both cotton yield and quality. Existing weed detection models perform poorly in the complex environment of cotton fields, where the visual features of weeds and crops are similar and often overlap, resulting in low detection accuracy. Furthermore, real-time deployment on edge devices is difficult. To address these issues, this study proposes an improved lightweight weed detection model, YOLO-WL, based on the YOLOv8 architecture. The model leverages EfficientNet to reconstruct the backbone, reducing model complexity and enhancing detection speed. To compensate for any performance loss due to backbone simplification, CA (cross-attention) is introduced into the backbone, improving feature sensitivity. Finally, AFPN (Adaptive Feature Pyramid Network) and EMA (efficient multi-scale attention) mechanisms are integrated into the neck to further strengthen feature extraction and improve weed detection accuracy. At the same time, the model maintains a lightweight design suitable for deployment on edge devices. Experiments on the CottonWeedDet12 dataset show that the YOLO-WL model achieved an mAP of 92.30%, reduced the detection time per image by 75% to 1.9 ms, and decreased the number of parameters by 30.3%. After TensorRT optimization, the video inference time was reduced from 23.134 ms to 2.443 ms per frame, enabling real-time detection in practical agricultural environments.Keywords
Funding Information
- Hubei Province Key Research and Development Special Project of Science and Technology Innovation Plan (2023BAB087, 2023010201020465, 2024KJB328, CZQ24011)
- Wuhan Knowledge Innovation Special Dawn Project (2023BAB087, 2023010201020465, 2024KJB328, CZQ24011)
- Wuhan East Lake High-techDevelopment Zone (2023BAB087, 2023010201020465, 2024KJB328, CZQ24011)
- Fund for Research Platform of South-Central Minzu University (2023BAB087, 2023010201020465, 2024KJB328, CZQ24011)
This publication has 40 references indexed in Scilit:
- Deep learning based weed detection and target spraying robot system at seedling stage of cotton fieldComputers and Electronics in Agriculture, 2023
- WeedsNet: a dual attention network with RGB-D image for weed detection in natural wheat fieldPrecision Agriculture, 2023
- Deep learning techniques for in-crop weed recognition in large-scale grain production systems: a reviewPrecision Agriculture, 2023
- YOLOWeeds: A novel benchmark of YOLO object detectors for multi-class weed detection in cotton production systemsComputers and Electronics in Agriculture, 2023
- A deep learning approach incorporating YOLO v5 and attention mechanisms for field real-time detection of the invasive weed Solanum rostratum Dunal seedlingsComputers and Electronics in Agriculture, 2022
- A novel deep learning‐based method for detection of weeds in vegetablesPest Management Science, 2022
- Automated weed detection system in smart farming for developing sustainable agricultureInternational Journal of Environmental Science and Technology, 2021
- Performance of deep learning models for classifying and detecting common weeds in corn and soybean production systemsComputers and Electronics in Agriculture, 2021
- Unsupervised deep learning and semi-automatic data labeling in weed discriminationComputers and Electronics in Agriculture, 2019
- Potential use of ground‐based sensor technologies for weed detectionPest Management Science, 2013