DCP-YOLOv7x: improved pest detection method for low-quality cotton image - Ma, Yukun; Wei, Yajun; Ma, Minsheng; Ning, Zhilong; Qiao, Minghui; Awada, Uchechukwu (Frontiers in Plant Science, 2024)
Pests are important factors affecting the growth of cotton, and it is a challenge to accurately detect cotton pests under complex natural conditions (e.g., low-light environments). Aiming at the problems of degraded image quality, difficult feature extraction, and low detection precision of cotton pests in low-light environments, this paper proposes a low-light environments cotton pest detection method DCP-YOLOv7x based on YOLOv7x.This method is firstly enhanced by FFDNet (Fast and Flexible Denoising Convolutional Neural Network) and EnlightenGAN low-light image enhancement network for cotton pest low-quality images, aiming at generating high-quality pest images, reducing redundant noise, and improving target features and texture details in low-light environments. Second, the DAttention (Deformable Attention) mechanism is introduced into the SPPCSPC module of the YOLOv7x network to dynamically adjust the computation area of attention and enhance the feature extraction capability. Meanwhile, the loss function is modified, and NWD (Normalized Wasserstein Distance) is introduced to significantly improve the detection precision and convergence speed of small targets. In addition, the model detection head part is replaced with a DyHead (Dynamic Head) structure, which dynamically fuses the features at different scales by introducing dynamic convolution and multi-head attention mechanism to enhance the model's ability to cope with the problem of target morphology and location variability. The model is fine-tuned and tested using the Exdark and Dk-CottonInsect datasets.The experimental results show that the detection Precision (P) of DCP-YOLOv7x for cotton pests is: 95.9% and the Mean Average Precision (mAP0.5) is: 95.4% under a low-light environments.They are improved by 14.4% and 15.6%, respectively, compared to YOLOv7x. Experiments on the Exdark datasets also achieved better detection results, verifying the effectiveness of the present model in different low-light environments. Fast and accurate detection of cotton pests can provide strong theoretical support for improving cotton quality and yield. Moreover, this method can be further integrated into agricultural edge computing devices to enhance the practical application value.