Crop disease and insect pest prediction method, system and storage medium based on machine vision

The crop disease and pest prediction method that combines edge detection and lesion area recognition models with meteorological environmental indicator information solves the problems of low efficiency and insufficient accuracy in disease and pest identification in existing technologies, and achieves efficient and accurate disease and pest prediction.

CN115482465BActive Publication Date: 2025-09-05GUANGDONG COMM POLYTECHNIC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211143610.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2025-09-05
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

Existing crop disease and pest identification methods are unable to effectively extract lesion feature areas, resulting in a waste of computing resources and low prediction efficiency. They also fail to consider the impact of climate and environmental factors, resulting in insufficient prediction accuracy.

Method used

The contours of crop leaves are extracted through edge detection, and the leaf lesion areas are identified using a pre-trained lesion area recognition model. The meteorological and environmental indicator information of the target area is then input into the pest and disease prediction model for prediction.

Benefits of technology

The efficiency and accuracy of crop disease and pest predictions have been improved. By filtering out areas where no lesions have occurred or where lesions are not obvious, and comprehensively considering the real-time growth conditions of crops and climate and environmental factors, the reliability of predictions has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482465B_ABST
    Figure CN115482465B_ABST
Patent Text Reader

Abstract

The present invention discloses a machine vision-based crop disease and insect pest prediction method, system, and storage medium. The method comprises: obtaining first image information of a target crop, performing edge detection on the first image information to obtain multiple leaf contours of the target crop, and extracting leaf image information based on the leaf contours; inputting the leaf image information into a pre-trained lesion area recognition model to obtain the lesion type of the target crop and extract the leaf lesion area; obtaining first meteorological indicator information and first environmental indicator information of the target area; inputting the first meteorological indicator information, first environmental indicator information, and the leaf lesion area into a pre-trained disease and insect pest prediction model to obtain a disease and insect pest prediction result for the target crop. The present invention improves the efficiency, accuracy, and reliability of crop disease and insect pest prediction and can be widely applied to the field of crop disaster prediction technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crop disaster prediction, and in particular to a machine vision-based crop disease and insect pest prediction method, system and storage medium. Background Art

[0002] With the advancement of science and technology, crop disease and pest identification methods have evolved from traditional manual identification and instrument identification to identification based on mathematical statistics and machine learning, and the new generation of methods are constantly overcoming the shortcomings of the original methods. For example, compared with traditional manual identification, the advantage of using portable instruments to identify crop diseases and pests is objectivity, which avoids the subjective conjecture of agricultural technicians, but its limitation is that it does not help agricultural technicians get rid of heavy work, that is, the degree of automation and intelligence is low. Subsequently, the crop disease and pest identification methods based on mathematical statistics and machine learning have fully utilized the advantages of data and can mine various types of crop disease and pest information from large amounts of data, including key information such as disease location, color, shape, etc. However, the crop disease and pest identification methods based on machine learning are still affected by the difficulty of feature extraction.

[0003] Currently, most domestic pest and disease identification technologies begin with image acquisition and then use computer vision for intelligent identification. Related research primarily employs the following methods: traditional digital image processing, support vector machines, and artificial intelligence neural networks. For example, domestic scholar Jiang Hui created a basic information database for rice diseases and pests based on an Android phone. This database uses the phone's built-in camera to capture and upload images of rice pests, receive identification results, and query the database based on the identification results, displaying standard pest images, basic information, and control measures. Qiu Yong and others also used insect monitoring lights to trap rice pests and then used the YOLO algorithm to identify them through the camera.

[0004] However, existing pest and disease identification methods are unable to extract lesion feature areas from the collected original images. This consumes a large amount of computing resources in the subsequent identification process to identify and process areas where no lesions have occurred or where lesions are not obvious, affecting the efficiency of crop pest and disease identification. In addition, pest and disease prediction is performed only through crop images without considering the influence of climate and environmental factors, resulting in insufficient accuracy and reliability in crop pest and disease prediction. Summary of the Invention

[0005] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0006] To this end, an object of an embodiment of the present invention is to provide a method for predicting crop diseases and insect pests based on machine vision, which improves the efficiency, accuracy and reliability of crop disease and insect pest prediction.

[0007] Another object of an embodiment of the present invention is to provide a crop disease and insect pest prediction system based on machine vision.

[0008] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

