An incremental deep transfer learning method and system for real-time remote sensing detection of crop diseases and pests
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2026-08-14
AI Technical Summary
此外,现有的深度学习模型通常需要大量的标注数据来训练,但在农作物病虫害检测领域,获取足够的标注数据非常困难,这限制了模型的性能和泛化能力
[0032]有益效果:与现有技术相比,本发明具有如下显著优点:(1)通过病虫害特征域对齐技术,能够快速适应新的农作物病虫害检测任务;(2)源模型的迁移学习显著提高了小样本条件下的识别准确度;(3)自适应权重调整机制和增量学习机制使得模型在不同区域、不同作物和不同病虫害类型上的检测性能得到保证;(4)结合物联网技术,实现病虫害检测的实时监控和预警;(5)端到端的监测流程简化了操作步骤,易于在实际生产中应用。
Smart Images

Figure CN120673270B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and system for detecting crop diseases and pests, and more particularly to an incremental deep transfer learning method and system for real-time remote sensing detection of crop diseases and pests. Background Technology
[0002] Early detection of crop diseases and pests is crucial for agricultural production. Traditional methods rely primarily on manual observation and experience, which are inefficient and have limited accuracy, failing to meet the demands of modern agriculture. With the development of remote sensing and deep learning technologies, automated pest and disease detection methods have become a research hotspot. Remote sensing technology, using sensors mounted on satellites or drones, can quickly acquire data on the growth status of crops and the occurrence of diseases and pests over large areas. Deep learning technology, especially convolutional neural networks (CNNs), excels in image recognition and classification tasks, providing strong technical support for automated detection.
[0003] However, existing technologies face several limitations in remote sensing detection of crop diseases and pests. First, crop disease and pest image data is complex and diverse, with different regions, crops, and growth stages exhibiting varying manifestations of these diseases and pests. Second, high-quality labeled data is relatively scarce, crucial for training deep learning models. Furthermore, existing deep learning models typically require large amounts of labeled data for training, but obtaining sufficient labeled data is extremely difficult in the field of crop disease and pest detection, limiting model performance and generalization ability. More importantly, the types and varieties of crop diseases and pests are dynamically changing, requiring models to continuously adapt to new situations. Therefore, a new technological solution is needed to address these issues. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide an incremental deep transfer learning method and system for real-time remote sensing detection of crop diseases and pests, which solves the problem of disease and pest identification under small sample conditions, and can dynamically adapt to new disease and pest types or crop varieties, significantly improving the accuracy and efficiency of early detection of crop diseases and pests.
[0005] Technical solution: The incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests described in this invention includes:
[0006] (1) Use remote sensing equipment and IoT sensors to collect image data of crops and environmental data, and perform preprocessing;
[0007] (2) Construct the source model;
[0008] (3) By using the pest and disease feature domain alignment technology and incremental learning mechanism, the knowledge of the source model is dynamically transferred to the target task to adapt to new pest and disease types or crop varieties.
[0009] (4) Train and optimize the model to adapt to pest and disease detection tasks;
[0010] (5) The test set is used to evaluate the detection results of the model;
[0011] (6) Iterative improvement based on feedback: Adjust and optimize the model based on the evaluation results.
[0012] Preferably, the preprocessing includes image cropping to remove non-crop areas from the image; image denoising using Gaussian filtering and median filtering to eliminate high-frequency noise and salt-and-pepper noise in the image; using histogram equalization to improve the contrast and clarity of the image; data augmentation by scaling to adjust the image resolution and rotating to correct the image; and fusing remote sensing image data with environmental data collected by IoT sensors to form a comprehensive feature vector.
[0013] Preferably, step (2) includes:
[0014] (21) Extract feature representations of crop images from source models;
[0015] (22) Extract features from the source domain data and the target domain data respectively, perform Wasserstein distance optimization, minimize the Wasserstein distance value through gradient descent to achieve domain alignment;
[0016] (23) When encountering new types of pests and diseases or crop varieties, dynamically adjust the model structure, add new classification layers or feature extraction layers, and train only the newly added parts and related layers.
[0017] Preferably, during model training, the model weights are adjusted using the following formula:
[0018]
[0019] Among them, w t L(w) represents the weights at time step t, α is the learning rate, and L(w) represents the weights at time step t. t ) is the loss function under the current weights.
[0020] Preferably, the model optimization includes using a triple adaptive fusion comprehensive loss function consisting of cross-entropy loss, focus loss, and contrast loss, as shown in the following formula:
[0021]
[0022] Where α and β are balancing coefficients used to balance the weights of different loss functions; LCE L Focal L Contrastive These are cross-entropy loss, focus loss, and contrast loss.
[0023] Preferably, step (5) uses an independently labeled dataset of pest and disease images to evaluate the detection results of the model, with metrics including accuracy, recall, and F1-score.
[0024] Preferably, during model training, the model's performance metrics on the validation set are monitored, and the weights and learning rate are dynamically adjusted based on the performance on the validation set. An early stopping mechanism is adopted, whereby training is stopped early when the performance metrics on the validation set do not improve within a certain number of iteration cycles to prevent the model from overfitting.
[0025] The present invention discloses an incremental deep transfer learning system for real-time remote sensing detection of crop diseases and pests, comprising:
[0026] Data acquisition and processing unit: used to collect image data of crops and environmental data using remote sensing equipment and IoT sensors, and to perform preprocessing;
[0027] Model building unit: used to build the source model;
[0028] Model training unit: Used to dynamically transfer knowledge from the source model to the target task through pest and disease feature domain alignment technology and incremental learning mechanism, train and optimize the model to adapt to pest and disease detection tasks;
[0029] Evaluation feedback unit: used to evaluate the model's detection results using a test set; iterative improvement based on feedback, adjusting and optimizing the model according to the evaluation results.
[0030] A computer device includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests.
[0031] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests.
[0032] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: (1) Through the alignment technology of pest and disease feature domains, it can quickly adapt to new crop pest and disease detection tasks; (2) The transfer learning of the source model significantly improves the recognition accuracy under small sample conditions; (3) The adaptive weight adjustment mechanism and incremental learning mechanism ensure the detection performance of the model in different regions, different crops and different pest and disease types; (4) Combined with Internet of Things technology, it realizes real-time monitoring and early warning of pest and disease detection; (5) The end-to-end monitoring process simplifies the operation steps and is easy to apply in actual production. Attached Figure Description
[0033] Figure 1 This is a flowchart of the method described in this invention.
[0034] Figure 2 This is a schematic diagram of data preprocessing in this invention.
[0035] Figure 3 A schematic diagram of the process for aligning feature domains of pests and diseases.
[0036] Figure 4 This is a schematic diagram of incremental learning in this invention.
[0037] Figure 5 This is a schematic diagram of the TriFAL loss function optimization process of the present invention. Detailed Implementation
[0038] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0039] This invention provides an incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests, such as... Figure 1 As shown, it includes:
[0040] (1) Use remote sensing equipment and IoT sensors to collect image data of crops and environmental data, and perform preprocessing;
[0041] Specifically, multispectral or hyperspectral sensors mounted on drones or satellites are used to collect crop image data. The drone's flight altitude is set appropriately based on crop type and pest characteristics to ensure that the image resolution meets detection requirements. Simultaneously, IoT sensors are deployed in the farmland to collect environmental data (such as temperature, humidity, and light intensity) in real time.
[0042] Select representative crop planting areas, covering different growth stages and the occurrence of pests and diseases.
[0043] It collects image data in bands including visible light and near infrared, as well as environmental data such as temperature, humidity, and light intensity, to comprehensively reflect the health status of crops.
[0044] After data acquisition, the following preprocessing steps are performed, such as... Figure 2 As shown:
[0045] Image cropping: Remove non-crop areas (such as soil, roads, etc.) from the image to ensure that the image data is focused on the target crop. Cropping the image to a uniform size facilitates subsequent model input.
[0046] Image denoising: Gaussian filtering and median filtering techniques are used to eliminate high-frequency noise and salt-and-pepper noise in the image, respectively. The filter kernel size is selected based on the image resolution and noise level.
[0047] Contrast Enhancement: Histogram equalization or adaptive histogram equalization (CLAHE) techniques are used to improve the contrast and sharpness of images, highlighting the characteristics of pests and diseases.
[0048] Data augmentation: Image resolution is adjusted by scaling to fit the model input requirements; images are corrected by rotation to ensure consistent crop orientation; and the dataset is expanded using methods such as flipping and brightness adjustment. This enhances the model's generalization ability.
[0049] Data fusion: The remote sensing image data is fused with environmental data collected by IoT sensors to form a comprehensive feature vector, which is used as input to the model.
[0050] (2) Construct the source model;
[0051] Pre-trained deep learning models that perform well on pest and disease identification tasks, such as ResNet and VGG, are selected as source models. These models have been trained on a large amount of image data and possess rich feature extraction capabilities. The top-level classification layer of the model is removed, retaining only the feature extraction portion.
[0052] (3) By using the pest and disease feature domain alignment technology and incremental learning mechanism, the knowledge of the source model is dynamically transferred to the target task to adapt to new pest and disease types or crop varieties.
[0053] Specifically, by utilizing pest and disease feature domain alignment technology, the feature extraction capabilities of the source model are dynamically transferred to the target detection task. For example... Figure 3 As shown, it includes:
[0054] (31) Feature Mapping: Extracting feature representations of crop images through the source model. The preprocessed crop image data is input into the source model, which undergoes operations such as convolutional layers and pooling layers to extract low-level features such as edges, textures, and shapes, as well as high-level semantic features specific to pests and diseases. The extracted feature vectors are recorded as the basis for subsequent feature domain alignment.
[0055] (32) Feature domain alignment: Features are extracted from the source domain data (e.g., publicly available pest and disease datasets) and the target domain data (e.g., data collected in the examples); Wasserstein distance optimization is performed: the Wasserstein distance is used to measure the difference between the feature distributions of the source and target domains. Domain alignment is achieved by minimizing the Wasserstein distance value using the gradient descent optimization algorithm.
[0056] (33) Incremental learning: When encountering new types of pests or diseases or crop varieties, the model structure is dynamically adjusted by adding new classification layers or feature extraction layers. Only the newly added parts and related layers are trained, while most of the parameters of the original model are retained. Specifically:
[0057] After identifying new pest or disease types or crop varieties, determine the number and structure of the necessary classification or feature extraction layers. Based on the source model, add the new classification or feature extraction layers and train the new parts and their associated layers. During training, freeze most of the parameters of the original model and only update the parameters of the new parts and associated layers. After training, integrate the new parts with the original model to form a target model adapted to the new task.
[0058] (4) Train and optimize the model to adapt to pest and disease detection tasks;
[0059] The training optimization includes:
[0060] (41) Loss Function Design
[0061] Cross-entropy loss: As a basic loss function, it measures the difference between the model's predictions and the true labels. Its formula is:
[0062] L CE =-∑y i log(p i )
[0063] Among them, y i Indicates the real label, p i This represents the probability that the model predicts the class as i.
[0064] Focal Loss: Focal loss addresses the class imbalance problem and enhances the model's ability to identify classes with fewer samples. By adjusting the balance factor and focusing parameters, the model's focus on both easy and difficult samples is optimized. The formula for focal loss is:
[0065] L Focal =-(1-p t ) γ log(p t )
[0066] Where, pt γ is the probability predicted by the model, representing the probability that the model predicts the sample belongs to the true class t. γ is a focusing parameter used to control the degree of attention given to both easy and difficult samples, with values of 0, 0.5, 1, 2, etc. A larger value indicates more attention is given to difficult samples.
[0067] Contrastive Loss: This method uses contrastive learning to enable models to better distinguish between different categories of pest and disease characteristics. For example... Figure 5 As shown, the formula for contrast loss is:
[0068] L Contrastive =∑‖f(x) i )-f(x j )‖ 2 +max(0,m-‖f(x k )-f(x l )‖)
[0069] Where, f(x) i ) represents x i The feature representation, i.e., the feature vector extracted by the model, x i x j Sample pairs belonging to the same category, x k x l For sample pairs belonging to different categories, m represents the preset distance threshold (margin), which is the minimum distance used to distinguish between samples of different categories.
[0070] (42) Adaptive weight adjustment
[0071] The weights and learning rate are dynamically adjusted based on the model's performance during training. An early stopping mechanism is employed to prevent overfitting and ensure optimal model performance on the validation set. Details are as follows:
[0072] During training, monitor the model's performance metrics on the validation set, such as accuracy and loss. Based on the performance on the validation set, dynamically adjust the weights and learning rate. For example, if the loss on the validation set no longer decreases within a few iterations, reduce the learning rate to further optimize the model. Employ an early stopping mechanism: if the performance metrics on the validation set do not significantly improve within a certain number of iterations, stop training early to prevent overfitting.
[0073] (5) The test set is used to evaluate the detection results of the model;
[0074] (6) Iterative improvement based on feedback: Adjust and optimize the model based on the evaluation results.
[0075] Building upon transfer learning, the model is further refined and optimized, including:
[0076] (61) Weight adjustment: Based on the loss function L(w t Adjust the model weights W using gradient descent. t The specific steps are as follows:
[0077] Calculate the gradient of the loss function with respect to the model weights:
[0078]
[0079] Among them, W t L(W) represents the weights at time step t, α is the learning rate, and L(W) represents the weights at time step t. t ) is the loss function under the current weights.
[0080] (62) Loss Function Optimization: Focal Loss is introduced to address the class imbalance problem and enhance the model's ability to identify classes with small sample sizes. The specific steps are as follows:
[0081] During model training, focus loss, cross-entropy loss, and contrastive loss are combined to form a comprehensive loss function to optimize model performance. The formula for the comprehensive loss function is:
[0082]
[0083] Here, α and β are balancing coefficients used to balance the weights of different loss functions. CE L Focal L Contrastive These are cross-entropy loss, focus loss, and contrast loss.
[0084] This invention also provides an incremental deep transfer learning system for real-time remote sensing detection of crop diseases and pests, comprising:
[0085] Data acquisition and processing unit: used to collect image data of crops and environmental data using remote sensing equipment and IoT sensors, and to perform preprocessing;
[0086] Model building unit: used to build the source model;
[0087] Model training unit: Used to dynamically transfer knowledge from the source model to the target task through pest and disease feature domain alignment technology and incremental learning mechanism, train and optimize the model to adapt to pest and disease detection tasks;
[0088] Evaluation feedback unit: used to evaluate the model's detection results using a test set; iterative improvement based on feedback, adjusting and optimizing the model according to the evaluation results.
Claims
1. An incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests, characterized in that, include: (1) Collect image data of crops and environmental data using remote sensing equipment and Internet of Things sensors, and perform preprocessing; The preprocessing includes image cropping to remove non-crop areas from the image; Image denoising employs Gaussian filtering and median filtering to eliminate high-frequency noise and salt-and-pepper noise in the image. Histogram equalization can be used to improve image contrast and sharpness. Data augmentation is performed by scaling and adjusting image resolution and rotating and correcting images; remote sensing image data is fused with environmental data collected by IoT sensors to form a comprehensive feature vector; (2) Construct the source model; (3) By using the pest and disease feature domain alignment technology and incremental learning mechanism, the knowledge of the source model is dynamically transferred to the target task to adapt to new pest and disease types or crop varieties. Feature representations of crop images are extracted from the source model; features are extracted from source and target domain data respectively, and Wasserstein distance optimization is performed. The Wasserstein distance value is minimized through gradient descent to achieve domain alignment; when new types of pests or crop varieties are encountered, the model structure is dynamically adjusted, and new classification or feature extraction layers are added. Only the newly added parts and related layers are trained. (4) Train and optimize the model to adapt to the pest and disease detection task; during model training, the model weights are adjusted using the following formula: in, Indicates at time step The weight, For learning rate, The loss function under the current weights; (5) The detection results of the model are evaluated using a test set; (6) Iterative improvement based on feedback: adjust and optimize the model based on the evaluation results; Model optimization involves using a triple adaptive fusion loss function that combines cross-entropy loss, focus loss, and contrast loss, as shown in the formula: in, , It is a balancing coefficient used to balance the weights of different loss functions; , , These are cross-entropy loss, focus loss, and contrast loss.
2. The incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests according to claim 1, characterized in that, Step (5) uses an independently labeled dataset of pest and disease images to evaluate the detection results of the model, with metrics including accuracy, recall, and F1-score.
3. The incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests according to claim 1, characterized in that, During model training, the model's performance metrics on the validation set are monitored. Based on the performance on the validation set, the weights and learning rate are dynamically adjusted. An early stopping mechanism is adopted, which stops training early when the performance metrics on the validation set do not improve within a certain number of iteration cycles to prevent the model from overfitting.
4. An incremental deep transfer learning system for real-time remote sensing detection of crop diseases and pests, characterized in that, include: Data acquisition and processing unit: used to collect image data of crops and environmental data using remote sensing equipment and IoT sensors, and to perform preprocessing; The preprocessing includes image cropping to remove non-crop areas from the image; Image denoising employs Gaussian filtering and median filtering to eliminate high-frequency noise and salt-and-pepper noise in the image. Histogram equalization can be used to improve image contrast and sharpness. Data augmentation is performed by scaling and adjusting image resolution and rotating and correcting images; remote sensing image data is fused with environmental data collected by IoT sensors to form a comprehensive feature vector; Model building unit: used to build the source model; Model training unit: This unit dynamically transfers knowledge from the source model to the target task using pest and disease feature domain alignment technology and incremental learning mechanisms, training and optimizing the model to adapt to pest and disease detection tasks. It extracts feature representations from crop images using the source model; extracts features from both source and target domain data, performs Wasserstein distance optimization, and minimizes the Wasserstein distance value through gradient descent to achieve domain alignment; when encountering new pest and disease types or crop varieties, it dynamically adjusts the model structure, adding new classification or feature extraction layers, training only the newly added parts and related layers; during model training, model weights are adjusted using the following formula: in, Indicates at time step The weight, For learning rate, The loss function under the current weights; Evaluation Feedback Unit: Used to evaluate the model's detection results using a test set; based on feedback, iterative improvements are made, adjusting and optimizing the model according to the evaluation results. Model optimization includes using a triple adaptive fusion comprehensive loss function using cross-entropy loss, focus loss, and contrast loss, with the following formula: in, , It is a balancing coefficient used to balance the weights of different loss functions; , , These are cross-entropy loss, focus loss, and contrast loss.
5. A computer device, characterized in that, It includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the steps of an incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the incremental deep transfer learning method for real-time remote sensing detection of crop diseases and pests as described in any one of claims 1-3.
Citation Information
Patent Citations
Remote sensing image classification and farmland identification method based on deep learning
CN119580088A
High-resolution remote sensing image accurate classification system and method based on deep learning multi-modal fusion
CN120047721A