Weak supervised learning method of gramineous plant lodging detection model

By improving the encoder and pre-trained weakly supervised learning method, the problem of high label dependence and negative sample imbalance in lodging detection of grass family plants is solved, and the lodging detection effect of high accuracy and robustness is achieved.

CN119516356APending Publication Date: 2025-02-25INST OF GENETICS & DEVELOPMENTAL BIOLOGY CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411395068.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing lodging detection methods for grass family plants rely on a large amount of labeled data, which leads to high cost of data acquisition and labeling, limiting the widespread application of technology, and negative sample imbalance leads to low accuracy.

Method used

The improved encoder is used to construct the lodging detection model of Grape plants. Through pre-training and weakly supervised learning, the label dependence is reduced, and the training effect and robustness of the model are improved.

Benefits of technology

While reducing label dependence, it improves the accuracy and robustness of lodging detection in grass family plants, effectively captures lodging phenomena, and improves the detection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516356A_ABST
    Figure CN119516356A_ABST
Patent Text Reader

Abstract

The invention provides a weak supervised learning method for a gramineous plant lodging detection model, and relates to the technical field of machine learning, and the method comprises the steps: constructing the gramineous plant lodging detection model through employing an improved encoder; wherein the gramineous plant lodging detection model comprises an input layer, a convolution layer and an output layer; the convolution layer is composed of a plurality of residual blocks, each residual block comprises three convolution modules in jump connection, and the output layer is of a full-connection structure; optimizing parameters of the gramineous plant lodging detection model by using the pre-training loss function to obtain a pre-trained gramineous plant lodging detection model; based on weak supervised learning, finely adjusting the pre-trained gramineous plant lodging detection model to obtain a trained gramineous plant lodging detection model; wherein the gramineous plant lodging detection model is used for carrying out lodging detection on the gramineous plant image. The method solves the problem of low accuracy caused by negative sample imbalance in gramineous plant lodging detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning technology, and in particular to a weakly supervised learning method for a grass plant lodging detection model. Background Art

[0002] Lodging of grasses is a common problem in agricultural production, especially when there is bad weather or pests and diseases, the lodging phenomenon will seriously affect the growth and yield of crops. Existing lodging detection methods usually rely on a large amount of labeled data, which not only increases the cost of data acquisition and annotation, but also limits the widespread application of the technology. With the development of deep learning technology, efficient lodging detection using unsupervised learning and a small amount of labeled data has become a potential technical means. The present invention proposes a grass lodging detection method combining unsupervised learning and a small amount of label fine-tuning, which can improve the accuracy and robustness of lodging detection while reducing label dependence. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a weakly supervised learning method for a Gramineae plant lodging detection model, which solves the problem of low accuracy caused by imbalanced negative samples in Gramineae plant lodging detection.

[0004] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a weakly supervised learning method of a grass plant lodging detection model, comprising:

[0005] S1: Using an improved encoder, a Gramineae plant lodging detection model is constructed; wherein the improved encoder is obtained by proportionally increasing the number of channels of the ResNet original residual block in the convolution layer; the Gramineae plant lodging detection model includes an input layer, a convolution layer and an output layer; the convolution layer is composed of a plurality of residual blocks, each residual block contains three skip-connected convolution modules, and the output layer is a fully connected structure;

[0006] S2: Optimizing the parameters of the Gramineae plant lodging detection model using the pre-trained loss function to obtain the pre-trained Gramineae plant lodging detection model;

[0007] S3: Based on weakly supervised learning, fine-tune the pre-trained Gramineae plant lodging detection model to obtain a trained Gramineae plant lodging detection model; wherein the Gramineae plant lodging detection model is used to perform lodging detection on Gramineae plant images.

[0008] The beneficial effects of the present invention are as follows: using the improved encoder, a Gramineae plant lodging detection model is constructed, and a trained Gramineae plant lodging detection model is obtained through pre-training and weakly supervised learning. In this way, label dependence can be reduced, and the training effect of the Gramineae plant lodging detection model can be improved; the lodging phenomenon of Gramineae plants can be effectively captured, and the accuracy and robustness of lodging detection can be greatly improved.

