A method for identifying crop disease images

By using LED light sources and specific color space conversion on crop leaves, combined with a neural network model, the problem of early identification of minor diseases has been solved, enabling timely prevention and control and efficient identification, while reducing pesticide usage and costs.

CN117237862BActive Publication Date: 2025-11-25HAINAN HAINING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311081529.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-25
Publication Date
2025-11-25
Estimated Expiration
2043-08-25

AI Technical Summary

Technical Problem

Existing technologies cannot effectively identify early-stage minor diseases on crop leaves, leading to increased pesticide use and disease spread. Furthermore, existing disease identification models miss the optimal control time after lesions appear.

Method used

By illuminating crop leaves with white LED light, a disease identification model was constructed using HSI and Lab color space conversion, maximum inter-class variance segmentation, and VGGNet and Inception V3 neural networks. Combined with least squares segmentation and loss function optimization, the early-stage minor disease characteristics were identified.

Benefits of technology

It enables timely identification of early-stage minor diseases, reduces pesticide use, lowers costs, prevents disease spread, and improves identification accuracy and speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237862B_ABST
    Figure CN117237862B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, solves the technical problem that the prior art cannot identify early slight diseases on crop leaves, and particularly relates to a crop disease image identification method, which comprises the following steps: S1, obtaining an original image of crop leaves under the action of a light source; S2, segmenting the original image to generate a binary image in which the target and background are separated; and S3, judging whether the gray value of any pixel point in the region covered by the target in the binary image is 0. The present application can effectively identify early slight disease characteristics that cannot be identified by computer vision in the past, can timely discover and take corresponding prevention measures in the early stage of disease occurrence, can timely grasp the best prevention time of disease occurrence, thereby reducing the amount and cost of pesticides, and can avoid further spread of the disease.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a crop disease image recognition method. BACKGROUND

[0002] With the popularization of digital image processing and recognition technology based on agricultural Internet, the disease on the crop leaf can be identified by computer at present. After the disease occurs on the leaf of the crop, the disease spot will be formed on the surface of the leaf. The disease spot can be quickly identified by color difference. However, in the early stage of the disease, the image captured by the visual camera and other devices cannot show the slight symptoms of the early disease. Therefore, the color feature of the diseased leaf cannot be used as the basis for identifying the corresponding disease.

[0003] In addition, in the segmentation and extraction of the color feature of the diseased leaf, the effect of identifying the early and slight disease is not significant, and it is often difficult to effectively identify the disease. Under the premise of limited color feature, the current disease recognition model can only identify the disease after the disease spot appears on the leaf. However, the best prevention and control time is missed after the disease spot appears, which not only increases the amount and cost of pesticides, but also cannot timely discover and effectively control the spread of the disease. SUMMARY

[0004] In view of the defects of the prior art, the present application provides a crop disease image recognition method, which solves the technical problem that the prior art cannot identify the early and slight disease on the crop leaf.

[0005] To solve the above technical problems, the present application provides the following technical scheme: a crop disease image recognition method, which comprises the following steps:

[0006] S1, obtaining an original image of a crop leaf under the action of a light source;

[0007] S2, segmenting the original image to generate a binary image in which the target and the background are separated;

[0008] S3, judging whether the gray value of any pixel point in the area covered by the target in the binary image is 0;

[0009] If yes, the process is ended;

[0010] If no, the process proceeds to step S4;

[0011] S4, segmenting the area with a gray value of 255 in the binary image to obtain an early and slight disease feature;

[0012] S5, construct a disease identification model and determine a loss function L, train the disease identification model with the public data set;

[0013] S6, input the early mild disease features into the disease identification model for identification and output the identification result.

[0014] Further, in step S1, the original image of the crop leaf under the action of the light source is: the original image obtained by irradiating the leaf from one side with LED white light and taking a picture on the other side of the leaf with a camera.

[0015] Further, in step S2, the specific process includes the following steps:

