CN111967424A - Buckwheat disease identification method based on convolutional neural network - Google Patents

Buckwheat disease identification method based on convolutional neural network Download PDF

Info

Publication number
CN111967424A
CN111967424A CN202010879986.XA CN202010879986A CN111967424A CN 111967424 A CN111967424 A CN 111967424A CN 202010879986 A CN202010879986 A CN 202010879986A CN 111967424 A CN111967424 A CN 111967424A
Authority
CN
China
Prior art keywords
buckwheat
convolution
disease
layer
neural network
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
CN202010879986.XA
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.)
Southwest University
Original Assignee
Southwest University
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 Southwest University filed Critical Southwest University
Priority to CN202010879986.XA priority Critical patent/CN111967424A/en
Publication of CN111967424A publication Critical patent/CN111967424A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/20Scenes; Scene-specific elements in augmented reality scenes
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a buckwheat disease identification method based on a convolutional neural network, which comprises the following steps: firstly, detecting a buckwheat disease area by adopting a method based on the combination of MSER and CNN, and separating a disease area and a non-disease area from an image; and then, sending the image of the disease area into a convolutional neural network based on the augmentation structure improvement and a cosine similarity convolution mode for training and identification. The method can realize accurate identification of the buckwheat diseases.

Description

Buckwheat disease identification method based on convolutional neural network
Technical Field
The invention mainly relates to the related technical field of buckwheat disease detection, in particular to a buckwheat disease identification method based on a convolutional neural network.
Background
Buckwheat (Fagopyrum spp.) is an important coarse cereal with rich nutrition, is rich in nutritional ingredients, contains components such as protein, cellulose, saccharides and antioxidant substance rutin which are very beneficial to human health, has strong planting adaptability, is cold-resistant and barren, and is a high-quality crop resource with development potential.
However, the disease greatly affects the yield and quality of buckwheat, so that the nutritional value, the feed quality and the like are low. In recent years, with the gradual expansion of buckwheat planting area, the traditional small-scale production is changed into modern mechanized production, the occurrence types and the damage degree of diseases are increased, and thus the demand for disease prevention and control is increased. Accurately and timely distinguishing the disease condition of the buckwheat, and is an important means for preventing and controlling. The existing buckwheat disease identification means mainly adopts manual identification, has high requirements on professional knowledge and low efficiency, and often misses the optimal control period.
In agricultural production, the method has important application value for automatically classifying the crop disease images. The traditional classification algorithm based on artificial feature extraction has the problems of high requirement on professional knowledge, time and labor consumption, difficulty in extracting high-quality features and the like, and the deep learning is utilized to obtain the multi-scale features of the crop diseases, so that the feature expression of different diseases can be more accurately realized, and the accurate identification of the crop diseases is facilitated. In the traditional image-based automatic classification research, the crop disease identification is mainly focused on the research of field crops, the planting area is large, the collection and screening of samples are relatively easy, the established sample library is standard, the disease and healthy crop image samples are clear, and the imaging quality is good, so that the existing deep learning framework can achieve a good identification effect on the field crops. Buckwheat serving as a coarse cereal crop does not have a standard image database, is mostly planted in a mountain area and is limited by sampling conditions, and phenomena of low imaging quality, serious noise interference, uneven sample illumination, overlapped leaves and the like exist, so that an ideal effect is difficult to obtain by adopting a traditional identification method.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a buckwheat disease identification method based on a convolutional neural network by combining the prior art and starting from practical application, and the buckwheat disease identification method can realize accurate identification of buckwheat diseases.
The technical scheme of the invention is as follows:
a buckwheat disease identification method based on a convolutional neural network comprises the following steps:
firstly, detecting a buckwheat disease area by adopting a method based on the combination of MSER and CNN, and separating a disease area and a non-disease area from an image;
and then, sending the image of the disease area into a convolutional neural network based on the augmentation structure improvement and a cosine similarity convolution mode for training and identification.
Further, the method for detecting the buckwheat disease area based on the combination of MSER and CNN specifically comprises the following steps,
step 1, detecting the disease area by adopting a method based on MSER, wherein the specific implementation process of the MSER algorithm is as follows:
(1) carrying out gray level processing on the buckwheat disease image in a gray level interval [0, 255%]Carrying out binarization on the gray level image by 256 different threshold values; let QtRepresenting a certain connected region in the binary image corresponding to the binary threshold value t, when the binary threshold value is changed from t to t + delta and t-delta, delta is a change value, and the connected region QtCorrespondingly become Qt+ΔAnd Qt-Δ
(2) Calculating an area ratio Q (t) ═ Q when the threshold is tt+Δ-Qt-Δ|/|QtWhen QtIs less changed with the change of the binary threshold value t, namely qtAt local minimum, QtIs the maximally stable extremal region, whereintI denotes a connected component QtArea, | Qt+Δ-Qt-ΔI represents Qt+ΔMinus Qt-ΔThe area of the remaining region;
in the process of MSER detection, some large rectangular frames contain small rectangular frames, so the regions are merged, and the small rectangular frames are removed, and the merging method is as follows:
for the merging of the two regions, let the parameter of the connected region 1 be β1,χ111The parameter of the connected region 2 is beta2,χ222Wherein χ and β represent the minimum and maximum values of the minimum bounding rectangle of the connected region in the y-axis direction, respectively, and represent the minimum and maximum values of the minimum bounding rectangle of the connected region in the x-axis direction, respectively, then the connected region 1 including the connected region 2 can be determined according to the formula (1)
Figure BDA0002653821680000031
Through the above steps, the diseased area is selected.
Further, a method based on MSER and CNN combination is adopted to detect buckwheat disease areas, and the method further comprises the following steps:
step 2, designing a CNN binary classifier on the basis of the AlexNet network, further distinguishing diseased regions from non-diseased regions, and avoiding detection frame overlapping and false detection, wherein the specific processing flow is as follows:
firstly inputting a 32 × 32 image, then extracting the features of the input image by using 16 convolution kernels of 3 × 3 to further obtain a 32 × 32 × 16 convolution layer, then reducing the data dimension of the convolution layer by using a 2 × 2 maximum pooling method to obtain a 16 × 16 × 16 pixel pooling layer, further extracting the features of a higher layer by using 32 convolution kernels of 5 × 5, finally obtaining 8 × 8 × 32 output by using a 2 × 2 maximum pooling method, connecting all the output features to a full-connection layer, performing weight calculation according to a feature vector, outputting the probability belonging to two categories, and further judging whether the input image is a disease area.
Further, when the CNN model is trained, Adam is used as an optimization algorithm, the learning rate is set to be 0.001, the learning rate reduction multiplier factor is set to be 0.1, the loss function selects a cross entropy loss function, and the training samples are obtained by cutting from the original image, wherein the positive sample is a cut image of a diseased region, and the negative sample is a cut image of a non-diseased region.
Further, the convolution neural network based on the increment structure improvement is characterized in that a two-stage increment structure is added on a traditional convolution neural network basic frame, the leaf intersection is carried out, the feature extraction is accurately carried out on the low-quality buckwheat image, and the specific processing flow is as follows:
(1) firstly, inputting a buckwheat disease image with the size of 64 multiplied by 64 into a network, and then performing convolution operation by using 136 convolution kernels with the size of 9 multiplied by 9 to obtain 136 characteristic maps of 56 multiplied by 56;
(2) sending the feature map into an initiation 1 structure, wherein all initiation structures in the network adopt the same convolution operation, namely the size of the feature map is not changed, the size of the pooling windows in all the subsequent pooling layers is 2 multiplied by 2, and the size of the feature map after pooling is changed into 28 multiplied by 28;
(3) obtaining 200 24 × 24 feature maps by using 200 5 × 5 convolution kernels, sending the feature maps into an acceptance 2 structure, performing pooling, and obtaining 264 8 × 8 feature maps by using 264 5 × 5 convolution kernels;
(4) after passing through the pooling layer, the data enters the last convolution layer, the number of convolution kernels is 520, the size of the convolution kernels is 3 x 3, 520 feature maps of 2 x 2 are obtained, and finally, a full connection layer and a classification output layer are obtained.
Further, in an initiation 1 structure, 1 × 1, 3 × 3, 1 × 5, 5 × 1, 4 convolution kernels with different scales are respectively used for multi-channel feature extraction, and finally channels are fused;
in the concept 2 structure, 1 × 5 and 5 × 1 convolutions in concept 1 are replaced by 1 × 3 and 3 × 1 convolutions, respectively, in the 2 nd convolutional layer of the network, the number of input feature maps is greater than that in the first layer, and the number of channels in the structure is increased from 30 to 40.
Further, the convolutional neural network based on the cosine similarity convolution mode takes the input feature map and the convolution kernel as two vectors in the operation of the convolutional layer, and calculates the correlation between the two vectors, and the specific method is as follows:
in the convolutional neural network, the output value of the J-th feature map of the i-th convolutional layer is assumed to be:
Figure BDA0002653821680000051
where g (.) represents an activation function, M represents a set of input feature maps,
Figure BDA0002653821680000058
represents the convolution kernel vector adopted between the I-th characteristic diagram and the J-th characteristic diagram,
Figure BDA0002653821680000059
is an offset;
the cosine similarity formula is an index for measuring the similarity between two vectors, and calculates the cosine value of the included angle between the two vectors, the smaller the included angle is, the higher the correlation between the two vectors is, the larger the calculated cosine value is, the value range is [ -1,1], and the following is the calculation mode of the cosine similarity between the vector X and the vector Y, wherein n represents the dimension of the vector:
Figure BDA0002653821680000052
by using
Figure BDA0002653821680000053
Representing a similarity metric function between the input feature map of the convolution layer of the l-th layer and the convolution kernel, and X represents an input feature map vector, the convolution operation based on cosine similarity can be expressed as the following equation:
Figure BDA0002653821680000054
where r × z represents the size of the convolution kernel, wijAnd xijRepresenting the coefficients in the convolution kernel and the feature map, respectively, then the similarity metric function can be expressed as:
Figure BDA0002653821680000055
therefore, the output value of the convolution layer of the l-th layer based on the cosine similarity calculation is:
Figure BDA0002653821680000056
wherein g (.) represents the activation function, when inputting the feature map and the convolution kernel
Figure BDA0002653821680000057
The higher the similarity of (2), the larger the output value of the convolutional layer.
The invention has the beneficial effects that:
firstly, detecting a buckwheat disease area, and accurately positioning the focus position; and then, a two-stage interception structure is added on the basis of a traditional convolutional neural network basic framework, so that the characteristics of the crossed leaves and the low-quality buckwheat image are accurately extracted, and the classification accuracy is improved. Meanwhile, in order to reduce the influence of illumination in the sampling process, the convolution based on cosine similarity is adopted to replace the traditional convolution operation, so that the sample under the condition of uneven illumination can be subjected to better feature extraction, and experiments prove that the method can be used for accurately identifying the buckwheat diseases.
Drawings
FIG. 1 is a network structure diagram of buckwheat disease area detection.
FIG. 2 is a diagram of a convolutional neural network structure for buckwheat disease identification.
FIG. 3 is a diagram of an initiation 1 structure.
FIG. 4 is a diagram of an initiation 2 structure.
Fig. 5 is a graph of the variation of the training loss value.
Fig. 6 is a graph of training accuracy change.
Fig. 7 is a comparison graph of two convolution operations.
Detailed Description
The invention is further described with reference to the accompanying drawings and specific embodiments. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and these equivalents also fall within the scope of the present application.
The embodiment of the invention provides a buckwheat insect pest identification method based on a convolutional neural network. The method mainly comprises the steps of detecting a disease area and identifying the buckwheat disease.
And (3) detection of a diseased area:
buckwheat diseases and insect pests frequently occur on leaves, the buckwheat disease and insect pest category is identified, and the region where the buckwheat disease occurs needs to be accurately detected from the image so as to extract the characteristics of the disease region. The detection of the disease area of the buckwheat is to separate the disease area and the non-disease area from the image and send the disease area to a network to finish training and identification. Aiming at the detection of buckwheat disease and insect pest areas, the embodiment provides a method for detecting buckwheat disease and insect pest areas based on the combination of MSER and CNN, and the specific implementation steps are as follows.
Step 1, detecting the disease area by adopting a method based on MSER, wherein the specific implementation process of the MSER algorithm is as follows:
(1) performing gray scale processing on the buckwheat disease image in a gray scale interval [0,255 ]]Carrying out binarization on the gray level image by 256 different threshold values; let QtRepresenting a certain connected region in the binary image corresponding to the binary threshold value t, when the binary threshold value is changed from t to t + delta and t-delta, delta is a change value, and the connected region QtCorrespondingly become Qt+ΔAnd Qt-Δ
(2) Calculating an area ratio Q (t) ═ Q when the threshold is tt+Δ-Qt-Δ|/|QtWhen QtIs less changed with the change of the binary threshold value t, namely qtAt local minimum, QtIs the maximally stable extremal region, whereintI denotes a connected component QtArea, | Qt+Δ-Qt-ΔI represents Qt+ΔMinus Qt-ΔThe remaining area of the rear.
In the process of MSER detection, some large rectangular frames contain small rectangular frames, so the areas are merged, the small rectangular frames are removed, and for the merging of the two areas, the parameter of the connected area 1 is set as beta1,χ111The parameter of the connected region 2 is beta2,χ222Wherein χ and β represent the minimum and maximum values of the minimum bounding rectangle of the connected region in the y-axis direction, respectively, and represent the minimum and maximum values of the minimum bounding rectangle of the connected region in the x-axis direction, respectively, then the connected region 1 including the connected region 2 can be determined according to equation (1):
Figure BDA0002653821680000071
through the above steps, the diseased area is selected. However, in the actual detection process, the superposition and the false detection of the diseased area and the non-diseased area still exist in the detection result, and the background fuzzy area and the blade edge area are falsely detected as the diseased area.
Step 2, in order to further distinguish the damaged area from the non-damaged area and avoid overlapping and false detection of the detection frames, a CNN binary classifier is designed on the basis of the AlexNet network in the embodiment, and the structure of the CNN binary classifier is shown in fig. 1. The network I comprises two convolution layers and two pooling layers, and the last full-connection layer is a binary classifier aiming at a diseased area and a non-diseased area. Firstly inputting a 32 x 32 image, then extracting the characteristics of the input image by 16 convolution kernels of 3 x 3 to further obtain a 32 x 16 convolution layer, then reducing the data dimension of the convolution layer by a 2 x 2 maximum pooling method to obtain a 16 x 16 pixel pooling layer, further extracting the characteristics of a higher layer by 32 convolution kernels of 5 x 5, and finally obtaining 8 x 32 output by the 2 x 2 maximum pooling method, connecting all the output characteristics to a full connection layer, performing weight calculation according to the characteristic vector, outputting the probability belonging to two categories, and further judging whether the input image is a disease area.
In training the CNN model, Adam is used herein as an optimization algorithm, the learning rate is set to 0.001, the learning rate reduction multiplier factor is set to 0.1, and the loss function is a cross entropy loss function. The training samples are obtained by cutting from the original image, wherein the positive sample is a cutting image of a diseased area, and the negative sample is a cutting image of a non-diseased area.
Experiments prove that the disease areas obtained after CNN classification can be seen to be more accurate in detection result, and cross frames and false detection of the disease areas are eliminated, so that the method can accurately classify the disease areas and non-disease areas of buckwheat.
The convolutional neural network structure for buckwheat disease identification:
the key for identifying the buckwheat diseases is to adopt a proper convolutional neural network structure. In general, the performance of convolutional neural networks is improved by increasing the depth and width of the network, i.e., increasing the hidden layer sum and the number of neurons in each layer. This results in a larger parameter space, easier overfitting, more computing resources needed, deeper networks, easy gradient disappearance, and difficult optimization. The method for solving the difficulty is to change full connection into sparse connection, and the convolution layer is also sparse connection, but the numerical calculation efficiency of asymmetric sparse data is low, and an optimal local sparse structure which can be approximated by a convolution network is needed to be found, so that the inclusion structure is introduced in the embodiment. Inclusion is the design of a network with an excellent local topology, i.e. multiple convolution or pooling operations are performed in parallel on the input image and all output results are stitched into a very deep feature map. Because different convolution operations and pooling operations of 1 × 1, 3 × 3, 5 × 5 and the like can obtain different information of the buckwheat disease image, parallel processing of the operations and combining all the results can obtain better disease image characterization.
In the convolutional neural network structure adopted in this embodiment, as shown in fig. 2, two indications are added to the network based on the conventional structure, and the specific processing flow is as follows: (1) first, an image of a buckwheat disease having a size of 64 × 64 is input to the network, and then, 136 convolution kernels having a size of 9 × 9 are used to perform convolution operation, thereby obtaining 136 feature maps of 56 × 56. (2) The feature map is fed into an initiation 1 structure, and all initiation structures in the network use the same convolution operation, i.e. the size of the feature map is not changed. The size of the pooling windows in all subsequent pooling layers is 2 × 2, so the size of the pooled feature map becomes 28 × 28. (3) 200 feature maps of 24 × 24 are obtained by using 200 convolution kernels of 5 × 5, and after the feature maps are sent to an acceptance 2 structure, the feature maps are subjected to pooling and then 264 convolution kernels of 5 × 5 are used to obtain 264 feature maps of 8 × 8. (4) After passing through the pooling layer, the data enters the last convolutional layer, the number of convolutional kernels is 520, and the size of the convolutional kernels is 3 × 3, so that 520 feature maps of 2 × 2 are obtained. And finally, a full connection layer and a classification output layer.
In the first two convolutional layers of the network, the receptive fields of 9 × 9 and 5 × 5 are respectively adopted, and in order to extract more feature information of different scales from a smaller receptive field and simultaneously expand the width and the depth of the network, the entrapment 1 and entrapment 2 structures are respectively added into the two convolutional layers, and the structures are shown in fig. 3 and fig. 4. In the concept 1 structure, 1 × 1, 3 × 3, 1 × 5, 5 × 1, 4 convolution kernels with different scales are respectively used for multi-channel feature extraction, and finally, the channels are fused. The 1 × 1 convolution of the uppermost layer can effectively reduce the number of channels of the input feature map and reduce the calculation cost of the network. The lowest layer of 1 × 1 convolution is to restore the number of channels of the input feature map and maintain the consistency of the number of channels of the input and output feature maps. In the concept 2 structure, the feature map of the input becomes smaller, so the 1 × 5 and 5 × 1 convolutions in the concept 1 are replaced with 1 × 3 and 3 × 1 convolutions, respectively. In the 2 nd convolutional layer, the number of input signatures is greater than in the first layer, thus increasing the number of channels in the structure from 30 to 40.
In order to evaluate the performance of the initiation module, 1200 samples are selected from 8 types of samples of buckwheat spot blight, buckwheat sclerotinia rot, buckwheat rhizoctonia rot, buckwheat ring spot, buckwheat downy mildew, buckwheat brown spot, buckwheat virus disease and buckwheat white mold, 800 buckwheat images without diseases are added, and the training set and the test set are in a proportion of 2: 1 division, control variable experimental comparisons were performed for inclusion 1 and inclusion 2, and the experimental results are shown in table 1:
TABLE 1 acceptance Module Performance evaluation
Figure BDA0002653821680000101
From table 1, it can be found that after the initiation 1 and initiation 2 structures are added respectively, the identification accuracy of the network is improved within the same number of iterations, thus proving the effectiveness of the initiation structure proposed in this embodiment.
The buckwheat disease data is acquired from the field, is limited by the sampling environment and has noise interference. Therefore, in order to make only the positions in the feature map having similar features to the convolution kernel obtain higher activation values after convolution operation, reduce the difference between the features, and avoid the interference of sample noise on feature extraction, the present embodiment introduces the idea of cosine similarity into the operation of the convolution layer, and takes the input feature map and the convolution kernel as two vectors to calculate the correlation between them.
In a conventional convolutional neural network, the output value of the jth feature map of the ith convolutional layer is assumed to be:
Figure BDA0002653821680000111
where g (.) represents an activation function, M represents a set of input feature maps,
Figure BDA0002653821680000112
represents the convolution kernel vector adopted between the I-th characteristic diagram and the J-th characteristic diagram,
Figure BDA0002653821680000113
is an offset.
The cosine similarity formula is an index for measuring the similarity between two vectors, and calculates the cosine value of the included angle between the two vectors, wherein the smaller the included angle is, the higher the correlation between the two vectors is, the larger the calculated cosine value is, and the value range is [ -1,1 ]. The following is the way in which the cosine similarity between vector X and vector Y is calculated, where n represents the dimension of the vector:
Figure BDA0002653821680000114
by using
Figure BDA0002653821680000115
And a similarity metric function between the input feature map of the convolution layer of the I layer and the convolution kernel, wherein X represents an input feature map vector. The convolution operation based on cosine similarity can be expressed as the following equation:
Figure BDA0002653821680000116
where r × z represents the size of the convolution kernel, wijAnd xijRepresenting the coefficients in the convolution kernel and the feature map, respectively. Then, the similarity metric function can be expressed as:
Figure BDA0002653821680000117
therefore, the output value of the convolution layer of the l-th layer based on the cosine similarity calculation is:
Figure BDA0002653821680000118
wherein g (.) represents the activation function, when inputting the feature map and the convolution kernel WI l JThe higher the similarity of (2), the larger the output value of the convolutional layer.
In the embodiment, the identification performance of the convolutional neural network based on the traditional convolution mode, the convolutional neural network based on other similarity function convolution modes and the convolutional neural network based on the cosine similarity convolution mode are compared and analyzed. Selecting 8 types of image data sets of buckwheat spot blight, buckwheat sclerotinia rot, buckwheat rhizoctonia rot, buckwheat ring spot, buckwheat downy mildew, buckwheat brown spot, buckwheat virus disease and buckwheat white mold, totaling 1200 samples, simultaneously adding 800 buckwheat image samples without diseases, dividing a training set and a testing set according to a ratio of 2 to 1, carrying out disease and disease-free identification, carrying out 5 times of experiments on networks of different convolution modes respectively, and obtaining results shown in table 2.
TABLE 2 recognition accuracy (%)
Figure BDA0002653821680000121
As can be seen from table 2, the recognition accuracy obtained by the convolution mode using cosine similarity calculation is improved compared with that obtained by the conventional convolution mode, and the average accuracy is improved by 4.14%. The network based on the convolution mode of other similarity functions is lower in identification accuracy rate than the network based on the traditional convolution, which shows that the difference among the features in the sample is amplified by the calculation mode of other similarity functions, so that the noise in the sample generates larger interference on the feature extraction process. The cosine similarity limits the output result between-1 and 1, and can reduce the influence of noise on feature extraction to the maximum extent.
In order to further analyze the performance of the cosine similarity convolution network, a third experiment is taken as an example here, and loss functions and accuracy rate change curves of a conventional convolution-based network and a cosine similarity convolution-based network are given, as shown in fig. 5 and 6. As can be seen from fig. 5 and 6, the network of the conventional convolution converges gradually after about 6000 iterations, and the convolution based on the cosine similarity converges already after 4000 iterations, so that the network based on the cosine similarity converges faster and finds a globally optimal solution more easily.
The reason that the network convergence based on cosine similarity convolution is faster is analyzed, mainly because the convolution mode can better evaluate the correlation degree of the convolution kernel and the corresponding characteristic of the input characteristic diagram, so that the position similar to the characteristic of the convolution kernel obtains a higher activation value, and meanwhile, the influence of noise on characteristic extraction is avoided. Under the influence of sampling time and environment, in the image of the buckwheat disease, a plurality of samples have the conditions of uneven illumination and obvious shading change, and the condition causes the gray value change of the image to be obvious, so that the activation value obtained by the traditional convolution operation is also subjected to mutation finally, and fig. 7 shows an output comparison graph of the traditional convolution mode and the convolution mode based on cosine similarity.
Assuming that the values in fig. 7 represent the pixel gray values of the image, and the difference between the values is mainly caused by uneven illumination, the conventional convolution operation and the convolution operation based on cosine similarity are respectively performed on the convolution kernel in fig. 7(a) and the input feature map in fig. 7(b), and it can be seen that the output values obtained by the conventional convolution method have significant difference, and the feature extraction capability is correspondingly weakened, which is obviously not the result that we expect. The output value based on the cosine similarity convolution is relatively uniform, which shows that the method can better adapt to the interference of illumination unevenness and is more beneficial to feature extraction.
Experimental analysis:
in order to further verify the accuracy of the pest identification method provided by the embodiment, a buckwheat disease database is established, and the database contains 8 disease images of buckwheat spot blight, buckwheat sclerotinia rot, buckwheat rhizoctonia rot, buckwheat ring rot, buckwheat downy mildew, buckwheat brown spot, buckwheat virus disease and buckwheat white mold, wherein each disease image is 500, 1000 disease-free images are 5200 in total. Selecting 400 images of each disease as a training set, 100 images as a test set, and selecting 800 images of the disease-free images as the training set and 200 images as the test set; the method is carried out by adopting a five-fold cross validation mode. The adoption of the interception structure of the invention uses the convolution neural network of cosine similarity convolution to identify and compares the final identification accuracy. The embodiment adopts the accuracy, the recall rate and the F1 value to evaluate the recognition effect.
Performance of the algorithm was evaluated using Recall (Recall), Precision (Precision), False Positive (FPR) and False Negative (FNR) Rates as indices.
Figure BDA0002653821680000141
Figure BDA0002653821680000142
Figure BDA0002653821680000143
Wherein: TP (true Positive) indicates the number of positive samples for positive classification, and indicates the number of samples for correctly judging diseases; fp (false positive) indicates the number of negative samples that are incorrectly labeled as positive samples, indicating the number of normal samples judged to be a disease; fn (false negative) indicates the number of positive samples that are incorrectly labeled as negative samples, indicating the number of defective samples judged as normal samples; recall is intuitively the ability of the classifier to find all disease samples; precision represents the ratio of TP to total number of TP plus FN in the sample expected to be diseased; the F1 score is a weighted harmonic mean of accuracy and recall.
The results of the experiment are shown in table 3. While comparing mainstream CNN models (AlexNet, VGG, *** net, ResNet, LeNet), in order to show the performance of the method proposed in this embodiment, this embodiment also introduces a face recognition model which is relatively deeply studied at present to perform tests in buckwheat disease data set, and the results show that by using the method of this embodiment, precision, recycle, and F respectively reach 96.82%, 95.62%, 96.71%, which is 2.59%, 2.89%, 2.13% higher than the optimal performance of mainstream AlexNet, VGG, *** net, ResNet, LeNet frameworks, respectively. And the FPS (average number of processed pictures per second) value of the recognition frame proposed by the embodiment is 5.19, it can be seen that the processing speed is also at a higher level.
TABLE 3 results of buckwheat disease identification
Figure BDA0002653821680000151
In order to further study the influence of the model on the identification effect of the buckwheat diseases after the detection of the buckwheat leaf disease area, the embodiment tests whether to perform area detection. After the disease area detection method is added, the identification effect is obviously improved, as shown in table 4. After the method for detecting the disease area is adopted, precision, call and F of the identification method of the embodiment respectively reach 97.54%, 96.38% and 97.82%, and are improved by 0.72%, 1.76% and 1.11% compared with the method before use. After the disease area detection is added, the average precision, recycle and F of each recognition model are respectively improved by 1.45%, 1.67% and 1.46%.
TABLE 4 identification results of buckwheat diseases after addition of area tests
Figure BDA0002653821680000152
Figure BDA0002653821680000161
The experiment also carries out classification and identification on buckwheat spot blight, buckwheat sclerotinia, buckwheat rhizoctonia, buckwheat ring spot, buckwheat downy mildew, buckwheat brown spot, buckwheat virus diseases and buckwheat white mold. Table 5 shows the results of identifying specific diseases using the identification frame proposed in this example after detection of the diseased area. It can be seen that the identification effect for specific diseases is obviously reduced, and particularly the identification performance for the buckwheat downy mildew is poor. The classification effect is good because only the disease existence of buckwheat is judged, and the classification targets of the specific disease types are increased, so that the identification difficulty is increased. Due to the fact that the performance of the photographing equipment is different, the photographing environment is different, and the difference of imaging quality is large; meanwhile, the recognition accuracy greatly depends on the training of the model and the number of samples, the number of the samples adopted in the embodiment is from field collection and is limited by conditions, only 500 samples are used for each disease, the model training is insufficient, and the recognition effect is greatly influenced. However, it can be seen that the buckwheat leaf blight disease and buckwheat ring spot disease precision, recycle and F still reach more than 90%, because the edge profiles of the two diseases on the buckwheat leaves are relatively clear, the feature Map of the diseases can be accurately obtained when the feature extraction is carried out by using the convolutional neural network, and therefore, the classification shows higher precision.
TABLE 5 recognition effects of various buckwheat diseases
Disease type P R F
Bacterial spot of buckwheat 90.51 91.35 92.92
Sclerotinia rot of buckwheat 82.48 83.41 80.54
Damping off of buckwheat 78.38 80.72 80.21
Ring rot of buckwheat 91.57 92.61 92.39
Downy mildew of buckwheat 78.45 75.28 77.38
Brown spot of buckwheat 85.91 88.47 86.52
Viral disease of buckwheat 86.19 87.43 86.52
White mold of buckwheat 85.36 86.92 86.74
In the embodiment, the automatic identification of the buckwheat diseases is researched, the characteristics of the buckwheat diseases are extracted by utilizing a multilayer characteristic extraction mode of a convolutional neural network, and then classification is performed according to the characteristics, so that the discrimination of the buckwheat diseases is finally realized. In order to improve the identification precision of buckwheat diseases, the disease area is detected, and the detection result is input into a convolutional neural network for training and identification; meanwhile, an initiation structure is added on the basis of a traditional structure, and the precision is further improved. In order to reduce the influence of illumination in the sampling process, the convolution based on cosine similarity replaces the traditional convolution, so that the samples under the condition of uneven illumination can be subjected to better feature extraction.