[0009] Furthermore, the Gramineae plant lodging detection model includes:

[0010] The input layer is used to perform image enhancement and normalization on the input image to obtain a training image;

[0011] The convolution layer contains 50 layers of depth, and the last global average pooling layer is connected to the output layer, which is used to extract the features of the training image through convolution and pooling to obtain the feature vector;

[0012] The output layer is used to connect the feature vectors to obtain the low-dimensional space feature vectors.

[0013] Using this structure, high-level features of the image can be effectively extracted.

[0014] Further, the S2 includes:

[0015] Performing image enhancement and normalization processing on the acquired Gramineae plant images to obtain positive sample pairs; using enhanced samples generated for images other than the Gramineae plant images as negative sample pairs; the positive sample pairs and the negative sample pairs belong to the input image;

[0016] The positive sample pair and the negative sample pair are processed by using the Gramineae plant lodging detection model to obtain a positive sample pair feature vector and a negative sample feature vector, respectively;

[0017] Based on the positive sample pair feature vector and the negative sample feature vector, a pre-training loss function is used to perform calculation to obtain a pre-training loss result;

[0018] The pre-training loss result is used to update the weights of the neural network through a back propagation algorithm and an Adam optimizer to obtain a pre-trained Gramineae lodging detection model.

[0019] Through this training method, the performance of the model can be improved so that the model can better represent image features.

[0020] Furthermore, the expression of the feature vector of the positive sample pair is:

[0021]

[0022] The expression of the negative sample feature vector is:

[0023]

[0024] in, represents the first positive sample feature vector, f represents the output layer function, represents the first positive sample, represents the second positive sample feature vector, represents the second positive sample, represents negative samples, Represents the negative sample feature vector.

[0025] Furthermore, the expression of the pre-training loss result is:

[0026]

[0027] Among them, Loss represents the pre-training loss result, n represents the number of positive sample pairs, exp represents the exponential form of the natural constant, and d represents the distance in the feature space. represents the first positive sample feature vector, represents the second positive sample feature vector, τ represents the temperature parameter, Represents the negative sample feature vector, i represents the positive sample pair number, and k represents the negative sample pair number.

[0028] Further, the S3 includes:

[0029] Freeze the weights of the pre-trained Gramineae lodging detection model, unfreeze the residual block and output layer at the end of the convolutional layer, and obtain the Gramineae lodging detection model for weakly supervised learning;

[0030] A small amount of images of Gramineae plants with lodging annotated and images of normal Gramineae plants are used as weakly supervised input data, and input into the Gramineae plant lodging detection model for weakly supervised learning to obtain weakly supervised learning results;

[0031] Based on the weakly supervised learning results, the weakly supervised loss function is used to perform parameter optimization to obtain a trained Gramineae lodging detection model.

[0032] In this way, the feature vector of the fallen image can be made far away from the feature vector of the normal image in the feature space without clustering the fallen images, ensuring that the normal images are clustered near the normal category proxy points in the feature space, while the fallen images are distributed in the area far away from the normal proxy points, forming an obvious separation, thereby improving the efficiency of model training.

[0033] Furthermore, the expression of the weak supervision loss function is:

[0034]

[0035] Among them, L proxy represents the result of weak supervision loss function, N represents the number of weak supervision input data, represents the normal rate, d represents the distance in the feature space, z i represents the feature vector of a normal Gramineae plant image, p normal Indicates the number of normal Gramineae plant images after update, represents the lodging judgment function, max represents the maximum value function, and m represents the boundary distance of the hyperparameter. Represents the label of the normal Gramineae image i1, i1 represents the normal Gramineae image number, α represents the agent point learning rate, and n1 represents the current number of normal Gramineae images.

[0036] Further, the lodging detection of the Gramineae plant image using the Gramineae plant lodging detection model includes:

[0037] Using the Euclidean distance of the output results of the Gramineae lodging detection model, the anomaly score is obtained by calculation:

[0038] Score anomaly =||z-μ||2;