[0016] S21, convert the RGB color space of the original image to the HSI color space, and filter out the green area in the HSI color space to obtain image A;

[0017] S22, convert the RGB image of the original image to a three-dimensional XYZ space, and then convert from the XYZ space to the Lab space to obtain image B;

[0018] S23, combine image A and image B to obtain image C, and perform threshold segmentation on image C using the maximum inter-class variance method;

[0019] S24, determine the binary image threshold T for threshold segmentation;

[0020] S25, according to the binary image threshold T, the original image is segmented into a binary image with target and background separated.

[0021] Further, in step S21, the formula for converting the RGB color space to the HSI color space is:

[0022]

[0023] wherein,

[0024]

[0025] wherein, H∈[70, 200], S∈[0.17, 1].

[0026] Further, in step S22, the formula for converting the RGB image to a three-dimensional XYZ space is:

[0027]

[0028] Then, the formula for converting from the XYZ space to the Lab space is:

[0029]

[0030] In the above formula, X, Y, Z are three components corresponding to XYZ space respectively, , and are expressions of the function .

[0031] Further, in step S4, the specific process includes the following steps:

[0032] S41, obtaining all pixel points with a gray value of 255 in the binary image to form a pixel set , and i represents the number of pixel points with a gray value of 255.

[0033] S42, selecting a plurality of pixel points with a gray value of 0 from the pixel set as boundary points ;

[0034] S43, fitting the plurality of boundary points using the least square method to obtain a boundary line ;

[0035] S44, performing segmentation with the boundary line as a segmentation line to obtain the early slight disease characteristics.

[0036] Further, in step S42, the specific process includes the following steps:

[0037] S421, selecting any pixel point as an origin, and setting a region range with the origin and a radius of r to establish a neighborhood, and the length of r is the Euclidean distance between two pixel points .

[0038] S422, searching whether there is a pixel point with a gray value of 0 in the neighborhood , , and n represents the number of pixel points with a gray value of 0.

[0039] If yes, the pixel point is a boundary point ;

[0040] If no, returning to step S421.

[0041] Further, in step S5, the disease recognition model is composed of a VGGNet convolutional neural network used as a basic feature extractor and an Inception V3 neural network used for improving high-dimensional features and classifying by using multi-scale feature maps.

[0042] ​​The VGGNet convolutional neural network is based on the original network structure, sets the last convolutional layer as a 3*3*512 convolution, adds a batch normalization BN convolution layer on the last convolutional layer, and directly replaces the ReLU with a Swish activation function;

[0043] A global pooling layer and a Softmax classifier are added after the last Inception module of the Inception V3 neural network.

[0044] Further, in step S5, the expression of the loss function L is:

[0045]

[0046] In the above formula, is the probability that the early mild disease feature belongs to a certain category, is a focusing parameter, , is a modulation coefficient, and the value range is .

[0047] By the above technical solution, the present application provides a crop disease image recognition method, which has at least the following beneficial effects:

[0048] 1. The present application realizes effective recognition of early mild disease features that cannot be recognized by previous computer vision, can timely discover and take corresponding prevention measures in the early stage of disease occurrence, can timely grasp the best prevention time of disease occurrence, thereby reducing the amount and cost of pesticides, and can avoid further spread of the disease.

[0049] 2. The present application improves the recognition accuracy of early mild disease features by constructing a disease recognition model, is especially suitable for such disease feature recognition with inconspicuous performance, and uses a loss function L to optimize the disease recognition model, which can improve the average recognition rate of early mild disease features, thereby improving the overall recognition accuracy of early mild disease features.

[0050] 3. The present application can quickly and accurately segment disease images from binary images, the segmented early mild disease features can maintain the basic features of the original image, reduce the number of basic entities in the image, and are not easily disturbed by noise, have the advantages of fast segmentation speed, high segmentation accuracy, and can reduce background interference, and can lay a good foundation for further extraction of feature parameters and recognition of early mild disease features by the subsequent disease recognition model, thereby improving the accuracy of disease recognition. BRIEF DESCRIPTION OF DRAWINGS