Claims (7)

1. A buckwheat disease identification method based on a convolutional neural network is characterized by comprising the following steps:
firstly, detecting a buckwheat disease area by adopting a method based on the combination of MSER and CNN, and separating a disease area and a non-disease area from an image;
and then, sending the image of the disease area into a convolutional neural network based on the augmentation structure improvement and a cosine similarity convolution mode for training and identification.
2. The buckwheat disease identification method based on the convolutional neural network as claimed in claim 1, wherein the method based on the combination of MSER and CNN is adopted to detect the buckwheat disease area, comprising the following steps,
step 1, detecting the disease area by adopting a method based on MSER, wherein the specific implementation process of the MSER algorithm is as follows:
(1) carrying out gray level processing on the buckwheat disease image in a gray level interval [0, 255%]Carrying out binarization on the gray level image by 256 different threshold values; let QtRepresenting a certain connected region in the binary image corresponding to the binary threshold value t, when the binary threshold value is changed from t to t + delta and t-delta, delta is a change value, and the connected region QtCorrespondingly become Qt+ΔAnd Qt-Δ
(2) Calculating an area ratio Q (t) ═ Q when the threshold is tt+Δ-Qt-Δ|/|QtWhen QtIs less changed with the change of the binary threshold value t, namely qtAt local minimum, QtIs the maximally stable extremal region, whereintI denotes a connected component QtArea, | Qt+Δ-Qt-ΔI represents Qt+ΔMinus Qt-ΔThe area of the remaining region;
in the process of MSER detection, some large rectangular frames contain small rectangular frames, so the regions are merged, and the small rectangular frames are removed, and the merging method is as follows:
for the merging of the two regions, let the parameter of the connected region 1 be β1,χ111The parameter of the connected region 2 is beta2,χ222Wherein χ and β represent the minimum and maximum values of the minimum bounding rectangle of the connected region in the y-axis direction, respectively, and represent the minimum and maximum values of the minimum bounding rectangle of the connected region in the x-axis direction, respectively, then the connected region 1 including the connected region 2 can be determined according to the formula (1)
Figure FDA0002653821670000021
Through the above steps, the diseased area is selected.
3. The buckwheat disease identification method based on the convolutional neural network as claimed in claim 2, wherein the buckwheat disease area is detected by a method based on the combination of MSER and CNN, further comprising the steps of:
step 2, designing a CNN binary classifier on the basis of the AlexNet network, further distinguishing diseased regions from non-diseased regions, and avoiding detection frame overlapping and false detection, wherein the specific processing flow is as follows:
firstly inputting a 32 × 32 image, then extracting the features of the input image by using 16 convolution kernels of 3 × 3 to further obtain a 32 × 32 × 16 convolution layer, then reducing the data dimension of the convolution layer by using a 2 × 2 maximum pooling method to obtain a 16 × 16 × 16 pixel pooling layer, further extracting the features of a higher layer by using 32 convolution kernels of 5 × 5, finally obtaining 8 × 8 × 32 output by using a 2 × 2 maximum pooling method, connecting all the output features to a full-connection layer, performing weight calculation according to a feature vector, outputting the probability belonging to two categories, and further judging whether the input image is a disease area.
4. The buckwheat disease identification method based on the convolutional neural network as claimed in claim 3, wherein in training the CNN model, Adam is adopted as an optimization algorithm, the learning rate is set to 0.001, the learning rate reduction multiplier factor is set to 0.1, the loss function selects a cross entropy loss function, the training samples are obtained by cropping from the original image, wherein the positive samples are cropped images of diseased regions, and the negative samples are cropped images of non-diseased regions.
5. The buckwheat disease identification method based on the convolutional neural network as claimed in claim 1, wherein the convolutional neural network based on an initiation structure improvement is formed by adding a two-stage initiation structure on a traditional convolutional neural network basic frame, and performing feature extraction on a low-quality buckwheat image with crossed leaves, wherein the specific processing flow is as follows:
(1) firstly, inputting a buckwheat disease image with the size of 64 multiplied by 64 into a network, and then performing convolution operation by using 136 convolution kernels with the size of 9 multiplied by 9 to obtain 136 characteristic maps of 56 multiplied by 56;
(2) sending the feature map into an initiation 1 structure, wherein all initiation structures in the network adopt the same convolution operation, namely the size of the feature map is not changed, the size of the pooling windows in all the subsequent pooling layers is 2 multiplied by 2, and the size of the feature map after pooling is changed into 28 multiplied by 28;
(3) obtaining 200 24 × 24 feature maps by using 200 5 × 5 convolution kernels, sending the feature maps into an acceptance 2 structure, performing pooling, and obtaining 264 8 × 8 feature maps by using 264 5 × 5 convolution kernels;
(4) after passing through the pooling layer, the data enters the last convolution layer, the number of convolution kernels is 520, the size of the convolution kernels is 3 x 3, 520 feature maps of 2 x 2 are obtained, and finally, a full connection layer and a classification output layer are obtained.
6. The buckwheat disease identification method based on the convolutional neural network as claimed in claim 5, wherein in an initiation 1 structure, 1 × 1, 3 × 3, 1 × 5, 5 × 1, 4 convolutional kernels with different scales are respectively used for multi-channel feature extraction, and finally the channels are fused;
in the concept 2 structure, 1 × 5 and 5 × 1 convolutions in concept 1 are replaced by 1 × 3 and 3 × 1 convolutions, respectively, in the 2 nd convolutional layer of the network, the number of input feature maps is greater than that in the first layer, and the number of channels in the structure is increased from 30 to 40.
7. The buckwheat disease identification method based on the convolutional neural network according to claim 1, wherein the convolutional neural network based on the cosine similarity convolution method calculates the correlation between the input feature map and the convolution kernel as two vectors in the operation of the convolutional layer by using the following specific method:
in the convolutional neural network, the output value of the J-th feature map of the i-th convolutional layer is assumed to be:
Figure FDA0002653821670000031
where g (.) represents an activation function, M represents a set of input feature maps,
Figure FDA0002653821670000032
represents the convolution kernel vector adopted between the I-th characteristic diagram and the J-th characteristic diagram,
Figure FDA0002653821670000041
is an offset;
the cosine similarity formula is an index for measuring the similarity between two vectors, and calculates the cosine value of the included angle between the two vectors, the smaller the included angle is, the higher the correlation between the two vectors is, the larger the calculated cosine value is, the value range is [ -1,1], and the following is the calculation mode of the cosine similarity between the vector X and the vector Y, wherein n represents the dimension of the vector:
Figure FDA0002653821670000042
by using
Figure FDA0002653821670000043
Indicating the input of the first layer of convolutional layerEntering a similarity metric function between the feature map and the convolution kernel, X representing the input feature map vector, the cosine similarity based convolution operation can be represented as the following equation:
Figure FDA0002653821670000044
where r × z represents the size of the convolution kernel, wijAnd xijRepresenting the coefficients in the convolution kernel and the feature map, respectively, then the similarity metric function can be expressed as:
Figure FDA0002653821670000045
therefore, the output value of the convolution layer of the l-th layer based on the cosine similarity calculation is:
Figure FDA0002653821670000046
wherein g (.) represents the activation function, when inputting the feature map and the convolution kernel
Figure FDA0002653821670000047
The higher the similarity of (2), the larger the output value of the convolutional layer.
CN202010879986.XA 2020-08-27 2020-08-27 Buckwheat disease identification method based on convolutional neural network Pending CN111967424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010879986.XA CN111967424A (en) 2020-08-27 2020-08-27 Buckwheat disease identification method based on convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010879986.XA CN111967424A (en) 2020-08-27 2020-08-27 Buckwheat disease identification method based on convolutional neural network

