Image pre-selection processing system for automated visual inspection
By generating spatial attention distribution maps of pests and diseases and acquiring multimodal data, combined with optical property processing and image analysis group division, the problems of wasted computing resources and slow processing speed in UAV crop pest and disease detection systems are solved, achieving efficient and accurate pest and disease detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN LINGCHUANG JUYOU INNOVATION TECHNOLOGY CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-19
Smart Images

Figure CN122243949A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically to an image pre-selection processing system for automated visual inspection. Background Technology
[0002] In the process of agricultural modernization, accurate and efficient crop pest and disease detection is crucial to ensuring crop yield and quality. Traditional crop pest and disease detection methods mostly rely on manual on-site inspection, which not only consumes a lot of manpower and resources, but also makes it difficult to detect pests and diseases comprehensively and in a timely manner. With the development of technology, automated visual inspection technology has gradually emerged in the field of crop pest and disease detection due to its advantages such as speed, accuracy and non-contact, becoming a key means to improve detection efficiency and accuracy.
[0003] In the prior art, the crop disease and pest detection system located on a drone, with the publication number "CN104330410B", is configured with random access memory, high-definition camera, image processor and main controller on the drone. The high-definition camera captures crop images, the image processor processes the crop images to obtain the types of crop diseases and pests in the crop images, and the main controller stores the types of crop diseases and pests in the random access memory.
[0004] However, the aforementioned technology still has significant drawbacks. This system processes every single crop image captured by a high-definition camera indiscriminately. In real-world scenarios, drones often capture numerous crop images, many of which may depict healthy, pest-free areas or areas with only subtle pest or disease characteristics. Yet, current technology treats all these images equally, subjecting them all to complex image processing operations. This undoubtedly results in a significant waste of computing resources. Furthermore, indiscriminate processing overloads the image processor, drastically reducing its processing speed and lengthening the response time of the entire crop pest and disease detection system, hindering timely results. In addition, this processing method increases system energy consumption, significantly shortening the flight time of battery-powered drones, impacting operational range and duration, and ultimately reducing the practicality and cost-effectiveness of the entire crop pest and disease detection system in real-world applications. Summary of the Invention
[0005] The purpose of this invention is to provide an image pre-selection processing system for automated visual inspection, solving the following technical problems: How to avoid indiscriminate processing of all images and improve image processing speed.
[0006] The objective of this invention can be achieved through the following technical solutions: An image pre-selection processing system for automated visual inspection, the image pre-selection processing system comprising: The target area spatial attention analysis module is used to generate a spatial attention distribution map of pests and diseases in the target area based on the physical layout of the target area. A multimodal data acquisition module, installed on the UAV, is used to simultaneously acquire visible light image information data and feature image information data of the target area; The optical property processing module is used to preprocess the feature image information data according to the spectral reflectance model of the crop in the target area, and generate enhanced image information data of the defect features of the target area. The segmentation module is used to divide the target area's spatial attention distribution map of pests and diseases, defect feature enhancement image information data, and visible light image information data according to a preset grid segmentation rule, and divide them into several image analysis groups; the image analysis group includes a first image analysis unit, a second image analysis unit, and a third image analysis unit; The analysis module performs analysis based on the first and second image analysis units of each image analysis group to obtain the anomaly risk index of each image analysis group; then, based on the anomaly risk index of each image analysis group, it performs analysis to obtain the image processing level of the third image analysis unit of each image analysis group. The preprocessing module is used to process each third image analysis unit according to the corresponding image processing level.
[0007] As a further aspect of the present invention: the method for obtaining the spatial attention distribution map of pests and diseases in the target area includes the following steps: S1: Obtain the geographical location information of the target area and the flight attitude data of the drone through the positioning device carried by the drone; S2: Construct a three-dimensional spatial model of the target area based on the geographical location information of the target area and the flight attitude data of the UAV; S3: The three-dimensional spatial model of the target area is divided according to the preset grid division rules by the partitioning module to obtain several basic prediction units; S4: Obtain historical meteorological data, basic topographic information data, and crop planting information data for each basic forecasting unit; S5: Construct a pest and disease occurrence prediction model from the historical meteorological data, basic topographic information data, and crop planting information data of each basic prediction unit, and calculate the severity index of pests and diseases in each basic prediction unit.
[0008] S6: Analyze the severity index of pests and diseases in each basic prediction unit to obtain a spatial attention distribution map of pests and diseases in the target area.
[0009] As a further aspect of the present invention: the meteorological data includes rainfall, temperature, humidity and wind speed; the basic terrain information data includes terrain type, preset soil water retention coefficient and soil moisture; the crop planting data includes crop type and crop growth time.
[0010] As a further aspect of the present invention: In step S5, the process of training the pest and disease occurrence prediction model for any basic prediction unit includes the following steps: S10: Synchronously acquire the temperature, humidity, precipitation, light intensity, growth stage time series data of the basic prediction unit within the preset time period of each detection in the past preset detection number, as well as altitude, slope, aspect, crop variety, and planting density. S20: Based on the visible light image information data and feature image information data obtained during each drone detection, determine the type of pests and diseases and the area ratio of each type in each detection; and combine the temperature, humidity, precipitation, light intensity, growth stage time series data of the basic prediction unit within the preset time period of each detection, as well as altitude, slope, aspect, crop variety, and planting density to construct a proportional sample set. S30: Divide the proportional sample set into a training set, a test set, and a validation set according to a preset ratio; S40: Select mean squared error as the loss function of the pest and disease occurrence prediction model, select Adam optimizer or stochastic gradient descent algorithm to update the momentum parameter of the pest and disease occurrence prediction model, and predefine hyperparameters. S50: The training set includes temperature, humidity, precipitation, light intensity, growth stage time series data, as well as altitude, slope, aspect, crop variety, and planting density. The ratio of the affected area of pests and diseases detected in this test is used as the output label to train the pest and disease occurrence prediction model. After completing one round of training, the validation set is input into the pest and disease occurrence prediction model for validation. If the mean square error is less than the preset threshold, the pest and disease occurrence prediction model is considered to have completed training. Otherwise, training continues until the predetermined number of training rounds is reached. The test set is used to test the pest and disease occurrence prediction model. If the mean square error of the pest and disease occurrence prediction model is less than the preset threshold, the pest and disease occurrence prediction model is considered to have completed training. Otherwise, the hyperparameters are adjusted and the pest and disease occurrence prediction model is retrained until the mean square error is less than the preset threshold.
[0011] As a further aspect of the present invention: In step S5, the process of obtaining the severity index of pests and diseases in any basic prediction unit includes the following steps: S51: A pest and disease occurrence prediction model that inputs temperature, humidity, precipitation, light intensity, growth stage time series data, as well as altitude, slope, aspect, crop variety, and planting density into the basic prediction unit. S52: Output the predicted occurrence type of pests and diseases and the area ratio of each type for this basic prediction unit through the pest and disease occurrence prediction model; S53: Based on the predicted occurrence types of pests and diseases and the area ratio of each type in the basic prediction unit, the severity index of pests and diseases occurring in the basic prediction unit is obtained.
[0012] As a further aspect of the present invention: the mathematical expression for the severity index of pests and diseases occurring in the basic prediction unit is as follows: ; Where i is the basic prediction unit; S i ρ represents the severity index of pests and diseases occurring in the basic prediction unit; D represents the number of pest and disease species occurring within the basic prediction unit; id π represents the area ratio of the d-th type of pest or disease occurring in this basic prediction unit. id C1 is the harm weighting coefficient of the dth type of pest or disease occurring in the basic prediction unit to the current growth stage of the crops planted in the basic prediction unit; C1 is the first preset constant.
[0013] As a further aspect of the present invention: the process of obtaining the anomaly risk index of any image analysis group includes the following steps: S71: By analyzing the first image analysis unit of the image analysis group, the severity index of pests and diseases occurring in the image analysis group is obtained; S72: By analyzing the second image analysis unit of the image analysis group, the defect display index of the image analysis group is obtained; S73: By analyzing the severity index and defect display index of pests and diseases in the image analysis group, the abnormal risk index of the image analysis group is obtained.
[0014] As a further aspect of the present invention: in S72, the process for obtaining the defect display index of the image analysis group is as follows: S721: By analyzing the second image analysis unit of the image analysis group, obtain the pest and disease defect display information data of the image analysis group; S722: By analyzing the pest and disease defect display information data of the image analysis group, the defect display index of the image analysis group is obtained.
[0015] As a further aspect of the present invention: the pest and disease defect display information data includes pest and disease type, display color, distribution area ratio, and display area ratio.
[0016] As a further aspect of the present invention: in step S721, the distribution area ratio of any type of pest or disease is obtained as follows: S7211: Use the smallest diameter circular area to delineate the color area presented by this type of pest in the second image analysis unit; S7212: Get the area of the circular region; S7213: The ratio of the area of the circular region to the area of the second image analysis unit is determined as the distribution area ratio of the pest type.
[0017] The beneficial effects of this invention are: (1) This invention first generates a spatial attention distribution map of pests and diseases in the target area based on the physical layout of the target area through the target area spatial attention analysis module; this can effectively highlight the key monitoring areas in the target area, avoid the large amount of energy waste caused by image acquisition of the entire target area, and improve the energy utilization rate of the UAV. Then, by setting a multimodal data acquisition module on the UAV, the visible light image information data and feature image information data of the target area are acquired simultaneously, which can provide a data basis for accurately analyzing the actual situation of crops in the key monitoring areas of the target area. Next, the optical characteristic processing module preprocesses the feature image information data according to the spectral reflectance model of the crops in the target area to generate enhanced image information data of the defect features of the target area; this enhances the display of crop defect features, making the originally difficult-to-detect subtle defects clearly presented, greatly improving the sensitivity of defect detection, and helping to discover the crop defects in a timely manner. This involves analyzing various problems that arise during crop growth; then, using a partitioning module, the spatial attention distribution map of pests and diseases, enhanced image information data of defect features, and visible light image information data are divided into several image analysis groups according to a preset grid partitioning rule; the analysis module then analyzes each image analysis group to obtain the anomaly risk index of each image analysis group; the anomaly risk index reflects the degree of anomaly in each image analysis group; and further analysis is conducted based on the anomaly risk index of each image analysis group to obtain the image processing level of the third image analysis unit of each image analysis group. This enables staff to see sufficient details in locations with high anomalies based on the visible light image information data. Staff can more accurately judge the status of crop pests and diseases based on these pre-processed visible light image information data with sufficient details in locations with high anomalies, avoiding misjudgments of disease conditions due to ambiguous information, which could lead to untimely prevention and control or inappropriate measures, resulting in reduced crop yields or even crop failure. (2) The present invention first analyzes the first image analysis unit of the image analysis group to obtain the severity index of the pests and diseases in the image analysis group; then analyzes the second image analysis unit of the image analysis group to obtain the defect display index of the image analysis group; finally, analyzes the severity index and defect display index of the pests and diseases in the image analysis group to obtain the abnormal risk index of the image analysis group. Through the above settings, the potential risk of pests and diseases and the actual defect presentation are comprehensively considered; it can more comprehensively and accurately reflect the degree of abnormality in the area where the image analysis group is located, avoid the one-sidedness of single factor judgment, and provide a reliable basis for subsequent image processing level classification and targeted processing based on the abnormal risk index, thereby improving the accuracy and effectiveness of crop pest and disease detection. (3) The present invention can clearly define whether the deviation between the severity index and the abnormal risk index is within a reasonable range through the judgment function; when the deviation is too large, it can promptly indicate that the area has a high risk of abnormality, guide staff to carefully detect crop conditions using visible light image information data, provide a reliable basis for precision agricultural management, and improve the efficiency and accuracy of crop monitoring. Attached Figure Description
[0018] The invention will now be further described with reference to the accompanying drawings.
[0019] Figure 1 This is a system module framework diagram of one embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figure 1 As shown, in one embodiment, an image pre-selection processing system for automated visual inspection is provided, suitable for crop pest and disease detection systems on unmanned aerial vehicles (UAVs). The image pre-selection processing system includes: The target area spatial attention analysis module is used to generate a spatial attention distribution map of pests and diseases in the target area based on the physical layout of the target area. A multimodal data acquisition module, installed on the UAV, is used to simultaneously acquire visible light image information data and feature image information data of the target area; Specifically, the feature image information data is multispectral / hyperspectral image information data; The optical property processing module is used to preprocess the feature image information data according to the spectral reflectance model of the crop in the target area, and generate enhanced image information data of the defect features of the target area. Specifically, different colors are used to represent different types of pests and diseases in the enhanced image information data of the defect features in the target area; the enhanced image information data of the defect features in the target area can reflect the distribution of different types of pests and diseases in the target area; The segmentation module is used to divide the target area's spatial attention distribution map of pests and diseases, defect feature enhancement image information data, and visible light image information data according to a preset grid segmentation rule, and divide them into several image analysis groups; the image analysis group includes a first image analysis unit, a second image analysis unit, and a third image analysis unit; The analysis module performs analysis based on the first and second image analysis units of each image analysis group to obtain the anomaly risk index of each image analysis group; then, based on the anomaly risk index of each image analysis group, it performs analysis to obtain the image processing level of the third image analysis unit of each image analysis group. The preprocessing module is used to process each third image analysis unit according to the corresponding image processing level; Through the above technical solution, this embodiment first generates a spatial attention distribution map of pests and diseases in the target area based on the physical layout of the target area using a target area spatial attention analysis module. This effectively highlights key monitoring areas within the target area, avoiding the significant energy waste caused by image acquisition of the entire target area and improving the energy efficiency of the drone. Then, by setting a multimodal data acquisition module on the drone, visible light image information and feature image information of the target area are acquired simultaneously. Visible light image information can intuitively present the appearance of the target area, while feature image information contains deeper characteristic information of the crop (for example, multispectral / hyperspectral image information can capture the crop's...). Reflectance characteristics at different spectral bands; spectral information at different bands can reflect the chlorophyll content of crop leaves. Chlorophyll is a key substance for photosynthesis in crops, and changes in its content directly reflect the growth and health of crops. When crops are attacked by pests and diseases, chlorophyll synthesis in leaves is affected, leading to changes in reflectance at specific spectral bands. Furthermore, the cellular structure information of crop leaves is also contained within these images. Changes in cellular structure are often closely related to crop pest and disease infections, nutrient deficiencies, etc. Different pests and diseases cause different damage characteristics to the cellular structure of crop leaves. These characteristics are presented as unique reflectance patterns in multispectral / hyperspectral images. By analyzing these reflectance patterns, it is possible to... (It can accurately identify the type and severity of pests and diseases affecting crops). Through the above settings, the multimodal data acquisition module can provide a data foundation for accurately analyzing the actual situation of crops in the target area and key monitoring areas, effectively avoiding the analysis bias and errors that may be caused by a single data source, thereby improving the reliability and accuracy of the entire monitoring system. Then, the optical characteristic processing module preprocesses the feature image information data according to the spectral reflectance model of crops in the target area, generating enhanced image information data of defect features in the target area. This enhances the display of crop defect features, making previously difficult-to-detect subtle defects clearly visible, greatly improving the sensitivity of defect detection, and helping to promptly detect crop growth problems. Various problems arise during the process; then, the segmentation module divides the target area's pest spatial attention distribution map, defect feature enhancement image information data, and visible light image information data according to preset grid segmentation rules, and divides them into several image analysis groups; each image analysis group includes a first image analysis unit, a second image analysis unit, and a third image analysis unit; then, the analysis module analyzes each image analysis group based on its first and second image analysis units to obtain the anomaly risk index of each image analysis group; the anomaly risk index reflects the degree of anomaly in each image analysis group; then, based on the anomaly risk index of each image analysis group, the image processing level of the third image analysis unit of each image analysis group is obtained;Images from the third image analysis unit of the image analysis group with no anomaly risk do not require processing. Images from the third image analysis unit of the image analysis group with high anomaly risk require higher processing standards, ensuring sufficient detail is visible. Finally, the preprocessing module processes each third image analysis unit according to its corresponding image processing level. This allows staff to see sufficient detail in areas with high anomaly levels based on the visible light image information data. Using this preprocessed visible light image information data with sufficient detail in areas with high anomalies, staff can more accurately determine the status of crop diseases and pests, avoiding misjudgments due to unclear information, which could lead to untimely or inappropriate prevention and control measures, resulting in reduced crop yields or even crop failure.
[0022] As one embodiment of the present invention, the method for obtaining the spatial attention distribution map of pests and diseases in the target area includes the following steps: S1: Obtain the geographical location information of the target area and the flight attitude data of the drone through the positioning device carried by the drone; S2: Construct a three-dimensional spatial model of the target area based on the geographical location information of the target area and the flight attitude data of the UAV; S3: The three-dimensional spatial model of the target area is divided according to the preset grid division rules by the partitioning module to obtain several basic prediction units; S4: Obtain historical meteorological data, basic topographic information data, and crop planting information data for each basic forecasting unit; S5: Construct a pest and disease occurrence prediction model from the historical meteorological data, basic topographic information data, and crop planting information data of each basic prediction unit, and calculate the severity index of pest and disease occurrence in each basic prediction unit based on the meteorological data, basic topographic information data, and crop planting data of the past preset time period at the current time according to the pest and disease occurrence prediction model. S6: Analyze the severity index of pests and diseases in each basic prediction unit to obtain a spatial attention distribution map of pests and diseases in the target area; Through the above technical solution, this embodiment first uses the positioning device carried by the UAV to obtain the geographical location information of the target area and the flight attitude data of the UAV; then, a three-dimensional spatial model of the target area is constructed based on the geographical location information of the target area and the flight attitude data of the UAV. The geographical location information clarifies the location of the target area in geographic space, while the flight attitude data ensures that the perspective and position of the UAV when shooting or collecting data are accurately reproduced when the model is constructed. The abstract geographical location and flight attitude information are transformed into an intuitive spatial model through the three-dimensional spatial model, so that the terrain, landform and other features of the target area are presented in a visual form. Then, the three-dimensional spatial model of the target area is divided according to the preset grid division rules through the division module to obtain several basic prediction units. This step decomposes the complex target area into multiple relatively independent and easy-to-manage units, which facilitates the accurate prediction of the abnormal risks of each basic prediction unit. Then, the historical meteorological data, basic terrain information data and crop planting information data of each basic prediction unit are obtained. Meteorological data has a significant impact on crop growth and the occurrence of pests and diseases. Basic topographic information data reflects the influence of different regional topographic features on environmental factors such as water and sunlight. Crop planting information data is directly related to the pest and disease situation and resilience of crops. These data provide comprehensive and crucial information for the prediction model, forming the foundation for establishing the pest and disease occurrence prediction model. Next, historical meteorological data, basic topographic information data, and crop planting information data for each basic prediction unit are used to construct the pest and disease occurrence prediction model. Based on meteorological data, basic topographic information data, and crop planting data from a preset time period in the past, the severity index of pests and diseases in each basic prediction unit is calculated according to the pest and disease occurrence prediction model. The severity index of pests and diseases in each basic prediction unit reflects the risk level of pests and diseases in each unit. Finally, analysis is performed based on the severity index of pests and diseases in each basic prediction unit to obtain a spatial attention distribution map of pests and diseases in the target area, visually demonstrating the risk level of various disasters in different areas within the target region.
[0023] In one embodiment of the present invention, meteorological data includes temperature, humidity, precipitation, and light intensity; basic topographic information data includes altitude, slope, and aspect; and crop planting data includes crop variety, planting density, and growth stage. It should be noted that the methods used to obtain meteorological data, basic topographic information data, and crop planting data are existing technologies and will not be described in detail here.
[0024] As one embodiment of the present invention, step S5, the process of training the pest and disease occurrence prediction model for any basic prediction unit includes the following steps: S10: Synchronously acquire the temperature, humidity, precipitation, light intensity, growth stage time series data of the basic prediction unit within the preset time period of each detection in the past preset detection number, as well as altitude, slope, aspect, crop variety, and planting density. Specifically, the preset number of tests can be selected as 80, 100, or 200 tests from the past, etc., and the preset past time period can be selected as the past week, the past 15 days, etc. The specific values for the preset number of tests and the preset past time period are set by the staff according to the actual situation, and will not be elaborated here. S20: Based on the visible light image information data and feature image information data obtained during each drone detection, determine the type of pests and diseases and the area ratio of each type in each detection; and combine the temperature, humidity, precipitation, light intensity, growth stage time series data of the basic prediction unit within the preset time period of each detection, as well as altitude, slope, aspect, crop variety, and planting density to construct a proportional sample set. S30: Divide the proportional sample set into a training set, a test set, and a validation set according to a preset ratio; Specifically, the preset ratio of the training set, test set, and validation set can be selected as 8:1:1; S40: Select mean squared error as the loss function of the pest and disease occurrence prediction model, select Adam optimizer or stochastic gradient descent algorithm to update the momentum parameter of the pest and disease occurrence prediction model, and predefine hyperparameters. Specifically, hyperparameters include learning rate, batch size, and training epochs. The learning rate can be set between 0.001 and 0.01 to avoid instability during training due to an excessively large learning rate or slow convergence due to an excessively small learning rate. The batch size can be set to 32 or 64 to ensure appropriate memory usage and training speed. The number of training epochs can be set between 50 and 200 to ensure that the pest and disease occurrence prediction model fully learns the mapping relationship between the line power characteristics and the power characteristics of each device under normal conditions. S50: The temperature, humidity, precipitation, light intensity, growth stage time series data, as well as altitude, slope, aspect, crop variety, and planting density in the training set are used as inputs, and the ratio of the disease and pest occurrence area detected in this test is used as the output label to train the disease and pest occurrence prediction model. After completing one round of training, the validation set is input into the disease and pest occurrence prediction model for validation. If the mean square error is less than the preset threshold, the disease and pest occurrence prediction model is considered to have completed training. Otherwise, training continues until the predetermined training round is reached. The disease and pest occurrence prediction model is tested using the test set. If the mean square error of the disease and pest occurrence prediction model is less than the preset threshold, the disease and pest occurrence prediction model is considered to have completed training. Otherwise, the hyperparameters are adjusted and the disease and pest occurrence prediction model is retrained until the mean square error is less than the preset threshold. Specifically, the preset threshold can be set between 0.01 and 0.1, and the specific setting is determined by the staff according to the actual situation, which will not be elaborated here; Through the above technical solution, the training process of this embodiment can make full use of meteorological, terrain information and crop data to provide rich information for the prediction model and improve the accuracy of the prediction model.
[0025] As one embodiment of the present invention, in step S5, the process of obtaining the severity index of pests and diseases in any basic prediction unit includes the following steps: S51: A pest and disease occurrence prediction model that inputs temperature, humidity, precipitation, light intensity, growth stage time series data, as well as altitude, slope, aspect, crop variety, and planting density into the basic prediction unit. S52: Output the predicted occurrence type of pests and diseases and the area ratio of each type for this basic prediction unit through the pest and disease occurrence prediction model; S53: Based on the predicted occurrence types of pests and diseases in the basic prediction unit and the area ratio of each type, the severity index of pests and diseases in the basic prediction unit is obtained. Through the above technical solutions, in this embodiment, temperature, humidity, precipitation, and light intensity directly affect the reproduction, spread, and survival of pests and diseases (e.g., high temperature and humidity easily trigger fungal diseases, and drought easily induces insect pests); altitude, slope, and aspect indirectly affect the occurrence of pests and diseases by influencing microclimate (e.g., light and drainage) (e.g., low-lying slopes are prone to water accumulation, increasing the risk of root rot); variety resistance (e.g., insect-resistant genetically modified crops) and planting density (high density easily leads to rapid disease spread) directly determine the potential degree of harm from pests and diseases; different growth stages show significant differences in sensitivity to pests and diseases (e.g., seedlings are susceptible to insect damage, while grain-filling stages are susceptible to disease and yield reduction); therefore, the temperature, humidity, precipitation, light intensity, and growth stage time-series data, as well as altitude, slope, aspect, and crop variety data from the current time to a preset time period are used. The planting density input into the pest and disease occurrence prediction model of this basic prediction unit yields more accurate prediction data. Simultaneously, inputting continuous data from a preset time period reflects the cumulative effect of environmental conditions, avoiding misjudgments caused by relying solely on instantaneous data. The pest and disease occurrence prediction model outputs the predicted occurrence types of pests and diseases and the area ratio of each type for this basic prediction unit. Finally, analysis based on the predicted occurrence types and area ratios of pests and diseases in this basic prediction unit yields a severity index of pest and disease occurrence, achieving accurate assessment and dynamic decision support for pest and disease risk. Furthermore, the severity index transforms complex ecological processes into actionable indicators, providing a scientific tool for intelligent and precise pest and disease control in modern agriculture, while simultaneously considering economic benefits and ecological sustainability.
[0026] As one embodiment of the present invention, the mathematical expression for the severity index of pests and diseases occurring in the basic prediction unit is as follows: ; Where i is the basic prediction unit; S i ρ represents the severity index of pests and diseases occurring in the basic prediction unit; D represents the number of pest and disease species occurring within the basic prediction unit; id π represents the area ratio of the d-th type of pest or disease occurring in this basic prediction unit. id C1 is the harm weighting coefficient of the dth type of pest or disease occurring in the basic prediction unit to the current growth stage of the crops planted in the basic prediction unit; C1 is the first preset constant. Through the above technical solution, this embodiment comprehensively considers multiple factors such as the number of pest and disease types, the area ratio of various pests and diseases, and the damage weighting coefficient. It can accurately and completely reflect the severity of pests and diseases, avoid the deviation caused by considering a single factor, and make the prediction results more in line with the actual situation. It can also reflect the severity of the pests and diseases in the basic prediction unit through the severity index of the pests and diseases, so that the drone can patrol in order of the severity index of the pests and diseases. It can quickly obtain the actual crop images of the basic prediction units with higher pest and disease severity, and can deal with the basic prediction units with higher pest and disease severity in a timely and effective manner, thereby reducing crop yield reduction caused by pests and diseases. It should be noted that the damage weight coefficients of each type of pest and disease to each growth stage of each crop and the first preset constant C1 are preset values obtained by empirical fitting and are existing technologies, which will not be described in detail here.
[0027] As one embodiment of the present invention, the process of obtaining the anomaly risk index of any image analysis group includes the following steps: S71: By analyzing the first image analysis unit of the image analysis group, the severity index of pests and diseases occurring in the image analysis group is obtained; Specifically, the first image analysis unit corresponds one-to-one with the basic prediction unit, and the severity index of pests and diseases occurring in the first image analysis unit is the same as the severity index of pests and diseases occurring in the corresponding basic prediction unit. S72: By analyzing the second image analysis unit of the image analysis group, the defect display index of the image analysis group is obtained; S73: By analyzing the severity index and defect display index of pests and diseases in the image analysis group, the abnormal risk index of the image analysis group is obtained; Through the above technical solution, this embodiment first analyzes the first image analysis unit of the image analysis group to obtain the severity index of pests and diseases occurring in the image analysis group; then, it analyzes the second image analysis unit of the image analysis group to obtain the defect display index of the image analysis group; finally, it analyzes the severity index and defect display index of pests and diseases occurring in the image analysis group to obtain the abnormal risk index of the image analysis group. Through the above settings, the potential risk of pests and diseases and the actual defect presentation are comprehensively considered; it can more comprehensively and accurately reflect the degree of abnormality in the area where the image analysis group is located, avoid the one-sidedness of single-factor judgment, and provide a reliable basis for subsequent image processing level classification and targeted processing based on the abnormal risk index, thereby improving the accuracy and effectiveness of crop pest and disease detection.
[0028] In one embodiment of the present invention, in S72, the process of obtaining the defect display index of the image analysis group is as follows: S721: By analyzing the second image analysis unit of the image analysis group, obtain the pest and disease defect display information data of the image analysis group; Specifically, the pest and disease defect display information data includes pest and disease type, display color, distribution area ratio, and display area ratio; different pest and disease types are displayed in different colors in the second image analysis unit. S722: By analyzing the pest and disease defect display information data of the image analysis group, the defect display index of the image analysis group is obtained; Through the above technical solution, this embodiment displays different types of pests and diseases in different colors in the second image analysis unit, which can intuitively show the distribution of various pest and disease types in the second image analysis unit. Based on this, a defect display index is derived, which can comprehensively and meticulously reflect the presentation of pest and disease defects in the image. This not only helps to accurately assess the actual degree of crop damage caused by pests and diseases, but also provides key support for subsequently determining the abnormal risk index by combining the severity index, thereby improving the overall crop pest and disease detection system's ability to grasp the actual defect situation and enhancing the reliability of the detection results.
[0029] In one embodiment of the present invention, in step S721, the distribution area ratio of any type of pest or disease is obtained as follows: S7211: Use the smallest diameter circular area to delineate the color area presented by this type of pest in the second image analysis unit; S7212: Get the area of the circular region; S7213: The ratio of the area of the circular region to the area of the second image analysis unit is determined as the distribution area ratio of the pest type.
[0030] Through the above technical solution, this embodiment uses a circular area with the smallest diameter to delineate the color area of the pest type in the second image analysis unit, which can accurately locate the range of pests and reduce errors; by obtaining the area of the circular area and comparing it with the area of the second image analysis unit, the distribution area ratio can be intuitively obtained, providing a reliable basis for accurately assessing the severity of pests and diseases, helping to take timely and targeted prevention and control measures, reducing the damage of pests and diseases to crops, and ensuring production efficiency.
[0031] As one embodiment of the present invention, using Formula 1: ; Calculate the defect display index X of this image analysis group. i ; Where A is the total number of pest and disease types, a∈A; ρ a θ is the weighting coefficient for the a-th type of pest or disease; a The distribution area ratio of the a-th type of pest and disease; μ a γ1 is the display area ratio of the a-th type of pest and disease; γ2 is the first weighting coefficient; γ2 is the second weighting coefficient; C2 is the second preset constant; It should be noted that the first weighting coefficient γ1, the second weighting coefficient γ2, and the second preset constant C2 are preset values, set based on empirical fitting, and are existing technologies, which will not be described in detail here.
[0032] It should be noted that the display area ratio is the ratio of the area of the pest / disease type displayed in color in the second image analysis unit to the area of the second image analysis unit. As one embodiment of the present invention, formula two is used: ; Calculate the anomaly risk index Y for this image analysis group. i ; Where f(X) is the judgment function, f(X)=X when X>0; and f(X)=0 when X≤0; The first preset allowable error; Through the above technical solution, this embodiment can clearly define whether the deviation between the severity index and the abnormal risk index is within a reasonable range through the judgment function; when the deviation is too large, it can promptly indicate that the abnormal risk in the area is relatively high, guiding staff to carefully detect the crop condition using visible light image information data, providing a reliable basis for precision agricultural management, and improving the efficiency and accuracy of crop monitoring; It should be noted that the first preset allowable error W1 is a preset value, set based on empirical fitting, and is existing technology, so it will not be described in detail here.
[0033] As one embodiment of the present invention, the anomaly level determination process of the image analysis group is as follows: when When =0, the image analysis group shows no abnormalities; When 0 < When R1 is ≤, the image analysis group shows slight anomalies; When R1 < When R² is ≤2, the image analysis group is severely abnormal; Where R1 is the first comparison value; R2 is the second comparison value; It should be noted that the first comparison value R1 and the second comparison value R2 are preset values, and the specific values are set based on empirical fitting, which will not be described in detail here.
[0034] As one embodiment of the present invention, the process for determining the image processing level of the third image analysis unit in each image analysis group is as follows: When the image analysis group is free of abnormalities, the image processing level of the third image analysis unit of the image analysis group is low, and no image processing is required for the third image analysis unit. When the image analysis group is slightly abnormal, the image processing level of the third image analysis unit of the image analysis group is medium level. The image data in the third image analysis unit is initially screened and optimized to remove some noise interference that may exist. At the same time, the edge information of the image is enhanced to a certain extent to improve the image clarity, but it does not involve in-depth analysis and complex transformation of the core content of the image. When an image analysis group shows severe anomalies, the image processing level of the third image analysis unit within that group is set to high. For high-level processing, advanced super-resolution reconstruction algorithms are first used to refine the image, significantly improving its resolution and clearly revealing subtle textures on crop leaves and minute features of pests and diseases. Next, a deep learning model is employed for deep image analysis, accurately identifying key information such as the type, development stage, and severity of pests and diseases. Simultaneously, color optimization is applied to enhance the color contrast between different pest and disease characteristic areas and normal areas, further highlighting pest and disease characteristics. This provides staff with more intuitive, accurate, and detailed image information, enabling them to make rapid and informed decisions and implement effective control measures to minimize the impact of pests and diseases on crop growth and yield.
[0035] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. An image pre-selection processing system for automated visual inspection, suitable for crop pest and disease detection systems on unmanned aerial vehicles, characterized in that, The image pre-selection processing system includes: The target area spatial attention analysis module is used to generate a spatial attention distribution map of pests and diseases in the target area based on the physical layout of the target area. A multimodal data acquisition module, installed on the UAV, is used to simultaneously acquire visible light image information data and feature image information data of the target area; The optical property processing module is used to preprocess the feature image information data according to the spectral reflectance model of the crop in the target area, and generate enhanced image information data of the defect features of the target area. The segmentation module is used to divide the target area's spatial attention distribution map of pests and diseases, defect feature enhancement image information data, and visible light image information data according to a preset grid segmentation rule, and divide them into several image analysis groups; the image analysis group includes a first image analysis unit, a second image analysis unit, and a third image analysis unit; The analysis module performs analysis based on the first and second image analysis units of each image analysis group to obtain the anomaly risk index of each image analysis group; then, based on the anomaly risk index of each image analysis group, it performs analysis to obtain the image processing level of the third image analysis unit of each image analysis group. The preprocessing module is used to process each third image analysis unit according to the corresponding image processing level.
2. The image pre-selection processing system for automated visual inspection according to claim 1, characterized in that, The method for obtaining the spatial attention distribution map of pests and diseases in the target area includes the following steps: S1: Obtain the geographical location information of the target area and the flight attitude data of the drone through the positioning device carried by the drone; S2: Construct a three-dimensional spatial model of the target area based on the geographical location information of the target area and the flight attitude data of the UAV; S3: The three-dimensional spatial model of the target area is divided according to the preset grid division rules by the partitioning module to obtain several basic prediction units; S4: Obtain historical meteorological data, basic topographic information data, and crop planting information data for each basic forecasting unit; S5: Construct a pest and disease occurrence prediction model from the historical meteorological data, basic topographic information data, and crop planting information data of each basic prediction unit, and calculate the severity index of pests and diseases in each basic prediction unit. S6: Analyze the severity index of pests and diseases in each basic prediction unit to obtain a spatial attention distribution map of pests and diseases in the target area.
3. The image pre-selection processing system for automated visual inspection according to claim 2, characterized in that, The meteorological data includes rainfall, temperature, humidity, and wind speed; the basic terrain information data includes terrain type, preset soil water retention coefficient, and soil moisture; and the crop planting data includes crop type and crop growth period.
4. The image pre-selection processing system for automated visual inspection according to claim 3, characterized in that, In step S5, the process of training the pest and disease occurrence prediction model for any basic prediction unit includes the following steps: S10: Synchronously acquire the temperature, humidity, precipitation, light intensity, growth stage time series data of the basic prediction unit within the preset time period of each detection in the past preset detection number, as well as altitude, slope, aspect, crop variety, and planting density. S20: Based on the visible light image information data and feature image information data obtained during each drone detection, determine the type of pests and diseases and the area ratio of each type in each detection; and combine the temperature, humidity, precipitation, light intensity, growth stage time series data of the basic prediction unit within the preset time period of each detection, as well as altitude, slope, aspect, crop variety, and planting density to construct a proportional sample set. S30: Divide the proportional sample set into a training set, a test set, and a validation set according to a preset ratio; S40: Select mean squared error as the loss function of the pest and disease occurrence prediction model, select Adam optimizer or stochastic gradient descent algorithm to update the momentum parameter of the pest and disease occurrence prediction model, and predefine hyperparameters. S50: The training set includes temperature, humidity, precipitation, light intensity, growth stage time series data, as well as altitude, slope, aspect, crop variety, and planting density. The ratio of the affected area of pests and diseases detected in this test is used as the output label to train the pest and disease occurrence prediction model. After completing one round of training, the validation set is input into the pest and disease occurrence prediction model for validation. If the mean square error is less than the preset threshold, the pest and disease occurrence prediction model is considered to have completed training. Otherwise, training continues until the predetermined number of training rounds is reached. The test set is used to test the pest and disease occurrence prediction model. If the mean square error of the pest and disease occurrence prediction model is less than the preset threshold, the pest and disease occurrence prediction model is considered to have completed training. Otherwise, the hyperparameters are adjusted and the pest and disease occurrence prediction model is retrained until the mean square error is less than the preset threshold.
5. The image pre-selection processing system for automated visual inspection according to claim 4, characterized in that, In step S5, the process of obtaining the severity index of pests and diseases in any basic prediction unit includes the following steps: S51: A pest and disease occurrence prediction model that inputs temperature, humidity, precipitation, light intensity, growth stage time series data, as well as altitude, slope, aspect, crop variety, and planting density into the basic prediction unit. S52: Output the predicted occurrence type of pests and diseases and the area ratio of each type for this basic prediction unit through the pest and disease occurrence prediction model; S53: Based on the predicted occurrence types of pests and diseases and the area ratio of each type in the basic prediction unit, the severity index of pests and diseases occurring in the basic prediction unit is obtained.
6. The image pre-selection processing system for automated visual inspection according to claim 5, characterized in that, The mathematical expression for the severity index of pests and diseases in this basic prediction unit is: ; Where i is the basic prediction unit; S i ρ represents the severity index of pests and diseases occurring in the basic prediction unit; D represents the number of pest and disease species occurring within the basic prediction unit; id π represents the area ratio of the d-th type of pest or disease occurring in this basic prediction unit. id C1 is the harm weighting coefficient of the dth type of pest or disease occurring in the basic prediction unit to the current growth stage of the crops planted in the basic prediction unit; C1 is the first preset constant.
7. The image pre-selection processing system for automated visual inspection according to claim 6, characterized in that, The process of obtaining the anomaly risk index for any image analysis group includes the following steps: S71: By analyzing the first image analysis unit of the image analysis group, the severity index of pests and diseases occurring in the image analysis group is obtained; S72: By analyzing the second image analysis unit of the image analysis group, the defect display index of the image analysis group is obtained; S73: By analyzing the severity index and defect display index of pests and diseases in the image analysis group, the abnormal risk index of the image analysis group is obtained.
8. The image pre-selection processing system for automated visual inspection according to claim 7, characterized in that, In S72, the process for obtaining the defect display index of this image analysis group is as follows: S721: By analyzing the second image analysis unit of the image analysis group, obtain the pest and disease defect display information data of the image analysis group; S722: By analyzing the pest and disease defect display information data of the image analysis group, the defect display index of the image analysis group is obtained.
9. The image pre-selection processing system for automated visual inspection according to claim 8, characterized in that, The pest and disease defect display information data includes pest and disease type, display color, distribution area ratio, and display area ratio.
10. The image pre-selection processing system for automated visual inspection according to claim 9, characterized in that, In step S721, the distribution area ratio of any pest or disease type is obtained as follows: S7211: Use the smallest diameter circular area to delineate the color area presented by this type of pest in the second image analysis unit; S7212: Get the area of the circular region; S7213: The ratio of the area of the circular region to the area of the second image analysis unit is determined as the distribution area ratio of the pest type.