[0051] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application, and do not limit the application. In the drawings:

[0052] Figure 1 A flow chart of the crop disease image recognition method of the present application;

[0053] Figure 2 A schematic diagram of the leaf image and the corresponding binary image;

[0054] Figure 3 A schematic diagram of the original image under the light source and the corresponding binary image;

[0055] Figure 4 A network structure diagram of the disease recognition model of the present application;

[0056] Figure 5 A schematic diagram of determining the boundary point from a plurality of pixel points. DETAILED DESCRIPTION

[0057] In order to make the above-mentioned purposes, features and advantages of the present application more obvious, clear and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments. The realization process of how to apply technical means to solve technical problems and achieve technical effects of the present application can be fully understood and implemented.

[0058] Crop diseases not only cause the decline of agricultural product yield and quality, but also lead to the abuse of pesticides, which not only increases the cost of agricultural production, but also brings food safety and environmental pollution problems. Practice shows that reasonable use of pesticides is the most effective means to prevent and control crop diseases, which not only effectively controls the occurrence of crop diseases, but also reduces the pollution of pesticides to the environment and agricultural products. As we all know, reasonable use of pesticides requires accurate acquisition of crop growth state information, and the most critical is to quickly and accurately identify the type of crop disease.

[0059] Traditional crop disease identification mainly relies on the experience of farmers or professional technicians in the field, which is limited by professional knowledge, and farmers often cannot judge or misjudge some crop diseases. In addition, since some crop diseases have no obvious symptoms at the initial stage or similar symptoms, even professional technicians are difficult to identify exactly, and when the symptoms are obvious, the best prevention and control time has been missed, which not only increases the amount and cost of pesticides, but also cannot find and effectively control the spread of diseases in time.

[0060] To solve the technical problems existing at present, please refer to Figure 1 The embodiment provides a crop disease image recognition method, which comprises the following steps:

[0061] S1, acquire the original image of the crop leaf under the action of the light source, for the definition of the light source under the action of the leaf is to use LED white light to irradiate from one side of the leaf, and the other side of the leaf is photographed by the camera, as shown in a of Figure 3 , the main role of using light source to irradiate in the shooting of the original image is to acquire the disease symptoms that are not easy to detect on the leaf, Figure 2 and Figure 3 , as shown in a of Figure 2 , under the action of the light source, the leaf is difficult to distinguish from the color with the naked eye, and the high-resolution picture taken by the camera vision is also difficult to distinguish the existence of disease symptoms, as shown in b of Figure 2 , it is a binary image of a leaf in Figure 2 , after binarization processing, the gray value of the leaf with early and slight disease symptoms is 0, that is, black, so that the color characteristics of the diseased leaf cannot be used as the basis for judging the corresponding disease, and the disease recognition effect is not significant for the early and slight disease symptoms in the segmentation and extraction of the color characteristics of the diseased leaf, and it is difficult to effectively identify the disease, therefore, under the premise of limited color characteristics, the existing disease recognition model has limitations in disease recognition, and can only recognize the disease that has shown obvious symptoms.

[0062] , as shown in a of Figure 3 , by adding a white light source to irradiate from one side of the leaf, and then shooting the other side with a camera to acquire the original image under a specific environment, it can be clearly seen from the figure that the texture on the leaf, which can better extract the comprehensive feature information of shape, texture, color and other features required by the current multi-level pattern recognition model, and the slight disease symptoms on the leaf have also been shown, although not clearly visible, but the camera vision can display it, as shown in b of Figure 3 , it is a binary image of a leaf in Figure 3 , after binarization processing, the gray value of the part of the leaf with early and slight disease symptoms is 255, that is, white, therefore, according to this phenomenon, the embodiment judges and identifies whether there is early and slight disease on the leaf according to the different gray values, then segments the slight disease part to maintain the basic features of the original image, and finally identifies the characteristics of the early and slight disease through the built disease detection network model.

