摘要
In recent years, the apple growing industry in Qingyang has been seriously threatened by many diseases such as grey mould, rust, brown spot, scar disease and leaf spot. These diseases have caused significant losses to the local economy. This study discusses the method of combining computer technology with deep learning to accurately diagnose these diseases, with the aim of reducing their negative impact on agricultural development. To this end, we collected early disease data sets of apple leaves in Ningxian Modern Agricultural Industrial Park in Qingyang City, Gansu Province, and Haisheng Apple Planting Base in Yulinzi Town, Zhengning County. Considering the problems of low accuracy of classification of apple leaf diseases, difficulty in collecting data sets and huge model parameters, this paper selects grey spot, rust, brown spot, scarring and leaf spot as the research objects, and proposes a MobileViT model suitable for small sample size based on the theory of deep transfer learning. The model aims to solve the problems of large model, low precision and small sample in the process of apple leaf disease detection under complex background. Firstly, MobileViT, Vision Transformer and Swin Transformer are used for the training of the model transfer learning. The experimental results show that the accuracy rate of the MobileViT model is 97.3%, the loss value is 0.169, the model size is 18.9 MB, and the prediction time of a single image is only 2.6 ms. Furthermore, the MobileViT model is optimised by freezing different training strategies, the migration strategy is the most effective, so the average accuracy of the model in apple leaf disease classification reaches 98.54%, and the loss value drops to 0.125. Finally, we developed a WeChat applet to deploy the trained model, and realised the visualisation of apple leaf disease classification. This innovative application not only improves the efficiency and accuracy of disease classification, but also provides new opportunities for the modernisation and intelligence of agricultural technology.