CN113269191A - Crop leaf disease identification method and device and storage medium - Google Patents

Crop leaf disease identification method and device and storage medium Download PDF

Info

Publication number
CN113269191A
CN113269191A CN202110419951.2A CN202110419951A CN113269191A CN 113269191 A CN113269191 A CN 113269191A CN 202110419951 A CN202110419951 A CN 202110419951A CN 113269191 A CN113269191 A CN 113269191A
Authority
CN
China
Prior art keywords
image
lesion
disease
leaf
crop
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
CN202110419951.2A
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.)
Inner Mongolia Zhicheng Internet Of Things Co ltd
Original Assignee
Inner Mongolia Zhicheng Internet Of Things Co ltd
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 Inner Mongolia Zhicheng Internet Of Things Co ltd filed Critical Inner Mongolia Zhicheng Internet Of Things Co ltd
Priority to CN202110419951.2A priority Critical patent/CN113269191A/en
Publication of CN113269191A publication Critical patent/CN113269191A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • 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
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture

Landscapes

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

Abstract

The invention relates to a crop leaf disease identification method, a device and a storage medium, wherein the method comprises the following steps: segmenting the crop leaf image under the real background by adopting a preset semantic segmentation model to obtain each leaf image; according to an image enhancement technology and a color space conversion technology, carrying out scab segmentation on each leaf image to obtain each scab image; setting disease type labels for each disease spot image, and establishing each disease spot image data set; extracting lesion feature vectors of lesion images in the lesion image data set; carrying out classification training on the classifier according to the lesion feature vector and a lesion type label corresponding to the lesion image data set; recognizing the crop leaf diseases according to the trained classifier; crop leaves under a complex background are accurately segmented, the classifier is classified and trained through the scab characteristic vector and the disease type label to realize the recognition of the diseases, the manual recognition mode is avoided, the labor rate is greatly reduced, and the recognition accuracy is improved.

Description