[0063] S2, segmenting the original image to generate a binary image separating the target and the background; in order to clearly and completely describe the embodiments for implementing step S2, refer to the method steps shown in steps S21 to S25, and the specific process includes the following steps:

[0064] S21, converting the RGB color space of the original image to the HSI color space, and filtering out the green region in the HSI color space to obtain image A; in this step, the formula for converting the RGB color space to the HSI color space is:

[0065]

[0066] wherein,

[0067]

[0068] The above formula can convert the RGB color space of the original image to the HSI color space, so that the segmentation effect of the original image under the HSI color space is more significant. According to the characteristics of the HSI color space, the I component is irrelevant to the color information of the image, but the H and S components are closely related to the way people perceive colors. According to this characteristic, after multiple test tests, when H∈[70, 200] and S∈[0.17, 1], the green region of the crop leaf can be approximately represented. Therefore, the above region is removed under the HSI color space to achieve the purpose of filtering the green part of the leaf. Compared with the RGB color mode, the HSI mode is more in line with the feeling law of the human eye to color, and it can separate the color information of the image from the brightness information, which can enable the computer to convert the recognition mode according to different light.

[0069] S22, converting the RGB image of the original image to a three-dimensional XYZ space, and then converting the XYZ space to Lab space to obtain image B; in this step, the formula for converting the RGB image to a three-dimensional XYZ space is:

[0070]

[0071] X, Y and Z are respectively the three components corresponding to the XYZ space, and the formula for converting the XYZ space to the Lab space is:

[0072]

[0073] In the above formula, , and Let represent,

[0074]

[0075] Because of the RGB color model has the disadvantages of not intuitive, not uniform, and does not conform to the human perception of color psychology, there are many disadvantages in processing color images, and the conversion to Lab space has the uniformity of perception, and the human perception of color is very similar, therefore the original image is converted to Lab space to obtain the best segmentation effect.

[0076] S23, image A and image B are combined to obtain image C, and the maximum inter-class variance method is used for threshold segmentation of image C. The combination of image A and image B can be completed by existing technical means, that is, four pixel points at the same position of the top corners of image A and image B are taken as fixed points, and image A and image B are combined to obtain image C, and then the maximum inter-class variance method is used for threshold segmentation of image C.

[0077] The embodiment combines the advantages of Lab and HSI color spaces, and considers the color characteristics of the leaves. The segmented leaf target contour is clear, the green background residue is less, the segmentation effect is excellent, the clarity of the binary image is improved, and the judgment of whether there is early mild disease in the leaves according to the gray value is laid as a foundation, so that the effective recognition degree of early mild disease is improved.

[0078] S24, determine the binary image threshold T for threshold segmentation. In this step, the binary image threshold T can be determined by calculating the average gray value of the target and the background, that is, the average gray value of the target is set as The average gray value of the background is set as The calculation formula of the binary image threshold T is:

[0079]

[0080] S25, according to the binary image threshold T, the original image is segmented into a binary image in which the target and the background are separated. The purpose of image binarization processing is to separate the background and the target, and to reduce the data amount of subsequent processing. Image binarization is a gray scale transformation process, which converts a gray scale image into a black and white binary image through a transformation function. Specifically, according to the binary image threshold T, if the gray scale of a pixel in the target image is less than T, the gray scale value of the pixel is set to 0, that is, black, otherwise the pixel value is set to 255, that is, white, so that any pixel point in the target image is set as Therefore, the pixel point The expression of the binarization conversion is:

[0081]

[0082] In the above formula, represents any pixel point in the target image, Represents pixels grayscale, This represents the threshold value for a binary image.

[0083] S3. Determine whether the gray value of any pixel in the region covered by the target in the binary image is 0;

[0084] If so, then the process ends;

[0085] If not, then there are early minor defects on the original image, and proceed to step S4;

