Rice disease identification method based on computer vision
Through computer vision technology, image processing and deep learning are used to identify rice diseases, the subjectivity and time-consuming problems of traditional methods are solved, and efficient and accurate disease monitoring and prevention are achieved.
Patent Information
- Application Number
- CN202411429342.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-14
AI Technical Summary
Traditional rice disease identification methods rely on artificial experience, and have subjectivity and time-consuming problems, making it difficult to effectively monitor and prevent diseases in large-scale planting areas.
Using a computer vision-based method, rice leaf images are collected through image processing and deep learning technology, pre-processing, data augmentation, transmission learning and multi-model fusion, and a convolutional neural network is used to identify diseases.
It improves the accuracy and stability of disease identification, reduces labor costs and time, can detect potential problems in a timely manner, reduces the misdiagnosis rate, and is suitable for disease monitoring in large-scale planting areas.
Smart Images

Figure CN119314050A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of computer vision recognition, and in particular to a rice disease recognition method based on computer vision. Background Art
[0002] As we all know, the traditional rice disease identification method mainly relies on the experience and knowledge of agricultural experts, and judges whether there is a disease by observing the appearance characteristics of the leaves with the naked eye. This method has the following limitations: Manual identification relies on personal experience and judgment, and is easily affected by subjective factors, resulting in unstable identification results. Manual inspection requires a lot of manpower input, especially in large-scale planting areas. This inspection method is very time-consuming and difficult to detect diseases in time. Human observation is limited by vision and experience, and may not be able to identify early or subtle signs of diseases, resulting in the failure to control the disease in the first place. Long-term reliance on manual inspection not only consumes manpower costs, but also makes it difficult to achieve large-scale disease monitoring, which is not conducive to the early prevention and control of diseases. In recent years, with the development of computer vision technology, especially the successful application of deep learning methods in the field of image recognition, new solutions have been provided for rice disease identification. Computer vision technology uses image processing algorithms and machine learning models to automatically extract features from images and classify diseases. Computer vision technology can automatically analyze plant leaf images, identify whether there are signs of diseases, and further classify them into specific disease types. This method has the advantages of non-contact, high efficiency, and strong repeatability, and is particularly suitable for disease monitoring in large-scale planting areas. However, relying solely on traditional image processing technology (such as edge detection, morphological operations, etc.) is often difficult to achieve ideal recognition results, especially when the lesion morphology is complex and the background interference is serious. Therefore, it is necessary to propose a solution to this technical problem. Summary of the invention
[0003] Technical problem to be solved: In view of the deficiencies of the prior art, the present invention provides a rice disease identification method based on computer vision.
[0004] Technical solution: To achieve the above purpose, the present invention provides the following technical solution: a rice disease identification method based on computer vision, comprising the following steps: Step 1: Collect image data of rice leaves; Step 2: Preprocessing the image data, including size standardization, color correction and noise removal; Step 3: Perform data enhancement by rotating, scaling, and flipping the image data to generate additional training samples; Step 4: Select a pre-trained convolutional neural network model using transfer learning techniques and fine-tune it to suit the rice disease recognition task; Step 5: Improve recognition accuracy by integrating the prediction results of multiple models.
[0005] Furthermore, the present invention has the following improvements: in the above step 3, the data enhancement performs rotation, scaling, and flipping transformation operations on the image data, and synthesizes the transformed image data with the original image data to generate an expanded data set.
[0006] Furthermore, the present invention is improved in that a pre-trained convolutional neural network model is selected in the above step 4, the last layer or layers of the pre-trained model are replaced, and fine-tuning training is performed for the rice disease recognition task.
[0007] Furthermore, the present invention is improved in that, in the above step 5, multiple models with different initial parameters or different data subsets are trained, and the prediction results of the multiple models are integrated by weighted averaging.
[0008] Furthermore, the present invention improves on that the model performance is evaluated on the test set, and the model parameters are adjusted according to the evaluation results.
[0009] Furthermore, the present invention is improved in that, in the above step 1, a high-definition image of the rice leaf is obtained, and relevant information on the time and location of image acquisition is recorded.
[0010] Furthermore, the present invention has the following improvements: in the above step 2, the image size is unified, the image color deviation is corrected, and the noise interference in the image is reduced.
[0011] Furthermore, the present invention has the advantages of extracting key features in the image to assist in disease identification and making disease classification decisions based on the extracted features.
[0012] Furthermore, the present invention has the following improvements: in the above step 4, a data set for model training is prepared, and the process of model training is controlled, including setting parameters such as training batch size and number of iterations.
[0013] Furthermore, the present invention has the following improvements: in the above step 5, multiple models are selected for fusion, and a specific strategy for fusion of model prediction results is formulated, and the strategy includes majority voting.
[0014] Beneficial effects: Compared with the prior art, the present invention provides a rice disease identification method based on computer vision, which has the following beneficial effects: This rice disease recognition method based on computer vision generates more training samples through data enhancement technology, which increases the diversity of the training data set. This allows the model to be exposed to more image variations during the training process, so that it has better recognition capabilities for images with different angles, lighting conditions and backgrounds in practical applications. Data enhancement reduces the risk of model overfitting by increasing the size of the data set, making the model's performance on the test set more stable and reliable. Using pre-trained convolutional neural network models, these models have been trained on large-scale data sets and have strong feature extraction capabilities. Through transfer learning, a model with good basic feature extraction capabilities can be quickly constructed, which significantly reduces training time and computing resource consumption. CNN can automatically learn key features in images, such as The color, shape, texture, etc. of the lesions do not require artificially designed features, which simplifies the model development process. The deep structure of CNN can capture the multi-level features in the image, making the model more accurate in identifying diseases, especially in the case of dealing with complex backgrounds and subtle lesions. Multi-model fusion technology makes computer vision recognition technology more robust and reliable when facing different types of diseases. Even if a model performs poorly under certain conditions, the supplementation of other models can make up for this defect. By combining multiple technologies such as data enhancement, transfer learning, CNN and multi-model fusion, the method of the present invention has achieved significant performance improvements in many aspects. Data enhancement increases the diversity of data sets, transfer learning improves the ability of feature extraction, CNN improves recognition accuracy, and multi-model fusion enhances the robustness and stability of the system. Automated recognition technology replaces manual inspection, reduces labor costs and improves work efficiency. Especially in large-scale planting areas, this method can significantly reduce the time and labor costs required for manual inspection. The recognition method based on computer vision can quickly process a large amount of image data. Compared with manual inspection, it can complete the inspection of large quantities of samples faster, which helps to timely detect and control the spread of diseases. By training and optimizing the deep learning model, the misdiagnosis rate of the recognition system is significantly lower than that of manual inspection, especially in the early stages of the disease when it is difficult to detect with the naked eye. This method can detect potential problems earlier and reduce the probability of missed diagnosis and misdiagnosis. Computer vision recognition technology can provide intelligent decision-making support for agricultural production, helping farmers better manage and prevent diseases and improve the yield and quality of crops. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of the method of the present invention; Figure 2 is a detailed flow chart of step 4 of the method of the present invention; Figure 3 Detailed flow chart of step 5 of the method of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] See also Figure 1-3 The present invention is a rice disease recognition method based on computer vision, and the rice disease recognition method based on computer vision comprises the following steps: Step 1: Collect image data of rice leaves; Step 2: Preprocessing the image data, including size standardization, color correction and noise removal; Step 3: Perform data enhancement by rotating, scaling, and flipping the image data to generate additional training samples; Step 4: Select a pre-trained convolutional neural network model using transfer learning techniques and fine-tune it to suit the rice disease recognition task; Step 5: Improve recognition accuracy by integrating the prediction results of multiple models.
[0018] In this solution, the data enhancement in the above step 3 performs rotation, scaling, and flipping transformation operations on the image data, and synthesizes the transformed image data with the original image data to generate an expanded data set.
[0019] In this solution, a pre-trained convolutional neural network model is selected in the above step 4, the last layer or layers of the pre-trained model are replaced, and fine-tuning training is performed for the rice disease recognition task.
[0020] In this solution, in the above step 5, multiple models with different initial parameters or different data subsets are trained, and the prediction results of multiple models are combined by weighted averaging.
[0021] In this scheme, the model performance is evaluated on the test set, and the model parameters are adjusted based on the evaluation results.
[0022] In this solution, in the above step 1, a high-definition image of the rice leaf is obtained, and relevant information on the time and location of image acquisition is recorded.
[0023] In this solution, in the above step 2, the image size is unified, the image color deviation is corrected, and the noise interference in the image is reduced.
[0024] In this scheme, key features in the image are extracted to assist in disease identification, and disease classification decisions are made based on the extracted features.
[0025] In this solution, the data set for model training is prepared in the above step 4, and the process of model training is controlled, including setting the training batch size and the number of iterations parameters.
[0026] In this solution, multiple models are selected for fusion in the above step 5, and a specific strategy for fusing the model prediction results is formulated, and the strategy includes majority voting.
[0027] Data augmentation generates new training samples through a series of image transformation operations. The specific steps are as follows: Collect high-definition images of rice leaves from the field. Preprocess the original images, such as size standardization, color correction, and noise removal. Perform a series of transformation operations on the preprocessed images, including but not limited to: Rotate the image at a certain angle (such as ±30°). Scale the image by a certain ratio (such as ±20%). Flip the image along the horizontal or vertical axis. Change the color space of the image, such as brightness and contrast adjustment. Synthesize the transformed image with the original image data to generate an augmented dataset.
[0028] Generate more training samples through transformation operations and increase the diversity of the data set. The expanded data set helps reduce the risk of overfitting of the model. The model can be exposed to more diverse images during training, thereby improving its generalization ability in practical applications.
[0029] Transfer learning uses the powerful feature extraction capabilities of pre-trained models. The specific steps are as follows: Select a deep learning model (such as VGG16, ResNet50) that has been trained on a large-scale dataset (such as ImageNet). Keep most of the structure of the pre-trained model and replace the last layer or layers to adapt it to the rice disease recognition task. Use the expanded dataset to fine-tune the replaced model and optimize the model parameters to adapt to the new task.
[0030] Features: Pre-trained models have learned a large number of common features and can be quickly applied to new tasks. Pre-trained models have powerful feature extraction capabilities and can maintain good performance on smaller data sets. This reduces the time and computing resources required to train a model from scratch.
[0031] The convolutional neural network automatically learns the features in the image through components such as convolutional layers, pooling layers, and fully connected layers. The specific steps are as follows: Input the rice leaf image into the CNN model. Extract the local features in the image through convolution operations. Reduce the spatial dimension of the feature map through pooling operations and reduce the number of parameters. Integrate the features extracted by the convolutional layer and the pooling layer, and classify them through the fully connected layer. Output the final disease recognition result.
[0032] CNN can automatically learn key features in images without manually designing features. It abstracts image information layer by layer through a multi-layer structure and extracts high-level features. CNN performs well in image classification tasks and can accurately identify complex lesion patterns.
[0033] Multi-model fusion improves recognition accuracy and robustness by integrating the prediction results of multiple models. The specific steps are as follows: Train multiple slightly different models, such as using different initialization weights, data subsets, or fine-tuning different hyperparameters. Use multiple trained models to predict the same set of test data. Combine the prediction results of multiple models through weighted averaging, majority voting, etc.
[0034] Multi-model fusion can reduce the uncertainty and errors of a single model and improve the consistency and stability of the recognition results. Even if a model performs poorly under certain conditions, the addition of other models can make up for this shortcoming and make the system more robust. Multiple models complement each other and jointly improve the recognition and generalization capabilities of the system.
[0035] By organically combining multiple technologies such as data enhancement, transfer learning, convolutional neural network and multi-model fusion, the rice disease recognition method based on computer vision provided by the present invention has the following significant advantages: increasing diversity through data enhancement, improving feature extraction ability through transfer learning, improving recognition accuracy through CNN, and enhancing stability through multi-model fusion. Multi-model fusion technology makes the system more robust in different environments and conditions. Automated recognition technology replaces manual inspection and improves work efficiency. The recognition method based on computer vision can quickly process large amounts of image data, and promptly detect and control the spread of diseases. Through the training and optimization of the deep learning model, the misdiagnosis rate of the recognition system is significantly reduced.
[0036] The rice disease identification method based on computer vision of the present invention uses a high-definition camera carried by an unmanned aerial vehicle or a ground robot to collect images in the field, collects images in different time periods (morning, noon, evening) and under different weather conditions to ensure the diversity of the data set, records the time, location, weather conditions and other related information of each image collection, and facilitates later data analysis. The image data is preprocessed, all images are uniformly adjusted to the same resolution, such as 224x224 pixels, to adapt to most pre-trained convolutional neural network models, and the image is color corrected to make the color more realistic and reduce the color deviation caused by different lighting conditions. Image processing techniques such as median filtering and Gaussian filtering are used to remove random noise in the image. The image data is rotated (±30°), scaled (±20%), horizontally flipped and other operations are performed to generate more training samples. The transformed image is synthesized with the original image data to generate an expanded data set to increase the generalization ability of the model. The pre-trained convolutional neural network model is selected using the transfer learning technology and fine-tuned. A pre-trained convolutional neural network model (such as VGG16, ResNet50 or Inception) is selected. v3), these models have been pre-trained on large-scale natural image datasets (such as ImageNet), replace the last layer or several layers of the pre-trained model, and add new layers suitable for rice disease recognition, use the rice disease dataset to fine-tune the entire model to make it more suitable for the rice disease recognition task, improve the recognition accuracy by integrating the prediction results of multiple models, train multiple models with different initial parameters or different data subsets, such as initializing model parameters with different random seeds, or using different data partitions for training, and integrate the prediction results of multiple models by weighted averaging to improve the recognition accuracy and stability, evaluate the model's performance indicators such as accuracy, recall rate, F1 score, etc. on an independent test set, and adjust the model parameters according to the evaluation results, find the best hyperparameter combination through grid search, Bayesian optimization and other methods to optimize the model performance, use the intermediate layer of the convolutional neural network to extract key features in the image, such as the color and shape of the lesions, make disease classification decisions based on the extracted features, and use softmax The final disease type is output by the layer or other classifiers, the training data set is sorted and labeled to ensure the accuracy and consistency of the labels, and appropriate parameters such as training batch size and number of iterations are set to ensure that the model can converge to a good local minimum. Multiple models with better performance are selected for fusion, and the prediction results of multiple models are integrated by weighted average, majority voting, etc. to improve the accuracy of the final recognition.
[0037] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A rice disease identification method based on computer vision, characterized in that: The following steps are involved: Step 1: Collect image data of rice leaves; Step 2: Preprocessing the image data, including size standardization, color correction and noise removal; Step 3: Perform data enhancement by rotating, scaling, and flipping the image data to generate additional training samples; Step 4: Select a pre-trained convolutional neural network model using transfer learning techniques and fine-tune it to suit the rice disease recognition task; Step 5: Improve recognition accuracy by integrating the prediction results of multiple models.
2. The rice disease identification method based on computer vision according to claim 1, characterized in that: In the above step 3, the data enhancement performs rotation, scaling, and flipping transformation operations on the image data, synthesizes the transformed image data with the original image data, and generates an expanded data set.
3. The rice disease identification method based on computer vision according to claim 1, characterized in that: In the above step 4, a pre-trained convolutional neural network model is selected to replace the last layer or layers of the pre-trained model, and fine-tuning training is performed for the rice disease recognition task.
4. The rice disease identification method based on computer vision according to claim 1, characterized in that: In the above step 5, multiple models with different initial parameters or different data subsets are trained, and the prediction results of multiple models are combined by weighted averaging.
5. The rice disease identification method based on computer vision according to claim 1, characterized in that: Evaluate the model performance on the test set and adjust the model parameters based on the evaluation results.
6. The rice disease identification method based on computer vision according to claim 1, characterized in that: In the above step 1, a high-definition image of the rice leaf is obtained, and relevant information on the time and location of image acquisition is recorded.
7. The rice disease identification method based on computer vision according to claim 1, characterized in that: In the above step 2, the image size is unified, the image color deviation is corrected, and the noise interference in the image is reduced.
8. The rice disease identification method based on computer vision according to claim 1, characterized in that: Extract key features from images to assist in disease identification, and make disease classification decisions based on the extracted features.
9. The rice disease identification method based on computer vision according to claim 3, characterized in that: In step 4 above, prepare the data set for model training and control the model training process, including setting the training batch size and number of iterations.
10. The rice disease identification method based on computer vision according to claim 1, characterized in that: In the above step 5, multiple models are selected for fusion, and a specific strategy for fusion of model prediction results is formulated, including majority voting.
Citation Information
Cited By
Intelligent agricultural four-condition comprehensive monitoring system and method
CN119984396A