CN114881928A - Wheat frost disease detection method and system based on deep cost sensitive learning - Google Patents

Wheat frost disease detection method and system based on deep cost sensitive learning Download PDF

Info

Publication number
CN114881928A
CN114881928A CN202210343261.8A CN202210343261A CN114881928A CN 114881928 A CN114881928 A CN 114881928A CN 202210343261 A CN202210343261 A CN 202210343261A CN 114881928 A CN114881928 A CN 114881928A
Authority
CN
China
Prior art keywords
layer
wheat
disease detection
frost
samples
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210343261.8A
Other languages
Chinese (zh)
Inventor
王杨
曹淑建
刘海鹏
汪萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology filed Critical Hefei University of Technology
Priority to CN202210343261.8A priority Critical patent/CN114881928A/en
Publication of CN114881928A publication Critical patent/CN114881928A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30188Vegetation; Agriculture
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a wheat frost disease detection method and system based on deep cost sensitive learning, relating to the technical field of artificial intelligence and comprising the following steps: collecting hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples; preprocessing the initial sample to obtain a training data set; constructing a wheat frost disease detection model, introducing cost-sensitive learning, inputting the training data set into the wheat frost disease detection model for training until a loss function is converged, and obtaining an optimal wheat frost disease detection model; and detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model to obtain a disease detection result. The method can develop a machine learning method suitable for detecting the frost damage of the wheat on the basis of an unbalanced hyperspectral wheat frost data set, and overcomes the difficulty caused by unbalanced category in the training process.

Description

