| Crop disease is one of the main natural disasters in agricultural production,which seriously restricts the growth and development of crops and threatens food security.Timely classification and identification and prescribing the right medicine can effectively prevent crop diseases and improve the quality of agricultural products.However,during the growth of crops,there are a wide variety of diseases with similar shapes,which greatly increases the difficulty of disease identification.In addition,due to the shortage of relevant technical personnel,there are often potential hazards of disease spread,which further increases production costs.Therefore,this study uses deep learning technology to classify and identify crop diseases based on convolutional neural networks,design an efficient visual detection method for diseases,and develop an identification system that is easy to promote.The main research contents are as follows:Firstly,based on the ResNet50 network,a fine-grained disease classification algorithm for crops is proposed.By introducing transfer learning and SE attention mechanism,and using the Focal Loss loss function to train the model,the model accuracy,training speed and generalization ability of the algorithm are improved.Strengthen the algorithm’s attention to the diseased part.The experimental results show that the average accuracy of the improved TL-SE-ResNet50 convolutional neural network model is 7.7%higher than that of the original ResNet50,reaching 96.32%.Second,the system needs to be analyzed.After demand analysis,it is determined that individual farmers are the main users of the system,and farmland is the environment for the use of the system.And use the E-R diagram to design the database table structure.Based on the requirements and database structure,the visual damage recognition system for crop diseases is developed.The workflow of the system is as follows:On the WeChat applet,the user uploads an image to the Flask backend,and Flask calls the TL-SE-ResNet50 model to predict and obtain the final recognition result.echo to the applet.At the same time,a continuous delivery method based on GitOps is designed to complete the deployment and delivery of the system.GitOps uses Gitlab CI to complete continuous integration,and Argo CD implements continuous deployment services.The code is built into an image through continuous integration technology,the continuous deployment service pulls the image and deploys it to the Kubernetes cluster,and the Kubernetes cluster realizes automatic scaling of the number of containers based on concurrency and high-availability deployment of multiple master nodes,which is in line with the cloud-native development concept.Finally,functional and non-functional tests are performed on the system respectively.Through the functional test,various functions such as the applet and the background management platform are running normally.The non-functional test uses Jmeter to test the classification interface.The results show that the response time of the classification interface is 882 ms,and the Kubernetes cluster container can automatically expand and shrink to reduce the delay.Simulate the situation of electing a new control node after the control node goes offline to verify the high availability of the cluster.Through the above research,a visual recognition system for crop diseases based on deep learning is established.Functional tests and non-functional tests prove that the system function,recognition efficiency and accuracy all meet the design requirements. |