[0086] like Figure 3 As shown in b, it is Figure 3 After binarization, the grayscale value of the parts of leaf a with early minor disease is 255, which is white. Therefore, based on this phenomenon, this embodiment judges and identifies whether there is early minor disease on the leaf by the difference in grayscale value, and then segments the part with minor disease to maintain the basic features of the original image. Finally, a disease detection network model is built to identify the disease and thus obtain the specific symptoms of early minor disease.

[0087] S4. Segment the region with a gray value of 255 in the binary image to obtain early minor disease features; To clearly and completely describe the implementation method of step S4, please refer to the method steps shown in steps S41 to S44 below. The specific process includes the following steps:

[0088] S41. Obtain all pixels with a grayscale value of 255 in the binary image. Pixel set , where i represents the number of pixels with a grayscale value of 255;

[0089] S42, From pixel set Select any number of adjacent pixels where the grayscale value is 0. As boundary point ;like Figure 5 As shown, in order to clearly and completely describe the implementation method of step S42, please refer to the method steps shown in steps S421 to S422 below. The specific process includes the following steps:

[0090] S421. Select any pixel. Let r be the origin, and define a neighborhood with a radius of r, where r is two pixels in length. The Euclidean distance between them;

[0091] S422. Search for whether there are pixels with a gray value of 0 in the neighborhood. , , the number of pixel points with a gray value of 0;

[0092] If yes, the pixel point is a boundary point .

[0093] If no, return to step S421.

[0094] In this method, by setting any pixel point as the origin, and establishing a neighborhood with the Euclidean distance of two pixel points as the radius r, the pixel points adjacent to the origin are located on the neighborhood, i.e. in the circle with the radius r, at this time, it is only needed to determine whether there is more than one pixel point with a gray value of 0 distributed on the circle, if yes, it indicates that the pixel point is at the boundary of the pixel points with a gray value of 0 and 255, if no, it indicates that the periphery of the pixel point is all pixel points with a gray value of 255, thus the pixel point is not at the boundary of the pixel points with a gray value of 0 and 255, i.e. the pixel point cannot be a boundary point .

[0095] S43, using the least square method to fit a plurality of boundary points to obtain a boundary line ;

[0096] S44, using the boundary line as the segmentation line to obtain the early slight disease feature.

[0097] According to the method proposed in steps S41-S44, through this segmentation method, all the boundary points can be quickly screened out from the known number of pixel sets , and according to the coordinates of the boundary points (i.e. the coordinates of the pixel points ), the least square method is used for curve fitting to obtain , and then using the boundary line as the segmentation line to segment, the disease image can be quickly and accurately segmented from the binary image, the early slight disease feature segmented by this method can not only maintain the basic features of the original image, reduce the number of basic entities in the image, but also is not easily disturbed by noise, has the advantages of fast segmentation speed, high segmentation accuracy, and can reduce background interference, and can lay a good foundation for further extraction of feature parameters and recognition of early slight disease features by the subsequent disease recognition model, thereby improving the accuracy of disease recognition.

[0098] S5. Construct a disease identification model and determine the loss function L. Train the disease identification model using a public dataset. The disease identification model consists of a VGGNet convolutional neural network used as a basic feature extractor and an Inception V3 neural network used to improve high-dimensional features and classify using multi-scale feature maps. The VGGNet convolutional neural network is based on the original network structure, with the last convolutional layer set to a 3×3×512 convolution. A batch normalization (BN) convolutional layer is added on the last convolutional layer, and the Swish activation function is used to directly replace ReLU. Adding BN on the last convolutional layer can achieve an improvement of more than 2% in mean accuracy. The test accuracy of the Swish activation function is 0.9% higher than that of ReLU in ImageNet, thereby improving the extraction effect of the VGGNet training module on early minor disease features.

[0099] A global pooling layer and a Softmax classifier are added after the last Inception module of the Inception V3 neural network.

