###### Abstract  
The detection and accurate positioning of agricultural pests and diseases can significantly improve the effectiveness of disease and pest control and reduce the cost of prevention and control, which has become an urgent need for crop production. Aiming at the low precision of maize leaf pest and disease detection, a new model of maize leaf pest and disease detection using attention mechanism and multi-scale features was proposed. Our model combines a convolutional block attention module (CBAM) with the ResNet50 backbone network to suppress complex background interference and enhance feature expression in specific regions of the maize leaf images. We also design a multi-scale feature fusion module that aggregates local and global information at different scales, improving the detection performance for objects of varying sizes. This module reduces the number of parameters and enhances efficiency by using a lightweight module and replacing the deconvolutional layer. Experimental results on a natural environment dataset demonstrate that our proposed model achieves an average detection accuracy of 85.13%, which is 9.59% higher than the original CenterNet model. The model has 24.296 M parameters and a detection speed of 23.69 f/s. Compared with other popular models such as SSD-VGG, YOLOv5, Faster-RCNN, and EfficientDet-D0, our proposed model demonstrates superior performance in the fast and accurate detection of maize leaf pests and diseases. This model has practical applications in the identification and treatment of maize pests and diseases in the field, and it can provide technical support for precision pesticide application. The trained model can be deployed to a web client for user convenience.  
m 2023 13 10441 18 July 2023 8 September 2023 14 September 2023 18 September 2023 18 July 2023 8 September 2023 18 July 2023 8 September 2023 18 September 2023 18 July  
blight in maize, achieving an average detection accuracy of 93.55% for this particular disease. [PERSON] [9] proposed the MEAN-SSD algorithm based on the improved SSD algorithm for detecting apple leaf disease, with an average detection accuracy of 83.12%. [PERSON] et al. [10] developed a maize stamen detection model by improving the CenterNet algorithm to realize maize growth monitoring and yield estimation, achieving a recognition accuracy of 92.4%. However, the CenterNet model had some instances of missing dense targets.  
While Faster R-CNN and other two-stage methods exhibit high detection accuracy, they are computationally intensive and may not meet real-time requirements. On the other hand, one-stage algorithms like YOLO directly take the image as input and learn pixel-level features, but they often suffer from a high false detection rate, misclassifying some background areas as targets. Additionally, most of the leaf image datasets used in research are captured in laboratory environments with relatively simple backgrounds, which differ significantly from the complex backgrounds found in real environments, including various soils, vegetation, stones, and weeds. These varying background factors can interfere with plant disease detection and affect algorithm performance.  
To address these issues, this paper proposes an improved maize leaf disease and pest detection model based on the CenterNet target detection algorithm. The model focuses on several common maize leaf diseases and pests in natural environments, including three diseases and five pests. Experimental comparisons with other detection algorithms are conducted to verify the effectiveness of the proposed method. Furthermore, the model is deployed on a web platform to provide farmers with a more convenient user experience.