[0009] In a first aspect, an embodiment of the present invention provides a method for predicting crop diseases and insect pests based on machine vision, comprising the following steps:

[0010] Acquiring first image information of a target crop, performing edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extracting leaf image information based on the leaf contours;

[0011] Inputting the leaf image information into a pre-trained lesion area recognition model to obtain the lesion type of the target crop and extract the leaf lesion area;

[0012] Acquiring first meteorological indicator information and first environmental indicator information of a target area, where the target area is an area where the target crop is located;

[0013] The first meteorological indicator information, the first environmental indicator information and the leaf lesion area are input into a pre-trained pest and disease prediction model to obtain a pest and disease prediction result of the target crop.

[0014] Furthermore, in one embodiment of the present invention, the step of performing edge detection on the first image information to obtain a plurality of leaf contours of the target crop and extracting leaf image information based on the leaf contours specifically includes:

[0015] Performing edge detection on the first image information to obtain a plurality of continuous contours;

[0016] Performing random Hough transform on the continuous contours, and selecting the continuous contours that meet the preset threshold conditions as the blade contours;

[0017] The first image information is segmented according to the leaf contour to obtain leaf image information of the target crop.

[0018] Furthermore, in one embodiment of the present invention, the crop disease and insect pest prediction method further includes the step of pre-training a diseased area recognition model, which specifically includes:

[0019] Acquire a plurality of preset diseased leaf images, and determine the disease type and diseased area of ​​each of the diseased leaf images;

[0020] determining a first sample label for each of the diseased leaf images according to the lesion type and the lesion area, and constructing a first training sample set according to the diseased leaf images and the first sample labels;

[0021] Inputting the first training sample set into a pre-built first convolutional neural network to obtain a lesion type recognition result and a lesion area recognition result;

[0022] Determining a first loss value of the first convolutional neural network according to the lesion type recognition result, the lesion area recognition result, and the first sample label;

[0023] Updating the parameters of the first convolutional neural network through a back-propagation algorithm according to the first loss value;

[0024] When the first loss value reaches a preset first threshold or the number of iterations reaches a preset second threshold, the training is stopped to obtain a trained lesion area recognition model.

[0025] Furthermore, in one embodiment of the present invention, the step of obtaining the first meteorological indicator information and the first environmental indicator information of the target area is specifically as follows:

[0026] Determining first meteorological indicator information of a target area according to weather forecast information, and acquiring first environmental indicator information of the target area through a sensor;

[0027] Among them, the first meteorological indicator information includes at least one of air temperature and humidity, light duration, atmospheric pressure and rainfall, and the first environmental indicator information includes at least one of soil temperature and humidity, soil nitrogen, phosphorus and potassium content and light intensity.

[0028] Furthermore, in one embodiment of the present invention, the crop pest and disease prediction method further includes the step of pre-training a pest and disease prediction model, which specifically includes:

[0029] Acquiring a plurality of preset images of diseased areas of crops with pests and diseases, determining second meteorological index information and second environmental index information of the crops with pests and diseases, and then determining a second training sample based on the images of the diseased areas, the second meteorological index information, and the second environmental index information;

[0030] Determine the pest type label of each of the pest-infested crops by manual labeling, and construct a second training sample set based on the second training sample and the pest type label;

[0031] Inputting the second training sample set into a pre-built second convolutional neural network to obtain a pest and disease type recognition result;

[0032] Determining a second loss value of the second convolutional neural network according to the pest and disease type identification result and the pest and disease type label;

[0033] Updating the parameters of the second convolutional neural network through a back-propagation algorithm according to the second loss value;

[0034] When the second loss value reaches a preset third threshold or the number of iterations reaches a preset fourth threshold, the training is stopped to obtain a trained pest and disease prediction model.

[0035] Furthermore, in one embodiment of the present invention, the crop disease and insect pest prediction method further comprises the following steps:

[0036] An early warning message is generated according to the disease and insect pest prediction result, and the early warning message is sent to the management personnel of the target area.

[0037] In a second aspect, an embodiment of the present invention provides a crop disease and insect pest prediction system based on machine vision, comprising:

[0038] a leaf image information extraction module, configured to obtain first image information of a target crop, perform edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extract leaf image information based on the leaf contours;

[0039] a leaf lesion area recognition module, configured to input the leaf image information into a pre-trained lesion area recognition model, obtain the lesion type of the target crop, and extract the leaf lesion area;

