A method and system for identifying camellia oleifera leaf diseases based on an improved ResNet model
By improving the data augmentation and recognition system of the ResNet model, the problems of accuracy and robustness in the identification of camellia diseases were solved, and efficient identification and treatment suggestions for camellia diseases were realized, thereby improving the yield and quality of camellia.
Patent Information
- Application Number
- CN202310574293.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-05-22
AI Technical Summary
In the current technology, the identification of diseases in camellia oleifera mainly relies on manual identification, and the identification accuracy of non-professionals is not high, making it difficult to detect diseases in a timely manner and propose effective measures, which affects the yield and quality of camellia oleifera.
An improved ResNet model was adopted, and a camellia disease identification system was built by combining data augmentation, the introduction of an attention mechanism and an improved residual structure with transfer learning. This system includes dataset augmentation and an interactive interface to improve identification accuracy and robustness.
It improves the accuracy of camellia disease identification and the robustness of the system, enabling accurate identification of multiple types of diseases under complex planting conditions, reducing the number of model parameters, and providing timely treatment suggestions.
Smart Images

Figure CN116612325B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of machine vision image recognition and image classification, in particular to an improved ResNet model-based camellia leaf disease identification method and system. BACKGROUND
[0002] Camellia is one of the four major woody oil plants, and the main product is tea oil. By-products include tea dregs, tea shells and tea meal, which have high comprehensive utilization value and are widely used in health care, medical treatment, biological pesticides, biological feed, sterilization and disinfection and chemical industry. However, due to extensive management, oil tea diseases occur frequently, which seriously affects the yield and quality of oil tea. Timely detection of oil tea diseases and corresponding solutions are the key to improving the yield and quality of oil tea. Due to the complex and variable symptoms of plant diseases, professional plant protection experts are often needed to accurately identify and diagnose, and amateur personnel are prone to diagnostic errors.
[0003] Deep learning can automatically extract image features without complex feature engineering and is widely used in the field of computer vision. Among them, as the most classic deep learning algorithm, convolutional neural network (CNN) has achieved good results in the field of image recognition. ResNet has achieved good results in image classification tasks.
[0004] Reasonably and efficiently using deep learning to establish a precise oil tea disease identification system can timely prevent the adverse effects of oil tea diseases and greatly improve the yield and quality of oil tea. SUMMARY
[0005] The application creates an improved ResNet model-based camellia leaf disease identification method and system, which improves the accuracy of camellia disease identification and reduces the model parameter quantity.
[0006] According to the first aspect of the application, an improved ResNet model-based camellia leaf disease identification method is provided, characterized in that it comprises:
[0007] Step 1: Collecting various camellia leaf disease leaf images and non-disease leaf images to form a camellia leaf disease identification dataset.
[0008] Step 2: build an improved ResNet-50 network model as a tea-oil tree disease identification network; wherein the improved ResNet-50 network model comprises an input layer, a hidden layer and an output layer; the hidden layer comprises an improved residual structure, and the improved residual structure comprises: residual structure input features sequentially pass through a first convolutional layer, a first swish activation function, a second convolutional layer, an SE module, and then the obtained results are connected with the residual structure input features, and then the results are processed through a second swish activation function to obtain residual structure output results; the SE module comprises: SE module input feature matrices sequentially pass through a global pooling layer, a first full connection layer, a siwsh activation function, a second full connection layer and a sigmoid activation function, and then the obtained results are multiplied with the SE module input feature matrices to obtain SE module output results.
[0009] Step 3: pre-train the tea-oil tree disease identification network with the PlantVillage data set to obtain a tea-oil tree disease identification network pre-training model.
[0010] Step 4: train the tea-oil tree disease identification network pre-training model with the tea-oil tree leaf disease identification data set to obtain a tea-oil tree disease identification network fully trained model.
[0011] Step 5: input the tea-oil tree leaf image to be identified into the tea-oil tree disease identification network fully trained model to obtain an identification output result.
[0012] Step 6: compare the identification output result with a preset threshold value, if the set threshold value is reached, output the disease type of the current plant, and give a processing suggestion according to the disease type of the plant; if the set threshold value is not reached, output feedback information to inquire whether the tea-oil tree leaf image belongs to an existing disease type in the tea-oil tree leaf disease identification data set, if it is an existing disease type, store the tea-oil tree leaf image in the data of the corresponding type in the tea-oil tree leaf disease identification data set, otherwise, add a new disease type in the tea-oil tree leaf disease identification data set, and store the tea-oil tree leaf image in the data of the new disease type, and save the input new processing suggestion.
[0013] Step 7: when the distance from the last time step 4 is reached to the preset self-updating time, return to step 4 according to the current tea-oil tree leaf disease identification data set.
[0014] Further, the tea-oil tree leaf disease identification method based on the improved ResNet model provided by the application is characterized in that step 1 further comprises: the tea-oil tree disease leaf image comprises tea bud disease, soft rot disease, anthracnose disease, net cake disease, smoke coal disease and algal spot disease; the non-disease leaf image comprises sunlight burning; the tea-oil tree leaf disease identification data set is enhanced, including enhancing brightness, increasing Gaussian noise, horizontal flipping and rotating by any angle.
[0015] Further, the improved ResNet model-based camellia leaf disease identification method provided by the present application is characterized in that step 3 further comprises: pre-training the camellia disease identification network with the PlantVillage dataset, the training round is 1000 rounds, the parameters obtained after each training round is completed are saved, and the parameter with the highest test accuracy is selected as the camellia disease identification network pre-training model parameter.
[0016] Further, the improved ResNet model-based camellia leaf disease identification method provided by the present application is characterized in that step 4 further comprises: selecting a cross-entropy loss function CrossEntropyLoss as the loss function for training, selecting Adam as the optimizer, setting the learning rate to 0.001, and saving the model parameter with the highest test accuracy as the camellia disease identification network fully trained model parameter.
[0017] According to the second aspect of the present application, an improved ResNet model-based camellia leaf disease identification system is provided, which is characterized in that the system inputs image data through an interactive interface, displays disease types and treatment suggestions, outputs feedback information and obtains new disease types and new treatment suggestions, so as to execute the improved ResNet model-based camellia leaf disease identification method of the first aspect.
[0018] According to the third aspect of the present application, a computer device is provided, which is characterized in that it comprises:
[0019] a memory for storing instructions; and a processor for calling the instructions stored in the memory to execute the improved ResNet model-based camellia leaf disease identification method of the first aspect.
[0020] According to the fourth aspect of the present application, a computer readable storage medium is provided, which is characterized in that it stores instructions, and the instructions are executed by a processor to execute the improved ResNet model-based camellia leaf disease identification method of the first aspect.
[0021] Compared with the prior art, the above technical solutions conceived by the present application have at least the following beneficial effects:
[0022] The improved ResNet network-based tea-oil tree disease identification system solves the problem that the tea-oil tree disease identification mainly relies on manual identification and the non-professional identification accuracy is not high at the present stage. The improved ResNet model improves the tea-oil tree disease identification accuracy and reduces the model parameter quantity by using the data enhancement method, introducing the attention mechanism, improving the residual structure, improving the activation function, and using the transfer learning method. In view of the problem that the tea-oil tree disease leaf image data is less, the original data set is processed by data enhancement, including operations such as enhancing brightness, adding Gaussian noise, horizontal flipping, rotating an arbitrary angle, simulating the real shooting situation, and improving the robustness of the model.
[0023] Through experiments, it is verified that the tea-oil tree disease identification system has good performance in accuracy. This verifies the superiority of the improved ResNet network model in the multi-class tea-oil tree disease identification task under complex real planting conditions.
[0024] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0025] The drawings incorporated into the specification and forming part of the specification, show embodiments consistent with the present application, and together with the specification, serve to explain the principles of the present application.
[0026] Figure 1 is a flow chart of the tea-oil tree leaf disease identification system based on the improved ResNet algorithm according to an exemplary embodiment.
[0027] Figure 2 is a residual module structure diagram in the improved ResNet network according to an exemplary embodiment.
[0028] Figure 3 is an SE module structure diagram in the improved ResNet network according to an exemplary embodiment.
[0029] Figure 4 is an interactive interface example diagram in the ResNet network-based tea-oil tree disease identification system according to an exemplary embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and cannot limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as there is no conflict.
[0031] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0032] Specifically, the embodiment of the present application discloses an improved ResNet algorithm-based camellia leaf disease identification system, which comprises the following steps: Figure 1
[0033] Step 1: Collect seven kinds of leaf images of tea bud disease, soft rot disease, anthracnose disease, net cake disease, smoke coal disease, algal spot disease and sunlight burning of camellia leaf, and make a camellia leaf disease identification dataset as the dataset of the experiment, and perform pretreatment.
[0034] Step 2: Obtain a ResNet-50 network as a basic network model of the experiment, improve the network model, and build an effective camellia disease identification system.
[0035] Step 3: Download the PlantVillage dataset. The improved ResNet network is fully pre-trained on the PlantVillage dataset, the training round is set to 1000, the model parameters after training are saved, and the storage format is.pth.
[0036] Step 4: Input the training dataset data, download the pre-trained parameter model on PlantVillage as the initial parameter, train the improved ResNet model on the camellia disease dataset, save the model parameter with the highest test precision, and store it in the format of.pth.
[0037] Step 5: Load the fully trained parameters, and input the camellia disease color image into the trained improved ResNet network to identify the disease.
[0038] Step 6: Compare the output result with the set threshold value, if the set threshold value is reached, the disease type of the current plant is output, and the corresponding treatment suggestion is given according to the disease type of the plant.
[0039] Step 7: When the plant disease identification result does not reach the expected threshold value, save the picture and feedback information, ask whether the variety is a disease type that does not exist in the database list, if it is an existing disease, save the picture in the corresponding disease list dataset, otherwise, add the corresponding disease type in the data disease list, and remind to input the corresponding treatment suggestion.
[0040] Step 8: Set the self-updating time, and when the specified time is reached, train and update the parameters according to the current database.
[0041] Step 9: Design an interactive interface for the oil tea leaf disease recognition system, integrate all the functions of steps 1-8 into the interface, so as to simply and intuitively display the operations and results of the system.
[0042] In some embodiments, the step 1 comprises:
[0043] Collecting oil tea disease leaf images includes tea bud disease, soft rot disease, anthracnose disease, net cake disease, smoke coal disease, and algal spot disease; non-disease leaf images include sunlight burning; the data set is enhanced, including enhancing brightness, adding Gaussian noise, horizontal flipping, rotating any angle, etc.
[0044] In some embodiments, the step 2 comprises:
[0045] First, obtain the ResNet-50 network as the experimental base network model, and improve the ResNet network based on this, wherein the improved ResNet-50 network model comprises an input layer, a hidden layer and an output layer; the hidden layer comprises an improved residual structure, and the improved residual structure comprises: the residual structure input feature is sequentially processed through a first convolutional layer, a first swish activation function, a second convolutional layer and an SE module, then the obtained result is connected with the residual structure input feature through a residual connection, and then the residual structure output result is obtained through a second swish activation function processing; the SE module comprises: the SE module input feature matrix is sequentially processed through a global pooling layer, a first full connection layer, a siwsh activation function, a second full connection layer and a sigmoid activation function, then the obtained result is multiplied with the SE module input feature matrix to obtain the SE module output result.
[0046] In some embodiments, the step 3 comprises:
[0047] Download the public PlantVillage data set, and fully train the improved ResNet network on the PlantVillage data set, with 1000 training rounds, save the model parameters after each training round ends, store them in the form of.pth file, and select the model parameters of the round with the highest test accuracy in 1000 rounds as the final experimental initial network parameters.
[0048] In some embodiments, the step 4 comprises:
[0049] The cross-entropy loss function CrossEntropyLoss is selected as the loss function of the experiment, the optimizer is Adam, and the learning rate is 0.001. The pre-trained model parameters in step 3 are loaded, and the processed tea oil leaf disease data set is input into the improved ResNet network model for training. The model parameters with the highest test accuracy are saved and stored in the format of.pth.
[0050] In some embodiments, the step 5 comprises:
[0051] The tea oil leaf disease picture is read, the model parameters trained and saved in step 4 are loaded, the test picture is input into the pre-trained network model, and the output result is obtained.
[0052] In some embodiments, the step 6 comprises:
[0053] The threshold value is set in advance as 0.7, the recognition result of the tea oil disease leaf obtained in step 5 is compared with the threshold value, when the output value meets the threshold value requirement, the corresponding recognition result is output, and according to the result, the corresponding processing suggestion is given.
[0054] In some embodiments, the step 7 comprises:
[0055] If the obtained tea disease recognition result does not reach the expected value, the picture is saved and the information is fed back, it is inquired whether the variety is a disease type that does not exist in the database list, if it is an existing disease, the picture is stored in the corresponding disease list data set, otherwise, the corresponding disease type is added in the data disease list, and the corresponding processing suggestion is reminded.
[0056] In some embodiments, the step 8 comprises:
[0057] The self-updating time is set, when the specified time is reached, the network model and the existing data set are called, the data set is input into the network for training and the corresponding parameters are saved, and the weight data is self-updated. At the same time, the update function and button are set, the model parameters can be actively trained and updated through the button.
[0058] In some embodiments, the step 9 comprises:
[0059] The tkinter tool library is used to build the interactive interface, the interface mainly includes information display and function buttons, the top is the selected picture path display, the left side is the selected picture display, the right side is the disease recognition type and the corresponding processing suggestion, and the middle part is the function button, from top to bottom in turn: picture upload, disease recognition, parameter update, and exit program.
[0060] It should be understood that the application is not limited to the precise construction which has been described above and which shown in the drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should be limited only by the appended claims.
Claims
1. A method for identifying diseases of Camellia oleifera leaf based on an improved ResNet model, characterized by, The application relates to a tea plant disease identification method, which comprises the following steps: Step 1: collecting a plurality of Camellia oleifera leaf disease leaf image and non-disease leaf image, forming a Camellia oleifera leaf disease identification data set; Step 2: building an improved ResNet-50 network model as a Camellia oleifera disease identification network; wherein the improved ResNet-50 network model comprises an input layer, a hidden layer and an output layer; the hidden layer comprises an improved residual structure, and the improved residual structure comprises: residual structure input features sequentially passing through a first convolutional layer, a first swish activation function, a second convolutional layer, an SE module, then performing residual connection on the obtained results and the residual structure input features, and then performing a second swish activation function to obtain residual structure output results; the SE module comprises: SE module input feature matrices sequentially passing through a global pooling layer, a first full connection layer, a siwsh activation function, a second full connection layer and a sigmoid activation function, then multiplying the obtained results and the SE module input feature matrices to obtain SE module output results; Step 3: pre-training the Camellia oleifera disease identification network by using a PlantVillage data set to obtain a Camellia oleifera disease identification network pre-training model; Step 4: training the Camellia oleifera disease identification network pre-training model by using the Camellia oleifera leaf disease identification data set to obtain a Camellia oleifera disease identification network fully trained model; Step 5: inputting the Camellia oleifera leaf image to be identified into the Camellia oleifera disease identification network fully trained model to obtain an identification output result; Step: comparing the identification output result with a preset threshold value, if the threshold value is reached, outputting the disease type of the current plant, and giving a processing suggestion according to the disease type of the plant; if the threshold value is not reached, outputting feedback information to inquire whether the Camellia oleifera leaf image belongs to an existing disease type in the Camellia oleifera leaf disease identification data set, if the Camellia oleifera leaf image belongs to an existing disease type, storing the Camellia oleifera leaf image in the data of the corresponding type in the Camellia oleifera leaf disease identification data set, otherwise, adding a new disease type in the Camellia oleifera leaf disease identification data set, storing the Camellia oleifera leaf image in the data of the new disease type, and saving the input new processing suggestion; Step: when the distance from the last execution of step 4 reaches a preset self-updating time, returning to step 4 for execution according to the current Camellia oleifera leaf disease identification data set.
2. The improved ResNet model-based camellia leaf disease identification method according to claim 1, characterized in that, Step 1 further comprises: The Camellia oleifera disease leaf image comprises tea bud disease, soft rot disease, anthracnose disease, net cake disease, smoke coal disease and algal spot disease; the non-disease leaf image comprises sunlight burning; The Camellia oleifera leaf disease identification data set is subjected to enhancement processing, including enhancing brightness, adding Gaussian noise, horizontal flipping and rotating by any angle.
3. The improved ResNet model-based camellia leaf disease identification method according to claim 1, characterized in that, Step 3 further comprises: The Camellia oleifera disease identification network is pre-trained by using the PlantVillage data set, the training round is 1000 rounds, the parameters obtained after each round of training is ended are saved, and the parameters with the highest test accuracy are selected as the Camellia oleifera disease identification network pre-training model parameters.
4. The improved ResNet model-based camellia leaf disease identification method according to claim 1, characterized in that, Step 4 further comprises: The CrossEntropyLoss is selected as the loss function of training, the Adam is selected as the optimizer, the learning rate is 0.001, and the model parameters with the highest test accuracy are saved as the fully trained model parameters of the tea tree disease identification network.
5. A tea-oil leaf disease identification system based on an improved ResNet model, characterized in that, The system inputs image data through an interactive interface, displays disease types and treatment suggestions, outputs feedback information, and obtains new disease types and new treatment suggestions, to execute the tea tree leaf disease identification method based on the improved ResNet model according to any one of claims 1-4.
6. A computer device, comprising: Comprise: a memory for storing instructions; and a processor for calling the instructions stored in the memory to execute the tea tree leaf disease identification method based on the improved ResNet model according to any one of claims 1-4.
7. A computer readable storage medium characterized in that, The instructions are stored, and when executed by a processor, the tea tree leaf disease identification method based on the improved ResNet model according to any one of claims 1-4 is executed.