[0039] Among them, Score anomaly represents the abnormality score, z represents the output result of the Gramineae lodging detection model, μ represents the distribution center, represents the norm;

[0040] Based on the abnormality score threshold, the abnormality score is analyzed to obtain a lodging detection result.

[0041] Furthermore, the process of acquiring the image of the Gramineae plant includes:

[0042] RGB image data of grass plants at different growth stages and under different lighting conditions are collected as grass plant images; wherein the growth stages include heading stage, filling stage and maturity stage, and the lighting conditions include morning light conditions, noon light conditions, evening conditions and uniform light conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0044] Figure 1 It is an exemplary flow chart of a weakly supervised learning method for a grass plant lodging detection model according to some embodiments of this specification. DETAILED DESCRIPTION

[0045] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0046] Example

[0047] Figure 1 is an exemplary flow chart of a weakly supervised learning method for a grass plant lodging detection model according to some embodiments of this specification. Figure 1 As shown, the process includes the following steps. In some embodiments, the process can be executed by a processor.

[0048] S1: Use the improved encoder to construct a lodging detection model for Gramineae plants.

[0049] The improved encoder is an encoder that can preserve the information flow. For example, the improved encoder can be a ResNet-50 encoder composed of multiple residual blocks, where each residual block contains three convolutional layers.

[0050] In some embodiments, the processor may increase the number of channels of the original residual block of ResNet in the convolution layer in equal proportion to obtain an improved encoder. For example, the processor may increase the number of channels of the residual block in proportion to: conv2_x: 128 channels, conv3_x: 256 channels, conv4_x: 512 channels, and conv5_x: 1024 channels to obtain an improved encoder.

[0051] In this way, the representation ability of the network can be increased, allowing the network to learn complex features from the data.

[0052] The Gramineae lodging detection model is a neural network model used for lodging detection of Gramineae plants. For example, the Gramineae lodging detection model may include a convolutional neural network model and a graph neural network model.

[0053] In some embodiments, the processor may utilize the improved encoder to construct a grass lodging detection model.

[0054] In some embodiments, the grass plant lodging detection model may include an input layer, a convolution layer and an output layer; wherein the output of the input layer is used as the input of the convolution layer, the output of the convolution layer is used as the input of the output layer, and the output of the output layer is used as the final output of the grass plant lodging detection model.

[0055] The input layer is used to perform image enhancement and normalization on the input image to obtain a training image.

[0056] The input image is a grass plant image and a control image. For example, the input image may include a positive sample pair and a negative sample pair.

[0057] The training images are images used to train the Gramineae plant lodging detection model.

[0058] In some embodiments, the processor can perform four data enhancement techniques, including random cropping, rotation, random flipping and color jittering, on the image of the Poaceae plant in the input image to generate two different view samples as a positive sample pair; and perform image enhancement on the control image in the input image to obtain a negative sample pair.

[0059] The convolution layer contains 50 layers of depth and the last global average pooling layer is connected to the output layer, which is used to extract the features of the training image through convolution and pooling processing to obtain the feature vector.

[0060] In some embodiments, the convolutional layer may be composed of multiple residual blocks, each residual block containing three skip-connected convolutional modules.

[0061] The feature vector is a vector that reflects the characteristics of image position and lodging.

[0062] In some embodiments, the convolution layer may perform convolution and pooling processing on the training image to obtain a feature vector.

[0063] The output layer is used to connect the feature vectors to obtain the low-dimensional space feature vectors.

[0064] In some embodiments, the output layer may be a fully connected structure.

[0065] The low-dimensional space feature vector is a vector that reflects the position characteristics of the lodging situation in the low-dimensional feature space.

[0066] In some embodiments, the output layer may fully connect multiple feature vectors output by the convolutional layer to obtain a low-dimensional space feature vector.

[0067] In some embodiments, the expression of the low-dimensional space feature vector may be:

[0068] z=f(x);

[0069] Among them, z represents the low-dimensional space feature vector, f represents the output layer function, and x represents the feature vector.