Publications (1)

Publication Number Publication Date
CN111967424A true CN111967424A (en) 2020-11-20

Family

ID=73399613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010879986.XA Pending CN111967424A (en) 2020-08-27 2020-08-27 Buckwheat disease identification method based on convolutional neural network

Country Status (1)

Country Link
CN (1) CN111967424A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554116A (en) * 2021-08-16 2021-10-26 重庆大学 Buckwheat disease identification method based on convolutional neural network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491729A (en) * 2017-07-12 2017-12-19 天津大学 The Handwritten Digit Recognition method of convolutional neural networks based on cosine similarity activation
CN107742290A (en) * 2017-10-18 2018-02-27 成都东谷利农农业科技有限公司 Plant disease identifies method for early warning and device
CN107945182A (en) * 2018-01-02 2018-04-20 东北农业大学 Maize leaf disease recognition method based on convolutional neural networks model GoogleNet
CN108960301A (en) * 2018-06-20 2018-12-07 西南大学 A kind of ancient Yi nationality's text recognition methods based on convolutional neural networks
CN109086799A (en) * 2018-07-04 2018-12-25 江苏大学 A kind of crop leaf disease recognition method based on improvement convolutional neural networks model AlexNet
CN111209962A (en) * 2020-01-06 2020-05-29 电子科技大学 Combined image classification method based on CNN (CNN) feature extraction network) and combined heat map feature regression

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491729A (en) * 2017-07-12 2017-12-19 天津大学 The Handwritten Digit Recognition method of convolutional neural networks based on cosine similarity activation
CN107742290A (en) * 2017-10-18 2018-02-27 成都东谷利农农业科技有限公司 Plant disease identifies method for early warning and device
CN107945182A (en) * 2018-01-02 2018-04-20 东北农业大学 Maize leaf disease recognition method based on convolutional neural networks model GoogleNet
CN108960301A (en) * 2018-06-20 2018-12-07 西南大学 A kind of ancient Yi nationality's text recognition methods based on convolutional neural networks
CN109086799A (en) * 2018-07-04 2018-12-25 江苏大学 A kind of crop leaf disease recognition method based on improvement convolutional neural networks model AlexNet
CN111209962A (en) * 2020-01-06 2020-05-29 电子科技大学 Combined image classification method based on CNN (CNN) feature extraction network) and combined heat map feature regression

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘虹 等: "结合余弦相关性的卷积网络识别汉字的方法", 《计算机工程与应用》 *
陈善雄 等: "基于MSER和CNN的彝文古籍文献的字符检测方法", 《华南理工大学学报(自然科学版)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554116A (en) * 2021-08-16 2021-10-26 重庆大学 Buckwheat disease identification method based on convolutional neural network
CN113554116B (en) * 2021-08-16 2022-11-25 重庆大学 Buckwheat disease identification method based on convolutional neural network