[0040] A meteorological and environmental index acquisition module, configured to acquire first meteorological index information and first environmental index information of a target area, wherein the target area is an area where the target crop is located;

[0041] The prediction module is used to input the first meteorological index information, the first environmental index information and the leaf lesion area into a pre-trained pest and disease prediction model to obtain a pest and disease prediction result of the target crop.

[0042] Furthermore, in one embodiment of the present invention, the leaf image information extraction module includes:

[0043] an edge detection unit, configured to perform edge detection on the first image information to obtain a plurality of continuous contours;

[0044] A contour screening unit, configured to perform random Hough transform on the continuous contours, and screen out continuous contours that meet a preset threshold condition as blade contours;

[0045] The image segmentation unit is used to perform image segmentation on the first image information according to the leaf contour to obtain the leaf image information of the target crop.

[0046] In a third aspect, an embodiment of the present invention provides a device for predicting crop diseases and insect pests based on machine vision, comprising:

[0047] at least one processor;

[0048] at least one memory for storing at least one program;

[0049] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned crop disease and insect pest prediction method based on machine vision.

[0050] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a program executable by a processor, wherein the program executable by the processor is used to execute the above-mentioned method for predicting crop diseases and pests based on machine vision when executed by the processor.

[0051] The advantages and benefits of the present invention will be described in part in the following description and will become apparent from the following description or learned through practice of the present invention:

[0052] The embodiment of the present invention obtains first image information of a target crop, performs edge detection on the first image information to obtain a leaf contour and extracts leaf image information, then inputs the leaf image information into a pre-trained lesion area recognition model to obtain a leaf lesion area and lesion type, then obtains first meteorological indicator information and first environmental indicator information of the target area, inputs the first meteorological indicator information, first environmental indicator information, and the leaf lesion area into a pre-trained pest and disease prediction model, and obtains a pest and disease prediction result for the target crop. The embodiment of the present invention extracts leaf image information through edge detection, then identifies the leaf lesion area through the lesion area recognition model, thereby filtering out areas where no lesions have occurred or where lesions are not obvious. Subsequently, pest and disease prediction can be performed on the leaf lesion area, thereby improving the efficiency of crop pest and disease prediction. The target crop pest and disease prediction is performed based on the leaf lesion area of ​​the target crop and the meteorological indicator information and environmental indicator information of the target crop's area, comprehensively considering the real-time growth status of the target crop as well as climate and environmental factors, thereby improving the accuracy and reliability of crop pest and disease prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.

[0054] Figure 1 A flowchart of a method for predicting crop diseases and insect pests based on machine vision provided by an embodiment of the present invention;

[0055] Figure 2 A structural block diagram of a crop disease and insect pest prediction system based on machine vision provided by an embodiment of the present invention;

[0056] Figure 3 This is a structural block diagram of a device for predicting crop diseases and insect pests based on machine vision provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided for ease of explanation only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0058] In the description of the present invention, "a plurality" means two or more. The terms "first" and "second" are used solely to distinguish technical features and are not to be construed as indicating or implying relative importance, or as implicitly indicating the number of the indicated technical features, or as implicitly indicating the order of the indicated technical features. Furthermore, unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art.

[0059] Reference Figure 1 The embodiment of the present invention provides a method for predicting crop diseases and insect pests based on machine vision, which specifically includes the following steps:

[0060] S101 , obtaining first image information of a target crop, performing edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extracting leaf image information based on the leaf contours.

[0061] Specifically, the embodiment of the present invention uses the OpenMV machine vision module to perform edge detection on the first image information to extract the leaf outline, and extracts leaf image information based on the position of the leaf outline. Because crop pests and diseases are more obvious on leaves, the subsequent recognition and prediction process can be performed only on the extracted leaf image information, and images of other parts of the target crop can be discarded.

[0062] Among them, OpenMv is an open source, low-cost, powerful machine vision module. It is based on the STM32F767 CPU and integrates the OV7725 camera chip. It efficiently implements the core machine vision algorithm in C language on a compact hardware module and provides a Python programming interface.

[0063] As a further optional implementation, edge detection is performed on the first image information to obtain several leaf contours of the target crop, and the step of extracting leaf image information based on the leaf contours specifically includes:

