Tomato economy of our country accounts for a large proportion of the entire crop economy.However,in the process of tomato planting and cultivating will encounter various diseases,resulting in a decline in yield and huge losses.Nowadays,in the era of big data and artificial intelligence,it is of great significance to improve the income of farmers and promote the economic development of related industries by making full use of image data,using efficient and accurate intelligent algorithms to replace manual identification of tomato diseases.Existing research work: on the one hand,the disease identification scheme based on machine learning requires manual extraction of pathological features,which is not only time-consuming and labor-intensive,but also limits the upper limit of model identification accuracy.The complex structure leads to poor generalization ability,only a small number of disease types can be identified,and it is easily disturbed by background factors.To this end,this paper proposes a tomato disease recognition model based on knowledge distillation and attention mechanism.The main research work is as follows:1.Propose a basic model with simple structure.There are various models used in the existing tomato disease identification research,and the training methods are different.It is difficult to judge the best model structure and training scheme in this research problem.Therefore,3 different experimental schemes were designed,and 4 classical models with different structures,Alex Net,VGG16,Res Net and Dense Net were trained at the same time.The experimental results show that by pre-training the model with diverse additional image data,even the VGG16 with a simple structure can achieve a recognition accuracy close to that of Dense Net121.Therefore,a lightweight model was designed using the structure of VGG16,and then the model was pre-trained using the pre-training data set,and finally the model parameters were fine-tuned by using tomato disease images.Finally,we obtain a tomato disease identification model with a simple structure.However,the lightweight structural design also makes the model less accurate than the four classic models,which needs to be further improved.2.Propose a scheme to improve model performance by using attention algorithm and knowledge distillation algorithm.The SE channel attention algorithm module is embedded in the basic model,and the model is guided to pay attention to the important lesion areas in the image.Then the knowledge learned from the large model is transferred to the model using the knowledge distillation algorithm,and the recognition accuracy of the final model is comparable to that of the classical model.Close to 98.33%,but the model is only 30.79 M,which proves the effectiveness of the scheme proposed in this paper.In order to further confirm that the model has learned the key tomato disease spot features and evaluate the generalization ability of the model,4 types of 38 crop diseases were randomly selected,and the relevant images were downloaded from the Internet to identify and visualize the results.It was found that the model is very good Focus on the diseased area of leaves with high confidence and generalization ability. |