A tea leaf disease identification method based on a DS-Net model

By combining the DS-Net model with multi-scale branching and spatial attention mechanisms, the problems of overfitting and low accuracy in tea disease identification were solved, achieving efficient early tea disease identification with an accuracy rate of 96.55%.

CN116681938BActive Publication Date: 2025-10-21SUZHOU SUZE TIANWU ROBOT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310659379.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2025-10-21
Estimated Expiration
2043-06-05

AI Technical Summary

Technical Problem

Existing traditional image classification models suffer from overfitting and low accuracy in tea disease identification, especially in the early stages of tea disease identification where it is difficult to extract key features, resulting in low accuracy.

Method used

The DS-Net model, including the Conv feature extraction module, two-layer BT module and Neck module, is adopted. It combines multi-scale branching, spatial attention mechanism and self-correcting convolution. The model weights are optimized through data augmentation and multiple training to improve the accuracy and robustness of tea disease identification.

Benefits of technology

It improved the accuracy of tea disease identification, reaching an average accuracy of 96.55%, which is significantly better than other models, and enhanced the model's generalization ability and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116681938B_ABST
    Figure CN116681938B_ABST
Patent Text Reader

Abstract

The application relates to the computer technology image recognition technical field and discloses a tea leaf disease identification method based on a DS-Net model. The method comprises the following stages: a training stage: tea leaf disease pictures are taken and made into a data set, the data set is divided into a training set and a test set, and data is preprocessed; a multi-scale branch extraction module, an improved self-correcting convolution MSC-Conv and spatial attention CA are introduced into the DS-Net model to construct the DS-Net model; the training data set is input into the DS-Net model, the best weight is saved after multiple training; and a test stage: tea leaf disease pictures to be identified are input, and the DS-Net network model obtained through training is used for classifying and identifying tea leaf diseases. Compared with the prior art, the application can accurately identify early tea leaf diseases, improves tea leaf production and solves the problem of early tea leaf diseases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer technology image recognition, and particularly relates to a tea disease recognition method based on a DS-Net model. Background Art

[0002] Tea cultivation and processing originated in China. Tea is made from the leaves of the Camellia sinensis plant. Tea boasts health benefits, including reducing the risk of cardiovascular disease and mortality, lowering the risk of diabetes, boosting immunity, helping prevent and treat Alzheimer's disease, combating stress and anxiety, and promoting weight loss. Consequently, it has become a popular drink both domestically and internationally. However, demand for tea has increased in recent years. Manual labeling of tea plantations is labor-intensive, prone to subjective errors, and incompletely covers all conditions. This carries the risk of omissions or mislabeling, significantly reducing tea quality and impacting sales.

[0003] With the development of artificial intelligence technology in the field of crop disease identification, the use of traditional image classification models for crop disease identification has significantly reduced crop morbidity and increased crop yields. However, tea disease samples differ from traditional crop diseases in that they are unevenly distributed. Using raw data for identification can easily lead to model overfitting and low recognition accuracy. Tea disease identification requires early detection. However, because diseased leaves occupy a relatively small area and have minimal color difference from healthy leaves, traditional image classification models struggle to extract key features, making it difficult to identify tea diseases. Summary of the Invention

[0004] Purpose of the invention: In response to the above problems, the present invention provides a tea disease identification method based on the DS-Net model. This method can accurately identify early tea diseases, improve tea production, and solve the problem of early tea diseases.

[0005] Technical solution: The present invention proposes a tea disease identification method based on the DS-Net model, comprising the following steps:

[0006] Step 1: Collect and save tea disease data, manually label the tea disease data and create a dataset;

[0007] Step 2: Preprocess the tea disease dataset and enhance the original dataset to achieve data generalization;

[0008] Step 3: Divide the prepared data set into training set and test set according to a certain ratio;

[0009] Step 4: Construct a DS-Net model for tea disease identification. The DS-Net model includes a Conv feature extraction module, a two-layer BT module, and a Neck module. The BT module includes a Bottleneck module and a Transition module.

[0010] Step 5: Update the weights through multiple training sessions to obtain the optimal training model weights and identify tea diseases.

[0011] Furthermore, the tea diseases in step 1 are divided into 6 categories: algal leaf spot, red leaf spot, brown wilt, gray wilt, anthracnose and healthy.

[0012] Furthermore, in step 2, data enhancement processing is performed on the tea disease picture, and the data enhancement includes flip transformation, rotation transformation, cropping transformation, brightness and contrast transformation; wherein, flip transformation is to flip the image data horizontally and vertically in sequence, and the relative position of the tea disease will not change, simulating different shooting angles; rotation transformation is to rotate the image at a certain angle to obtain image data from different angles; cropping transformation is to crop different areas of the image according to a certain ratio, thereby increasing the diversity of the image; adjusting brightness and contrast transformation is to simulate images taken under different lighting conditions.

