In recent years,due to various reasons such as atmospheric pollution,excessive or incorrect use of pesticides,and poor crop protection facilities,crop diseases have increased in variety and incidence,which greatly affect the quality of crop yields and thus reduce the income level of farmers.Therefore,we must pay attention to the identification and control of crop diseases to improve the quality and production level of crops.Traditional crop disease identification methods mainly rely on staff naked eye identification,expert judgment and other methods;machine learning-based methods rely on manual extraction of features,which cannot extract all the information of disease features and the accuracy rate needs to be improved.Therefore,in order to realize the automatic recognition of crop diseases,this paper researches the recognition methods of 38 health and disease types of 14 crops such as tomatoes and grapes based on convolutional neural networks,and builds a disease recognition system on the Web side.The main work accomplished in this paper is as follows.(1)To address the problem of uneven distribution of disease type data in the original dataset,four data enhancement methods of random rotation,image flipping,brightness enhancement,and noise addition were used to complete the data expansion,and a standard dataset was produced in the ratio of 6:2:2 for the training set,validation set,and test set.In order to accelerate the convergence speed of the network and improve the stability,pre-processing was performed before the images were input to the network.(2)In order to explore the hyperparameters suitable for network training,ResNet50 was used to study the effects of four sizes of Batchsize and five common optimization algorithms on network training,and compared with the popular AlexNet,VGGNet,and GoogleNet networks,in which the ResNet50 network was able to achieve better training Then,the transfer learning method is used to train ResNet50,and the experimental results show that the transfer learning method can effectively improve the prediction accuracy of the ResNet50 network.(3)To address the problem of poor prediction ability of pre-trained ResNet50 for different types of diseases of the same crop,an improved ResNet50 model is proposed.Firstly,three 3×3 convolutional kernels are used instead of 7×7 convolutional kernels to increase the nonlinear characterization ability of the network;in order to change the problem of missing features of the residual structure of the original network,an average pooling layer is added to the downsampling module to retain all the information of the input features;finally,a channel attention mechanism is added to the network to improve the extraction ability of the network for minute features.According to the different positions of the attention mechanism,the improved model is divided into SERnet1 and SE-Rnet2.The experimental results show that the overall recognition accuracy of the improved model is 99.43% and 98.85%,respectively,and finally the improved model SE-Rnet1 is deployed on the web side using Django technology to build the disease recognition system. |