[0070] In some embodiments, the output layer function may be a function constructed by the encoder.

[0071] S2: Optimize the parameters of the Gramineae lodging detection model using the pre-trained loss function to obtain the pre-trained Gramineae lodging detection model.

[0072] The pre-training loss function is a loss function used to pre-train the Gramineae lodging detection model. For example, the pre-training loss function may include an InfoNCE loss function.

[0073] In some embodiments, the processor can implement S2 based on the following steps: perform image enhancement and normalization processing on the acquired Gramineae plant images to obtain positive sample pairs; generate enhanced samples for images other than Gramineae plant images as negative sample pairs; use the Gramineae plant lodging detection model to process the positive sample pairs and the negative sample pairs to obtain positive sample pair feature vectors and negative sample feature vectors, respectively; based on the positive sample pair feature vectors and the negative sample feature vectors, use a pre-trained loss function to perform calculations to obtain pre-trained loss results; use the pre-trained loss results to update the weights of the neural network through a back-propagation algorithm and an Adam optimizer to obtain a pre-trained Gramineae plant lodging detection model.

[0074] The positive sample pairs are sample pairs obtained based on the images of Gramineae plants.

[0075] The negative sample pair is a sample pair obtained based on images other than the Gramineae plant image (control image).

[0076] The positive sample pair feature vector is a vector reflecting the lodging characteristics and position characteristics of the positive sample pair.

[0077] In some embodiments, the expression of the feature vector of the positive sample pair may be:

[0078]

[0079] in, represents the first positive sample feature vector, f represents the output layer function, represents the first positive sample, represents the second positive sample feature vector, represents the second positive sample.

[0080] The negative sample feature vector is a vector that reflects the lodging characteristics and position characteristics of the negative sample.

[0081] In some embodiments, the negative sample feature vector is expressed as:

[0082]

[0083] in, represents negative samples, Represents the negative sample feature vector.

[0084] The pre-training loss result is a parameter that reflects the gap between the output results of the pre-trained grass lodging detection model and the label.

[0085] In some embodiments, the expression of the pre-training loss result can be:

[0086]

[0087] Among them, Loss represents the pre-training loss result, n represents the number of positive sample pairs, exp represents the exponential form of the natural constant, and d represents the distance in the feature space. represents the first positive sample feature vector, represents the second positive sample feature vector, τ represents the temperature parameter, Represents the negative sample feature vector, i represents the positive sample pair number, and k represents the negative sample pair number.

[0088] In some embodiments, the processor can optimize the weights of the Poaceae lodging detection model using the pre-training loss results based on the back-propagation algorithm and the Adam optimizer until the number of iterations reaches a threshold or the pre-training loss results converge, thereby obtaining the pre-trained Poaceae lodging detection model.

[0089] S3: Based on weakly supervised learning, fine-tune the pre-trained Gramineae plant lodging detection model to obtain a trained Gramineae plant lodging detection model; wherein the Gramineae plant lodging detection model is used to perform lodging detection on Gramineae plant images.

[0090] Weakly supervised learning is a machine model supervised learning method based on a small number of labels.

[0091] In some embodiments, the processor can implement S3 based on the following steps: freezing the weights of the pre-trained Poaceae lodging detection model, unfreezing the last residual block and output layer of the convolutional layer, and obtaining the Poaceae lodging detection model for weakly supervised learning; using a small number of Poaceae plant images marked with lodging and normal Poaceae plant images as weakly supervised input data, and inputting them into the Poaceae plant lodging detection model for weakly supervised learning to obtain weakly supervised learning results; based on the weakly supervised learning results, using the weakly supervised loss function to optimize parameters and obtain a trained Poaceae plant lodging detection model.

[0092] The weakly supervised input data are a small number of labeled images of fallen Poaceae plants and normal Poaceae plants.

[0093] The weakly supervised learning results are the results of the lodging conditions of the grass plant images.

[0094] In some embodiments, the processor may process weakly supervised input data based on a grass lodging detection model for weakly supervised learning to obtain weakly supervised learning results.

