## 1 Introduction  
Pests and diseases, as major calamities affecting the development of agriculture, frequently inflict substantial economic losses due to their diversity and propensity for rapid outbreak [1]. According to a report by the Food and Agriculture Organization (FAO) of the United Nations, pests and diseases globally result in an annual loss of approximately 20% to 40% of agricultural crops, posing a severe threat to the security of staple food crops such as maize, wheat, and rice [2]. In the face of increasingly severe pest and disease threats, it is critically important to undertake control efforts based on classification and detection work. Traditional methods for the classification and detection of pests and diseases primarily rely on visual observation, manual sampling, and laboratory analysis, which are typically time-consuming and susceptible to the limitations imposed by human experience [3]. With the advancement of computer and image acquisition technologies, machine learning based techniques for pest and disease classification and detection have garnered considerable attention from numerous scholars [4; 5; 6; 7]. Notably, deep learning technologies, owing to their potent capability for automatic feature extraction, high adaptability to large datasets, and superior robustness, have demonstrated more accurate and efficient image processing performance [8; 9]. The basic concept is predicated on the utilization of neural networks, intricately composed of convolutional layers, pooling layers, and fully connected layers, for the purposes of data analysis and feature learning. These networks possess the ability to extract comprehensive features from images and, through the amalgamation of these features, procuring advanced information, which consequently facilitates the classification and detection of targets within images [10]. In the realm of pest and disease identification research, it is imperative to comprehensively extract information pertaining to color, texture, and morphology. Such information is often susceptible to constraints imposed by factors such as the stochastic distribution of lesions, the diversity in symptoms, and complex environmental conditions (e.g., lighting, camera angle, etc.). Upon alterations in the environment, the characteristics utilized for identification and detection may deviate from the established patterns, consequently precipitating a decline in precision [11; 12]. Some scholars conduct relevant research by combining the distinctive features of agricultural pests and diseases with deep learning technology. Methods such as optimization of network architecture [13; 14], refinement of loss functions [15], and integration of transfer learning [16] have been sequentially proposed in classification tasks, while approaches based on R-CNN [17; 18], SSD [19], and YOLO [20; 21] have also been subjected to experimentation in object detection tasks. However, these methodologies are frequently predicated upon niche datasets and may not be applicable to real-world scenarios characterized by complex background noise and encompassing a multitude of factors. Moreover, the occurrence scenarios of pests and diseases in agriculture are characterized by complex environments, where the outcomes of image data recognition and detection are susceptible to interference from background factors. This necessitates models with enhanced self-attention capabilities to improve the degree of attention in priority regions, an area in which the ViT model has demonstrated significant advantages [22; 23]. This model applies the traditional transformer architecture to visual data, breaking down images into fixed-size patches and projecting these into a one-dimensional sequence for processing, thereby enabling the capture of the rich features and relationships inherent within the images [24].