[0013] Furthermore, the Conv feature extraction module structure in step 4 is as follows:

[0014] The Conv feature extraction module adopts a multi-scale branch extraction module, which is divided into two branches. The first branch contains two serial convolutions, a spatial attention mechanism and maximum pooling. The second branch uses 3*3 convolution and maximum pooling to perform feature splicing on the data extracted by the first and second branches, thereby improving the feature extraction capability.

[0015] Furthermore, the BT module is composed of a Bottleneck module and a Transition module, and the specific structure is as follows:

[0016] The Bottleneck module includes a 1*1 convolution kernel and an improved self-correcting convolution MSC-Conv module. The MSC-Conv module includes self-correcting convolution, spatial attention mechanism and grouped convolution. The self-correcting convolution expands the field of view of each grouped convolution through internal communication. While expanding the grouped convolution, the spatial attention mechanism is adopted to enrich the output features.

[0017] The Transition module reduces the number of channels of the feature map generated by the previous module, including a compressed convolution and an average pooling, and uses a 1*1 convolution kernel to perform convolution dimensionality reduction on the feature map, reducing the feature channels of the next layer input. Average pooling further reduces the size of the feature map to reduce calculation and memory.

[0018] Furthermore, the specific execution process of the BT module is as follows:

[0019] The feature vector after feature extraction serves as the input of the first Bottleneck module. The layer in the first Bottleneck module is iterated 6 times, and the layer in the second Bottleneck module is iterated 12 times. The backbone network of the layer layer adopts a series combination of 1*1 convolution and improved self-correction convolution MSC-Conv module. The features of each iterative layer are concatenated with the previous layer.

[0020] After feature extraction through the first Bottleneck module, the feature vector of the first-layer Transition input is obtained. After a BatchNorm normalization process and a ReLU activation function, it is subjected to 1*1 convolution and 3*3 average pooling to finally obtain the feature vector of the first-layer Transition output; the feature vector output by the first-layer Transition is used as the input of the second Bottleneck module. After feature extraction by the second Bottleneck module, the feature vector of the second-layer Transition input is obtained. After a BatchNorm normalization process and a ReLU activation function, it is subjected to 1*1 convolution and 3*3 average pooling to finally obtain the feature vector output by the second-layer Transition module, which is the final output of the two-layer BT module.

[0021] Furthermore, the Neck module structure is as follows:

[0022] The Neck module specifically includes a 1*1 convolution and a 1*1 adaptive average pooling. The output of the two-layer BT module is used as the input of the Neck module, and a 1*1 convolution kernel is used to perform convolution dimensionality reduction on the feature map.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] 1. The Conv module used in the present invention is a combination of a multi-scale feature extraction module and a spatial attention mechanism module. It can not only be used to extract features of different resolutions and regions, but also capture richer visual information. This helps to extract data features while also solving long-distance dependencies.

[0025] 2. The MSC-Conv module employed in this paper combines self-correcting convolution, spatial attention, and grouped convolution. By integrating features from different layers and kernel sizes, it can capture more useful detail data, thereby improving the accuracy and robustness of the model. Self-correcting convolution adaptively treats the surrounding information environment of each spatial location as coming from a low-resolution source, effectively expanding the receptive field of the self-correcting convolution layer. Grouped convolution reduces the number of calculated parameters, thereby increasing the running speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flow chart of the tea disease identification method based on DS-Net;

[0027] Figure 2 This is a schematic diagram of the network model structure of the tea disease identification method constructed by the present invention;

[0028] Figure 3 This is a structural diagram of the Conv feature extraction module;

[0029] Figure 4 This is a schematic diagram of the BT module structure;

[0030] Figure 5 This is a schematic diagram of the Bottleneck module structure;

[0031] Figure 6 Schematic diagram of the MSC-Conv module structure;

[0032] Figure 7 This is a schematic diagram of the Transition module structure;

[0033] Figure 8 Neck module structure diagram;

[0034] Figure 9 is a schematic diagram of average accuracy;

[0035] Figure 10 is a schematic diagram of the average loss rate;

[0036] Figure 11 The original image of tea leaves and the processed image provided by the embodiment of the present invention. DETAILED DESCRIPTION

[0037] The present invention will be described in further detail below with reference to the accompanying drawings.

