| Crop diseases are one of the inducing factors for grain yield reduction,and timely and accurate disease prevention and control work plays a decisive role in promoting the healthy growth of crops.Traditional methods for identifying disease types mainly rely on the experience of experts,which results in low recognition efficiency and strong subjectivity.With the development of computer technology,a large amount of research is devoted to using visual image information to identify and classify disease images.However,due to the interference of complex backgrounds,the existing disease recognition results based on image processing are still not ideal.In addition,most existing research is based on leaf disease spots with obvious characteristics and significant differences,without considering the study of small and similar disease spots that are more meaningful in disease prevention and control work.Therefore,this article takes crop disease images in complex contexts as the research object,and makes targeted improvements to the convolutional neural network MobileNet-V2 to achieve accurate recognition of small lesions and similar diseases in complex backgrounds.The specific research content and results are as follows:1.In response to the problem of MobileNet-V2 being difficult to focus on lesion areas in complex environments,the internal relationship between model channel attention and lesion area location information was analyzed,and a coordinate attention mechanism was embedded in MobileNet-V2.The channel features and spatial information were weighted and fused to establish a dependency relationship between them,enabling the model to allocate attention more accurately to the lesion area.Finally,effective localization of lesion areas on pixel coordinates was achieved;To address the difficulty of extracting features from small lesions,upsampling fusion was performed on feature maps of different sizes in the network to construct a new feature map that combines high and low level information of the network.The experimental results indicate that the parameter quantity of the improved model is 2.29×106,the recognition accuracy of 94.48% was achieved on the complex background crop leaf disease dataset,which increased by 2.54 percentage compared to before improvement.Compared to traditional models such as VGG-16,Efficient Net-b0,Res Net-50,and Shuffle Net-V2,the improved model has better recognition performance,smoother convergence process,and less parameter memory,which can better identify crop leaf diseases in complex field backgrounds.2.In response to the problem of similar features in different categories of diseases,which can easily lead to misclassification of diseases,a Transformer Encoder is proposed to be introduced as a convolutional operation into the improved model to establish the connection between remote features and extract the features of global disease images.Then,Centerloss is introduced as a penalty term to optimize the common cross entropy loss,so as to expand the difference between the categories of crop disease characteristics and narrow the distance within the category.Finally,based on the characteristics of the dataset,experiments were conducted on different datasets using more suitable evaluation indicators.We achieved a recognition accuracy of99.62% on Plant Village and a balance accuracy of 96.58% on Dataset1 with complex backgrounds.The improved model not only exhibits good generalization ability when facing disease images from different sources,but also effectively solves the contradiction between recognition accuracy and parameter quantity.Compared with pure CNN and pure Transformer models,the leaf disease recognition model proposed in this paper not only pays more attention to the characteristics of disease areas,but also better distinguishes different diseases with similar features.3.A handheld disease identification device has been designed.This device integrates devices such as AI cameras,Hi3516DV300 chips,and AI video recording analyzers.This device captures field crop leaf videos through AI lenses and provides them to the Haisi Taurus AI video analyzer.Through steps such as model construction,format conversion,and burning,this video analyzer will integrate the image recognition function of deep learning models.It can analyze the input crop leaf disease videos frame by frame,output and mark areas in the input images that may have disease spots.The final detection accuracy reaches 83.35%,the recall rate reaches 84.12%,the average accuracy rate reaches 83.49%,and the FPS reaches 38.4 frames/s.In summary,the improved model proposed in this article can achieve accurate identification of crop leaf diseases in complex backgrounds,with better recognition performance for small and similar disease spots on leaves,and has good model generalization ability.The experimental results of handheld disease recognition equipment show that the improved model in this paper can achieve rapid and accurate detection of leaf lesions in complex backgrounds. |