[0095] In some embodiments, the weakly supervised loss function may use a proxy loss function.

[0096] In some embodiments, the expression of the weak supervision loss function can be:

[0097]

[0098] Among them, L proxy represents the result of weak supervision loss function, N represents the number of weak supervision input data, represents the normal rate, d represents the distance in the feature space, z i represents the feature vector of a normal Gramineae plant image, p normal Indicates the number of normal Gramineae plant images after update, represents the lodging judgment function, max represents the maximum value function, and m represents the boundary distance of the hyperparameter. Represents the label of the normal Gramineae image i1, i1 represents the normal Gramineae image number, α represents the agent point learning rate, and n1 represents the current number of normal Gramineae images.

[0099] In some embodiments, the expression of the lodging judgment function may be:

[0100]

[0101] Among them, fall means to fall down.

[0102] In some embodiments, performing lodging detection on a Poaceae plant image using a Poaceae plant lodging detection model includes: obtaining an abnormality score by calculating the Euclidean distance of an output result of the Poaceae plant lodging detection model; and analyzing the abnormality score based on an abnormality score threshold to obtain a lodging detection result.

[0103] The grass plant images are images of grass plants at different growth stages and under different lighting conditions.

[0104] In some embodiments, the process of acquiring the image of the Poaceae plant may include: using a drone or a ground camera to collect RGB image data of the Poaceae plant at different growth stages and under different lighting conditions as the image of the Poaceae plant.

[0105] Growth stages may include heading, grain filling, and maturity.

[0106] Light conditions may include morning light conditions (light intensity of about 300-500 lux), midday light conditions (light intensity of about 1000-1200 lux), evening conditions (light intensity of about 300-500 lux), and uniform light conditions (light intensity of about 600-800 lux).

[0107] The anomaly score is a score that reflects the probability of anomaly of the Gramineae plant image. The larger the anomaly score value, the higher the probability of anomaly of the Gramineae plant image.

[0108] In some embodiments, the expression of the anomaly score may be:

[0109] Score anomaly =||z-μ||2;

[0110] Among them, Score anomaly represents the anomaly score, z represents the low-dimensional space feature vector, μ represents the distribution center, Represents the norm.

[0111] The anomaly score threshold is a value used to distinguish whether a Gramineae plant image is abnormal.

[0112] The lodging detection results reflect the lodging conditions of Gramineae plant images at different growth stages and under different lighting conditions.

[0113] In some embodiments of this specification, the processor uses an improved encoder to construct a Gramineae plant lodging detection model, and obtains a trained Gramineae plant lodging detection model through pre-training and weakly supervised learning. In this way, it is possible to reduce label dependence and improve the training effect of the Gramineae plant lodging detection model; it can effectively capture the lodging phenomenon of Gramineae plants and greatly improve the accuracy and robustness of lodging detection.

Claims

1. A weakly supervised learning method for a grass lodging detection model, characterized in that: include: S1: Using an improved encoder, a Gramineae plant lodging detection model is constructed; wherein the improved encoder is obtained by proportionally increasing the number of channels of the ResNet original residual block in the convolution layer; the Gramineae plant lodging detection model includes an input layer, a convolution layer and an output layer; the convolution layer is composed of a plurality of residual blocks, each residual block contains three skip-connected convolution modules, and the output layer is a fully connected structure; S2: Optimizing the parameters of the Gramineae plant lodging detection model using the pre-trained loss function to obtain the pre-trained Gramineae plant lodging detection model; S3: Based on weakly supervised learning, fine-tune the pre-trained Gramineae plant lodging detection model to obtain a trained Gramineae plant lodging detection model; wherein the Gramineae plant lodging detection model is used to perform lodging detection on Gramineae plant images.

2. The weakly supervised learning method of the Gramineae lodging detection model according to claim 1, characterized in that: The Gramineae plant lodging detection model comprises: The input layer is used to perform image enhancement and normalization on the input image to obtain a training image; The convolution layer contains 50 layers of depth, and the last global average pooling layer is connected to the output layer, which is used to extract the features of the training image through convolution and pooling to obtain the feature vector; The output layer is used to connect the feature vectors to obtain the low-dimensional space feature vectors.