Similar Documents

Publication Publication Date Title
CN110533084B (en) Multi-scale target detection method based on self-attention mechanism
Liu et al. Detection of aphids in wheat fields using a computer vision technique
CN109684922B (en) Multi-model finished dish identification method based on convolutional neural network
CN102903122B (en) Video object tracking method based on feature optical flow and online ensemble learning
CN111784721B (en) Ultrasonic endoscopic image intelligent segmentation and quantification method and system based on deep learning
CN108596038B (en) Method for identifying red blood cells in excrement by combining morphological segmentation and neural network
CN108537751B (en) Thyroid ultrasound image automatic segmentation method based on radial basis function neural network
CN109033978B (en) Error correction strategy-based CNN-SVM hybrid model gesture recognition method
CN111369523B (en) Method, system, equipment and medium for detecting cell stack in microscopic image
CN114897816A (en) Mask R-CNN mineral particle identification and particle size detection method based on improved Mask
Bonifacio et al. Determination of common Maize (Zea mays) disease detection using Gray-Level Segmentation and edge-detection technique
CN113343755A (en) System and method for classifying red blood cells in red blood cell image
Trivedi et al. Automatic segmentation of plant leaves disease using min-max hue histogram and k-mean clustering
Mohammadpoor et al. An intelligent technique for grape fanleaf virus detection
CN114463843A (en) Multi-feature fusion fish abnormal behavior detection method based on deep learning
CN114399674A (en) Hyperspectral image technology-based shellfish toxin nondestructive rapid detection method and system
CN115294109A (en) Real wood board production defect identification system based on artificial intelligence, and electronic equipment
CN117746077B (en) Chip defect detection method, device, equipment and storage medium
CN109145770B (en) Automatic wheat spider counting method based on combination of multi-scale feature fusion network and positioning model
CN108805181B (en) Image classification device and method based on multi-classification model
CN111967424A (en) Buckwheat disease identification method based on convolutional neural network
Srivastav et al. Tea leaf disease detection using deep learning-based convolutional neural networks
Ye et al. Cucumber appearance quality detection under complex background based on image processing
CN116563205A (en) Wheat spike counting detection method based on small target detection and improved YOLOv5
CN116245855A (en) Crop variety identification method, device, equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201120

RJ01 Rejection of invention patent application after publication