[0064] A1. Perform edge detection on the first image information to obtain a plurality of continuous contours;

[0065] A2. Perform random Hough transform on the continuous contours to select the continuous contours that meet the preset threshold conditions as the blade contours;

[0066] A3. Perform image segmentation on the first image information according to leaf contours to obtain leaf image information of the target crop.

[0067] Specifically, an image edge is a region of the image where the brightness changes significantly. For grayscale images, this refers to an area with a significant change in grayscale value, where the grayscale value changes dramatically within a small buffer area to another grayscale value with a large difference in grayscale value. This embodiment of the present invention uses the Canny operator for edge detection in the OpenMV machine vision module, improving sensitivity to leaf contour edges while suppressing noise. The specific process is as follows:

[0068] 1) performing grayscale processing and denoising on the first image information to obtain grayscale image information;

[0069] 2) performing edge detection on the grayscale image information using a Canny operator to obtain second image information, and determining continuous contours in the second image information;

[0070] 3) performing a traversal search on the second image information, and when a continuous contour is found, performing a random Hough transform on the continuous contour to determine the size information of the continuous contour;

[0071] 4) When the size of the continuous contour meets a preset threshold condition (ie, the size range of the leaves of the target crop), the continuous contour is determined to be a leaf contour.

[0072] Specifically, the second image information extracted by the Canny operator is traversed and searched, starting from the upper left corner of the image, from top to bottom, and from left to right, to search for the i-th independent continuous contour in the image. The continuous contour is subjected to RHT transformation (random Hough transform), and straight lines and continuous contours that are too small or too large are eliminated. Continuous contours with a size within a preset threshold condition are screened out, and the continuous contours that meet the condition can be determined as the leaf contour.

[0073] S102: Input the leaf image information into a pre-trained lesion area recognition model to obtain the lesion type of the target crop and extract the leaf lesion area.

[0074] Specifically, the lesion area recognition model is a pre-trained neural network model for identifying lesion areas in leaves, the input of which is leaf image information, and the output is the leaf lesion area and the corresponding lesion type of the leaf image information.

[0075] As an optional embodiment, the crop disease and insect pest prediction method further includes the step of pre-training a diseased area recognition model, which specifically includes:

[0076] B1. Acquire multiple preset diseased leaf images, and determine the disease type and diseased area of ​​each diseased leaf image;

[0077] B2. Determine a first sample label for each diseased leaf image according to the diseased leaf type and the diseased area, and construct a first training sample set based on the diseased leaf image and the first sample label;

[0078] B3. Inputting the first training sample set into a pre-built first convolutional neural network to obtain lesion type recognition results and lesion area recognition results;

[0079] B4. Determine a first loss value of the first convolutional neural network based on the lesion type recognition result, the lesion area recognition result, and the first sample label;

[0080] B5. Update the parameters of the first convolutional neural network using a back propagation algorithm according to the first loss value;

[0081] B6. When the first loss value reaches a preset first threshold or the number of iterations reaches a preset second threshold, the training is stopped to obtain a trained lesion area recognition model.

[0082] Specifically, for the lesion area recognition model, the accuracy of the lesion area recognition result and the lesion type recognition result can be measured by a loss function. The loss function is defined on a single training data and is used to measure the prediction error of a training data. Specifically, the loss value of the training data is determined by the label of the single training data and the prediction result of the model for the training data. In actual training, a training data set has a lot of training data, so a cost function is generally used to measure the overall error of the training data set. The cost function is defined on the entire training data set and is used to calculate the average value of the prediction error of all training data, which can better measure the prediction effect of the model. For a general machine learning model, based on the aforementioned cost function, plus a regularization term that measures the complexity of the model, it can be used as the objective function of the training. Based on this objective function, the loss value of the entire training data set can be calculated. There are many types of commonly used loss functions, such as 0-1 loss function, square loss function, absolute loss function, logarithmic loss function, cross entropy loss function, etc., which can all be used as loss functions of machine learning models, which will not be elaborated here one by one. In the embodiment of the present invention, any one of the loss functions can be selected to determine the loss value of the training. Based on the training loss, the model parameters are updated using a backpropagation algorithm. After several iterations, a trained lesion recognition model is obtained. The specific number of iterations can be pre-set, or training is considered complete when the test set meets the required accuracy.

[0083] S103: Acquire first meteorological indicator information and first environmental indicator information of a target area, where the target area is an area where target crops are located.

