Plant disease target detection method based on self-supervised learning
Through multi-stage training and transfer learning technology, combined with self-supervised and supervised learning, the plant disease detection model is optimized, and the problems of high data labeling cost and insufficient generalization ability are solved, achieving efficient and accurate plant disease detection.
Patent Information
- Application Number
- CN202411402014.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-03
AI Technical Summary
The existing deep learning-based plant disease detection methods rely on a large amount of labeled data. The data labeling cost is high and the generalization ability is insufficient, making it difficult to maintain efficient detection performance in complex scenarios. How to combine self-supervised learning and supervised learning to optimize the object detection model Not resolved yet.
Using a multi-stage training strategy, feature extraction and model pre-training of unlabeled data through self-supervised learning, and block feature extraction of plant image data sets using the feature extraction network of the Detectron2 framework, combining weak labels and supervised training to perform migration. Learn to enhance the cross-breeding and cross-regional adaptability of the model.
It significantly reduces the cost of data labeling, improves the generalization ability and detection accuracy of the target detection model, maintains efficient detection performance in complex agricultural environments, and generates detailed detection reports containing disease type, severity and regional information.
Smart Images

Figure CN119251476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plant disease detection, and more particularly to a plant disease target detection method based on self-supervised learning. Background Art
[0002] In agricultural production, plant diseases are one of the important factors affecting crop yield and quality. In order to detect and prevent plant diseases in a timely manner, researchers and agricultural practitioners have been exploring effective disease detection methods. Traditional plant disease detection methods mainly rely on manual inspections and empirical judgments, which are not only time-consuming and labor-intensive, but also limited in accuracy by the experience and professional level of the inspectors. In recent years, with the rapid development of computer vision and artificial intelligence technologies, image-based plant disease detection methods have gradually become a research hotspot. These methods automatically identify and classify different types of diseases by analyzing images of plant leaves, fruits and other parts, providing more efficient technical support for agricultural production.
[0003] Most of the existing deep learning-based plant disease detection methods use supervised learning methods, which require a large amount of labeled data for training. However, obtaining high-quality labeled data faces many challenges in practical applications. First, there are many types of plant diseases, and different diseases may show different symptoms on different plants, which makes the workload of data labeling extremely large. Secondly, the quality of labeled data directly affects the training effect of the target detection model. Manual labeling is difficult to avoid subjective bias, and the labeling process is time-consuming and costly. In addition, since plant diseases may behave differently at different growth stages and under different environmental conditions, the existing methods are also insufficient in generalization ability, and it is difficult to maintain efficient detection performance in complex actual scenarios. In response to these problems, self-supervised learning, as an emerging machine learning method, provides a new idea for plant disease detection. Self-supervised learning constructs proxy tasks and uses a large amount of unlabeled data for feature learning, thereby reducing dependence on manually labeled data and reducing data preparation costs. In addition, self-supervised learning can extract universal feature representations from unlabeled data and improve the generalization ability of target detection models in different scenarios. However, the existing self-supervised learning methods still face some technical challenges when applied to plant disease detection. For example, the self-supervised learning method requires the design of reasonable proxy tasks to ensure that the learned features have sufficient distinguishing ability for the target detection task. In addition, in practical applications, how to effectively combine self-supervised learning and supervised learning to make full use of a small amount of labeled data for target detection model optimization has not yet been solved. Therefore, how to provide a plant disease target detection method based on self-supervised learning is a problem that technicians in this field urgently need to solve. Summary of the invention
[0004] In view of this, the present invention provides a plant disease target detection method based on self-supervised learning, which optimizes the beneficial effects of target detection model performance through a multi-stage training strategy to achieve automated and accurate detection of plant diseases.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A method for detecting plant disease targets based on self-supervised learning comprises the following steps:
[0007] S1. Collect plant image datasets containing different plant diseases;
[0008] S2, denoising, image enhancement and normalization processing are performed on the plant image dataset;
[0009] S3. Build a target detection model, divide the images in the plant image dataset into multiple blocks, optimize the block strategy to maximize the coverage of key areas of plant diseases, and use the feature extraction network based on the Detectron2 framework to extract features from each block;
[0010] S4. Use the unlabeled plant image dataset to pre-train the target detection model through a self-supervised learning algorithm, generate weak labels, and extract useful feature representations from the plant image dataset, combine the useful features with the generated weak labels, and perform supervised training;
[0011] S5. Perform transfer learning between different plants and disease types, set source and target domain data sets, use source domain features and target domain features for feature alignment, enhance feature sharing through transfer loss terms, and optimize the cross-variety and cross-region adaptability of the target detection model;
[0012] S6. Perform self-supervised learning in the target domain, annotate the target domain dataset with weak labels generated by the target detection model, and jointly train with the source domain labels, and optimize the target detection model performance through the joint supervised learning loss function and the transfer loss term;
[0013] S7. In actual agricultural scenarios, the trained target detection model is used to process plant image data in the field in real time, identify and locate diseased areas, and generate a detection report containing information on disease type, severity, and diseased area.
[0014] Optionally, S1 is:
[0015] S11. Collect plant images using camera equipment or drones. The total number of samples N is:
[0016]
[0017] In the formula, M is the type of disease, n isi is the number of samples of the disease in the i-th class, i∈[1,M];
[0018] S12. Build a plant image dataset X containing diverse plant diseases:
[0019] X={(x1,y1),(x2,y2),…,(x N ,y N )};
[0020] Where x1 is the first image, and y1 is the disease type label corresponding to x1.
[0021] Optional, S3 is:
[0022] S31, build a target detection model, plant image dataset X, each image x in the plant image dataset X i Divide into multiple area blocks, each image x i The number of generated area blocks is K i , by optimizing the block strategy, maximize the coverage of key areas for plant diseases:
[0023]
[0024] In the formula, w i and h i x i The width and height of the region block, s is the area block size, p and q are edge extension parameters, overlap x and overlap y are the overlap ratios in the horizontal and vertical directions, respectively;
[0025] S32, using the feature extraction network based on the Detectron2 framework, for each region block r in the plant image dataset X ij Perform feature extraction and generate feature representation z ij , the feature extraction formula introduces the local enhancement factor α ij and the global context-aware factor β ij :
[0026]
[0027] Where f(·) represents the feature extraction network based on the Detectron2 framework, which is used to extract useful features from the regional blocks of the plant image dataset X, and α ij is the local enhancement factor, λ1 is the regularization coefficient, Indicates the pixel gradient change within the region block, β ij is the global context-aware factor, is the perceptual smoothing parameter.
[0028] Optionally, S32 is specifically:
[0029] S321, using the feature extraction network based on the Detectron2 framework, for each region block r in the plant image dataset X ij Perform feature extraction and generate feature representation z ij ;
[0030] S322, local enhancement factor α ij The calculation is performed based on the edge information and texture features of the regional blocks in the plant image dataset X to enhance the significance of the plant disease area:
[0031]
[0032] Where μ1 is the local enhancement coefficient, For the region block r ij The square of the gradient modulus within the region reflects the edge strength within the region block, and v is the enhanced smoothing parameter used to control the local enhancement factor α ij Scope of influence;
[0033] S323, global context awareness factor β ij Used to capture other area blocks ik For the current region block r ij Impact:
[0034]
[0035] S324, regularization coefficient λ1 is used to balance the local enhancement factor α ij and the global context-aware factor β ij The contribution to the final feature representation is determined by cross-validation and is used to maintain the consistency of global and local information during feature extraction.
[0036] Optionally, S4 is specifically:
[0037] S41, the feature representation z of all the area blocks in the same image ij Aggregate and generate the feature representation Z of the whole image i , the aggregation process introduces the weight coefficient w ij , used to optimize the impact of the diseased area on the final characteristics:
[0038]
[0039] In the formula, K i For image x i The number of generated area blocks, μ2 is the feature smoothing factor, is the characteristic gradient modulus, is the characteristic smoothing parameter;
[0040] S42, the aggregated full-image feature is represented as Z i Input into the target detection model, combined with the labeled plant disease image data for supervised training, the loss function A region-level weighting factor η is introduced to enhance the target detection model’s attention to the diseased region in the plant image dataset X:
[0041]
[0042] Where η ij is the weighting factor of the region block in the plant image dataset X, g(Z i ) is the output of the target detection model, y i is the disease label of the image, ρ1 is the regularization coefficient, θ is the target detection model parameter, and CrossEntropy represents the cross entropy loss function;
[0043] S43. Through feature learning and aggregation at the regional level, the detection accuracy of the target detection model for micro-diseases on leaves is optimized. The final detection result integrates the feature representation z of the regional blocks in the plant image dataset X. ij and the whole image feature representation Z i , the final detection output D is obtained through the fusion strategy i :
[0044]
[0045] Among them, λ2 and λ3 are fusion coefficients, reflecting the importance of full-image features and regional block features, and ∈ is an anti-zero minimum.
[0046] Optionally, S5 is specifically:
[0047] S51. Perform transfer learning between different plant species and disease types, setting the source domain dataset X s and the target domain dataset X t , where the source domain dataset X s Contains labeled plant disease images, target domain dataset X t Contains unlabeled plant disease images across varieties and regions;
[0048] S52. Using source domain dataset X s The feature representation Z in s and the target domain dataset X t The feature representation Z in t Perform feature alignment using the maximum mean difference loss function To minimize the distribution difference between the two domains:
[0049]
[0050] Where N s and N t are the number of samples in the source domain and the target domain respectively, f(·) represents the feature extraction network function, and are the region blocks of samples in the source domain and target domain, respectively.
[0051] Optionally, S6 is specifically:
[0052] S61. Perform self-supervised learning in the target domain, using weak labels generated by the target detection model Annotate the target domain dataset and assign weak labels to Joint training with labels in the source domain, and the training loss function introduces a transfer loss term Used to enhance the sharing of cross-domain features:
[0053]
[0054] In the formula, is the supervised learning loss, Z s and Z t are the feature representations of the source domain and the target domain respectively, Y s is the source domain label, is the weak label of the target domain, λ4 is the trade-off coefficient, which is used to adjust the contribution ratio between the source domain and the target domain;
[0055] S62. Enhance the cross-variety and cross-region adaptability of the target detection model through transfer learning, and finally generate a transfer learning target detection model to identify and detect plant diseases in the target domain.
[0056] Optionally, S61 specifically includes:
[0057] S611. In the target domain dataset X t Self-supervised learning is performed on the weak labels generated by the target detection model Each weak tag Corresponding to the potential disease categories in the target domain image:
[0058]
[0059] S612: The generated weak tag and the label Y in the source domain dataset s Perform joint training and combine source domain features to represent Z s and the target domain feature representation Z t , calculate the joint supervised learning loss
[0060]
[0061] In the formula, g is the output layer of the target detection model, CrossEntropy is the cross entropy loss function, which is used to measure the difference between the predicted output and the actual label. for;
[0062] S613, introduction of migration loss item Strengthen the feature sharing between the source domain and the target domain, and adjust the contribution ratio of the source domain and the target domain through the trade-off coefficient λ4.
[0063] Optionally, S7 is:
[0064] S71. Collect real-time plant image datasets in the field using cameras or drones in actual agricultural scenarios. real ;
[0065] S72, collect the real-time plant image data set X real Input into the target detection model to generate each image The feature representation Then the target detection model is used to identify and locate the diseased area in the image. The positioning information includes the bounding box and disease type labels;
[0066] S73. Generate a detection report based on the output results of the target detection model, where the detection report includes the disease type and disease severity score of each image. And the location information of the diseased area:
[0067]
[0068] In the formula, is the number of diseased areas, is the characteristic representation of the diseased area, and Severity is a scoring function used to evaluate the severity of the diseased area;
[0069] S74. Based on the generated detection report, a visual disease distribution map is provided to show the distribution of the disease in the field.
[0070] It can be seen from the above technical solutions that, compared with the prior art, the present invention provides a plant disease target detection method based on self-supervised learning, which has the following beneficial effects:
[0071] (1) The method of the present invention uses a large amount of unlabeled plant image data sets to perform feature extraction and target detection model pre-training through self-supervised learning technology, which effectively reduces the dependence on manually labeled data. When constructing the target detection model, the plant image data set is divided into multiple regional blocks, and features are extracted for each regional block through a feature extraction network based on the Detectron2 framework, and weak labels are generated through self-supervised learning, which significantly reduces the workload of manual labeling and greatly reduces the data labeling cost. At the same time, since self-supervised learning can extract effective feature representations from a large amount of unlabeled data, the target detection model can learn features related to the disease detection task in the pre-training stage, thereby improving the training efficiency of subsequent supervised learning;
[0072] (2) The method of the present invention introduces transfer learning to share and align features between different plant species and disease types, thereby enhancing the cross-domain adaptability of the target detection model. By setting source domain and target domain data sets, using source domain features and target domain features for feature alignment, and introducing a migration loss term to enhance feature sharing, the performance of the target detection model in cross-variety and cross-regional disease detection is optimized. The alignment strategy maximizes the consistency of feature distribution between the source domain and the target domain, so that the target detection model can still maintain efficient detection performance when migrating to new plant species and growth environments, thereby improving the generalization ability of the target detection model.
[0073] (3) The method of the present invention applies the trained target detection model in actual agricultural scenes, processes the plant image data in the field in real time, identifies and locates the diseased area, and not only ensures the real-time detection, but also generates a detection report containing the disease type, severity and diseased area information by performing a detailed analysis of the feature representation and severity of the diseased area. The target detection model optimized by transfer learning and self-supervised learning makes the disease detection results more accurate and stable, and can maintain a high detection accuracy even in complex agricultural environments.
[0074] (4) The multi-stage training strategy proposed in the present invention, i.e., firstly, self-supervised learning is performed for feature extraction, and then the optimized training of the target detection model is performed in combination with supervised learning. Through this training method, the target detection model can make full use of the combination of unlabeled data and a small amount of labeled data, thereby improving the detection ability of different types of plant diseases. At the same time, through the application of transfer learning, the target detection model can adapt to different types of plants and disease types, thereby significantly improving the robustness and adaptability of the target detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0076] Figure 1 This is a flow chart of the plant disease target detection method of the present invention;
[0077] Figure 2 This is a framework diagram of the target detection model of the present invention. DETAILED DESCRIPTION
[0078] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] The embodiment of the present invention discloses a method for detecting plant disease targets based on self-supervised learning, such as Figure 1 As shown, the following steps are included:
[0080] S1. Collect plant image datasets containing different plant diseases;
[0081] S2, denoising, image enhancement and normalization processing are performed on the plant image dataset;
[0082] S3. Build a target detection model, divide the images in the plant image dataset into multiple blocks, optimize the block strategy to maximize the coverage of key areas of plant diseases, and use the feature extraction network based on the Detectron2 framework to extract features from each block;
[0083] S4. Use the unlabeled plant image dataset to pre-train the target detection model through a self-supervised learning algorithm, generate weak labels, and extract useful feature representations from the plant image dataset, combine the useful features with the generated weak labels, and perform supervised training;
[0084] S5. Perform transfer learning between different plants and disease types, set source and target domain data sets, use source domain features and target domain features for feature alignment, enhance feature sharing through transfer loss terms, and optimize the cross-variety and cross-region adaptability of the target detection model;
[0085] S6. Perform self-supervised learning in the target domain, annotate the target domain dataset with weak labels generated by the target detection model, and jointly train with the source domain labels, and optimize the target detection model performance through the joint supervised learning loss function and the transfer loss term;
[0086] S7. In actual agricultural scenarios, the trained target detection model is used to process plant image data in the field in real time, identify and locate diseased areas, and generate a detection report containing information on disease type, severity, and diseased area.
[0087] The embodiment of the present invention adopts a feature extraction network based on the Detectron2 framework. The traditional feature extraction network relies on a large amount of manually labeled data, while the embodiment of the present invention introduces self-supervised learning technology. In S3, feature extraction is performed on unlabeled plant images to generate weak labels, thereby reducing the dependence on manual labeling. The feature extraction network combined with self-supervised learning performs better than traditional methods on large-scale unlabeled data sets. The target detection model and feature extraction network in S3 are effectively improved on the basis of the existing technology by introducing self-supervised learning, weak label generation, transfer learning and multi-stage training strategies, solving the problems of high data labeling cost and poor generalization ability in plant disease detection.
[0088] Furthermore, S1 is specifically:
[0089] S11. Collect plant images using camera equipment or drones. The total number of samples N is:
[0090]
[0091] In the formula, M is the type of disease, n is i is the number of samples of the i-th disease, i∈[1,M];
[0092] S12. Build a plant image dataset X containing diverse plant diseases:
[0093] X={(x1,y1),(x2,y2),…,(x N ,y N )};
[0094] Where x1 is the first image, and y1 is the disease type label corresponding to x1.
[0095] Furthermore, S3 is specifically:
[0096] S31. Build a target detection model. The target detection model is as follows: Figure 2 As shown in the plant image dataset X, each image x in the plant image dataset X i Divide into multiple area blocks, each image x iThe number of generated area blocks is K i , by optimizing the block strategy, maximize the coverage of key areas for plant diseases:
[0097]
[0098] In the formula, w i and h i x i The width and height of the region block, s is the area block size, p and q are edge extension parameters, overlap x and overlap y are the overlap ratios in the horizontal and vertical directions, respectively;
[0099] S32, using the feature extraction network based on the Detectron2 framework, for each region block r in the plant image dataset X ij Perform feature extraction and generate feature representation z ij , the feature extraction formula introduces the local enhancement factor α ij and the global context-aware factor β ij :
[0100]
[0101] Where f(·) represents the feature extraction network based on the Detectron2 framework, which is used to extract useful features from the regional blocks of the plant image dataset X, and α ij is the local enhancement factor, λ1 is the regularization coefficient, Indicates the pixel gradient change within the region block, β ij is the global context-aware factor, is the perceptual smoothing parameter.
[0102] Furthermore, S32 is specifically:
[0103] S321, using the feature extraction network based on the Detectron2 framework, for each region block r in the plant image dataset X ij Perform feature extraction and generate feature representation z ij ;
[0104] S322, local enhancement factor α ij The calculation is performed based on the edge information and texture features of the regional blocks in the plant image dataset X to enhance the significance of the plant disease area:
[0105]
[0106] Where μ1 is the local enhancement coefficient, For the region block r ijThe square of the gradient modulus within the region reflects the edge strength within the region block, and v is the enhanced smoothing parameter used to control the local enhancement factor α ij Scope of influence;
[0107] S323, global context awareness factor β ij Used to capture other area blocks ik For the current region block r ij Impact:
[0108]
[0109] S324, regularization coefficient λ1 is used to balance the local enhancement factor α ij and the global context-aware factor β ij The contribution to the final feature representation is determined by cross-validation and is used to maintain the consistency of global and local information during feature extraction.
[0110] Furthermore, S4 is specifically:
[0111] S41, the feature representation z of all the area blocks in the same image ij Aggregate and generate the feature representation Z of the whole image i , the aggregation process introduces the weight coefficient w ij , used to optimize the impact of the diseased area on the final characteristics:
[0112]
[0113] In the formula, K i For image x i The number of generated area blocks, μ2 is the feature smoothing factor, is the characteristic gradient modulus, is the characteristic smoothing parameter;
[0114] S42, the aggregated full-image feature is represented as Z i Input into the target detection model, combined with the labeled plant disease image data for supervised training, the loss function A region-level weighting factor η is introduced to enhance the target detection model’s attention to the diseased region in the plant image dataset X:
[0115]
[0116] Where η ij is the weighting factor of the region block in the plant image dataset X, g(Z i ) is the output of the target detection model, y i is the disease label of the image, ρ1 is the regularization coefficient, θ is the target detection model parameter, and CrossEntropy represents the cross entropy loss function;
[0117] S43. Through feature learning and aggregation at the regional level, the detection accuracy of the target detection model for micro-diseases on leaves is optimized. The final detection result integrates the feature representation z of the regional blocks in the plant image dataset X. ij and the whole image feature representation Z i , the final detection output D is obtained through the fusion strategy i :
[0118]
[0119] Among them, λ2 and λ3 are fusion coefficients, reflecting the importance of full-image features and regional block features, and ∈ is an anti-zero minimum.
[0120] Furthermore, S5 is specifically:
[0121] S51. Perform transfer learning between different plant species and disease types, setting the source domain dataset X s and the target domain dataset X t , where the source domain dataset X s Contains labeled plant disease images, target domain dataset X t Contains unlabeled plant disease images across varieties and regions;
[0122] S52. Using source domain dataset X s The feature representation Z in s and the target domain dataset X t The feature representation Z in t Perform feature alignment using the maximum mean difference loss function To minimize the distribution difference between the two domains:
[0123]
[0124] Where N s and N t are the number of samples in the source domain and the target domain respectively, f(·) represents the feature extraction network function, and are the region blocks of samples in the source domain and target domain, respectively.
[0125] Furthermore, S6 is specifically:
[0126] S61. Perform self-supervised learning in the target domain, using weak labels generated by the target detection model Annotate the target domain dataset and assign weak labels to Joint training with labels in the source domain, and the training loss function introduces a transfer loss term Used to enhance the sharing of cross-domain features:
[0127]
[0128] In the formula, is the supervised learning loss, Z s and Z t are the feature representations of the source domain and the target domain respectively, Y s is the source domain label, is the weak label of the target domain, λ4 is the trade-off coefficient, which is used to adjust the contribution ratio between the source domain and the target domain;
[0129] S62. Enhance the cross-variety and cross-region adaptability of the target detection model through transfer learning, and finally generate a transfer learning target detection model to identify and detect plant diseases in the target domain.
[0130] Furthermore, S61 is specifically:
[0131] S611. In the target domain dataset X t Self-supervised learning is performed on the weak labels generated by the target detection model Each weak tag Corresponding to the potential disease categories in the target domain image:
[0132]
[0133] S612: The generated weak tag and the label Y in the source domain dataset s Perform joint training and combine source domain features to represent Z s and the target domain feature representation Z t , calculate the joint supervised learning loss
[0134]
[0135] In the formula, g is the output layer of the target detection model, CrossEntropy is the cross entropy loss function, which is used to measure the difference between the predicted output and the actual label. for;
[0136] S613, introduction of migration loss item Strengthen the feature sharing between the source domain and the target domain, and adjust the contribution ratio of the source domain and the target domain through the trade-off coefficient λ4.
[0137] Furthermore, S7 is specifically:
[0138] S71. Collect real-time plant image datasets in the field using cameras or drones in actual agricultural scenarios. real ;
[0139] S72, collect the real-time plant image data set X real Input into the target detection model to generate each image The feature representation Then the target detection model is used to identify and locate the diseased area in the image. The positioning information includes the bounding box and disease type labels;
[0140] S73. Generate a detection report based on the output results of the target detection model, where the detection report includes the disease type and disease severity score of each image. And the location information of the diseased area:
[0141]
[0142] In the formula, is the number of diseased areas, is the characteristic representation of the diseased area, and Severity is a scoring function used to evaluate the severity of the diseased area;
[0143] S74. Based on the generated detection report, a visual disease distribution map is provided to show the distribution of the disease in the field.
[0144] Furthermore, in one embodiment of the present invention, the plant disease target detection method of the present invention is used to perform a test:
[0145] Specifically: In June 2023, in the rice fields and wheat fields of a certain agricultural science and technology demonstration park, managers found signs of a large-scale outbreak of rice blast and sheath blight. Since it was the hot and humid summer, the spread of the disease was very fast. Traditional manual inspection and detection methods could not meet the needs of timely monitoring. The park adopted the plant disease target detection method based on self-supervised learning of the present invention to quickly and accurately identify the disease and take corresponding prevention and control measures.
[0146] In the early morning of June 15, the management activated the drone system deployed in the park and began to collect large-scale images of the entire demonstration park. The drones followed the preset route, flew at an altitude of 100 meters and shot at a frequency of 10 frames per second, and scanned the rice and wheat fields comprehensively. In just two hours, the drones collected a total of 48,360 high-resolution plant images, covering crops at multiple growth stages, especially key areas including areas where disease outbreaks are known.
[0147] That morning, the image data was quickly transferred to the park's data processing center, and then the system performed denoising, image enhancement and normalization on the images to ensure data consistency. After processing, the images were input into the feature extraction network based on the Detectron2 framework, and the system began the pre-training phase of self-supervised learning.
[0148] During the self-supervised learning process, the system automatically divides each image into multiple blocks and extracts key plant disease features through self-supervised learning algorithms. The system generates preliminary weak labels at this step to mark possible disease areas. These weak labels are then used for further supervised training. By combining a small amount of labeled data, the system greatly improves the accuracy of disease recognition.
[0149] On June 20, the system completed the initial training of the target detection model. Next, the system began the transfer learning phase, with the goal of applying the trained target detection model to unlabeled image data of other disease types. By comparing and analyzing the labeled data and the newly collected unlabeled data, the system automatically adjusted the feature alignment strategy of the target detection model and strengthened the sharing of cross-domain features. Ultimately, the system generated a highly generalized target detection model that can adapt to a variety of crops and disease types.
[0150] On June 25, the actual test of the park began. In this test, the system first detected a diseased area that had never been marked. The area is located in the northwest corner of the park and covers an area of about 2 hectares. When the system analyzed the images taken by the drone in real time, it detected multiple suspected diseased areas and marked them as potential sheath blight. According to the report generated by the system, the disease severity score of these areas averaged 0.85 (on a scale of 0 to 1), indicating that the crops in the area are in the early stages of a disease outbreak.
[0151] The system further analyzed the image features of these suspected disease areas and found that they were similar to typical sheath blight in terms of color, shape, texture, etc. In the detection report generated by the system, the location of each suspected disease area (expressed in GPS coordinates), disease type (sheath blight), disease severity (0.85), and boundary box information of the disease area (specific coordinate points) are listed in detail, and the report is sent to agricultural managers in real time.
[0152] After receiving the report, the manager immediately went to the site to check and compared the diseased area generated by the system with the actual crop situation, and found that the system's detection results were highly consistent with on-site observations. Based on the system's real-time report, the manager took targeted disease prevention measures that afternoon and used pesticides to accurately spray the diseased area, effectively curbing the further spread of the disease.
[0153] Furthermore, in one embodiment of the present invention, in order to further verify the effectiveness of the method of the present invention, a comparative test is conducted based on a traditional supervised learning method and the detection method of the present invention, specifically:
[0154] Data dependence: Traditional methods completely rely on manually annotated data. In this test, researchers used a total of 5,000 manually annotated rice blast and sheath blight images for training, which took 72 hours. In the self-supervised learning stage, the method of the present invention used 48,360 unlabeled data for pre-training, and combined with only 1,000 annotated data for supervised training, which took 36 hours overall and reduced the annotation cost by 80%.
[0155] Detection accuracy: In subsequent tests, the average detection accuracy of the traditional method on the unlabeled data set was 77.5%, while the detection accuracy of the method of the present invention reached 92.7%. In particular, in the detection of new disease areas, the false detection rate of the traditional method was 18%, while the method of the present invention reduced the false detection rate to 7%.
[0156] Real-time detection efficiency: The traditional method processes an average of 120 images per hour, and the generated disease detection report has a certain delay (the average delay time is 5 minutes). The method of the present invention processes an average of 180 images per hour, and the delay time for generating reports is shortened to 2 minutes, and the detection speed is increased by 50%.
[0157] Generalization ability of target detection model: Traditional methods performed well in the detection of rice blast and sheath blight, but showed a significant performance decline (accuracy dropped to 64.2%) when detecting other unlabeled diseases. However, the method of the present invention performed stably in cross-domain disease detection through transfer learning, and the average accuracy remained above 85%.
[0158] Through the above data comparison, the plant disease target detection method of the present invention shows significant advantages in reducing data annotation costs, improving detection accuracy, improving detection efficiency and enhancing the generalization ability of the target detection model. This innovative method not only effectively solves the problem of relying on a large amount of labeled data in traditional disease detection, but also achieves accurate detection of multiple diseases through multi-stage training strategies and transfer learning technology, and has the potential for large-scale promotion and application in actual agricultural production.
[0159] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0160] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A plant disease target detection method based on self-supervised learning, characterized in that: The following steps are involved: S1. Collect plant image datasets containing different plant diseases; S2, denoising, image enhancement and normalization processing are performed on the plant image dataset; S3. Build a target detection model, divide the images in the plant image dataset into multiple blocks, optimize the block strategy to maximize the coverage of key areas of plant diseases, and use the feature extraction network based on the Detectron2 framework to extract features from each block; S4. Use the unlabeled plant image dataset to pre-train the target detection model through a self-supervised learning algorithm, generate weak labels, and extract useful feature representations from the plant image dataset, combine the useful features with the generated weak labels, and perform supervised training; S5. Perform transfer learning between different plants and disease types, set source and target domain data sets, use source domain features and target domain features for feature alignment, enhance feature sharing through transfer loss terms, and optimize the cross-variety and cross-region adaptability of the target detection model; S6. Perform self-supervised learning in the target domain, annotate the target domain dataset with weak labels generated by the target detection model, and jointly train with the source domain labels, and optimize the target detection model performance through the joint supervised learning loss function and the transfer loss term; S7. In actual agricultural scenarios, the trained target detection model is used to process plant image data in the field in real time, identify and locate diseased areas, and generate a detection report containing information on disease type, severity, and diseased area.
2. A method for detecting plant disease targets based on self-supervised learning according to claim 1, characterized in that: S1 is specifically: S11. Collect plant images using camera equipment or drones. The total number of samples N is: In the formula, M is the type of disease, n is i is the number of samples of the i-th disease, i∈[1,M]; S12. Build a plant image dataset X containing diverse plant diseases: X={(x1,y1),(x2,y2),…,(x N ,y N )}; Where x1 is the first image, and y1 is the disease type label corresponding to x1.
3. A method for detecting plant disease targets based on self-supervised learning according to claim 1, characterized in that: S3 is specifically: S31, build a target detection model, plant image dataset X, each image x in the plant image dataset X i Divide into multiple area blocks, each image x i The number of generated area blocks is K i , by optimizing the block strategy, maximize the coverage of key areas for plant diseases: In the formula, w i and h i x i The width and height of the region block, s is the area block size, p and q are edge extension parameters, overlap x and overlap y are the overlap ratios in the horizontal and vertical directions, respectively; S32, using the feature extraction network based on the Detectron2 framework, for each region block r in the plant image dataset X ij Perform feature extraction and generate feature representation z ij , the feature extraction formula introduces the local enhancement factor α ij and the global context-aware factor β ij : Where f(·) represents the feature extraction network based on the Detectron2 framework, which is used to extract useful features from the regional blocks of the plant image dataset X, and α ij is the local enhancement factor, λ1 is the regularization coefficient, Indicates the pixel gradient change within the region block, β ij is the global context-aware factor, is the perceptual smoothing parameter.
4. A method for detecting plant disease targets based on self-supervised learning according to claim 3, characterized in that: S32 is specifically: S321, using the feature extraction network based on the Detectron2 framework, for each region block r in the plant image dataset X ij Perform feature extraction and generate feature representation z ij ; S322, local enhancement factor α ij The calculation is performed based on the edge information and texture features of the regional blocks in the plant image dataset X to enhance the significance of the plant disease area: Where μ1 is the local enhancement coefficient, For the region block r ij The square of the gradient modulus within the region reflects the edge strength within the region block, and v is the enhanced smoothing parameter used to control the local enhancement factor α ij Scope of influence; S323, global context awareness factor β ij Used to capture other area blocks ik For the current region block r ij Impact: S324, regularization coefficient λ1 is used to balance the local enhancement factor α ij and the global context-aware factor β ij The contribution to the final feature representation is determined by cross-validation and is used to maintain the consistency of global and local information during feature extraction.
5. The method for detecting plant disease targets based on self-supervised learning according to claim 1, characterized in that: S4 is specifically: S41, the feature representation z of all the area blocks in the same image ij Aggregate and generate the feature representation Z of the whole image i , the aggregation process introduces the weight coefficient w ij , used to optimize the impact of the diseased area on the final characteristics: In the formula, K i For image x i The number of generated area blocks, μ2 is the feature smoothing factor, is the characteristic gradient modulus, is the characteristic smoothing parameter; S42, the aggregated full-image feature is represented as Z i Input into the target detection model, combined with the labeled plant disease image data for supervised training, the loss function A region-level weighting factor η is introduced to enhance the object detection model's attention to the diseased area in the plant image dataset X: Where η ij is the weighting factor of the region block in the plant image dataset X, g(Z i ) is the output of the target detection model, y i is the disease label of the image, ρ1 is the regularization coefficient, θ is the target detection model parameter, and CrossEntropy represents the cross entropy loss function; S43. Through feature learning and aggregation at the regional level, the detection accuracy of the target detection model for micro-diseases on leaves is optimized. The final detection result integrates the feature representation z of the regional blocks in the plant image dataset X. ij and the whole image feature representation Z i , the final detection output D is obtained through the fusion strategy i : Among them, λ2 and λ3 are fusion coefficients, reflecting the importance of full-image features and regional block features, and ∈ is an anti-zero minimum.
6. A method for detecting plant disease targets based on self-supervised learning according to claim 1, characterized in that: S5 is as follows: S51. Perform transfer learning between different plant species and disease types, setting the source domain dataset X s and the target domain dataset X t , where the source domain dataset X s Contains labeled plant disease images, target domain dataset X t Contains unlabeled plant disease images across varieties and regions; S52. Using the source domain dataset X s The feature representation Z in s and the target domain dataset X t The feature representation Z in t Perform feature alignment using the maximum mean difference loss function To minimize the distribution difference between the two domains: Where N s and N t are the number of samples in the source domain and the target domain respectively, f(·) represents the feature extraction network function, and are the region blocks of samples in the source domain and target domain, respectively.
7. The method for detecting plant disease targets based on self-supervised learning according to claim 1, characterized in that: S6 is specifically: S61. Perform self-supervised learning in the target domain, using weak labels generated by the target detection model Annotate the target domain dataset and assign weak labels to Joint training with labels in the source domain, and the training loss function introduces a transfer loss term Used to enhance the sharing of cross-domain features: In the formula, is the supervised learning loss, Z s and Z t are the feature representations of the source domain and the target domain respectively, Y s is the source domain label, is the weak label of the target domain, λ4 is the trade-off coefficient, which is used to adjust the contribution ratio between the source domain and the target domain; S62. Enhance the cross-variety and cross-region adaptability of the target detection model through transfer learning, and finally generate a transfer learning target detection model to identify and detect plant diseases in the target domain.
8. A method for detecting plant disease targets based on self-supervised learning according to claim 7, characterized in that: S61 is as follows: S611. In the target domain dataset X t Self-supervised learning is performed on the weak labels generated by the target detection model Each weak tag Corresponding to the potential disease categories in the target domain image: S612: The generated weak tag and the label Y in the source domain dataset s Perform joint training and combine source domain features to represent Z s and the target domain feature representation Z t , calculate the joint supervised learning loss In the formula, g is the output layer of the target detection model, and CrossEntropy is the cross entropy loss function, which is used to measure the difference between the predicted output and the actual label; S613, introduction of migration loss item Strengthen the feature sharing between the source domain and the target domain, and adjust the contribution ratio of the source domain and the target domain through the trade-off coefficient λ4.
9. The method for detecting plant disease targets based on self-supervised learning according to claim 1, characterized in that: S7 is specifically: In actual agricultural scenarios, the trained object detection model is used to process plant image data in the field in real time, identify and locate diseased areas, and generate a detection report containing information on disease type, severity, and diseased area. S71. Collect real-time plant image datasets in the field using cameras or drones in actual agricultural scenarios. real ; S72, collect the real-time plant image data set X real Input into the target detection model to generate each image The feature representation Then the target detection model is used to identify and locate the diseased area in the image. The positioning information includes the bounding box and disease type labels; S73. Generate a detection report based on the output results of the target detection model, where the detection report includes the disease type and disease severity score of each image. And the location information of the diseased area: In the formula, is the number of diseased areas, is the characteristic representation of the diseased area, and Severity is a scoring function used to evaluate the severity of the diseased area; S74. Based on the generated detection report, a visual disease distribution map is provided to show the distribution of the disease in the field.
Citation Information
Cited By
Efficient leaf area estimation method
CN121010779A