Crop leaf disease identification method and device and storage medium
Technical Field
The invention relates to the field of agricultural disease identification, in particular to a crop leaf disease identification method, a crop leaf disease identification device and a storage medium.
Background
Various diseases may occur in the growth process of crops, the yield and the quality of the crops are seriously influenced, and certain threat is caused to the food safety. Under the condition of large-area planting, the disease identification only by manpower wastes time and labor, and the development of the disease cannot be found and prevented in time. The existing technical methods are all used for researching and testing the scab characteristics of the manually picked independent leaves, for example, the independent leaves are spread under the ideal conditions of single color and no interference of background, but in the actual scene such as the actual planting environment of crops, the original images of the leaves acquired during monitoring cannot be single leaves, generally are multiple leaves with different postures and contain other complex backgrounds, so that the leaves and the scab images thereof are difficult to segment, and the subsequent characteristic extraction method is invalid.
Disclosure of Invention
Aiming at the problems, the invention provides a crop leaf disease identification method, a device and a storage medium, which can accurately segment crop leaves under a complex background, carry out classification training on a classifier through a scab characteristic vector and a disease type label to realize disease identification, avoid using a manual identification mode, greatly reduce labor rate and improve identification accuracy;
the technical scheme for solving the technical problems is as follows: a crop leaf disease identification method comprises the following steps:
segmenting the crop leaf image under the real background by adopting a preset semantic segmentation model to obtain each leaf image;
according to an image enhancement technology and a color space conversion technology, carrying out scab segmentation on each leaf image to obtain each scab image;
setting disease type labels for the disease spot images, and establishing a disease spot image data set;
extracting lesion feature vectors of lesion images in the lesion image data set;
carrying out classification training on a classifier according to the lesion feature vector and a lesion type label corresponding to the lesion image data set;
and identifying the crop leaf diseases according to the trained classifier.
The invention has the beneficial effects that: the crop leaves under the complex background are segmented through the semantic segmentation module, the segmentation precision is high, the extraction of crop leaf images under the complex background is achieved, scab images are effectively segmented through local contrast enhancement and color space conversion technologies, scab image data sets are established, scab characteristic vectors corresponding to the scab image data sets are calculated respectively according to scab types, the characteristics of various different diseases are subdivided and fully covered, the classifier is classified and trained through the scab characteristic vectors and the disease type labels to achieve disease identification, the manual identification mode is avoided, the labor rate is greatly reduced, and the identification accuracy is improved.
On the basis of the technical scheme, the invention can be further improved as follows:
further, the segmenting the crop leaf image under the real background by adopting a preset semantic segmentation model comprises the following steps before obtaining each leaf image:
acquiring a crop leaf image under a real background through field shooting;
performing data enhancement processing on the crop leaf images to obtain an expanded data set, and dividing the data set into a training set, a verification set and a test set;
marking the region of the crop leaves in the training set and the verification set as 1 and the background region as 0, and converting the marked image into a file conforming to the format of a semantic segmentation model;
and training a semantic segmentation model according to the training set and the files to obtain the preset semantic segmentation model.
The beneficial effect of adopting the further scheme is that: by carrying out data enhancement processing on the crop leaf image under the real background, the diversity of the image is enhanced, and the accuracy and robustness of subsequent model training are improved; meanwhile, leaves and backgrounds of the agricultural crops are labeled, and the training accuracy of the semantic segmentation model is guaranteed.
Further, the preset semantic segmentation model comprises a Deeplab v3+ model.
The beneficial effect of adopting the further scheme is that: the Deeplab v3+ model further fuses the bottom layer features and the high layer features, and improves the accuracy of the segmentation boundary.
Further, the segmenting the crop leaf image under the real background by adopting a preset semantic segmentation model to obtain each leaf image comprises:
inputting the test set into the preset semantic segmentation model to obtain a mask image with the segmented leaves and background;
and turning over the mask image to obtain a binary image with a background area pixel gray value of 0 and a leaf area pixel gray value of 255, and adding the binary image and the images of the test set to obtain each leaf image with the background removed.
The beneficial effect of adopting the further scheme is that: the mask image obtained by segmenting the leaf and the background is inverted to better distinguish a background area from a leaf area, and then the leaf image with the background removed can be clearly and effectively obtained through the addition operation of the mask image and the original image.
Further, the obtaining of each lesion image by performing lesion segmentation on each leaf image according to an image enhancement operation and a color space conversion operation includes:
acquiring a local mean value and a standard deviation of the leaf image in the size of a local window;
determining the image after the local contrast enhancement of the leaf image according to the local mean value and the standard deviation;
carrying out color space conversion on the complement image of the image after the local contrast enhancement, converting an RGB image into a Lab image, and dividing the Lab image into three color component images of L, a and b;
selecting a b-component image, calculating an average pixel value of the b-component image, setting pixels with the b-component pixel value larger than the average pixel value as 0 and setting the other pixels as 1, and obtaining a preliminary scab image;
and carrying out morphological operation on the preliminary lesion image to obtain each lesion image.
The beneficial effect of adopting the further scheme is that: the method comprises the steps of carrying out local contrast enhancement processing on a leaf image, then carrying out image color space conversion, dividing the leaf image into three color component images of L, a and b, extracting scabs through the component image of b, determining the scab image through morphological operation, and accurately and effectively segmenting the scab image.
Further, the setting of disease type labels for the disease images and the establishing of the disease image data sets includes:
according to the crop leaf disease type expert database, disease marking is carried out on the disease spot image, and a disease type label is set;
and classifying the lesion images according to the disease types, and establishing lesion image data sets of different disease types.
The beneficial effect of adopting the further scheme is that: by carrying out disease class marking on the disease spot images and generating a set on a large number of disease spot images according to the types of diseases, image sets with classification labels are convenient to follow, feature vectors of the image sets are calculated respectively according to classification, classification training is carried out, and disease identification is achieved.
Further, the extracting the lesion feature vector of the lesion image in the lesion image data set includes:
calculating a characteristic value of a texture statistical characteristic of the lesion image run-length matrix, and taking a vector formed by the characteristic value as a first characteristic vector;
obtaining a second feature vector by performing x times of 3 × 3 convolution, y times of 1 × 1 convolution and x times of maximum pooling training on the lesion image, wherein x, y and z are positive integers;
and splicing the first characteristic vector and the second characteristic vector to obtain the lesion characteristic vector.
The beneficial effect of adopting the further scheme is that: the method comprises the steps of manually extracting the scab according to the textural features of the scab, extracting the features of data from a scab image through 3 × 3 convolution and 1 × 1 convolution to generate a feature map, reducing the size of the feature map through maximum pooling, reducing the data and network computation amount of parameters, completing automatic extraction of the features, manually and automatically extracting the feature information of the scab, and having a large amount of information, thereby being beneficial to subdividing and fully covering the features of various diseases.
Further, the classifying and training the classifier according to the lesion feature vector and the lesion type label corresponding to the lesion image data set comprises:
inputting the lesion feature vectors into a full-connection layer, inputting the data output by the full-connection layer and the disease type labels into the classifier for training, wherein the classifier is a softmax classifier.
The beneficial effect of adopting the further scheme is that: after the obtained feature vectors and the known classification categories pass through the full connection layer, the classifier is adopted to complete model training to realize disease identification, the mode of manual identification is avoided, the labor rate is greatly reduced, and the identification accuracy is improved.
In order to solve the above technical problem, the present invention further provides a crop leaf disease identification device, including: a processor and a memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the crop blade disease identification method as described above.
In order to solve the technical problem, the present invention further provides a storage medium, wherein the storage medium stores one or more computer programs, and the one or more computer programs are executable by one or more processors to implement the steps of the crop leaf disease identification method as described above.
Drawings
Fig. 1 is a flowchart of a crop leaf disease identification method according to an embodiment of the present invention;
FIG. 2 is a leaf view of a potato growing environment according to one embodiment of the present invention;
FIG. 3 is a schematic view of a single potato blade mask according to one embodiment of the present invention;
FIG. 4 is a schematic view of a potato chip obtained by dividing according to an embodiment of the present invention;
FIG. 5 is a schematic view of an extracted leaf lesion according to an embodiment of the present invention;
fig. 6 is a diagram illustrating a result of disease identification according to an embodiment of the present invention;
fig. 7 is a diagram illustrating an implementation effect of a crop leaf disease identification method according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, fig. 1 is a flowchart of a crop leaf disease identification method provided in an embodiment of the present invention, where the crop leaf disease identification method includes:
s1, segmenting the crop leaf images under the real background by adopting a preset semantic segmentation model to obtain all the leaf images;
s2, carrying out scab segmentation on each leaf image according to an image enhancement technology and a color space conversion technology to obtain each scab image;
s3, setting disease type labels for the disease speckle images, and establishing a disease speckle image data set;
s4, extracting lesion feature vectors of lesion images in the lesion image data set;
s5, performing classification training on a classifier according to the lesion feature vector and the lesion type label corresponding to the lesion image data set;
and S6, recognizing the crop leaf diseases according to the trained classifier.
In the embodiment, the crop leaves under the complex background are segmented by the semantic segmentation module, the segmentation precision is high, the problem of extraction of crop leaf images under the complex background is solved, the scab images are effectively segmented by utilizing local contrast enhancement and color space conversion technologies, the scab image data set is established, scab characteristic vectors corresponding to the scab image data set are respectively calculated according to scab types, the characteristics of various different diseases are subdivided and fully covered, the classifier is classified and trained through the scab characteristic vectors and the disease type labels to realize the identification of the diseases, the manual identification mode is avoided, the labor rate is greatly reduced, and the identification accuracy is improved.
In the embodiment, the crop blade image under the real background refers to an image obtained by shooting in a farmland field through a field camera or a camera, and comprises the crop blade and the background where the blade is located, namely, the independent blade is not picked; wherein the real background crop leaf images comprise healthy leaf images and speckled leaf images of crops, including but not limited to potato, cucumber, corn, etc.
It can be understood that the semantic segmentation model refers to labeling each pixel with a corresponding category for an image, and does not distinguish individuals; in this embodiment, the segmentation of the blade and the background is performed through a semantic segmentation model, specifically, the training of the semantic segmentation model needs to be completed in advance, and before S1, the method further includes:
s01, obtaining a crop leaf image under a real background through field shooting;
s02, performing data enhancement operation on the crop leaf images to obtain an expanded data set, and dividing the data set into a training set, a verification set and a test set;
s03, marking the region of the crop leaves in the training set and the verification set as 1 and the background region as 0, and converting the marked image into a file conforming to a semantic segmentation model format;
and S04, training a semantic segmentation model according to the training set and the file to obtain the preset semantic segmentation model.
In this embodiment, the crop leaf image is subjected to data enhancement processing to expand the image to obtain a data set, so as to ensure the diversity of the data set; the data enhancement processing comprises image turning, rotation, translation, brightness adjustment, chroma adjustment and contrast adjustment; the turning can be horizontal and vertical turning of the crop blade image, and the rotation can be random rotation of the crop blade image according to a certain angle, wherein the rotation is 60 degrees, 90 degrees or 180 degrees; rotational translation translates the image in a manner on the image plane; the translation range and the translation step length can be specified in a random or artificial definition mode, translation is carried out along the horizontal or vertical direction, and the position of the image content is changed; the brightness adjustment is to keep the saturation S and the hue H unchanged and change the brightness V component in the HSV color space of the image; the chroma adjustment is to keep the saturation S and the brightness V unchanged and change the hue H component; contrast adjustment is to change the saturation S and brightness V components in the HSV color space of an image, keep the hue H unchanged, perform an exponential operation (the exponential factor is between 0.25 and 4) on the S and V components of each pixel, and increase the illumination variation. After passing through the data set, the data set is divided into a training set, a verification set and a test set according to a certain proportion, for example, the proportion is 3:1:1, or the proportion is 4:2: 1.
The training set and the verification set are concentrated so that the blades have healthy blades and also contain blades with various scabs, the region of the crop blades in the training set and the verification set is marked as 1, the background region is marked as 0, and because the image is marked, the marked image needs to be converted into a file conforming to the format of the semantic segmentation model, relevant parameters of the semantic segmentation model are set, and the training of the semantic segmentation model is completed through the training set and the file.
Preferably, in this embodiment, a deplab v3+ model is used as a semantic segmentation model, specifically, Xception-65 is used as a backbone network in the deplab v3+ semantic segmentation model, and model training is completed through operations such as feature extraction and feature compression.
In this embodiment, S1 specifically includes:
s11, inputting the test set into the preset semantic segmentation model to obtain a mask image with the segmented blade and background;
and S12, turning the mask image to obtain a binary image with the gray value of the pixels in the background area being 0 and the gray value of the pixels in the blade area being 255, and adding the binary image and the image of the test set to obtain each blade image with the background removed.
As shown in fig. 2, the test image of the test set is a potato blade image with scabs under a real background, a mask image obtained by dividing the background and the potato blade is obtained through a preset semantic division model, and a reverse operation is performed, as shown in fig. 3, wherein the pixel value of the background area of the image is 0, the pixel value of the blade area is 255, and then the operation of adding fig. 3 and fig. 2 is performed to obtain a blade image with the divided background, as shown in fig. 4.
It should be noted that in this embodiment, S2 includes:
s21, acquiring a local mean value and a standard deviation of the blade image in the size of a local window;
s22, determining the image with the local contrast enhanced of the leaf image according to the local mean value and the standard deviation;
s23, performing color space conversion on the complement image of the image with the enhanced local contrast, converting the RGB image into a Lab image, and subdividing the Lab image into three color component images of L, a and b;
s24, selecting a b-component image, calculating the average pixel value of the b-component image, setting the pixels with the b-component pixel values larger than the average pixel value as 0 and the rest as 1, and obtaining a preliminary scab image;
and S25, performing morphological operation on the preliminary lesion image to obtain each lesion image.
Specifically, the image enhancement operation includes: assuming that the leaf image is w (u, v), local contrast enhancement is performed on the image, and the following formula is required:
Figure BDA0003027474980000091
Figure BDA0003027474980000092
Figure BDA0003027474980000093
C(u,v)=1-P(G(u,v))
wherein n is the local window size in pixel units; m (u, v) and σ represent the local mean and standard deviation, respectively, of the image within the window of nxn; μ denotes a global average value of the image w (u, v), β denotes a parameter value in the interval [0,1], and preferably β is 0.2; g (u, v) is an image with enhanced local contrast for w (u, v); c (u, v) is the complement of image G (u, v);
then, the image color space conversion operation comprises the following steps: performing color space conversion on the obtained C (u, v) image, converting the RGB image into a Lab image, and subdividing the Lab image into three color component images of L (illumination), a (range from red to green) and b (range from blue to yellow); because the scab color is in the range from blue to yellow, a b-component image is selected, the obtained binary image of the b-color component is divided into a preliminary scab image on the blade through pixel definition, and because fine isolated miscellaneous points possibly exist around the obtained scab outline, the preliminary scab image is binarized and is subjected to corrosion expansion operation to obtain a continuous scab outline, and the result is shown in fig. 5.
In this embodiment, S3 specifically includes: according to the crop leaf disease type expert database, disease type labeling is carried out on the disease spot image and the disease type label is set; the crop leaf disease type expert database stores corresponding relations between different crop disease spot images and disease types, for example, early blight of potato is characterized by sporadic brown spots in the initial stage, irregular and concentric ring lines in the later stage and narrow fading ring halos around the spots; the potato anthracnose is characterized in that the leaf color becomes light in the initial stage, the leaves at the top end are slightly rolled backwards, and then the whole plant wilts, becomes brown and dies; cucumber downy mildew is characterized in that round and fresh yellow disease spots appear on the front surface of cotyledon, and the peak is reached in the full-melon period. The leaves grow water stain-like disease spots and then expand to form large disease spots, when the disease spots are serious, the diseased leaves curl to be yellow brown and dry, and the disease spots on the back of the leaves grow thick purple gray to purple black mildew. And (3) giving disease type labels of the disease spot images according to the crop leaf disease type expert database, classifying the disease spot images according to disease types after the labeled disease spot images belong to the type of disease, and establishing disease spot image data sets of different disease types.
It can be understood that the disease spots of different disease types have different characteristics, and the automatic disease type identification is performed through the disease spot characteristic identification.
Specifically, step S4 specifically includes:
s41, calculating a characteristic value of a texture statistical characteristic of the lesion image run matrix, and taking a vector formed by the characteristic value as a first characteristic vector;
s42, performing x times of 3 x 3 convolution, y times of 1 x 1 convolution and z times of maximum pooling training on the lesion image to obtain a second feature vector, wherein x, y and z are positive integers;
and S43, splicing the first characteristic vector and the second characteristic vector to obtain the lesion characteristic vector.
In this embodiment, the texture statistical characteristics of the run matrix include short-run advantage (SRE), long-run advantage (LRE), gray-level non-uniformity (GLN), long-run non-uniformity (RLN), Run Percentage (RP), low gray-level run advantage (LGLRE), high gray-level run advantage (HGLRE), short-run low gray-level advantage (SRLGLE), short-run high gray-level advantage (SRHGLE), long-run low gray-level advantage (LRLGLE), and long-run high gray-level advantage (LRHGLE):
Figure BDA0003027474980000111
Figure BDA0003027474980000112
Figure BDA0003027474980000113
Figure BDA0003027474980000114
Figure BDA0003027474980000115
Figure BDA0003027474980000116
Figure BDA0003027474980000117
Figure BDA0003027474980000118
Figure BDA0003027474980000119
Figure BDA00030274749800001110
Figure BDA00030274749800001111
where i denotes the pixel value, j denotes the number of consecutive neighbors, θ denotes the direction, p (i, j | θ) denotes the probability for the case of j consecutive i values in the θ direction, and Np is the number of elements in the gray scale run matrix.
Preferably, θ is sequentially substituted into 0 degrees, 45 degrees, 90 degrees, and 135 degrees in the 11 feature calculation formulas to calculate 44 feature values, and a vector including the 44 feature values is referred to as a first feature vector M.
Automatically extracting features of the scab image through x times of 3 × 3 convolution, y times of 1 × 1 convolution and z times of maximum pooling training, recording the formed feature vector as a second feature vector N, preferably, obtaining a more miniaturized second feature vector through 7 times of 3 × 3 convolution, 1 time of 1 × 1 convolution and 3 times of maximum pooling training; in other embodiments, the lesion image may also be trained by 5 3 × 3 convolutions, 1 × 1 convolution, and 2 maximal pooling; extracting the features of the data through 3 × 3 convolution and 1 × 1 convolution to generate a feature map, and reducing the size of the feature map through maximum pooling so as to reduce the data of parameters and the network calculation amount and complete automatic extraction of the features; and splicing the characteristic vectors M and N to obtain a one-dimensional characteristic vector X which is recorded as the extracted lesion characteristic vector.
In this embodiment, step S5 specifically includes: and inputting the lesion feature vectors into a full-connection layer, and inputting data output by the full-connection layer and the disease type labels into the classifier for training. Preferably, the classifier is a softmax classifier, and then crop leaf disease recognition is realized according to the trained classifier, for example, the disease feature vector in fig. 5 is extracted and sent to the trained softmax classifier to complete disease recognition, and as a result, as shown in fig. 6, the recognition result is late blight.
For ease of understanding, the effectiveness of the present invention is further illustrated below in connection with the potato lesion segmentation example in the context of a potato growth environment:
in order to avoid loss of generality, the potato leaf images containing other diseases under a complex background (namely, non-picked leaves with disease spots are identified under a pure-color background) are selected, firstly, data preparation before semantic segmentation model training is completed according to steps S01-S03 in sequence, then, the semantic segmentation model training is performed according to S03, in the invention, a Deeplab v3+ model is preferentially adopted, Xception-65 is selected as a backbone network in the Deeplab v3+ semantic segmentation model, and model training is completed through operations such as feature extraction, feature compression and the like, so that model weight is obtained. And (5) obtaining a mask image which is obtained by dividing the background and the potato leaves of the test image through S11, wherein the pixel value of the background area of the image is 0, the pixel value of the leaf area is 255, and further obtaining the divided potato leaf image through S12. Further, the scab on the segmented leaf needs to be extracted, local contrast enhancement and color space conversion operations are performed on the segmented potato leaf image through S2, the obtained binary image of the b color component is defined by pixels to segment the scab on the leaf, noise is removed through morphological operations, and the potato scab is extracted. And completing label setting of the scab image according to an S3 potato blade disease expert database, establishing a scab data set, and extracting a characteristic vector by adopting an S4 manual and automatic method. And finally, sending the feature vectors into a softmax classifier according to a deep learning method to finish the identification of the diseases, wherein the result is shown in figure 7, and the identification result is the early blight.
Example 2
The embodiment provides a crops blade disease recognition device, and this crops blade disease recognition device includes: a processor and a memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the crop blade disease identification method according to the above embodiments, which are not described in detail herein.
The present embodiment further provides a computer-readable storage medium, where one or more computer programs are stored in the computer-readable storage medium, and the one or more computer programs may be executed by one or more processors to implement the steps of the crop leaf disease identification method according to the above embodiments, which are not described in detail herein.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The technical solutions provided by the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are explained in this patent by applying specific examples, and the descriptions of the embodiments above are only used to help understanding the principles of the embodiments of the present invention; the above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A crop leaf disease identification method is characterized by comprising the following steps:
segmenting the crop leaf image under the real background by adopting a preset semantic segmentation model to obtain each leaf image;
according to an image enhancement technology and a color space conversion technology, carrying out scab segmentation on each leaf image to obtain each scab image;
setting disease type labels for the disease spot images, and establishing a disease spot image data set;
extracting lesion feature vectors of lesion images in the lesion image data set;
carrying out classification training on a classifier according to the lesion feature vector and a lesion type label corresponding to the lesion image data set;
and identifying the crop leaf diseases according to the trained classifier.
2. The crop leaf disease identification method according to claim 1, wherein the segmenting the crop leaf image under the real background by using the preset semantic segmentation model comprises the following steps of:
acquiring a crop leaf image under a real background through field shooting;
performing data enhancement processing on the crop leaf images to obtain an expanded data set, and dividing the data set into a training set, a verification set and a test set;
marking the region of the crop leaves in the training set and the verification set as 1 and the background region as 0, and converting the marked image into a file conforming to the format of a semantic segmentation model;
and training a semantic segmentation model according to the training set and the files to obtain the preset semantic segmentation model.
3. The crop leaf disease identification method according to claim 2, wherein the preset semantic segmentation model comprises a deep v3+ model.
4. The crop leaf disease identification method according to claim 2, wherein the segmenting the crop leaf image under the real background by using the preset semantic segmentation model to obtain each leaf image comprises:
inputting the test set into the preset semantic segmentation model to obtain a mask image with the segmented leaves and background;
and turning over the mask image to obtain a binary image with a background area pixel gray value of 0 and a leaf area pixel gray value of 255, and adding the binary image and the images of the test set to obtain each leaf image with the background removed.
5. The method for identifying the crop leaf diseases according to claim 1, wherein the step of performing lesion segmentation on each leaf image according to an image enhancement operation and a color space conversion operation to obtain each lesion image comprises:
acquiring a local mean value and a standard deviation of the leaf image in the size of a local window;
determining the image after the local contrast enhancement of the leaf image according to the local mean value and the standard deviation;
carrying out color space conversion on the complement image of the image after the local contrast enhancement, converting an RGB image into a Lab image, and dividing the Lab image into three color component images of L, a and b;
selecting a b-component image, calculating an average pixel value of the b-component image, setting pixels with the b-component pixel value larger than the average pixel value as 0 and setting the other pixels as 1, and obtaining a preliminary scab image;
and carrying out morphological operation on the preliminary lesion image to obtain each lesion image.
6. The method for identifying the crop leaf diseases according to claim 1, wherein the setting of the disease type label for each lesion image and the establishing of each lesion image data set comprise:
according to the crop leaf disease type expert database, disease marking is carried out on the disease spot image, and a disease type label is set;
and classifying the lesion images according to the disease types, and establishing lesion image data sets of different disease types.
7. The crop leaf disease identification method according to any one of claims 1 to 6, wherein the extracting the lesion feature vector of the lesion image in the lesion image data set comprises:
calculating a characteristic value of the texture statistical characteristic of the lesion image, and taking a vector formed by the characteristic value as a first characteristic vector;
obtaining a second feature vector by performing x times of 3 × 3 convolution, y times of 1 × 1 convolution and z times of maximum pooling training on the lesion image, wherein x, y and z are positive integers;
and splicing the first characteristic vector and the second characteristic vector to obtain the lesion characteristic vector.
8. The crop leaf disease identification method according to claim 7, wherein the training of classifying a classifier according to the lesion feature vector and the disease type label corresponding to the lesion image data set comprises:
inputting the lesion feature vectors into a full-connection layer, inputting the data output by the full-connection layer and the disease type labels into the classifier for training, wherein the classifier is a softmax classifier.
9. A crop blade disease recognition device, characterized in that, crop blade disease recognition device includes: a processor and a memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the crop blade disease identification method of any one of claims 1 to 8.
10. A storage medium storing one or more computer programs executable by one or more processors to perform the steps of the crop leaf disease identification method of any one of claims 1 to 8.
CN202110419951.2A 2021-04-19 2021-04-19 Crop leaf disease identification method and device and storage medium Pending CN113269191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110419951.2A CN113269191A (en) 2021-04-19 2021-04-19 Crop leaf disease identification method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110419951.2A CN113269191A (en) 2021-04-19 2021-04-19 Crop leaf disease identification method and device and storage medium

