A Lightweight and Dynamic Feature Aggregation Method for Cotton Field Weed Detection Based on Enhanced YOLOv8

Doudou Ren,Wenzhong Yang,Zhifeng Lu,Danny Chen,Wenxuan Su,Yihang Li
DOI: https://doi.org/10.3390/electronics13112105
IF: 2.9
2024-05-29
Electronics
Abstract:Weed detection is closely related to agricultural production, but often faces the problems of leaf shading and limited computational resources. Therefore, this study proposes an improved weed detection algorithm based on YOLOv8. Firstly, the Dilated Feature Integration Block is designed to improve the feature extraction in the backbone network by introducing large kernel convolution and multi-scale dilation convolution, which utilizes information from different scales and levels. Secondly, to solve the problem of a large number of parameters in the feature fusion process of the Path Aggregation Feature Pyramid Network, a new feature fusion architecture multi-scale feature interaction network is designed, which achieves the high-level semantic information to guide the low-level semantic information through the attention mechanism. Finally, we propose a Dynamic Feature Aggregation Head to solve the problem that the YOLOv8 detection head cannot dynamically focus on important features. Comprehensive experiments on two publicly accessible datasets show that the proposed model outperforms the benchmark model, with mAP50 and mAP75 improving by 4.7% and 5.0%, and 5.3% and 3.3%, respectively, whereas the number of model parameters is only 6.62 M. This study illustrates the utility potential of the algorithm for weed detection in cotton fields, marking a significant advancement of artificial intelligence in agriculture.
engineering, electrical & electronic,physics, applied,computer science, information systems
What problem does this paper attempt to address?
The paper primarily addresses the issue of weed detection in cotton fields and proposes a lightweight dynamic feature aggregation method based on an improved YOLOv8 (EY8-LDFA). The research aims to solve the following problems: 1. **Target Scale Diversity**: Weeds vary significantly in size at different growth stages, making it difficult for a single-scale detection model to effectively identify weeds at various scales. 2. **Similarity Between Weeds and Crops**: Weeds and crops like cotton may be very similar in color and shape, especially at different growth stages, which can affect the detection model's performance, leading to false positives or missed detections. 3. **Dense Occlusion**: During crop growth, dense occlusion may occur, causing the target edges to be unclear and reducing the accuracy and robustness of weed detection. To address the above challenges, the research proposes the following key contributions: - Designed a lightweight and high-precision weed detection model EY8-LDFA, particularly suitable for resource-constrained environments. - Proposed a method called DFIB (Dilated Feature Integration Block) to efficiently integrate information from different levels and scales in the image. Additionally, to enhance the feature extraction capability of the backbone network, the C2f-DFIB module was designed, which achieves effective integration of global information and local details through multi-scale dilated convolutions and large-scale convolutions. - Designed a lightweight feature fusion architecture MFIN (Multi-Scale Feature Interaction Network) to reduce the number of parameters and computational complexity in the feature fusion network. MFIN enhances and integrates features of different scales and uses high-level semantic information to guide low-level semantic information to improve detection performance. - Designed a module called DFAH (Dynamic Feature Aggregation Head) that allows the detection head to dynamically focus on important features. DFAH utilizes technologies like DCNv3 to achieve adaptive sampling and dynamic weighting of feature maps, capturing long-range dependency information and feature alignment, thereby enhancing the target perception capability of the detection head. In summary, this research significantly improves the accuracy, efficiency, and robustness of weed detection in cotton fields through a series of innovative methods, providing strong technical support for precision agriculture.