[0038] The present invention discloses a tea disease identification method based on DS-Net model, see Figure 1 , specifically including the following steps:

[0039] Step 1: Collect and save tea disease image data, manually label the tea disease categories and create a dataset.

[0040] Tea disease categories are divided into six categories, including algal leaf spot, red leaf spot, brown wilt, gray blight, anthracnose, and healthy. These images include leaves in shaded areas, leaves under different lighting conditions, leaves wet by rain, etc. Figure 11 As shown, this embodiment provides a tea picture, the left side is the original picture, and the right side is the processed picture.

[0041] Step 2: Divide the dataset into training set and test set according to a certain ratio and perform data preprocessing on the tea disease images. The tea sample images are divided into training set and test set according to an 8:2 ratio.

[0042] Preprocess the sample data of the tea dataset, including:

[0043] (1) The tea dataset is denoised using median filtering technology, which can remove noise while better protecting the image edge details.

[0044] (2) The processed sample data is enhanced by performing flip transformation, rotation transformation, brightness and contrast transformation, and cropping transformation to expand the generalization of the image data. The preprocessed dataset contains a total of 5,867 images, including 4,694 images in the training set and 1,173 images in the test set.

[0045] Step 3: Construct a DS-Net model for tea disease identification, such as Figure 2 As shown in the figure, the system consists of a Conv feature extraction module, a two-layer BT module, and a Neck module. First, the input feature vector passes through the Conv feature extraction module, which is also a multi-way parallel branch module composed of convolution kernels and a spatial attention mechanism. The output feature vector after feature concatenation is then subjected to maximum pooling, which reduces the image size, reduces the number of input parameters for the next layer, and improves the execution speed. Next, the BT module is constructed, which consists of a Bottleneck module and a Transition module.

[0046] See also Figure 3 ,Conv feature extraction module is composed of multi-scale feature extraction and spatial attention mechanism, such as Figure 3As shown in the figure, the backbone network is divided into two branches for feature extraction. The first backbone branch is composed of 2*2 convolution, 3*3 convolution, and CA spatial attention mechanism in series. The dimension is first increased and then reduced. The features are obtained while ensuring that the number of channels remains unchanged, reducing the number of parameters. The second branch adopts 3*3 convolution and maximum pooling. Finally, the features of the two branches are fused to extract more effective features.

[0047] See also Figure 4 ,BT module is composed of Bottleneck module and Transition module, see Figure 4 The Bottleneck module is composed of feature concatenation and improved self-correction convolution MSC-Conv module, such as Figure 5 As shown in the figure, the backbone network is composed of a series combination of 1*1 convolution and MSC-Conv modules. The 1*1 convolution is used to reduce the number of parameters and improve computer operation efficiency. The MSC-Conv module includes self-correction convolution, spatial attention mechanism and group convolution. The self-correction convolution expands the field of view of each group convolution through internal communication. While expanding the group convolution, the spatial attention mechanism is used to enrich the output features. Figure 6 The MSC-Conv module adds spatial attention mechanism, residual addition and group convolution operations on the original basis. Spatial attention can effectively solve the long-short distance dependency and better extract the features of the data. Group convolution can reduce the number of calculated parameters, thereby improving computational efficiency.

[0048] See also Figure 7 The Transition module reduces the number of channels in the feature map generated by the previous module and reduces the image resolution, which helps reduce overfitting and improve the model's generalization ability. This module consists of a 1x1 convolution and a 3x3 average pooling layer. The 1x1 convolution is used to reduce the number of parameters required for calculation, and the 3x3 average pooling layer is used to reduce the image size.

[0049] See also Figure 8 , the Neck module is composed of 1*1 convolution and adaptive average pooling.

[0050] First, if Figure 3 As shown, after Figure 2The preprocessed image of size 224*224*3 adopts the Conv feature extraction module. The first main branch is composed of 2*2 convolution, 3*3 convolution, and CA spatial attention mechanism in series. The input feature vector (224*224*3) passes through the 2*2 convolution in the main branch to obtain the output feature vector (32, 114, 114), and then passes through the 3*3 convolution to obtain the output feature vector (32, 57, 57). After the CA spatial attention mechanism, the feature vector is (32, 57, 57), which is normalized by BatchNorm and activated by a ReLU function. Finally, the image size is scaled by half through maximum pooling, and the final feature vector is (32, 29, 29). The second branch performs a 3x3 convolution on the input feature vector (224x224x3). This convolution passes the input feature vector (224x224x3) through the branch, resulting in an output feature vector of (32, 57, 57). This vector undergoes BatchNorm normalization and a ReLU activation function, and is finally scaled to half the image size using max pooling. The resulting feature vector is (32, 29, 29). The two branches are then fused to obtain a feature vector of (64, 29, 29).