[0084] As an optional implementation, the step of obtaining the first meteorological indicator information and the first environmental indicator information of the target area is specifically as follows:

[0085] determining first meteorological indicator information of the target area according to weather forecast information, and acquiring first environmental indicator information of the target area through a sensor;

[0086] Among them, the first meteorological indicator information includes at least one of air temperature and humidity, light duration, atmospheric pressure and rainfall, and the first environmental indicator information includes at least one of soil temperature and humidity, soil nitrogen, phosphorus and potassium content and light intensity.

[0087] Specifically, while collecting images of target crops in the target area, the first meteorological indicator information and first environmental indicator information of the target area are obtained through weather forecast information and various sensors, and the AIOT system is used to integrate various types of data to facilitate subsequent pest and disease prediction.

[0088] S104: Input the first meteorological indicator information, the first environmental indicator information, and the leaf lesion area into a pre-trained pest and disease prediction model to obtain a pest and disease prediction result of the target crop.

[0089] Specifically, the pest and disease prediction model is a pre-trained neural network model used to predict the types of pests and diseases that may occur in target crops. Its input is the leaf disease area, meteorological index information, and environmental index information, and its output is the prediction result of the pest and disease type of the target crop.

[0090] As an optional embodiment, the crop pest and disease prediction method further includes the step of pre-training a pest and disease prediction model, which specifically includes:

[0091] C1. Acquire multiple preset images of diseased areas of crops with pests and diseases, determine second meteorological index information and second environmental index information of the crops with pests and diseases, and then determine second training samples based on the images of the diseased areas, the second meteorological index information, and the second environmental index information;

[0092] C2. Determine the pest type label of each pest-infested crop through manual labeling, and construct a second training sample set based on the second training sample and the pest type label;

[0093] C3. Input the second training sample set into the pre-built second convolutional neural network to obtain the pest and disease type recognition result;

[0094] C4. Determine the second loss value of the second convolutional neural network based on the pest and disease type recognition result and the pest and disease type label;

[0095] C5. Update the parameters of the second convolutional neural network through the back propagation algorithm according to the second loss value;

[0096] C6. When the second loss value reaches a preset third threshold or the number of iterations reaches a preset fourth threshold, the training is stopped to obtain a trained pest and disease prediction model.

[0097] Specifically, for the pest and disease prediction model, the accuracy of the pest and disease prediction results can be measured by a loss function. The loss function is defined on a single training data and is used to measure the prediction error of a training data. Specifically, the loss value of the training data is determined by the label of the single training data and the prediction result of the model for the training data. During actual training, a training data set has a lot of training data, so a cost function is generally used to measure the overall error of the training data set. The cost function is defined on the entire training data set and is used to calculate the average value of the prediction error of all training data, which can better measure the prediction effect of the model. For a general machine learning model, based on the aforementioned cost function, a regularization term that measures the complexity of the model can be used as the objective function of the training, and the loss value of the entire training data set can be calculated based on the objective function. There are many types of commonly used loss functions, such as 0-1 loss function, square loss function, absolute loss function, logarithmic loss function, cross entropy loss function, etc., which can all be used as loss functions of machine learning models, which will not be elaborated one by one here. In an embodiment of the present invention, any one of the loss functions can be selected to determine the loss value of the training. Based on the training loss, the model parameters are updated using the backpropagation algorithm. After several iterations, a trained pest and disease prediction model is obtained. The specific number of iterations can be pre-set, or training is considered complete when the test set meets the required accuracy.

[0098] As an optional embodiment, the crop disease and insect pest prediction method further includes the following steps:

[0099] Generate early warning information based on pest and disease prediction results and send it to managers in the target area.

[0100] Specifically, when the types of diseases and pests that may occur in the target crops are predicted, corresponding early warning information can be generated and sent to managers in the target area, so that managers can take relevant prevention and control measures in a timely manner.

[0101] The above describes the method and steps of the embodiment of the present invention. The embodiment of the present invention will be further described below in conjunction with a specific embodiment.