Wheat frost disease detection method and system based on deep cost sensitive learning
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a wheat frost disease detection method and system based on deep cost sensitive learning.
Background
The frost suffered by the wheat in the growth period can lead to a great reduction of yield, and brings serious economic loss to growers. In order to reduce the effect of frost on yield, existing strategies can be divided into the following three categories: development of frost-resistant wheat varieties, pre-season management and treatment after frost occurs. Until now, the measures taken after frost have been mainly grazing, harvesting, storing feed or continuing harvesting, and the success of any measure taken after frost has been determined by the rapid identification of the frost region and the degree of damage. Therefore, the rapid identification of frost regions has a very important impact on optimizing management schemes to ensure optimal economic benefits.
At present, the detection of frost suffered by wheat depends on visual observation of physical symptoms such as plant components (head, leaves or stems), and the like, and visible physical signs after the frost occurs begin to appear in 5 to 10 days, so that a grower cannot quickly and effectively obtain valuable and invisible information in crops through the physical signs; furthermore, visual inspection is not suitable, and particularly in large-area agriculture, the planting area is large, so that when the growth process of wheat is too slow, such as the booting stage and the heading stage, the grower cannot perform detection through human vision. At present, the remote sensing technology has good performance in the aspect of evaluating abiotic stress (nitrogen deficiency, water, salt, heat stress and the like) of crops, and the application of a multispectral or hyperspectral sensor to rapidly detect frost damage in a large range is regarded as a potential effective mode.
The hyperspectral image (HSI) captured by the hyperspectral sensor can obviously provide state information of related crops, but the amount of hyperspectral remote sensing data is huge, and the efficiency is very low or even fails when the hyperspectral image is processed by using a traditional processing method. In recent years, the deep learning technology thoroughly changes the processing mode of remote sensing data, great success is achieved in various hyperspectral image tasks, and an important advantage of using the deep learning technology is that a user can automatically and directly learn from data by constructing a deep model aiming at specific tasks (such as classification, regression and detection) without feature engineering. However, such deep learning models typically contain a large number of parameters, and in order to avoid overfitting, training of the model requires a sufficiently large data set, typically consisting of hundreds of thousands of labeled samples (hyperspectral samples contain information such as one-dimensional vectors of spectral data or two-dimensional matrices of spatial data or three-dimensional data cubes containing both spectral and spatial information). In addition to the lack of labeled datasets making it very difficult to apply deep learning on HSI data, there is a problem with sample imbalance in hyperspectral datasets.
Therefore, how to develop a machine learning method suitable for detecting the damage of the wheat frost on an unbalanced hyperspectral wheat frost data set and overcome the difficulty caused by unbalanced category in the training process is a technical problem which needs to be solved by technical personnel in the field.
Disclosure of Invention
In view of the above, the invention provides a wheat frost disease detection method and system based on deep cost sensitive learning, wherein a one-dimensional convolutional neural network is used as a basic frame, a cost coefficient is introduced into a loss function, and the difficulty caused by class imbalance in the training process is overcome.
In order to achieve the above purpose, the invention provides the following technical scheme:
a wheat frost disease detection method based on deep cost sensitive learning comprises the following steps:
collecting hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples;
preprocessing the initial sample to obtain a training data set;
constructing a wheat frost disease detection model, introducing cost-sensitive learning, inputting the training data set into the wheat frost disease detection model for model training until a loss function is converged, and obtaining an optimal wheat frost disease detection model;
and detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model to obtain a disease detection result.
The technical effect of the technical scheme is as follows: the method can effectively detect the sample and improve the detection accuracy.
Optionally, the preprocessing the initial sample specifically includes the following steps:
standardizing all wave bands of the initial sample to obtain a standardized sample;
marking the standardized sample by taking the crop yield as an index to obtain a training data set; wherein samples below the average yield are considered frost damage samples, labeled 1; samples above the average yield are considered healthy samples, labeled 0.
The technical effect of the technical scheme is as follows: the collected data is suitable for detecting and identifying crops with narrow spectral characteristics, and a data set required by a training model is obtained through preprocessing.
Optionally, the constructed wheat frost disease detection model is a one-dimensional convolutional neural network, and specifically includes an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a third maximum pooling layer, a full-connection layer, and an output layer, which are connected in sequence.
Optionally, the model training specifically includes the following steps:
inputting the preprocessed training data set into a one-dimensional convolution neural network through an input layer;
each convolution layer performs convolution operation on the output data of the previous layer and extracts features, and the activation functions of the first convolution layer, the second convolution layer and the third convolution layer during training all adopt ReLU functions;
and the maximum pooling layer reduces the dimension of the features, maps the features into one-dimensional vectors in a third maximum pooling layer, sends the one-dimensional vectors into a full-link layer for secondary classification, and obtains a classification result through an output layer.
Optionally, the loss function is a cost-sensitive binary-class loss function designed based on cross entropy, and the specific formula is as follows:
Figure BDA0003580127500000031
in the formula, L w Representing the value of the objective function; w represents the weight to be trained in the one-dimensional convolutional neural network; n represents the number of samples; y is i Indicates the label condition of the ith sample, y i ∈{0,1};
Figure BDA0003580127500000032
Representing the probability that the ith sample is predicted to be a corrupted sample; c i Indicating category swatch as y i The cost coefficient of the sample classification error is calculated by the following formula:
Figure BDA0003580127500000041
in the formula, c represents a self-defined hyper-parameter; n is a radical of i Representing the number of ith samples, i ∈ {0,1 }.
The technical effect of the technical scheme is as follows: by introducing the cost coefficient, the misclassification costs of different types of labels have larger difference, and on the basis that the cross entropy is used as a loss function, the larger cost is used for the misclassification of the damaged samples, so that the loss function is larger once the samples marked as 1 are misclassified.
The invention also provides a wheat frost disease detection system based on deep cost sensitive learning, which comprises the following steps:
the acquisition module is used for acquiring hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples;
the processing module is used for preprocessing the initial sample to obtain a training data set;
the construction module is used for constructing a wheat frost disease detection model;
the training module is used for introducing cost-sensitive learning, inputting the training data set into a wheat frost disease detection model for model training until a loss function is converged, and obtaining an optimal wheat frost disease detection model;
and the detection module is used for detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model and acquiring a disease detection result.
Optionally, the processing module includes a standardization unit and a marking unit, and the standardization unit is connected with the marking unit;
the normalization unit is used for normalizing all wave bands of the initial sample to obtain a normalized sample;
the marking unit is used for marking the standardized samples by taking the crop yield as an index to obtain a training data set; wherein samples below the average yield are considered frost damage samples, labeled 1; samples above the average yield are considered healthy samples, labeled 0.
Optionally, the wheat frost disease detection model is a one-dimensional convolutional neural network, and specifically includes an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a third maximum pooling layer, a full-link layer, and an output layer, which are connected in sequence.
Optionally, the training module includes an input unit, a feature extraction unit, a feature dimension reduction unit, and an output unit, and all the structures are connected in sequence;
the input unit inputs the preprocessed training data set into the one-dimensional convolutional neural network through the input layer;
the feature extraction unit performs convolution operation on the output data of the previous layer through each convolution layer and extracts features, and the activation functions of the first convolution layer, the second convolution layer and the third convolution layer during training all adopt ReLU functions;
the feature dimension reduction unit is used for reducing the dimension of the features through the maximum pooling layer and mapping the features into one-dimensional vectors in the third maximum pooling layer;
and the output unit is used for sending the one-dimensional vectors into a full-connection layer for secondary classification, and then obtaining a classification result through an output layer.
Optionally, the loss function is a cost-sensitive binary-type loss function designed based on cross entropy.
According to the technical scheme, compared with the prior art, the wheat frost disease detection method and system based on the deep cost sensitive learning are provided according to the characteristics of small samples and unbalanced category number of a hyperspectral wheat frost data set, the cost sensitive deep learning method is provided, a one-dimensional convolutional neural network is used as a basic frame, and a cost coefficient is introduced into a loss function, so that on the basis that cross entropy is used as the loss function, higher cost is used for error classification of damaged samples, the inclination of a model to a few types of samples and a plurality of types of samples is balanced, the difficulty caused by unbalanced category in the training process is successfully overcome, and the accuracy of wheat frost disease detection is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIGS. 1(a) -1 (b) are schematic sampling diagrams;
FIG. 2 is a flow chart of a wheat frost disease detection method based on deep cost sensitive learning;
FIG. 3 is a schematic diagram of a 1D-CNN network framework;
fig. 4 is a structural diagram of a wheat frost disease detection system based on deep cost sensitive learning.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
The traditional machine learning methods commonly used for disease detection include Decision Tree (DT), Support Vector Machine (SVM) naive bayes algorithm, K-nearest neighbor (KNN), K-means algorithm, and the like. These algorithms have the advantages of low computational resource requirements, strong robustness, etc., and thus have become the mainstream machine learning method for a long time. The disease recognition is carried out by firstly extracting the crop characteristics and then selecting a proper machine learning method, and the classical methods play a vital role in the crop disease recognition application. However, with the popularization of large-scale planting, the traditional method for manually extracting the features cannot guarantee the timeliness of data acquisition, cannot efficiently process mass data, is easy to lose valuable features, and has large influence difference of different classifiers on the result of disease identification. Nowadays, deep learning dominates large-scale disease identification application by virtue of the advantages of no need of manual feature extraction, strong characterization capability and the like. For example, Monhanty S P successfully identifies 14 crops and 26 diseases by training a deep convolutional neural network, and the test accuracy rate reaches over 90 percent; amanda R uses a cassava disease data set acquired in the tanzania field, three diseases and two pests are successfully identified by training a convolutional neural network, and the accuracy of the model is as high as 93%; jiang et al collected data of two rice diseases and three wheat diseases by using wheat and rice as research objects, fine-tuned the pre-trained model, and finally the accuracy is as high as more than 98%.
However, deep learning requires massive data to understand the potential patterns of the data, so that it has a very strong dependency on the distribution of training data. When the training data distribution is unbalanced, the deep learning model may focus more on the categories of the majority of samples, thereby ignoring or misclassifying the minority of samples. A few samples, although of low percentage in the data, are very important. Currently, the main problem of imbalance solution is a sampling method, where sampling includes undersampling a majority of classes and oversampling a minority of classes, and the undersampling method balances the distribution of the classes by randomly removing the samples of the majority of classes, as shown in fig. 1(a), but this method may lose the original information. Oversampling, i.e., achieving class distribution balancing by copying samples of a small number of classes, as shown in fig. 1(b), reuses data but does not add additional information. In addition, data can also be synthesized by generating new samples of a few classes, but in this method, since the number of samples of a few classes contained in the original data set is rare, the learning cost of this method is large.
Therefore, in order to solve the above technical problems, an embodiment of the present invention discloses a wheat frost disease detection method based on deep cost sensitive learning, as shown in fig. 2, including the following steps: collecting hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples; preprocessing an initial sample to obtain a training data set; constructing a wheat frost disease detection model, introducing cost-sensitive learning, inputting a training data set into the wheat frost disease detection model for model training until a loss function is converged, and obtaining an optimal wheat frost disease detection model; and detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model to obtain a disease detection result.
A total of 16 commercial wheat varieties were found in the Frost dataset of this example: scepter, Wylah, wyakatchem, Cosmick, Young, Forrest, AUS30323, improse CL Plus, Scout, Mace, Cutlass, callingiri, Magenta, endire, Kunjin, corigin, which are affected by frost in different growth periods, so collecting data during different growth periods can obtain more information, which is helpful for popularization of experimental results.
Acquisition of hyperspectral dataASD (Access service device) set
Figure BDA0003580127500000081
The 4Hi-Res hyperspectral spectrometer can collect spectrum information of 350-2500nm, has 2151 wave bands in total, and the collected data is particularly suitable for detecting and identifying crops with narrow spectral characteristics. The method comprises the steps that a data collector collects hyperspectral hand-held samples once every two weeks during the period from 8 months 15 days to 9 months 23 days in 2018, in order to obtain the samples, the collector points an ASD spectrometer to each land, 1-5 samples are collected for each variety, and 1000 samples are collected in total.
After data collection, the collected initial sample is preprocessed, specifically including: standardizing 2151 wave bands of the initial sample to obtain a standardized sample; marking the standardized sample by taking the crop yield as an index to obtain a training data set; wherein samples below the average yield are considered frost damage samples, labeled 1; samples above the average yield are considered healthy samples, labeled 0. The total number of measurements for 16 wheat was 1000, with 940 healthy samples and 60 impaired samples.
In order to solve the problems that mass data need to be manually selected and the feature extraction capability is limited when hyperspectral data are detected by a traditional method, deep learning is adopted as a basic framework, specifically, 2151 wave band values are used as features of each sample, obviously, local features have relevance and can be extended to the whole. The RNN or CNN can well process samples with correlation between such features, but the RNN cannot be calculated in parallel, which is not acceptable for a long sequence of hyperspectral images, so the CNN is adopted, specifically, the wheat frost disease detection model constructed in this embodiment is a one-dimensional convolutional neural network (1D-CNN), the sequence is converted into a format of 2151 × 1, and further, since the difference between the features and the features is to be retained to the maximum, the used pooling manner is maximum pooling, and the specific structure is shown in fig. 3 and includes an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a third maximum pooling layer, a fully-connected layer and an output layer which are connected in sequence.
Further, the model training specifically comprises the following steps: inputting the preprocessed training data set into a one-dimensional convolution neural network through an input layer; each convolution layer performs convolution operation on the output data of the previous layer and extracts features, and the activation functions of the first convolution layer, the second convolution layer and the third convolution layer during training all adopt ReLU functions; and the maximum pooling layer reduces the dimension of the features, maps the features into one-dimensional vectors in a third maximum pooling layer, sends the one-dimensional vectors into a full-link layer for secondary classification, and obtains a classification result through an output layer.
In order to solve the problem of sample data unbalance, cost sensitive learning is introduced, namely, by introducing a cost coefficient, the misclassification costs of different types of labels have large difference. Specifically, in the Frost damage data, the Frost damage sample labeled 1 is 60, and the healthy sample labeled 0 is 940, i.e., the number ratio of the two types of samples is close to 1:16, which means that the occurrence rate of the healthy type is higher than the occurrence rate of the disease type, and the model is easy to shift toward most samples during the training process, thereby resulting in poor generalization ability of the model. Therefore, we use a larger cost for misclassification of the damaged samples based on cross-entropy (cross-entropy) as a loss function in this embodiment, so that the samples marked as 1 will cause larger loss once misclassified.
Therefore, the loss function in this embodiment is a cost-sensitive binary loss function designed based on cross entropy, and the specific formula is as follows:
Figure BDA0003580127500000091
in the formula, L w Representing the value of the objective function; w represents the weight to be trained in the one-dimensional convolutional neural network; n represents the number of samples; y is i Indicates the label condition of the ith sample, y i ∈{0,1};
Figure BDA0003580127500000092
Representing the probability that the ith sample is predicted to be a corrupted sample; c i Indicating category swatch as y i The cost coefficient of the sample classification error is calculated by the following formula:
Figure BDA0003580127500000101
in the formula, c represents a self-defined hyper-parameter; n is a radical of i Representing the number of ith samples, i ∈ {0,1 }.
Next, a more detailed analysis of the one-dimensional convolutional neural network is performed:
one convolution layer conv (c1, c2, s) shows that the convolution layer conv reads a group of c1 channels, and outputs a group of c2 characteristic channels after convolution operation with window side length s. The spatial dimension of the output feature is typically 1/s of the spatial dimension of the input map, s representing the window sliding step (stride) at the time of the convolution operation;
a pooling layer pool (k, s, type) performs type pooling operation on input features by using the step length of s (for example, max represents that the maximum value in a neighborhood window is given to a central pixel, average represents that the average value of all pixels in the neighborhood window is given to the central pixel), and if the side length of each neighborhood window is k, the output space size is 1/s of the input space size;
a layer of linear rectifying elements ReLU acts as an activation function, setting to zero any value in the input data that is less than zero, while values greater than or equal to zero are unchanged;
a batch regularization layer bnorm subtracts an approximate mean value from the input data and divides the subtracted result by an approximate standard deviation, so that the mean value of the output data is approximately zero and the standard deviation is approximately 1;
a full link layer linear (n1, n2) maps the input feature representation to the sample's label space;
input signal X ═ X of soft threshold layer softmax 1 ,...,x n ]Should be a probability vector, any component x of which i Representing the probability that the corresponding pixel in the network model prediction input, image belongs to the ith class of the n classes. softmax function pass pairEach component of X is processed by exponential transformation and overall normalization to output a normalized probability vector y ═ y 1 ,...,y n-1 ],y i ∈[0,1],∑y i =1。
The complete process in the one-dimensional convolutional neural network is as follows: input- > conv1(1,64,7) - > bnorm- > relu- > pool (9,9, max) - > conv1_ output ═ conv2(64,128,7) - > bnorm- > relu- > pool (5,5, max) - > conv2_ output ═ conv3(128,32,7) - > bnorm- > relu- > pool (7,7, max) - > Learn (160,2) - > softmax- > output. In the conv1 layer to which Input is Input, the Input signature channel c1 is 1 because 2151 bands in the Input data are converted into a signature graph and are pulled into one channel. In the fully-connected layer before the output is obtained, the number num _ of _ class of the output feature map indicates that the categories defined in the task are several, the output has several bands, each pixel of the output is a vector with the num _ of _ class dimension, the dimension of the output is unchanged after the processing of the softmax layer, and the value of each component is normalized. It should be noted that there are only two types of detection tasks, the healthy sample is set to 0 and the damaged sample is marked as 1.
Iteratively updated parameters are included in the model and are referred to as learning objects. On the premise of giving one input, the values of the outputs all depend on the values of the parameters, and the models use the parameters to perform feature extraction and class division on the input, so as to output the outputs. The parameters to be learned include convolution filters in the conv layer, bias vectors, and mean and standard deviation in bnorm. In order to make the prediction class in Output as close as possible to the correct label in label, a Loss function Loss (Loss) is calculated, which is usually in the form of Cross Entropy (Cross Entropy). The smaller the Loss value, the more accurate the L prediction. The embodiment of the invention adopts Cross Encopy plus a cost sensitive coefficient, improves the stability of the training stage, and solves the problem that the training result is submerged by a sample due to the imbalance of the proportion of positive and negative samples. Although the Loss may be large, since the parameters of the network are initially randomly initialized, the Loss gradually converges to a minimum value by iteratively updating the parameters. In a typical Iteration (Iteration), a value is calculated for each parameter that makes the partial derivative of Loss to the parameter zero, called Gradient (Gradient), and then the Gradient takes a negative value to add to the parameter, which makes the parameter combination update direction of the whole network opposite to the direction in which Loss rises fastest, hence the so-called Gradient decline method.
Finally, the effectiveness of the deep cost sensitive learning provided by the embodiment is verified through experiments, and experiments of 3 schemes are performed at the same time: scheme 1 is to use the cost sensitive learning proposed in this example to work on the Frost data set to obtain results; scheme 2 is to remove cost sensitive learning from the model in scheme 1 and apply to Frost to obtain a result; scenario 3 is to apply the generating countermeasure network to the Frost dataset. Comparison of the results of scheme 1, scheme 2 and scheme 3 allows to evaluate the effectiveness of the method proposed herein.
Scheme 1: 70% of the samples in the Frost dataset were used for training, and 30% of the samples were left for testing. We have adopted the pytoreh deep learning framework to implement the network in this embodiment, the training uses the GeForce RTX 3090 display card, the total training times is set to 1500, through the continuous training and testing on this data set, finally the size of the batch is set to 256, i.e. 256 samples are randomly input at a time, in addition, in order to ensure the equal input of the two types of samples, the samples with less number are copied to ensure that the sample number ratio of the two types of labels can be maintained in a certain range. By adopting Adam as an optimization method, the learning rate is initialized to 0.001, and the learning rate is reduced to 10% of the current size after each 300 times of training. The above settings are summarized as shown in table 1.
TABLE 1 parameter settings
Figure BDA0003580127500000121
Scheme 2: this scheme is designed to verify the validity of cost sensitive learning in scheme 1. For this reason we have eliminated cost sensitive learning and all other settings are consistent with scheme 1.
Scheme 3: this scheme is proposed in order to verify the validity of scheme 1. The generative countermeasure network is used as a basic model, which can be used to add samples to adjust the data distribution. Specifically, given a random vector z (sampled randomly from a standard gaussian distribution), which is input to a neural network, a feature (which may be a picture, text, etc.) is output, the scheme outputs a 2151-dimensional feature:
x * =g(z);
wherein g (-) is the neural network that generated the sample; z represents the input random vector; x is the number of * Representing the characteristics of the generated sample by x * The original data is supplemented as enhancement data for classification.
Experimental results and analysis: the Frost data set was used to predict and calculate index values for the scenario 1(CSTL), scenario 2(Baseline), and scenario 3(GAN) we designed as follows in table 2.
TABLE 2 indices of different methods
Figure BDA0003580127500000131
The results in Table 2 show that the method proposed in this example has a correct ratio and F 1 Are all better in score than other methods. Although the GAN method can provide more artificial examples for the classifier, the Accuracy (Accuracy ═ 0.841) of the method is lower than that of the method (Accuracy ═ 0.940) provided in this embodiment, which indicates that the confidence of the classification learning cannot be improved by simply increasing the number of samples. In contrast, our proposed cost-sensitive learning can improve the confidence of the classifier by adjusting the learning weights of different classes. In particular, when tested on the original model without any method added, it also produced results with a correctness of 0.94, indicating that overfitting occurred. In this case, the model classifies all samples into healthy classes, which improves accuracy in recall R and F 1 It can be demonstrated fractionally that both are significantly lower than our proposed method. Furthermore, our confusion matrix obtained with the CSTL process (as shown in Table 3 below) also shows that the CSTL process can still be usedA small number of sample groups can be classified.
TABLE 3 confusion matrix
Figure BDA0003580127500000132
Note: (0- >1) indicates that the negative sample is predicted as the positive sample, and (1- >0) indicates that the positive sample is predicted as the negative sample.
Example 2
The embodiment of the invention provides a wheat frost disease detection system based on deep cost sensitive learning, as shown in fig. 4, comprising:
the acquisition module is used for acquiring hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples;
the processing module is used for preprocessing the initial sample to obtain a training data set;
the construction module is used for constructing a wheat frost disease detection model;
the training module is used for introducing cost-sensitive learning, inputting the training data set into the wheat frost disease detection model for model training until a loss function is converged, and obtaining an optimal wheat frost disease detection model;
and the detection module is used for detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model and acquiring a disease detection result.
Further, the processing module comprises a standardization unit and a marking unit, and the standardization unit is connected with the marking unit;
the normalization unit is used for normalizing all wave bands of the initial sample to obtain a normalized sample;
the marking unit is used for marking the standardized samples by taking the crop yield as an index to obtain a training data set; wherein samples below the average yield are considered frost damage samples, labeled 1; samples above the average yield are considered healthy samples, labeled 0.
Further, the wheat frost disease detection model is a one-dimensional convolutional neural network, and specifically comprises an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a third maximum pooling layer, a full-connection layer and an output layer which are sequentially connected.
Further, the training module comprises an input unit, a feature extraction unit, a feature dimension reduction unit and an output unit, and all the structures are connected in sequence;
the input unit is used for inputting the preprocessed training data set into the one-dimensional convolutional neural network through the input layer;
the characteristic extraction unit is used for performing convolution operation on the output data of the previous layer through each convolution layer and extracting characteristics, and the activation functions of the first convolution layer, the second convolution layer and the third convolution layer during training all adopt ReLU functions;
the feature dimension reduction unit is used for reducing the dimension of the features through the maximum pooling layer and mapping the features into one-dimensional vectors in the third maximum pooling layer;
and the output unit is used for sending the one-dimensional vector to a full-connection layer for secondary classification and then acquiring a classification result through an output layer.
Further, the loss function is a cost-sensitive binary loss function designed based on cross entropy.
According to the characteristics of a small sample of a hyperspectral wheat frost data set and unbalanced category number, the invention provides a cost-sensitive deep learning method, namely, a one-dimensional convolutional neural network is used as a basic frame, a cost coefficient is introduced into a loss function, and the difficulty caused by unbalanced categories in the training process is successfully overcome. The accuracy, precision, recall and F are used comprehensively 1 The scores were evaluated on the model. Experimental results show that the method provided by the invention has better performance on a Frost data set, and is superior to other common methods such as common 1D-CNN and GAN methods.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A wheat frost disease detection method based on deep cost sensitive learning is characterized by comprising the following steps:
collecting hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples;
preprocessing the initial sample to obtain a training data set;
constructing a wheat frost disease detection model, introducing cost-sensitive learning, inputting the training data set into the wheat frost disease detection model for model training until a loss function is converged, and obtaining an optimal wheat frost disease detection model;
and detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model to obtain a disease detection result.
2. The wheat frost disease detection method based on deep cost sensitive learning according to claim 1, characterized in that the preliminary sample is preprocessed, specifically comprising the following steps:
standardizing all wave bands of the initial sample to obtain a standardized sample;
marking the standardized sample by taking the crop yield as an index to obtain a training data set; wherein samples below the average yield are considered frost damage samples, labeled 1; samples above the average yield are considered healthy samples, labeled 0.
3. The wheat frost disease detection method based on deep cost sensitive learning according to claim 1, characterized in that the constructed wheat frost disease detection model is a one-dimensional convolutional neural network, and specifically comprises an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a third maximum pooling layer, a full-connection layer and an output layer which are sequentially connected.
4. The wheat frost disease detection method based on deep cost sensitive learning according to claim 3, wherein the model training specifically comprises the following steps:
inputting the preprocessed training data set into a one-dimensional convolution neural network through an input layer;
each convolution layer performs convolution operation on the output data of the previous layer and extracts features, and the activation functions of the first convolution layer, the second convolution layer and the third convolution layer during training all adopt ReLU functions;
and the maximum pooling layer reduces the dimension of the features, maps the features into one-dimensional vectors in a third maximum pooling layer, sends the one-dimensional vectors into a full-link layer for secondary classification, and obtains a classification result through an output layer.
5. The wheat frost disease detection method based on deep cost-sensitive learning according to claim 1, wherein the loss function is a cost-sensitive binary-class loss function designed based on cross entropy, and the specific formula is as follows:
Figure FDA0003580127490000021
in the formula, L w Representing the value of the objective function; w represents the weight to be trained in the one-dimensional convolutional neural network(ii) a N represents the number of samples; y is i Indicates the label condition of the ith sample, y i ∈{0,1};
Figure FDA0003580127490000022
Representing the probability that the ith sample is predicted to be a corrupted sample; c i Indicating category swatch as y i The cost coefficient of the sample classification error is calculated by the following formula:
Figure FDA0003580127490000023
in the formula, c represents a self-defined hyper-parameter; n is a radical of i Representing the number of ith samples, i ∈ {0,1 }.
6. A wheat frost disease detection system based on deep cost sensitive learning is characterized by comprising:
the acquisition module is used for acquiring hyperspectral data of different wheat varieties in different growth periods through a hyperspectral meter to serve as initial samples;
the processing module is used for preprocessing the initial sample to obtain a training data set;
the construction module is used for constructing a wheat frost disease detection model;
the training module is used for introducing cost-sensitive learning, inputting the training data set into a wheat frost disease detection model for model training until a loss function is converged, and obtaining an optimal wheat frost disease detection model;
and the detection module is used for detecting hyperspectral data of the wheat by using the optimal wheat frost disease detection model and acquiring a disease detection result.
7. The wheat frost disease detection system based on deep cost-sensitive learning of claim 6, wherein the processing module comprises a standardization unit and a marking unit, and the standardization unit is connected with the marking unit;
the normalization unit is used for normalizing all wave bands of the initial sample to obtain a normalized sample;
the marking unit is used for marking the standardized samples by taking the crop yield as an index to obtain a training data set; wherein samples below the average yield are considered frost damage samples, labeled 1; samples above the average yield are considered healthy samples, labeled 0.
8. The wheat frost disease detection system based on deep cost-sensitive learning according to claim 6, wherein the wheat frost disease detection model is a one-dimensional convolutional neural network, and specifically comprises an input layer, a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a third convolutional layer, a third maximum pooling layer, a full-link layer and an output layer, which are sequentially connected.
9. The wheat frost disease detection system based on deep cost sensitive learning of claim 8, wherein the training module comprises an input unit, a feature extraction unit, a feature dimension reduction unit, and an output unit, and the structures are connected in sequence;
the input unit inputs the preprocessed training data set into the one-dimensional convolutional neural network through the input layer;
the feature extraction unit performs convolution operation on the output data of the previous layer through each convolution layer and extracts features, and the activation functions of the first convolution layer, the second convolution layer and the third convolution layer during training all adopt ReLU functions;
the feature dimension reduction unit is used for reducing the dimension of the features through the maximum pooling layer and mapping the features into one-dimensional vectors in the third maximum pooling layer;
and the output unit is used for sending the one-dimensional vectors into a full-connection layer for secondary classification, and then obtaining a classification result through an output layer.
10. The wheat frost disease detection system based on deep cost-sensitive learning of claim 6, wherein the loss function is a cost-sensitive binary loss function based on cross entropy design.
CN202210343261.8A 2022-04-02 2022-04-02 Wheat frost disease detection method and system based on deep cost sensitive learning Pending CN114881928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210343261.8A CN114881928A (en) 2022-04-02 2022-04-02 Wheat frost disease detection method and system based on deep cost sensitive learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210343261.8A CN114881928A (en) 2022-04-02 2022-04-02 Wheat frost disease detection method and system based on deep cost sensitive learning