[0051] like Figure 5 As shown, through Figure 3 After the feature extraction module, the feature vector (64, 29, 29) is obtained as the input of the Bottleneck module. The Layer layer in the first Bottleneck module is iterated 6 times, and the Layer layer in the second Bottleneck module is iterated 12 times. The backbone network of the Layer layer adopts a series combination of 1*1 convolution and MSC-Conv convolution. Finally, the feature splicing operation is performed on the Layer layer of each iteration with the previous layer.

[0052] First, consider the process of the first Bottleneck module: the input feature vector (64, 29, 29) undergoes BatchNorm normalization and a ReLU activation function, then undergoes a 1x1 convolution to obtain a feature vector (128, 29, 29). This is followed by the MSC-Conv module to obtain a feature vector (160, 29, 29). The first layer in the first Bottleneck module now produces a feature vector (224, 29, 29). This first iteration is complete, and this process is repeated six times. The final feature vector is (1024, 29, 29).

[0053] like Figure 7 As shown, the Transition layer is composed of a 1*1 convolution layer and a 3*3 average pooling layer in series. Figure 4After feature extraction of the first Bottleneck module, the feature vector of the first-layer Transition module input is (1024, 29, 29). After BatchNorm normalization and a ReLU activation function, the feature vector is (1024, 29, 29). After 1*1 convolution, the feature vector is (128, 29, 29). After 3*3 average pooling, the feature vector is (128, 9, 9). Finally, the feature vector of the first-layer Transition output is (128, 9, 9).

[0054] The second Bottleneck module's process: The feature vector (128, 9, 9) output by the first Transition layer serves as the input feature vector (128, 9, 9) for the second Bottleneck module. After BatchNorm normalization and a ReLU activation function, the resulting feature vector is (128, 9, 9). This is then subjected to a 1x1 convolution to obtain a feature vector (128, 9, 9). This is then subjected to an MSC-Conv convolution to obtain a feature vector (160, 9, 9). The first layer in the second Bottleneck module now produces a feature vector (2048, 9, 9). The first round of iterations is now complete. This process is repeated 12 times. The final feature vector is (2048, 9, 9).

[0055] After feature extraction in the second Bottleneck module, the feature vector of the second layer Transition input is (2048, 9, 9). After BatchNorm normalization and a ReLU activation function, the feature vector is (2048, 9, 9). After 1*1 convolution, the feature vector is (256, 9, 9). After 3*3 average pooling, the feature vector is (256, 3, 3). Finally, the feature vector of the second layer Transition output is (256, 3, 3).

[0056] like Figure 8 As shown in Figure 2, the Neck module is composed of a 1*1 convolution and an adaptive average pooling in series. Figure 5 After feature extraction in the second Transition module, the Neck module input feature vector is (256, 3, 3). After BatchNorm normalization and a ReLU activation function, the feature vector is (256, 3, 3). After 1x1 convolution, the feature vector is (1024, 3, 3). After 1x1 adaptive average pooling, the feature vector is (1024, 1, 1).

[0057] Finally, a fully connected layer is used, followed by a Softmax classifier, to convert the individual likelihoods of the individual prediction results into probabilities in the overall prediction.

[0058] Step 4: Save the weights of the best pre-training set through multiple training, and then test the test set.

[0059] In step 3, the Adam optimizer is used, the loss function is the cross entropy loss function, the training batch is 100 times, the initial learning rate is set to 0.0001, the learning rate decay factor is 0.2, the minimum learning rate is 1e-7, and the batch size is set to 16.

[0060] like Figure 9 As shown in Figure 10, after 100 training cycles for tea disease identification, the average accuracy rate was 96.55%, after 100 training cycles for DenseNet121, the average accuracy rate was 96.24%, and after 100 training cycles for ResNet34, the average accuracy rate was 95.06%. Compared with currently popular models, the DS-Net model for tea disease identification can better detect tea diseases.

[0061] Mean Absolute Percentage Error (MAPE):

[0062]

[0063] Among them, y i represents the true value, x i Represents the regression prediction value, n represents the number of regression data, and the smaller the MAPE value, the better.

[0064] The formula of the cross entropy loss function is:

[0065]

[0066] The larger the predicted result p(x) of x, the smaller the cross entropy f(x).

[0067] The performance evaluation indicators of the present invention adopt accuracy, precision, recall, and comprehensive evaluation index (F-Measure). The formulas of each evaluation index are as follows:

[0068]