3. The weakly supervised learning method of the Gramineae lodging detection model according to claim 2, characterized in that: The S2 includes: Performing image enhancement and normalization processing on the acquired Gramineae plant images to obtain positive sample pairs; using enhanced samples generated for images other than the Gramineae plant images as negative sample pairs; the positive sample pairs and the negative sample pairs belong to the input image; The positive sample pair and the negative sample pair are processed by using the Gramineae plant lodging detection model to obtain a positive sample pair feature vector and a negative sample feature vector, respectively; Based on the positive sample pair feature vector and the negative sample feature vector, a pre-training loss function is used to perform calculation to obtain a pre-training loss result; The pre-training loss result is used to update the weights of the neural network through a back propagation algorithm and an Adam optimizer to obtain a pre-trained Gramineae lodging detection model.

4. The weakly supervised learning method of the Gramineae lodging detection model according to claim 3, characterized in that: The expression of the feature vector of the positive sample pair is: The expression of the negative sample feature vector is: in, represents the first positive sample feature vector, f represents the output layer function, represents the first positive sample, represents the second positive sample feature vector, represents the second positive sample, represents negative samples, Represents the negative sample feature vector.

5. The weakly supervised learning method of the Gramineae lodging detection model according to claim 3, characterized in that: The expression of the pre-training loss result is: Among them, Loss represents the pre-training loss result, n represents the number of positive sample pairs, exp represents the exponential form of the natural constant, and d represents the distance in the feature space. represents the first positive sample feature vector, represents the second positive sample feature vector, τ represents the temperature parameter, Represents the negative sample feature vector, i represents the positive sample pair number, and k represents the negative sample pair number.

6. The weakly supervised learning method of the Gramineae lodging detection model according to claim 1, characterized in that: The S3 includes: Freeze the weights of the pre-trained Gramineae lodging detection model, unfreeze the residual block and output layer at the end of the convolutional layer, and obtain the Gramineae lodging detection model for weakly supervised learning; A small amount of images of Gramineae plants with lodging annotated and images of normal Gramineae plants are used as weakly supervised input data, and input into the Gramineae plant lodging detection model for weakly supervised learning to obtain weakly supervised learning results; Based on the weakly supervised learning results, the weakly supervised loss function is used to perform parameter optimization to obtain a trained Gramineae lodging detection model.

7. The weakly supervised learning method for the Gramineae lodging detection model according to claim 1, characterized in that: The expression of the weak supervision loss function is: Among them, L proxy represents the result of weak supervision loss function, N represents the number of weak supervision input data, represents the normal rate, d represents the distance in the feature space, z i represents the feature vector of a normal Gramineae plant image, p normal Indicates the number of normal Gramineae plant images after update, represents the lodging judgment function, max represents the maximum value function, and m represents the boundary distance of the hyperparameter. Represents the label of the normal Gramineae image i1, i1 represents the normal Gramineae image number, α represents the agent point learning rate, and n1 represents the current number of normal Gramineae images.

8. The weakly supervised learning method for the Gramineae lodging detection model according to claim 1, characterized in that: The method of performing lodging detection on a Gramineae plant image by using a Gramineae plant lodging detection model comprises: Using the Euclidean distance of the output results of the Gramineae lodging detection model, the anomaly score is obtained by calculation: Score anomaly =||z-μ||2; Among them, Score anomaly represents the abnormality score, z represents the output result of the Gramineae lodging detection model, μ represents the distribution center, represents the norm; Based on the abnormality score threshold, the abnormality score is analyzed to obtain a lodging detection result.

9. The weakly supervised learning method of the Gramineae lodging detection model according to claim 1, characterized in that: The process of acquiring the Gramineae plant image comprises: RGB image data of grass plants at different growth stages and under different lighting conditions are collected as grass plant images; wherein the growth stages include heading stage, filling stage and maturity stage, and the lighting conditions include morning light conditions, noon light conditions, evening conditions and uniform light conditions.