[0100] like Figure 4 The diagram shows the network structure of the disease identification model. The first few layers of the convolutional neural network typically extract color and corner features. Extracting these features using the Inception V3 neural network is almost worthless. Therefore, the Conv1_1 to Pool3 layers of the VGGNet convolutional neural network are retained. The subsequent layers Conv5_1 to Conv5_3 of the VGGNet convolutional neural network are replaced by two initial modules and an added batch normalization (BN) convolutional layer. Swish is used as the activation function instead of ReLU. That is, in order to improve the network's multi-scale feature extraction capability, a convolutional layer with batch normalization and Swish functions is added after pooling3. Then, two initial modules consisting of Inception and Concat are used.

[0101] Specifically, regarding the determination of the loss function L for the disease identification model, in this embodiment, the expression for the loss function L is as follows:

[0102]

[0103] In the above formula, This represents the probability that early, minor disease characteristics belong to a certain category. To focus parameters, In this embodiment, , The modulation coefficient has a value range of 100. .

[0104] The verification result is as follows: The effect is best when the value is 2. If the prediction accuracy of early mild diseases is high at this time, that is, very high, then the value will be very small, and the change rate of the loss function L will become very small, and vice versa. The final loss function values of the samples with prediction accuracy of early mild diseases of 0.95 and 0.5 will differ by 100 times. Therefore, the disease identification model will focus on the samples with low prediction accuracy of early mild diseases, thereby improving the average recognition rate of the disease identification model.

[0105] For the training of the disease identification model, the PlantVillage dataset is used as the training set in the embodiment. The PlantVillage dataset is an internationally recognized dataset for testing plant disease detection machine learning algorithms, and contains 54309 images. These pictures cover 14 crops: apple, blueberry, cherry, corn, grape, orange, peach, sweet pepper, potato, raspberry, soybean, pumpkin, strawberry, and tomato. There are 17 kinds of fungal diseases, 4 kinds of bacterial diseases, 2 kinds of mold (oomycete) diseases, 2 kinds of viral diseases, and 1 kind of leaf disease caused by mites. There are also images of healthy leaves of 12 crops that are not significantly affected by diseases.

[0106] Firstly, the repeated data in the crop disease RGB image data is removed, and the data after removal is divided into a training set, a verification set and a test set, and the ratio is 6:2:2. Secondly, the image as the input layer is normalized, which is beneficial to the subsequent training of the disease identification model. Then, data augmentation is performed, the disease image is randomly rotated by 30°, randomly translated by 20% in the horizontal direction and the vertical direction, randomly sheared with a strength of 0.2, and the image is randomly scaled by 0.2. The image is randomly horizontally flipped, and finally all the disease images are adjusted to 150x150 pixels. The sample label array adopts 2D one-hot encoding label.

[0107] The disease identification model is constructed and trained by using the public dataset, so as to obtain the trained disease identification model. This can ensure the training effect of the disease identification model, thereby improving the recognition accuracy of the early mild disease characteristics, especially for the identification of such unobvious disease characteristics. The loss function L is used to optimize the disease identification model, which can improve the average recognition rate of the early mild disease characteristics, thereby improving the overall recognition accuracy of the early mild disease characteristics.

[0108] S6, input the early slight disease characteristics into the disease recognition model for recognition and output the recognition result, in this step, the trained disease recognition model can complete the accurate recognition of the early slight disease characteristics, the disease recognition model can recognize the early slight disease characteristics and determine the specific disease, first, the type of the crop is determined, that is, the leaf is the crop, then the early slight disease characteristics are recognized and compared in the database to obtain the corresponding disease as the result output.

[0109] The embodiment realizes effective recognition of the early slight disease characteristics that cannot be recognized by the previous computer vision, the early slight disease characteristics can be recognized in time in the early stage of the disease, and the corresponding prevention measures can be taken in time, the best prevention time of the disease can be grasped in time, thereby the amount and cost of the pesticide are reduced, and the further spread of the disease can be avoided.

