Abstract:Aiming at the problem that the traditional apple leaf disease classification method has poor accuracy and low efficiency, which affects prevention and cure effect, an improved ResNet18 algorithm was proposed. By adding the branch of channel and spatial attention mechanism to the original ResNet18, the feature extraction ability of the network for leaf disease regions was strengthened to improve the disease recognition accuracy and real-time performance. In addition, to better guide the network to learn the features of sporadically distributed disease spots, the feature map random cropping branch was introduced, which not only achieved the expansion of the limited sample space, but also further optimized the network structure and improved the training speed. The experiment was conducted with five common types of apple foliar diseases (black star, black rot, cedar rust, gray spot, and powdery mildew) as the main research objects and compared with the mainstream classification algorithm models for analysis.The experimental results showed that the disease classification accuracy of the proposed ResNet18-CBAM-RC1 model can reach 98.25%, which was higher than that of ResNet18 (93.19%) and VGG16 (96.13%), and can effectively extract leaf disease features, enhance the recognition of multiple types of diseases, and improve the real-time recognition capability and accuracy. In addition, the model size was only 37.44MB and the inference time of a single image was 9.11ms, which can meet the real-time requirements of orchard disease recognition on embedded devices and provide information support for disease prevention and control in digital orchards.