[0102] Regular high-definition photography of target crops in target areas is carried out through drones, and OpenMV machine vision modules are used to extract leaf image information related to pests and diseases, filter out useless information, and store and forward it at the edge nodes. The filtered image information is connected to the smart farmland AIOT system, and weather forecast information for the target area is pulled at the same time. Environmental indicators of the target area are collected through various sensors, and the smart farmland AIOT system uploads all this data to the cloud server. The cloud server uses the locally stored diseased area recognition model and disease and pest prediction model for identification and prediction, and finally obtains the disease and pest type prediction results, and displays the data through cross-platform applications such as mobile phone apps and PC software.

[0103] It can be understood that the embodiment of the present invention extracts leaf image information through edge detection, and then obtains leaf lesion areas through the lesion area recognition model, so that areas without lesions or unclear lesions can be filtered out. Subsequently, pest and disease prediction can be performed on the leaf lesion areas, thereby improving the efficiency of crop disease and pest prediction; disease and pest prediction is performed on the target crop through the leaf lesion areas of the target crop and the meteorological index information and environmental index information of the area where the target crop is located, comprehensively considering the real-time growth status of the target crop as well as the climate and environmental factors, thereby improving the accuracy and reliability of crop disease and pest prediction.

[0104] Reference Figure 2 The embodiment of the present invention provides a crop disease and insect pest prediction system based on machine vision, comprising:

[0105] a leaf image information extraction module, configured to obtain first image information of a target crop, perform edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extract leaf image information based on the leaf contours;

[0106] The leaf lesion area recognition module is used to input the leaf image information into a pre-trained lesion area recognition model to obtain the lesion type of the target crop and extract the leaf lesion area;

[0107] A meteorological and environmental index acquisition module is used to acquire first meteorological index information and first environmental index information of a target area, where the target area is an area where target crops are located;

[0108] The prediction module is used to input the first meteorological indicator information, the first environmental indicator information and the leaf disease area into a pre-trained pest and disease prediction model to obtain a pest and disease prediction result of the target crop.

[0109] As an optional embodiment, the leaf image information extraction module includes:

[0110] an edge detection unit, configured to perform edge detection on the first image information to obtain a plurality of continuous contours;

[0111] A contour screening unit is used to perform random Hough transform on the continuous contours and screen out the continuous contours that meet the preset threshold conditions as the blade contours;

[0112] The image segmentation unit is used to perform image segmentation on the first image information according to the leaf contour to obtain leaf image information of the target crop.

[0113] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0114] Reference Figure 3 The embodiment of the present invention provides a device for predicting crop diseases and insect pests based on machine vision, comprising:

[0115] at least one processor;

[0116] at least one memory for storing at least one program;

[0117] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method for predicting crop diseases and insect pests based on machine vision.

[0118] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0119] An embodiment of the present invention further provides a computer-readable storage medium storing a program executable by a processor. When the program is executed by the processor, it is used to execute the above-mentioned method for predicting crop diseases and insect pests based on machine vision.

[0120] A computer-readable storage medium according to an embodiment of the present invention can execute a machine vision-based crop disease and pest prediction method provided by an embodiment of the method of the present invention, can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.

[0121] The embodiment of the present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs Figure 1The method shown.

[0122] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.

[0123] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the routine skills of an engineer. Therefore, a person skilled in the art can implement the present invention set forth in the claims using ordinary skills without undue experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0124] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0125] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0126] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable media on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0127] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0128] In the above description of this specification, reference to the terms "one embodiment / example," "another embodiment / example," or "certain embodiments / examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0129] While 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 invention, and that the scope of the invention is defined by the claims and their equivalents.

[0130] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for predicting crop diseases and insect pests based on machine vision, characterized in that: The following steps are involved: Acquiring first image information of a target crop, performing edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extracting leaf image information based on the leaf contours; Inputting the leaf image information into a pre-trained lesion area recognition model to obtain the lesion type of the target crop and extract the leaf lesion area; Acquiring first meteorological indicator information and first environmental indicator information of a target area, where the target area is an area where the target crop is located; Inputting the first meteorological indicator information, the first environmental indicator information, and the leaf lesion area into a pre-trained pest and disease prediction model to obtain a pest and disease prediction result for the target crop; The step of performing edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extracting leaf image information based on the leaf contours specifically includes: Performing edge detection on the first image information to obtain a plurality of continuous contours; Performing random Hough transform on the continuous contours, and selecting the continuous contours that meet the preset threshold conditions as the blade contours; The first image information is segmented according to the leaf contour to obtain leaf image information of the target crop.

2. The method for predicting crop diseases and insect pests based on machine vision according to claim 1, characterized in that: The crop disease and insect pest prediction method further includes the step of pre-training a diseased area recognition model, which specifically includes: Acquire a plurality of preset diseased leaf images, and determine the lesion type and lesion area of ​​each of the diseased leaf images; determining a first sample label for each of the diseased leaf images according to the lesion type and the lesion area, and constructing a first training sample set according to the diseased leaf images and the first sample labels; Inputting the first training sample set into a pre-built first convolutional neural network to obtain a lesion type recognition result and a lesion area recognition result; Determining a first loss value of the first convolutional neural network according to the lesion type recognition result, the lesion area recognition result, and the first sample label; Updating the parameters of the first convolutional neural network through a back-propagation algorithm according to the first loss value; When the first loss value reaches a preset first threshold or the number of iterations reaches a preset second threshold, the training is stopped to obtain a trained lesion area recognition model.

3. The method for predicting crop diseases and insect pests based on machine vision according to claim 1, characterized in that: The step of obtaining the first meteorological indicator information and the first environmental indicator information of the target area is specifically as follows: Determining first meteorological indicator information of a target area according to weather forecast information, and acquiring first environmental indicator information of the target area through a sensor; Among them, the first meteorological indicator information includes at least one of air temperature and humidity, light duration, atmospheric pressure and rainfall, and the first environmental indicator information includes at least one of soil temperature and humidity, soil nitrogen, phosphorus and potassium content and light intensity.

4. The method for predicting crop diseases and insect pests based on machine vision according to claim 1, characterized in that: The crop disease and insect pest prediction method further includes the step of pre-training a disease and insect pest prediction model, which specifically includes: Acquiring a plurality of preset images of diseased areas of crops with pests and diseases, determining second meteorological index information and second environmental index information of the crops with pests and diseases, and then determining a second training sample based on the images of the diseased areas, the second meteorological index information, and the second environmental index information; Determine the pest type label of each of the pest-infested crops by manual labeling, and construct a second training sample set based on the second training sample and the pest type label; Inputting the second training sample set into a pre-built second convolutional neural network to obtain a pest and disease type recognition result; Determining a second loss value of the second convolutional neural network according to the pest and disease type identification result and the pest and disease type label; Updating the parameters of the second convolutional neural network through a back-propagation algorithm according to the second loss value; When the second loss value reaches a preset third threshold or the number of iterations reaches a preset fourth threshold, the training is stopped to obtain a trained pest and disease prediction model.

5. A method for predicting crop diseases and insect pests based on machine vision according to any one of claims 1 to 4, characterized in that: The crop disease and insect pest prediction method further comprises the following steps: An early warning message is generated according to the disease and insect pest prediction result, and the early warning message is sent to the management personnel of the target area.

6. A crop disease and insect pest prediction system based on machine vision, characterized in that: include: a leaf image information extraction module, configured to obtain first image information of a target crop, perform edge detection on the first image information to obtain a plurality of leaf contours of the target crop, and extract leaf image information based on the leaf contours; a leaf lesion area recognition module, configured to input the leaf image information into a pre-trained lesion area recognition model, obtain the lesion type of the target crop, and extract the leaf lesion area; A meteorological and environmental index acquisition module, configured to acquire first meteorological index information and first environmental index information of a target area, wherein the target area is an area where the target crop is located; a prediction module, configured to input the first meteorological indicator information, the first environmental indicator information, and the leaf lesion area into a pre-trained pest and disease prediction model to obtain a pest and disease prediction result for the target crop; The leaf image information extraction module includes: an edge detection unit, configured to perform edge detection on the first image information to obtain a plurality of continuous contours; A contour screening unit, configured to perform random Hough transform on the continuous contours, and screen out continuous contours that meet a preset threshold condition as blade contours; The image segmentation unit is used to perform image segmentation on the first image information according to the leaf contour to obtain the leaf image information of the target crop.

7. A device for predicting crop diseases and insect pests based on machine vision, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the crop disease and insect pest prediction method based on machine vision according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to execute the crop disease and insect pest prediction method based on machine vision as claimed in any one of claims 1 to 5 when executed by the processor.

Citation Information

Patent Citations

  • Wireless environmental data monitoring system for intelligent agriculture and working method thereof

    CN110850775A

  • Leaf lesion area detection method and system

    CN113269690A