[0069] This indicator is mainly used to indicate the number of correctly predicted samples out of the total number of samples.

[0070]

[0071] The precision reflects the proportion of samples predicted to be positive that are actually positive.

[0072]

[0073] This indicator reflects the ratio of the number of samples predicted to be positive to the total number of positive samples; TP represents the number of positive samples predicted to be positive; TN represents the number of negative samples predicted to be negative; FP represents the number of negative samples predicted to be positive; and FN represents the number of positive samples predicted to be negative.

[0074] The F1-Measure formula is as follows:

[0075]

[0076] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.

Claims

1. A tea disease identification method based on DS-Net model, characterized in that: The following steps are involved: Step 1: Collect and save tea disease data, manually label the tea disease data and create a dataset; Step 2: Preprocess the tea disease dataset and enhance the original dataset to achieve data generalization; Step 3: Divide the prepared dataset into training set and test set; Step 4: Construct a DS-Net model for tea disease identification. The DS-Net model includes a Conv feature extraction module, a two-layer BT module, and a Neck module. The BT module includes a Bottleneck module and a Transition module. The Conv feature extraction module adopts a multi-scale branch extraction module, which is divided into two branches. The first branch contains two serial convolutions, a spatial attention mechanism, and maximum pooling. The second branch uses 3*3 convolution and maximum pooling to concatenate the data extracted by the first and second branches, thereby improving the feature extraction capability. The BT module consists of a Bottleneck module and a Transition module, and its specific structure is as follows: The Bottleneck module includes a 1*1 convolution kernel and an improved self-correcting convolution MSC-Conv module. The MSC-Conv module includes self-correcting convolution, spatial attention mechanism and grouped convolution. The self-correcting convolution expands the field of view of each grouped convolution through internal communication. While expanding the grouped convolution, the spatial attention mechanism is adopted to enrich the output features. The Transition module reduces the number of channels of the feature map generated by the previous module, including a compressed convolution and an average pooling. It uses a 1*1 convolution kernel to perform convolution dimensionality reduction on the feature map, reducing the feature channels of the next layer input. Average pooling further reduces the size of the feature map to reduce calculation and memory; Step 5: Update the weights through multiple training sessions to obtain the optimal training model weights and identify tea diseases.

2. A tea disease identification method based on DS-Net model according to claim 1, characterized in that: The tea diseases in step 1 are divided into 6 categories: algal leaf spot, red leaf spot, brown wilt, gray wilt, anthracnose and healthy.

3. A tea disease identification method based on DS-Net model according to claim 1, characterized in that: In step 2, data enhancement processing is performed on the tea disease image, and the data enhancement includes flip transformation, rotation transformation, cropping transformation, brightness and contrast transformation; wherein, flip transformation is to flip the image data horizontally and vertically in sequence, and the relative position of the tea disease does not change, simulating different shooting angles; adjusting the brightness and contrast transformation is to simulate images taken under different lighting conditions.

4. The tea disease identification method based on the DS-Net model according to claim 1, characterized in that: The specific execution process of the BT module is as follows: The feature vector after feature extraction serves as the input of the first Bottleneck module. The layer in the first Bottleneck module is iterated 6 times, and the layer in the second Bottleneck module is iterated 12 times. The backbone network of the layer layer adopts a series combination of 1*1 convolution and improved self-correction convolution MSC-Conv module. The features of each iterative layer are concatenated with the previous layer. After feature extraction through the first Bottleneck module, the feature vector of the first-layer Transition input is obtained. After a BatchNorm normalization process and a ReLU activation function, it is subjected to 1*1 convolution and 3*3 average pooling to finally obtain the feature vector of the first-layer Transition output; the feature vector output by the first-layer Transition is used as the input of the second Bottleneck module. After feature extraction by the second Bottleneck module, the feature vector of the second-layer Transition input is obtained. After a BatchNorm normalization process and a ReLU activation function, it is subjected to 1*1 convolution and 3*3 average pooling to finally obtain the feature vector output by the second-layer Transition module, which is the final output of the two-layer BT module.

5. The tea disease identification method based on the DS-Net model according to claim 1, characterized in that: The Neck module structure is as follows: The Neck module specifically includes a 1*1 convolution and a 1*1 adaptive average pooling. The output of the two-layer BT module is used as the input of the Neck module, and a 1*1 convolution kernel is used to perform convolution dimensionality reduction on the feature map.

Citation Information

Patent Citations

  • Crop disease identification method based on convolutional neural network

    CN114445715A

  • Image feature recognition and classification method and device based on improved SE-DenseNet-FL model

    CN116188976A