Publications (1)

Publication Number Publication Date
CN113269191A true CN113269191A (en) 2021-08-17

Family

ID=77228992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110419951.2A Pending CN113269191A (en) 2021-04-19 2021-04-19 Crop leaf disease identification method and device and storage medium

Country Status (1)

Country Link
CN (1) CN113269191A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610048A (en) * 2021-08-25 2021-11-05 华南农业大学 Automatic litchi frost blight identification method and system based on image identification and storage medium
CN114241344A (en) * 2021-12-20 2022-03-25 电子科技大学 Plant leaf disease and insect pest severity assessment method based on deep learning
CN114842240A (en) * 2022-04-06 2022-08-02 盐城工学院 Method for classifying images of leaves of MobileNet V2 crops by fusing ghost module and attention mechanism
CN115170542A (en) * 2022-07-26 2022-10-11 中国农业科学院农业信息研究所 Potato early-late blight classification model construction method based on GLCM feature extraction
CN117456214A (en) * 2023-11-06 2024-01-26 江苏省农业科学院 Tomato leaf spot identification method, system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102759528A (en) * 2012-07-09 2012-10-31 陕西科技大学 Method for detecting diseases of crop leaves
WO2019104767A1 (en) * 2017-11-28 2019-06-06 河海大学常州校区 Fabric defect detection method based on deep convolutional neural network and visual saliency
CN111105393A (en) * 2019-11-25 2020-05-05 长安大学 Grape disease and pest identification method and device based on deep learning
CN112183635A (en) * 2020-09-29 2021-01-05 南京农业大学 Method for realizing segmentation and identification of plant leaf lesions by multi-scale deconvolution network
CN112465820A (en) * 2020-12-22 2021-03-09 中国科学院合肥物质科学研究院 Semantic segmentation based rice disease detection method integrating global context information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102759528A (en) * 2012-07-09 2012-10-31 陕西科技大学 Method for detecting diseases of crop leaves
WO2019104767A1 (en) * 2017-11-28 2019-06-06 河海大学常州校区 Fabric defect detection method based on deep convolutional neural network and visual saliency
CN111105393A (en) * 2019-11-25 2020-05-05 长安大学 Grape disease and pest identification method and device based on deep learning
CN112183635A (en) * 2020-09-29 2021-01-05 南京农业大学 Method for realizing segmentation and identification of plant leaf lesions by multi-scale deconvolution network
CN112465820A (en) * 2020-12-22 2021-03-09 中国科学院合肥物质科学研究院 Semantic segmentation based rice disease detection method integrating global context information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
毕欣: "《自主无人***的智能环境感知技术》", 华中科技大学出版社, pages: 114 - 115 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610048A (en) * 2021-08-25 2021-11-05 华南农业大学 Automatic litchi frost blight identification method and system based on image identification and storage medium
CN113610048B (en) * 2021-08-25 2023-08-01 华南农业大学 Automatic identification method, system and storage medium for litchi frost epidemic disease based on image identification
CN114241344A (en) * 2021-12-20 2022-03-25 电子科技大学 Plant leaf disease and insect pest severity assessment method based on deep learning
CN114842240A (en) * 2022-04-06 2022-08-02 盐城工学院 Method for classifying images of leaves of MobileNet V2 crops by fusing ghost module and attention mechanism
CN115170542A (en) * 2022-07-26 2022-10-11 中国农业科学院农业信息研究所 Potato early-late blight classification model construction method based on GLCM feature extraction
CN115170542B (en) * 2022-07-26 2023-02-28 中国农业科学院农业信息研究所 Potato early-late blight classification model construction method based on GLCM feature extraction
CN117456214A (en) * 2023-11-06 2024-01-26 江苏省农业科学院 Tomato leaf spot identification method, system and electronic equipment
CN117456214B (en) * 2023-11-06 2024-05-31 江苏省农业科学院 Tomato leaf spot identification method, system and electronic equipment