Publications (1)

Publication Number Publication Date
CN114881928A true CN114881928A (en) 2022-08-09

Family

ID=82669128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210343261.8A Pending CN114881928A (en) 2022-04-02 2022-04-02 Wheat frost disease detection method and system based on deep cost sensitive learning

Country Status (1)

Country Link
CN (1) CN114881928A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537777A (en) * 2018-03-20 2018-09-14 西京学院 A kind of crop disease recognition methods based on neural network
CN111275113A (en) * 2020-01-20 2020-06-12 西安理工大学 Skew time series abnormity detection method based on cost sensitive hybrid network
CN112446298A (en) * 2020-10-31 2021-03-05 复旦大学 Hyperspectral nondestructive testing method for wheat scab

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537777A (en) * 2018-03-20 2018-09-14 西京学院 A kind of crop disease recognition methods based on neural network
CN111275113A (en) * 2020-01-20 2020-06-12 西安理工大学 Skew time series abnormity detection method based on cost sensitive hybrid network
CN112446298A (en) * 2020-10-31 2021-03-05 复旦大学 Hyperspectral nondestructive testing method for wheat scab

Similar Documents

Publication Publication Date Title
CN111369540B (en) Plant leaf disease identification method based on mask convolutional neural network
Mardanisamani et al. Crop lodging prediction from UAV-acquired images of wheat and canola using a DCNN augmented with handcrafted texture features
CN111179216B (en) Crop disease identification method based on image processing and convolutional neural network
Hao et al. Growing period classification of Gynura bicolor DC using GL-CNN
Tanwar et al. Deep learning-based hybrid model for severity prediction of leaf smut sugarcane infection
CN113657294A (en) Crop disease and insect pest detection method and system based on computer vision
David et al. Literature review of disease detection in tomato leaf using deep learning techniques
Yu et al. Recognition method of soybean leaf diseases using residual neural network based on transfer learning
Zhang et al. Robust image segmentation method for cotton leaf under natural conditions based on immune algorithm and PCNN algorithm
Kumar et al. Apple Sweetness Measurement and Fruit Disease Prediction Using Image Processing Techniques Based on Human‐Computer Interaction for Industry 4.0
Sharma et al. A New Dawn for Tomato-spotted wilt virus Detection and Intensity Classification: A CNN and LSTM Ensemble Model
Kumar et al. A Novel Zero-Shot Learning Approach for Multi-Classification of Orange Sooty Mold Disease Severity Levels
Islam et al. Nitrogen fertilizer recommendation for paddies through automating the leaf color chart (LCC)
Brar et al. A smart approach to coconut leaf spot disease classification using computer vision and deep learning technique
Ambashtha et al. Leaf disease detection in crops based on single-hidden layer feed-forward neural network and hierarchal temporary memory
Chawal et al. Rice plant disease detection using twin support vector machine (TSVM)
Seelwal et al. Automatic detection of rice diseases using deep convolutional neural networks with sgd and adam
Chaturvedi et al. Efficient Method for Tomato Leaf Disease Detection and Classification based on Hybrid Model of CNN and Extreme Learning Machine
Kukana Hybrid Machine Learning Algorithm-Based Paddy Leave Disease Detection System
CN112528726A (en) Aphis gossypii insect pest monitoring method and system based on spectral imaging and deep learning
Megalingam et al. Coconut trees classification based on height, inclination, and orientation using MIN-SVM algorithm
CN114881928A (en) Wheat frost disease detection method and system based on deep cost sensitive learning
Chaithanya et al. Wheat Leaf Disease classification using modified ResNet50 Convolutional Neural Network model
Cao et al. Plant leaf segmentation and phenotypic analysis based on fully convolutional neural network
Almola et al. Citrus diseases recognition by using CNN

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination