Crop disease and pest recognition method based on computer vision
Patent Information
- Application Number
- CN202611136570.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-16
AI Technical Summary
传统基于计算机视觉的作物病虫害识别方法多聚焦单一地块,忽视地块间关联,无法从整体种植体系角度防控病虫害,跨地块传播的病虫害易形成防控漏洞,比如前茬作物病虫害残留侵染后茬,因未关联监测导致后茬发病时难追溯源头,从而难以及时阻断
本发明通过划分监测农田区域的预设分区地块组,让病虫害识别更加清晰,不同作物分布区域分别监测,避免混杂干扰,从而提升后续识别基础的准确性。借助历史特征数据集和实际图像数据集的对比挖掘区域病虫害发展规律,知晓当前病虫害与历史情况的关联,为后续识别提供数据基础,考虑作物种植关联为轮作关联,提前发现病虫害跨作物传播风险区域,从源头上关注病虫害潜在扩散路径,将防控范围从单一地块拓展到关联地块,构建更全面的病虫害防控网络,减少病虫害大面积爆发风险,通过特征差异分析锁定与目标监测分区病虫害紧密关联的地块,定位风险传导关键节点,本申请大幅提升识别精准性,快速制定防控措施,减少病虫害对作物的损害。
Smart Images

Figure CN122929176A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pest and disease identification technology, and more specifically, to a method for identifying crop pests and diseases based on computer vision. Background Technology
[0002] Effective identification and control of crop diseases and pests in agricultural production has always been a key challenge in ensuring yield and quality. Crop rotation patterns exist in agricultural production, and the spread of diseases and pests is influenced by factors related to different plots. Traditional computer vision-based methods for identifying crop diseases and pests often focus on individual plots, neglecting the connections between plots. This makes it impossible to control diseases and pests from the perspective of the entire planting system. Diseases and pests spreading across plots can easily create loopholes in control. For example, residual diseases and pests from previous crops can infect subsequent crops. Because there is no associated monitoring, it is difficult to trace the source when diseases occur in subsequent crops, making it difficult to stop them in time. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a method for identifying crop diseases and pests based on computer vision.
[0004] To achieve the above objectives, the present invention provides the following technical solution: A computer vision-based method for identifying crop diseases and pests, comprising the following steps: The farmland area monitored by machine vision is divided into pre-defined plot groups. The comparison result set is obtained by comparing the historical pest and disease characteristics data of crops in the preset zoning plot group with the actual pest and disease image data of crops in the corresponding plot area. The target monitoring zones are selected from the preset zoning plot groups based on the first comparison result of the comparison result set; From the preset zoning plot groups, select pre-screened associated plot groups that have crop planting associations with the target monitoring zone; After processing and analyzing the comparison result set, the first target associated sub-plot was extracted from the pre-screened associated plot group; The pest and disease image recognition condition set is obtained by statistically analyzing the pest and disease image recognition condition information of the first target associated sub-plot, target monitoring zone and preset zone plot group within the historical period. Within the current cycle, acquire the current crop growth characteristic information set of the target monitoring zone and the pre-screened associated plot group, and obtain the pre-matched image recognition conditions by matching the current crop growth characteristic information set from the set of pest and disease image recognition conditions. Let the current crop growth characteristic information set be... , The total number of crop samples from the target monitoring zone and pre-screened associated plots within the current monitoring period. Let tuples represent the growth characteristics of the 'o'th crop sample. For spatial characteristics, the location of crops in sub-plots is represented by plot grid codes. Visual characteristics, including plant height, leaf color, and lesion size, Physiological characteristics, such as chlorophyll content, This refers to the time of feature acquisition.
[0005] The types of crop diseases and pests in the target monitoring zones and pre-screened associated plot groups are identified based on the pre-matched image recognition conditions in the current period.
[0006] Preferably, the farmland area monitored by machine vision is divided into pre-defined plot groups, specifically including the following steps: The distribution of various crops within farmland areas was statistically monitored to obtain crop distribution statistics. Based on the statistical results of crop distribution, the monitored farmland area is divided into pre-defined plot groups.
[0007] Preferably, the comparison result set is obtained by comparing the historical pest and disease characteristic data of crops within the preset zoning plot group with the actual pest and disease image data of crops in the corresponding plot area, specifically including the following steps: In the first historical period, acquire the historical pest and disease feature dataset of crops in the preset partitioned plot group; The distribution of crop planting density within a pre-defined zoning plot group is statistically analyzed to obtain a set of planting density distribution results. In the first historical period, a dataset of actual crop disease and pest images was obtained based on the planting density distribution result set. The comparison result set is obtained by comparing the corresponding features of the historical pest and disease feature dataset with the actual pest and disease image dataset.
[0008] Preferably, the target monitoring zone is selected from the preset zoning group based on the first comparison result of the comparison result set, specifically including the following steps: The first comparison result is obtained by filtering from the comparison result set, wherein the first comparison result refers to the value of the feature matching degree of the historical pest and disease feature dataset being greater than or equal to the feature matching degree of the actual pest and disease image dataset. Extract the target monitoring zone that matches the first comparison result from the preset zoning plot group.
[0009] Preferably, the process of selecting pre-screened associated plot groups from the preset zoning plot groups that have a crop planting association with the target monitoring zone specifically includes the following steps: The associated sub-plot set is obtained by selecting sub-plots that are associated with crop rotation with the target monitoring zone from the preset zoning plot group; The second comparison result is selected from the comparison result set. The second comparison result refers to the value where the feature matching degree of the historical pest and disease feature dataset is less than the feature matching degree of the actual pest and disease image dataset. The comparison result set is defined as a parameter. Where: i is the index of the preset partitioned plot group (i=1,2,…,n, where n is the total number of plot groups); j is the feature matching type identifier (such as matching of historical pest and disease feature data and actual pest and disease feature data, matching of growth environment feature association, etc., j=1,2,…,m, where m is the total number of matching types); The matching difference or judgment result of the i-th plot group and the j-th feature (such as the second comparison result). When the value is less than 0, it means that the historical feature matching degree is less than the actual feature matching degree.
[0010] Extract the pre-screened associated plot group corresponding to the second comparison result from the associated sub-plot set.
[0011] Preferably, after processing and analyzing the comparison result set, the first target related sub-plot is extracted from the pre-screened related plot group, specifically including the following steps: The first feature difference set is obtained by calculating the feature difference values of the first comparison results; The second feature difference set is obtained by calculating the feature difference values of the second alignment results; The difference dataset is obtained by statistically analyzing the corresponding differences between the first feature difference set and the second feature difference set; Filter the first associated difference data that falls within the preset feature difference association interval value from the difference dataset; Based on the first association difference data, the first target associated sub-plot that matches the first association difference data is extracted from the pre-screened associated plot group.
[0012] Preferably, the pest and disease image recognition condition set is obtained by statistically analyzing the pest and disease image recognition condition information of the first target associated sub-plot, target monitoring zone, and preset zone plot group within a historical period, specifically including the following steps: The first set of crop growth environment characteristics information is obtained by collecting crop growth environment characteristic information of the target monitoring zone and the first target associated sub-plot in the first historical cycle; Let the first growth environment characteristic information set be... B represents the total number of monitored plots within the first historical period, including the target monitoring zone and the first target-related sub-plots; T represents the total number of environmental feature collection points within the first historical period. Let b be the environmental feature tuple of the b-th plot at time t. For land parcel identification, For time identification, Environmental feature vector.
[0013] The first set of growth environment feature information and the first set of related difference data are combined to form the first image recognition conditions; The second correlation difference data is obtained by comparing the feature difference values of the result set within the second historical period, where the second historical period is earlier than the first historical period; Extract the second target associated sub-plot from the preset partitioned plot group; wherein, the second target associated sub-plot refers to the remaining planting associated sub-plots excluding the first target associated sub-plot; The second growth environment characteristic information is obtained by collecting crop growth environment characteristic information of the target monitoring zone and the second target associated sub-plot in the second historical cycle; The second growth environment characteristic information and the second correlation difference data are combined to form the second image recognition conditions; The first and second growth environment characteristic information are combined to form a growth environment characteristic reference information set; The first image recognition condition and the second image recognition condition are combined to form a set of conditions for disease and pest image recognition.
[0014] Let the condition set for pest and disease image recognition be: , defined as the set of multi-dimensional conditional tuples Where K is the total number of independent identification rules contained in the condition set, such as independent rules corresponding to different crops and different types of pests and diseases. Let k be the condition tuple for the k-th recognition rule. This is a feature vector of the growth environment. This is the feature matrix of pest and disease images. To identify periodic markers, This is the feature matching threshold.
[0015] Preferably, within the current cycle, the current crop growth characteristic information set of the target monitoring zone and the pre-screened associated plot group is obtained, and the pre-matched image recognition conditions are obtained by matching the current crop growth characteristic information set with the pest and disease image recognition condition set. Specifically, this includes the following steps: The current growth characteristic information set is obtained by acquiring crop growth characteristic information of the target monitoring zone and the pre-screened associated plot groups in the current cycle; From the reference information set of growth environment characteristics, a preprocessed set of growth environment characteristics that matches the current set of growth characteristics is selected; Based on the preprocessed growth environment feature information set, corresponding pre-matched image recognition conditions are selected from the pest and disease image recognition condition set.
[0016] Preferably, the identification of crop pest and disease types in the target monitoring zone and pre-screened associated plot group within the current period is performed based on pre-matched image recognition conditions, specifically including the following steps: Based on the current growth characteristic information set, predict the pest and disease risk values of crops in the target monitoring zone and the pre-screened associated plot group within the current cycle, and obtain the current pest and disease risk prediction value dataset. The current pest and disease image feature set is obtained by collecting crop pest and disease image features from the target monitoring zone and pre-screened associated plot groups in the current cycle; The current pest and disease image feature set, the current pest and disease risk prediction value dataset, and the pre-matched image recognition conditions are input into the crop pest and disease recognition model to identify the pest and disease types.
[0017] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the computer vision-based crop disease and pest identification method.
[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention improves the clarity of pest and disease identification by dividing the monitored farmland into pre-defined zones. Monitoring different crop distribution areas separately avoids interference and enhances the accuracy of subsequent identification. By comparing historical feature datasets and actual image datasets, it uncovers regional pest and disease development patterns, revealing the correlation between current pest and disease conditions and historical data, providing a data foundation for subsequent identification. Considering crop rotation relationships, it identifies areas at risk of cross-crop transmission of pests and diseases in advance, focusing on potential spread paths at the source. This expands the control scope from single plots to related plots, constructing a more comprehensive pest and disease control network and reducing the risk of large-scale outbreaks. Through feature difference analysis, it identifies plots closely related to pests and diseases in the target monitoring zones, pinpointing key nodes in risk transmission. This application significantly improves identification accuracy, enables rapid development of control measures, and reduces crop damage caused by pests and diseases. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the crop disease and pest identification method based on computer vision proposed in this invention; Figure 2 This diagram illustrates the identification results of the crop disease and pest identification method based on computer vision proposed in this invention. Figure 1 ; Figure 3 This diagram illustrates the identification results of the crop disease and pest identification method based on computer vision proposed in this invention. Figure 2 ; Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention.
[0020] 610. Processor; 620. Communication interface; 630. Memory; 640. Communication bus. Detailed Implementation
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places throughout this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.
[0024] Reference Figures 1-4 As shown.
[0025] The embodiments further illustrate the crop disease and pest identification method based on computer vision proposed in this invention.
[0026] A computer vision-based method for identifying crop diseases and pests, comprising the following steps: The farmland area monitored by machine vision is divided into pre-defined plot groups. Specifically, the distribution of various crop types within farmland areas is statistically monitored to obtain crop distribution statistics. Based on the statistical results of crop distribution, the monitored farmland area is divided into pre-defined plot groups.
[0027] Specifically, the distribution of various crops within the farmland area is first statistically monitored to clearly identify the planting range of each crop. For example, if wheat is mainly planted in the east of the farmland and rice is mainly planted in the west, the farmland is divided into pre-defined plot groups with wheat as the main crop and pre-defined plot groups with rice as the main crop.
[0028] The comparison result set is obtained by comparing the historical pest and disease characteristics data of crops in the preset zoning plot group with the actual pest and disease image data of crops in the corresponding plot area. Specifically, in the first historical period, a dataset of historical pest and disease characteristics of crops within a preset partitioned plot group is obtained; The distribution of crop planting density within a pre-defined zoning plot group is statistically analyzed to obtain a set of planting density distribution results. In the first historical period, a dataset of actual crop disease and pest images was obtained based on the planting density distribution result set. The comparison result set is obtained by comparing the corresponding features of the historical pest and disease feature dataset with the actual pest and disease image dataset.
[0029] Obtain actual images of pests and diseases in crops within a pre-defined group of plots using computer vision. After extracting the morphological, location, and color features of pests from actual pest images, a dataset of actual pest images is obtained. The feature matching degree of the historical pest and disease feature dataset and the actual pest and disease image dataset is calculated to obtain a comparison result set containing the matching degree.
[0030] Specifically, in the first historical period, the historical pest and disease characteristics dataset of crops in the preset partition plot group is obtained. The first historical period can be a past planting season. The pest and disease situation of similar crops in the past is summarized. For example, the data on the onset time pattern, lesion morphology characteristics and diseased parts of wheat rust in a certain plot over the years. The lesion morphology characteristics include round or oval and color depth, and the diseased parts include leaves and stems.
[0031] At the same time, the distribution of crop planting density within the preset zoning plots is statistically analyzed. Different planting densities will affect the spread and development of pests and diseases. For example, in high-density cornfields, pests and diseases are more likely to spread due to the small spacing between plants and poor ventilation. Based on this planting density distribution result set, the actual pest and disease image dataset of crops is collected in the first historical period. For example, images of aphids gathering on plants and yellowing leaves are taken in densely planted corn areas, while images of relatively healthy plants or plants with mild disease are taken in sparsely planted areas.
[0032] Historical pest and disease feature datasets are compared with actual pest and disease image datasets. Taking wheat rust as an example, the historical feature dataset records that rust lesions initially appear as small yellow spots, which later expand into reddish-brown patches. The actual image dataset shows large areas of reddish-brown patches on wheat leaves in a certain plot. The lesion morphology, color, and other features of the two datasets are matched one by one to statistically analyze the degree of matching, such as the similarity of lesion color and the degree of shape matching. This results in a comparison set, which is used to determine the degree of fit between the current actual pest and disease situation and historical experience. This provides data support for identifying the development trend of pests and diseases. For example, if the actual lesion features highly match the features of historical severe outbreaks, it suggests that the area may face a high risk of pest and disease outbreaks.
[0033] The target monitoring zones are selected from the preset zoning plot groups based on the first comparison result of the comparison result set; Specifically, the first comparison result is obtained by filtering from the comparison result set. The first comparison result refers to the value of the feature matching degree of the historical pest and disease feature dataset being greater than or equal to the feature matching degree of the actual pest and disease image dataset. Extract the target monitoring zone that matches the first comparison result from the preset zoning plot group.
[0034] Specifically, the first step is to identify results from the comparison result set that have a feature matching degree greater than or equal to the feature matching degree of the actual pest and disease image dataset. These results are defined as the first comparison result.
[0035] Taking wheat rust monitoring as an example, suppose there is a wheat-growing area, labeled plot A, within a pre-defined group of plots. Its historical pest and disease feature dataset records past characteristics of wheat rust in this plot, such as initial yellow spots (approximately 2-3 mm in diameter) that later expand into reddish-brown patches (5-8 mm in diameter), with a lesion density of approximately 1-2 patches per square centimeter. In the current period's actual pest and disease image dataset, wheat leaf images of plot A show lesions primarily as small yellow spots (approximately 2 mm in diameter), without significant expansion, with a lesion density of 1 patch per square centimeter. At this point, comparing the historical reddish-brown patches with the actual yellow spots in the image, if the historical feature's matching degree is greater than or equal to the actual image's matching degree, it is considered the first comparison result. The historical feature's matching degree represents the degree to which the feature conforms to typical disease patterns, while the actual image's matching degree represents the degree to which the actual disease characteristics conform to historical patterns.
[0036] Based on the first comparison result, the corresponding area is extracted from the preset zoning plot group and identified as the target monitoring zone. Taking plot A as an example, if its comparison result matches the first comparison result, it indicates that the current development of pests and diseases in this plot is relatively consistent with historical patterns. It can be used as a core monitoring target to track whether the lesions will expand and spread as historically, providing a clear regional direction for timely control measures. Control measures include spraying, thereby improving the efficiency and effectiveness of pest and disease control in agricultural production.
[0037] From the preset zoning plot groups, select pre-screened associated plot groups that have crop planting associations with the target monitoring zone; Specifically, a set of associated subplots is obtained by selecting subplots from the preset zoning plot group that have a crop rotation relationship with the target monitoring zone; The second comparison result is selected from the comparison result set. The second comparison result refers to the value that the feature matching degree of the historical pest and disease feature dataset is less than the feature matching degree of the actual pest and disease image dataset. Extract the pre-screened associated plot group corresponding to the second comparison result from the associated sub-plot set.
[0038] Specifically, the first step is to focus on screening basic related plots based on crop rotation associations. Crop rotation can create connections between crops planted in different seasons or years in terms of soil environment and pathogen residues. For example, if a plot was planted with wheat in the previous season and then with corn in the current season, the soil may contain pathogens of wheat pests and diseases, which may infect the corn. Therefore, subplots with such crop rotation relationships with the target monitoring zone from the preset zoning plot group are marked as the set of related subplots.
[0039] Screening for abnormal pest and disease data that deviates from historical patterns. Historical pest and disease feature datasets record typical characteristics of pests and diseases affecting this type of crop or field in the past, such as the onset time, lesion morphology, and spread speed of a certain disease in history. Actual pest and disease image datasets represent the actual disease situation collected at present. By comparing the two, if the actual pest and disease feature matching degree exceeds that of the historical data, it means that the current pest and disease situation is more severe than before. For example, historically, the average diameter of lesions of a certain disease was 1 cm, but the diameter of lesions collected now is 2 cm. The feature matching degree of the historical pest and disease feature dataset is less than that of the actual pest and disease image dataset, and it is marked as the second comparison result. It represents an abnormal trend in the development of pests and diseases that deviates from historical experience.
[0040] Identify high-risk plots requiring close monitoring. Based on the associated sub-plot set and the second comparison results, plots matching the second comparison results are marked as pre-screened associated plot groups from the associated sub-plot set. For example, if a plot in the associated sub-plot set was previously planted with a disease-prone crop, and its current pest and disease characteristics match the historical data in the second comparison results, it indicates that the pest and disease risk in this plot is unusual and requires close monitoring and control.
[0041] After processing and analyzing the comparison result set, the first target associated sub-plot was extracted from the pre-screened associated plot group; Specifically, the first feature difference set is obtained by calculating the feature difference values of the first comparison results; The second feature difference set is obtained by calculating the feature difference values of the second alignment results; The difference dataset is obtained by statistically analyzing the corresponding differences between the first feature difference set and the second feature difference set; Filter the first associated difference data that falls within the preset feature difference association interval value from the difference dataset; Based on long-term research experience in agricultural pests and diseases, a reasonable range of fluctuation for characteristic differences is initially defined. For example, based on past cases of characteristic differences in similar crop pests and diseases, empirical ranges for differences in lesion area and color grayscale are determined. Then, through a large amount of historical data statistics, the mean and standard deviation of characteristic differences of different crop pests and diseases in dimensions such as growth environment and disease stage are calculated. Combined with confidence intervals, such as taking the characteristic difference range corresponding to a 95% confidence level, the appropriate preset characteristic difference correlation interval value is finally determined by comprehensive experience adjustment.
[0042] Based on the first association difference data, the first target associated sub-plot that matches the first association difference data is extracted from the pre-screened associated plot group.
[0043] Specifically, for the first comparison result, the pest and disease characteristic data, such as lesion size and disease area density, are extracted. The difference value of each characteristic dimension is calculated by comparing it with the preset standard characteristics, thus forming the first feature difference set. For the second comparison result, the difference between its pest and disease characteristics and the preset standard characteristics is judged to obtain the second feature difference set. Taking wheat rust as an example, in the first comparison result, the historical average diameter of lesions in a certain plot is 3mm, and the current average diameter of lesions is 4mm, so the difference is 1mm. In the second comparison result, the historical average diameter of lesions in another plot is 2mm, and the current average diameter of lesions is 5mm, so the difference is 3mm. These are respectively assigned to the corresponding difference sets.
[0044] A difference dataset is generated by statistically analyzing the corresponding differences. The differences in the same dimension of features are compared between the first and second feature difference sets, such as the difference in lesion diameter and the difference in the density of the affected area. These differences are recorded to construct the difference dataset. For example, if the average difference in lesion diameter is 1 mm in the first difference set and 3 mm in the second, the total difference is 2 mm, thus demonstrating the correlation between the two sets of comparison results in terms of feature differences.
[0045] Filter key correlation difference data. Select the first correlation difference data that meets the conditions from the difference dataset based on the preset feature difference correlation interval value. The preset feature difference correlation interval value can be set to a correlation interval of 1-4mm.
[0046] Based on the first correlation difference data, plots in the pre-screened correlation plot group that match the differences in pest and disease characteristics are identified and designated as the first target correlation sub-plots. For example, if the difference data indicates a difference of 2mm in lesion diameter and a difference of 10% in disease area density, plots in the pre-screened plot group that simultaneously meet both of these differences are identified as target correlation sub-plots requiring close monitoring of pest and disease conditions.
[0047] The pest and disease image recognition condition set is obtained by statistically analyzing the pest and disease image recognition condition information of the first target associated sub-plot, target monitoring zone and preset zone plot group within the historical period. Specifically, the first set of crop growth environment characteristic information is obtained by collecting crop growth environment characteristic information of the target monitoring zone and the first target associated sub-plot in the first historical cycle; The first set of growth environment feature information and the first set of related difference data are combined to form the first image recognition conditions; The second correlation difference data is obtained by comparing the feature difference values of the result set within the second historical period, where the second historical period is earlier than the first historical period; Extract the second target associated sub-plot from the preset partitioned plot group; wherein, the second target associated sub-plot refers to the remaining planting associated sub-plots excluding the first target associated sub-plot; The second growth environment characteristic information is obtained by collecting crop growth environment characteristic information of the target monitoring zone and the second target associated sub-plot in the second historical cycle; The second growth environment characteristic information and the second correlation difference data are combined to form the second image recognition conditions; The first and second growth environment characteristic information are combined to form a growth environment characteristic reference information set; The first image recognition condition and the second image recognition condition are combined to form a set of conditions for disease and pest image recognition.
[0048] Specifically, during the first historical period, crop growth environment characteristics information, such as temperature, humidity, soil fertility, and light duration, are collected from the target monitoring zones and the first target-related sub-plots. These environmental factors influence the occurrence and development of pests and diseases, and are summarized to form the first growth environment characteristic information set. The environmental information and the difference data are combined with the first correlation difference data to form the first image recognition condition. This associates environmental factors with differences in pest and disease characteristics to determine the occurrence conditions of pests and diseases within that period. For example, if the environmental information for a plot in the first historical period is 70% humidity and 25℃, and the correlation difference data is that the lesion diameter is 2mm larger than historical values, the combination of these two is defined as the image recognition condition of a lesion diameter difference of 2mm under an environment of 70% humidity and 25℃.
[0049] In the second historical period, the feature difference values of the comparison result set for that period are calculated to obtain the second association difference data. After excluding the first target associated sub-plots from the preset zoning plot group, the second target associated sub-plots are extracted. The crop growth environment feature information of these plots in the second historical period is collected to form the second growth environment feature information. The second growth environment feature information and the second association difference data are combined to form the second image recognition conditions. For example, in the second historical period, the humidity of a certain plot is 60% and the temperature is 22℃. The association difference data is that the lesion diameter is 1mm larger than the historical value. This is combined to form the condition that the lesion diameter difference is 1mm under the conditions of 60% humidity and 22℃.
[0050] The first and second growth environment feature information are integrated to form a growth environment feature reference information set, including environmental data from different historical periods, for subsequent comparison with the current environment. The first and second image recognition conditions are merged to construct a pest and disease image recognition condition set, thus forming a pest and disease recognition reference standard under multiple historical periods and multiple environmental scenarios, providing rich historical evidence for identifying pests and diseases in the current period.
[0051] Within the current cycle, acquire the current crop growth characteristic information set of the target monitoring zone and the pre-screened associated plot group, and obtain the pre-matched image recognition conditions by matching the current crop growth characteristic information set from the set of pest and disease image recognition conditions. Specifically, the current growth characteristic information set is obtained by acquiring crop growth characteristic information of the target monitoring zone and the pre-screened associated plot groups in the current cycle; From the reference information set of growth environment characteristics, a preprocessed set of growth environment characteristics that matches the current set of growth characteristics is selected; Based on the preprocessed growth environment feature information set, corresponding pre-matched image recognition conditions are selected from the pest and disease image recognition condition set.
[0052] Specifically, the first step is to collect current growth characteristic information. During the current period, crop growth characteristic information for the target monitoring zone and pre-screened associated plots is acquired, such as plant height, leaf color, number of tillers, and fruit size. This information is then compiled into a current growth characteristic information set, thereby providing a comprehensive understanding of the current crop growth status. For example, wheat in the target monitoring zone might have a plant height of 80 cm and yellow-green leaves, while corn in the pre-screened associated plots might have a plant height of 150 cm and yellow spots on its leaves. This information together constitutes the current growth characteristic information set.
[0053] Matching historical growth environment information. From the reference information set of growth environment characteristics, select portions with a high degree of matching with the current growth characteristic information set, thus forming a preprocessed growth environment characteristic information set. This is because crop growth characteristics are closely related to the environment. For example, if the current growth characteristics are wheat plant height of 80 cm and leaves that are yellow-green, find historical environmental data in the reference information set when wheat plant height was 78-82 cm and leaves were yellow-green, such as humidity of 65% and temperature of 24℃. This environmental data constitutes the preprocessed growth environment characteristic information set.
[0054] Filtering pre-matching image recognition conditions. Based on the pre-processed growth environment feature information set, search for corresponding conditions in the pest and disease image recognition condition set. Since image recognition conditions are a combination of environmental information and associated difference data, when matching environmental information is found, the corresponding image recognition condition can be filtered out and used as a pre-matching image recognition condition. For example, if the pre-processed environmental information is 65% humidity and 24℃, and the image recognition condition found is a 2mm difference in lesion diameter under 65% humidity and 24℃ conditions, this condition is a pre-matching image recognition condition that can be referenced for the current cycle, used for subsequent identification of pest and disease types and assessment of occurrence risk.
[0055] The types of crop diseases and pests in the target monitoring zones and pre-screened associated plot groups are identified based on the pre-matched image recognition conditions in the current period.
[0056] Specifically, based on the current growth characteristic information set, predict the pest and disease risk values of crops in the target monitoring zone and the pre-screened associated plot group within the current cycle, and obtain the current pest and disease risk prediction value dataset. The current pest and disease image feature set is obtained by collecting crop pest and disease image features from the target monitoring zone and pre-screened associated plot groups in the current cycle; The current pest and disease image feature set, the current pest and disease risk prediction value dataset, and the pre-matched image recognition conditions are input into the crop pest and disease recognition model to identify the pest and disease types.
[0057] Specifically, the first step is to conduct pest and disease risk prediction. Based on the current growth characteristic information set, a pre-trained prediction model is used to predict the pest and disease risk values for the current period for the target monitoring area and the pre-screened associated plot group, thus forming a current pest and disease risk prediction dataset. The pre-trained prediction model can learn the correlation between historical growth characteristics and pest and disease occurrence based on machine learning algorithms. For example, based on the current growth characteristics of wheat with low plant height and yellowing leaves, the probability of wheat rust occurrence in this plot is predicted to be 60%. In the pre-screened associated plot group, corn leaves have spots and slow growth, and the probability of corn leaf blight occurrence is predicted to be 55%. These probability values constitute the risk prediction dataset, allowing for early assessment of the likelihood of pest and disease occurrence.
[0058] An improved CNN (Convolutional Neural Network) is used as the basic architecture. An attention mechanism is introduced to enhance the detection of key crop growth features, such as abnormal wheat plant height and leaf color changes. Branch networks are built for different crops, sharing the bottom-level feature extraction layer while the upper-level classification layer is differentiated to improve adaptability to multiple crop scenarios.
[0059] This method collects crop growth images from multiple regions and growth stages, annotating features such as plant height, leaf color, and spot morphology, and associates these features with pest and disease types and their probability of occurrence. The training, validation, and test sets are divided in a 7:2:1 ratio, and data augmentation is used to expand the sample and alleviate class imbalance.
[0060] The image data is uniformly set to a resolution of 224×224 pixels, including panoramic views of crop plants and close-up details of local features. After inputting crop variety, growth cycle, environmental data, and image data into the model, the data is output in probabilistic form, such as a 60% probability of wheat rust and a 55% probability of corn leaf blight, corresponding to the probability of occurrence of different pests and diseases. Simultaneously, risk levels are output, such as low risk, medium risk, and high risk, with a threshold of below 30% for low risk, 30%-70% for medium risk, and above 70% for high risk.
[0061] Collect current pest and disease image features. For crops in the target monitoring zone and pre-screened associated plots during the current period, collect pest and disease images and extract image features, such as lesion shape, color, and distribution density; and pest size, color, and movement patterns. This forms a current pest and disease image feature set, visually presenting the current external manifestations of pests and diseases. For example, images of wheat leaves in the target monitoring zone are used to extract features such as elliptical, reddish-brown lesions distributed along the leaf edges; and images of corn in the pre-screened associated plots are used to extract features such as elongated, yellow lesions covering the entire leaf. These features constitute the image feature set.
[0062] The crop pest and disease identification model is input into the current pest and disease image feature set, the current pest and disease risk prediction value dataset, and the pre-matching image recognition conditions. This model is a deep learning-based image classification and risk fusion model. The model combines the intuitive representation of image features, the probability judgment of risk prediction, and the historical correlation of pre-matching conditions to comprehensively identify the pest and disease type. For example, if the image feature is an elliptical reddish-brown lesion, the risk prediction value is a 60% probability of rust occurrence, and the pre-matching conditions are a 2mm difference in lesion diameter at 65% humidity and 24℃, the model learns the correlation between these data to output the identification result of wheat rust, clarifying the current pest and disease type and providing a basis for formulating control measures.
[0063] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the computer vision-based crop disease and pest identification method.
[0064] Table 1 Comparison of Experimental Indicators for Identification of Diseases and Pests in Different Crops
[0065] The effectiveness of the method was validated using multiple indicators, focusing on three groups: wheat rust, corn aphids, and rice blast. The average accuracy of plot delineation was 91.2%, effectively distinguishing major crop-growing areas; the average feature matching accuracy was 87.2%, with varying difficulty in comparing features for different pests and diseases; the target monitoring zone identification and associated plot screening indicators demonstrated effectiveness in identifying typical pest and disease areas, but accuracy in some scenarios needed improvement due to crop characteristics and environmental interference; risk prediction and image extraction efficiency also showed patterns and room for optimization under different pest and disease scenarios.
[0066] Table 2 Comparison of experimental indicators for identifying diseases and pests in wheat rust groups
[0067] This study investigated the impact of different temperatures (low, medium, and high) on various indicators of the identification method. The accuracy of plot division initially increased and then stabilized with rising temperature, reaching 92.5% at medium temperatures. Indicators such as feature matching accuracy and target monitoring zone identification accuracy also showed a trend of better performance at medium temperatures; for example, the feature matching accuracy was 88.8% in the temperature group, and the risk prediction error rate was the lowest at 5.2% in the temperature group. Overall, the medium-temperature environment showed better adaptability to all aspects of wheat rust identification. Temperature changes affected the identification results, providing data reference for optimizing identification under different temperature scenarios.
[0068] like Figure 2 As shown, the electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a computer vision-based crop disease and pest identification method.
[0069] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0070] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to perform a computer vision-based crop disease and pest identification method.
[0071] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform a computer vision-based crop disease and pest identification method.
[0072] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying crop diseases and pests based on computer vision, characterized in that, The method includes the following steps: The farmland area monitored by machine vision is divided into pre-defined plot groups. The comparison result set is obtained by comparing the historical pest and disease characteristics data of crops in the preset zoning plot group with the actual pest and disease image data of crops in the corresponding plot area. The target monitoring zones are selected from the preset zoning plot groups based on the first comparison result of the comparison result set; From the preset zoning plot groups, select pre-screened associated plot groups that have crop planting associations with the target monitoring zone; After processing and analyzing the comparison result set, the first target associated sub-plot was extracted from the pre-screened associated plot group; The pest and disease image recognition condition set is obtained by statistically analyzing the pest and disease image recognition condition information of the first target associated sub-plot, target monitoring zone and preset zone plot group within the historical period. Within the current cycle, acquire the current crop growth characteristic information set of the target monitoring zone and the pre-screened associated plot group, and obtain the pre-matched image recognition conditions by matching the current crop growth characteristic information set from the set of pest and disease image recognition conditions. The types of crop diseases and pests in the target monitoring zones and pre-screened associated plot groups are identified based on the pre-matched image recognition conditions in the current period.
2. The crop disease and pest identification method based on computer vision according to claim 1, characterized in that, The process of dividing farmland areas monitored by machine vision into pre-defined plot groups includes the following steps: The distribution of various crops within farmland areas was statistically monitored to obtain crop distribution statistics. Based on the statistical results of crop distribution, the monitored farmland area is divided into pre-defined plot groups.
3. The crop disease and pest identification method based on computer vision according to claim 1, characterized in that, The comparison result set is obtained by comparing the historical pest and disease characteristics data of crops within the preset zoning plot group with the actual pest and disease image data of crops in the corresponding plot area. The specific steps include: In the first historical period, acquire the historical pest and disease feature dataset of crops in the preset partitioned plot group; The distribution of crop planting density within a pre-defined zoning plot group is statistically analyzed to obtain a set of planting density distribution results. In the first historical period, a dataset of actual crop disease and pest images was obtained based on the planting density distribution result set. The comparison result set is obtained by comparing the corresponding features of the historical pest and disease feature dataset with the actual pest and disease image dataset.
4. The crop disease and pest identification method based on computer vision according to claim 1, characterized in that, The target monitoring zones are selected from the preset zoning groups based on the first comparison result of the comparison result set. The specific steps include: The first comparison result is obtained by filtering from the comparison result set, wherein the first comparison result refers to the value of the feature matching degree of the historical pest and disease feature dataset being greater than or equal to the feature matching degree of the actual pest and disease image dataset. Extract the target monitoring zone that matches the first comparison result from the preset zoning plot group.
5. The crop disease and pest identification method based on computer vision according to claim 4, characterized in that, The process of selecting pre-screened associated plots from the preset zoning plot groups that are related to crop planting in the target monitoring zone includes the following steps: The associated sub-plot set is obtained by selecting sub-plots that are associated with crop rotation with the target monitoring zone from the preset zoning plot group; The second comparison result is selected from the comparison result set. The second comparison result refers to the value where the feature matching degree of the historical pest and disease feature dataset is less than the feature matching degree of the actual pest and disease image dataset. Extract the pre-screened associated plot group corresponding to the second comparison result from the associated sub-plot set.
6. The crop disease and pest identification method based on computer vision according to claim 1, characterized in that, After processing and analyzing the comparison result set, the first target related sub-plot is extracted from the pre-screened related plot group. The specific steps include: The first feature difference set is obtained by calculating the feature difference values of the first comparison results; The second feature difference set is obtained by calculating the feature difference values of the second alignment results; The difference dataset is obtained by statistically analyzing the corresponding differences between the first feature difference set and the second feature difference set; Filter the first associated difference data that falls within the preset feature difference association interval value from the difference dataset; Based on the first association difference data, the first target associated sub-plot that matches the first association difference data is extracted from the pre-screened associated plot group.
7. The crop disease and pest identification method based on computer vision according to claim 6, characterized in that, The pest and disease image recognition condition set is obtained by statistically analyzing the pest and disease image recognition condition information of the first target associated sub-plot, target monitoring zone, and preset zone plot group within the historical period. The specific steps include: The first set of crop growth environment characteristics information is obtained by collecting crop growth environment characteristic information of the target monitoring zone and the first target associated sub-plot in the first historical cycle; The first set of growth environment feature information and the first set of related difference data are combined to form the first image recognition conditions; The second correlation difference data is obtained by comparing the feature difference values of the result set within the second historical period, where the second historical period is earlier than the first historical period; Extract the second target associated sub-plot from the preset partitioned plot group; wherein, the second target associated sub-plot refers to the remaining planting associated sub-plots excluding the first target associated sub-plot; The second growth environment characteristic information is obtained by collecting crop growth environment characteristic information of the target monitoring zone and the second target associated sub-plot in the second historical cycle; The second growth environment characteristic information and the second correlation difference data are combined to form the second image recognition conditions; The first and second growth environment characteristic information are combined to form a growth environment characteristic reference information set; The first image recognition condition and the second image recognition condition are combined to form a set of conditions for disease and pest image recognition.
8. The crop disease and pest identification method based on computer vision according to claim 7, characterized in that, Within the current cycle, acquire the current crop growth characteristic information set of the target monitoring zone and the pre-screened associated plot group. Based on the current crop growth characteristic information set, obtain the pre-matched image recognition conditions from the pest and disease image recognition condition set. The specific steps include: The current growth characteristic information set is obtained by acquiring crop growth characteristic information of the target monitoring zone and the pre-screened associated plot groups in the current cycle; From the reference information set of growth environment characteristics, a preprocessed set of growth environment characteristics that matches the current set of growth characteristics is selected; Based on the preprocessed growth environment feature information set, corresponding pre-matched image recognition conditions are selected from the pest and disease image recognition condition set.
9. The crop disease and pest identification method based on computer vision according to claim 8, characterized in that, The identification of crop pest and disease types in the target monitoring zones and pre-screened associated plot groups within the current period is based on pre-matched image recognition conditions, specifically including the following steps: Based on the current growth characteristic information set, predict the pest and disease risk values of crops in the target monitoring area and the pre-screened associated plot group within the current period, and obtain the current pest and disease risk prediction value dataset. The current pest and disease image feature set is obtained by collecting crop pest and disease image features from the target monitoring zone and pre-screened associated plot groups in the current cycle; The current pest and disease image feature set, the current pest and disease risk prediction value dataset, and the pre-matched image recognition conditions are input into the crop pest and disease recognition model to identify the pest and disease types.
10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the computer vision-based crop disease and pest identification method as described in any one of claims 1 to 9.