[0110] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiment methods can be completed by programs instructing related hardware, therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product in the form of one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program codes.

[0111] The above embodiments are described in detail, the principles and implementation manners of the present application are described by applying specific examples, the above embodiment is only used to help understand the method of the present application and the core idea thereof; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed, and the above description should not be understood as the limitation of the present application.

Claims

1. A method of identifying a crop disease image, characterized by, The method comprises the following steps: S1, obtaining an original image of a crop leaf under the action of a light source, that is, an original image obtained by irradiating the leaf from one side thereof with LED white light and photographing the leaf from the other side thereof with a camera; S2, segmenting the original image to generate a binary image separating the target and the background, and the specific process comprises the following steps: S21, converting the RGB color space of the original image to the HSI color space, and filtering out the green region in the HSI color space to obtain an image A; S22, converting the RGB image of the original image to a three-dimensional XYZ space, and then converting from the XYZ space to the Lab space to obtain an image B; S23, merging the image A and the image B to obtain an image C, and performing threshold segmentation on the image C by using the maximum inter-class variance method; S24, determining a binary image threshold T for threshold segmentation; S25, segmenting the original image into a binary image separating the target and the background according to the binary image threshold T; S3, judging whether the gray value of any pixel point in the region covered by the target in the binary image is 0; If yes, end; If no, go to step S4; S4, segmenting the region with a gray value of 255 in the binary image to obtain an early mild disease feature; S5, constructing a disease recognition model and determining a loss function L, training the disease recognition model with a public data set, and the expression of the loss function L is: ; In the above formula, is the probability that the early mild disease feature belongs to a certain class, is a focusing parameter, , is a modulation coefficient, and the value range is ; S6, inputting the early mild disease feature into the disease recognition model for recognition and outputting a recognition result.

2. The identification method according to claim 1, characterized in that, In step S21, the formula for converting the RGB color space to the HSI color space is: ; wherein, ; wherein, H∈[70, 200], S∈[0.17, 1].

3. The identification method according to claim 1, characterized in that, In step S22, the formula for converting the RGB image to the three-dimensional XYZ space is: ; Then, the formula for converting from the XYZ space to the Lab space is: ; In the above formula, X, Y, Z are respectively three components corresponding to XYZ space, , and are expressions of the function .

4. The identification method according to claim 1, characterized in that, In step S4, the specific process comprises the following steps: S41、acquire all pixel points with gray value 255 in the binary image constitute a pixel set , i represents the number of pixel points with gray value 255 S42, selecting any one of the pixel points with a gray value of 0 from the pixel set ;​​ S43, fitting the boundary line by least square method to several boundary points ; S44, with the boundary line S44, with the boundary line S44, with the boundary line S44, with the boundary line S44, with the boundary line <000 5. The identification method according to claim 4, characterized in that, In step S42, the specific process comprises the following steps: S421. Select any pixel. Let r be the origin, and define a neighborhood with a radius of r, where r is two pixels in length. The Euclidean distance between them; S422, searching whether there is a pixel point with a gray value of 0 on the neighborhood , , represents the number of pixel points with a gray value of 0 If yes, the pixel point is a boundary point ; If no, return to step S421.

6. The identification method of claim 1, wherein, In step S5, the disease recognition model is composed of a VGGNet convolutional neural network serving as a basic feature extractor and an Inception V3 neural network serving to improve high-dimensional features and utilize multi-scale feature maps for classification; The VGGNet convolutional neural network is based on the original network structure, sets the last convolutional layer to 3×3×512 convolution, adds a batch normalization BN convolution layer on the last convolutional layer, and uses a Swish activation function to directly replace ReLU; A global pooling layer and a Softmax classifier are added after the last Inception module of the Inception V3 neural network.

Citation Information

Patent Citations

  • Banana leaf disease image detection method and system, storage medium and detection equipment

    CN113269750A