Similar Documents

Publication Publication Date Title
CN113269191A (en) Crop leaf disease identification method and device and storage medium
CN110148120B (en) Intelligent disease identification method and system based on CNN and transfer learning
CN105938564B (en) Rice disease identification method and system based on principal component analysis and neural network
Blok et al. The effect of data augmentation and network simplification on the image‐based detection of broccoli heads with Mask R‐CNN
CN106845497B (en) Corn early-stage image drought identification method based on multi-feature fusion
CN111860330A (en) Apple leaf disease identification method based on multi-feature fusion and convolutional neural network
CN112257702A (en) Crop disease identification method based on incremental learning
CN112862792A (en) Wheat powdery mildew spore segmentation method for small sample image data set
CN108073947B (en) Method for identifying blueberry varieties
Netto et al. Segmentation of RGB images using different vegetation indices and thresholding methods
CN115578660B (en) Land block segmentation method based on remote sensing image
CN111882555B (en) Deep learning-based netting detection method, device, equipment and storage medium
Hu et al. Self-adversarial training and attention for multi-task wheat phenotyping
CN113989536A (en) Tomato disease identification method based on cuckoo search algorithm
CN115690452A (en) High-throughput fish phenotype analysis method and device based on machine vision
Ibaraki et al. Image analysis for plants: basic procedures and techniques
CN111612797A (en) Rice image information processing system
CN116416523A (en) Machine learning-based rice growth stage identification system and method
CN110633720A (en) Corn disease identification method
CN115862003A (en) Lightweight YOLOv 5-based in-vivo apple target detection and classification method
CN113034454B (en) Underwater image quality evaluation method based on human visual sense
CN112270220B (en) Sewing gesture recognition method based on deep learning
CN114511567A (en) Tongue body and tongue coating image identification and separation method
CN110135481B (en) Crop lesion detection method and detection device
CN113269750A (en) Banana leaf disease image detection method and system, storage medium and detection device

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