Abstract:Abstract: Faced with the challenges of small target volumes, diverse morphologies, and uneven distributions of pests in maize crop pest detection, existing detectors suffer from issues such as false positives and false negatives. In response to these challenges, the SPD-YOLOv7 algorithm for maize crop pest detection based on YOLOv7 is proposed. A dataset of maize pests is curated and augmented using data augmentation techniques. The SPD-Conv module is introduced, replacing some of the stride convolution layers in the original backbone and head networks to mitigate the loss of detailed information as the network deepens, thereby enhancing the model's ability to capture features and positional information of small targets. By integrating the ELAN-W module with the CBAM attention mechanism, the network is better equipped to learn pest features, suppress background noise, and focus on the target itself. The improved YOLOv7 network achieves an accuracy of 98.38% and a mean average precision of 99.4%. Compared to the original YOLOv7 model, the accuracy and mean average precision have improved by 2.46 and 3.19 percentage points, respectively. The enhanced algorithm demonstrates superior detection accuracy compared to mainstream algorithms such as Faster-RCNN, YOLOv3, YOLOv4, YOLOv5, and YOLOv6, while maintaining real-time performance. Experimental results indicate that the proposed algorithm facilitates rapid identification of maize crop pest distributions and can be applied for real-time pest monitoring in agricultural fields.