Creation method and apparatus for tea leaf disease recognition model, and device and storage medium

By constructing a tea disease identification model based on MobileNetV3 and ULAM, the problem of low disease identification efficiency in tea cultivation was solved, and efficient automatic identification and intelligent prevention and control were achieved on resource-constrained equipment, thereby improving the level of intelligence in tea cultivation.

WO2025255986A1PCT designated stage Publication Date: 2025-12-18SUZHOU VOCATIONAL UNIVERSITY (SUZHOU OPEN UNIVERSITY)

Patent Information

Application Number
PCT/CN2024/119155
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-12
Filing Date
2024-09-14
Publication Date
2025-12-18

AI Technical Summary

Technical Problem

Existing technologies are inefficient in identifying and controlling tea diseases in tea cultivation, requiring a large amount of manpower and lacking sufficient intelligence, making it difficult to achieve rapid identification and timely treatment.

Method used

A tea disease identification model was constructed using the MobileNetV3 model, the ultra-lightweight attention model, and the fully connected layer. The MobileNetV3 model was improved by multi-stage feature fusion and the ultra-lightweight attention module (ULAM). The model was trained by combining cross-entropy and center loss function to achieve automatic identification of tea diseases.

Benefits of technology

The model's parameter count and computational load have been reduced, enabling its use on resource-constrained mobile or embedded devices. This has improved the accuracy and efficiency of tea disease identification and enhanced the level of intelligent tea cultivation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024119155_18122025_PF_FP_ABST
    Figure CN2024119155_18122025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present invention are a creation method and apparatus for a tea leaf disease recognition model, and a device and a storage medium. The creation method comprises: acquiring a plurality of images of tea leaves, and disease and insect pest information corresponding to each image; generating a tea leaf disease recognition model, wherein the tea leaf disease recognition model includes a MobileNetV3 model, an ultra-lightweight attention model and a fully connected layer; and on the basis of the plurality of images of tea leaves and the disease and insect pest information corresponding to each image, training the tea leaf disease recognition model. The tea leaf disease recognition model can automatically recognize tea leaf diseases and insect pests.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and equipment for creating tea disease identification model and storage medium

[0001] The present application is based on and claims priority to Chinese patent application No. 202410756431.4, filed on June 12, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the field of agricultural technology, and in particular to a method, device and equipment for creating a tea disease identification model and a storage medium. BACKGROUND

[0003] Tea is a very popular beverage and a cultural symbol with great connotations in Chinese culture. China is the birthplace of tea and the world's largest tea producer, with a total tea output accounting for more than 40% of the world's total tea output. In the cultivation and production of tea, some frequently-occurring and easily-occurring diseases have a great impact on the yield and quality of tea. For example, tea white spot disease not only causes serious damage to new tea leaves but also has a very high incidence, and tea leaf spot disease can occur throughout the growth cycle of tea plants. Therefore, the prevention and control of tea diseases is extremely important, and measures must be taken to quickly identify and timely manage some stubborn diseases in tea cultivation. Although people have accumulated rich experience in disease control over the past thousands of years of tea cultivation, this requires a lot of tea garden patrol and identification work, which requires a lot of manpower but is very inefficient.

[0004] Today, with the continuous penetration of artificial intelligence technology into traditional agriculture, if computer technology can be used to improve the intelligent level of tea cultivation and achieve intelligent prevention and control of tea diseases, it will play an important role in promoting the intelligent upgrading of the tea industry.

[0005] Any prior art mentioned in the specification does not mean that it is recognized or suggested that the prior art constitutes part of the common general knowledge in any jurisdiction, or that the prior art can be reasonably expected to be understood, considered relevant and / or combined with other prior art by those skilled in the art. SUMMARY

[0006] The present application relates to the field of agricultural technology, and in particular to a method, device and equipment for creating a tea disease identification model and a storage medium.

[0007] In order to achieve one of the above-mentioned purposes, an embodiment of the present application provides a method for creating a tea disease identification model, comprising the following steps: obtaining images of a plurality of tea leaves and pest information corresponding to each image; generating a tea disease identification model, wherein the tea disease identification model comprises a MobileNetV3 model, an ultra-light attention model and a fully connected layer; and training the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image.

[0008] As a further improvement of the embodiment of the present application, in the MobileNetV3 model, the convolution operation module is re-divided into 7 convolution operation groups with sizes of 224x224, 112x112, 56x56, 28x28, 14x14, 7x7 and 1x1, and the feature vectors output by the three convolution operation groups with sizes of 56x56, 28x28 and 14x14 are subjected to PCBR processing, wherein the PCBR processing comprises four operations of pooling operation, convolution operation, batch normalization operation and ReLU nonlinear activation, wherein the pooling operation adopts global maximum pooling along two dimensions of height and width, and compresses the feature map with a shape of into a feature map with a shape of , wherein , and represent the height, width and channel number of the feature map, respectively; the convolution operation adopts a convolution kernel with and applies grouped convolution processing with a group number of 8 to map the feature after the pooling operation into ; the ReLU nonlinear activation performs nonlinear mapping on the data through BN batch normalization and ReLU processing; then, the feature vectors output by the three convolution operation groups with sizes of 56x56, 28x28 and 14x14 are subjected to splicing operation, thereby obtaining a tensor with a shape of 1x1x960 after multi-stage feature fusion, transforming the tensor into a shape of 32x30x1, applying a convolution kernel with a size of 3x3 and a step of 2 to shrink the vector into an intermediate tensor with a shape of 16x15x1, then using a transpose convolution with a size of 3x3 and a step of 2 to restore the shape, and re-transforming the shape to obtain a branch vector with a shape of 1x1x960 ; finally, the branch vector is combined with a 1x1x960-dimensional vector extracted by the backbone network in a weighted manner as follows: , wherein is a feature fusion coefficient; after obtaining , subsequent convolution operations of the MobileNetV3 are continued to obtain an embedding vector mapped to a 1280-dimensional space.

[0009] As a further improvement of the embodiment of the present application, the specific calculation process of the channel attention sub-model in the ultra-light attention model is as follows: first, maximum pooling processing and average pooling processing are respectively performed along the high and wide dimensions to obtain two feature tensors and , the feature tensors and are further deformed to obtain a three-dimensional tensor with a shape of , wherein represents the concatenation operation of the tensor, represents the transformation from the vector to the matrix, and are obtained by difference value minimum integer decomposition on : , , and and the difference value is as small as possible; three conditions need to be met at the same time; then, a convolution kernel with a size of 3x3, padding of 1 and step of 1 is applied to the three-dimensional tensor to obtain a temporary tensor with a shape of and , then the height and width are respectively reduced to and using a convolution kernel with a step of 2; then, a tensor with a size of is obtained by using transpose convolution, wherein 3 and 2 in the subscript respectively represent the size of the convolution kernel and the step value; then, the Softmax function is applied to to deform to shape, that is, the channel attention weight tensor is obtained, wherein is the transformation operation from the matrix to the vector; after obtaining , the final channel attention is obtained, wherein represents that the elements of each channel dimension in are multiplied by the corresponding channel plane in , is the feature map.

[0010] As a further improvement of an embodiment of the present application, the specific calculation process of the spatial attention sub-module in the ultra-light attention model is as follows: first, maximum pooling and average pooling are respectively performed on it along the channel dimension to obtain two process tensors , and the process tensors are spliced to obtain a temporary tensor . A convolution kernel with a size of 3*3, a padding of 1 and a step of 1 is used for convolution operation on the temporary tensor, and then a ReLU activation function is used; then, the result obtained by the ReLU activation function is subjected to Softmax processing to obtain a weighted matrix of spatial attention; then, all channel elements at each spatial position of the feature map are multiplied to obtain spatial attention .

[0011] As a further improvement of an embodiment of the present application, the training of the tea disease identification model based on multiple tea leaf images and the pest information corresponding to each image specifically includes: the following processing is performed on each image: the image is enlarged to a pixel size of 256*256, and then a random cropping operation is performed from the center to crop a sub-image with a pixel size of 224*224; normalization processing is performed on the three channels of the sub-image, and the mean value used in the normalization processing is [0.485, 0.456, 0.406] and the standard deviation is [0.229, 0.224, 0.225]; random horizontal flip processing with a probability of 0.5 is performed, random rotation processing with a probability of 0.5 is performed, and the rotation angle is a random value between -30° and 30°; random jitter operation with a probability of 0.5 is performed on the hue, saturation and brightness of the image, and the jitter value is a random value between 0 and 0.2; then, the image is replaced by the sub-image; then, the tea disease identification model is trained based on multiple tea leaf images and the pest information corresponding to each image.

[0012] As a further improvement of an embodiment of the present application, in the tea disease identification model, the cross-entropy loss function value , wherein is the number of images in a training batch, is the number of classes of images in the batch, is the true label of the image, and when one-hot encoding is used, only when is the same as the class, the value is 1, is a label smoothing parameter, ​​​for the model to predict results, a center loss function wherein, denotes the center of all samples belonging to the class ; the loss function of the model on the current training batch of images is calculated according to the following formula wherein, is a weighted coefficient of the center loss function , .

[0013] As a further improvement of an embodiment of the application, = 0.0003.

[0014] The embodiment of the application further provides a device for creating a tea disease identification model, comprising the following modules: an information acquisition module, configured to acquire images of a plurality of tea leaves and pest information corresponding to each image; a model generation module, configured to generate a tea disease identification model, wherein the tea disease identification model comprises a MobileNetV3 model, a super-light attention model and a full connection layer; and a model training module, configured to train the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image.

[0015] The embodiment of the application further provides a device, comprising a memory configured to store executable instructions, and a processor configured to execute the executable instructions stored in the memory to implement the above-mentioned creation method.

[0016] The embodiment of the application further provides a storage medium storing executable instructions, which are configured to cause the processor to execute the above-mentioned creation method.

[0017] Compared with the prior art, the technical effect of the application is that the embodiment of the application provides a creation method, device, equipment and storage medium for a tea disease identification model, the creation method comprising: acquiring images of a plurality of tea leaves and pest information corresponding to each image; generating a tea disease identification model, wherein the tea disease identification model comprises a MobileNetV3 model, a super-light attention model and a full connection layer; and training the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image. The tea disease identification model can automatically identify tea diseases and pests.

[0018] As used herein, the terms "comprise" and variations of the term, such as "comprises" "comprised of, "comprising", "including", "containing", "include", "includes", "included", unless the context requires otherwise, do not exclude the presence of other features, integers, steps, or groups thereof. BRIEF DESCRIPTION OF DRAWINGS

[0019] Fig. 1 is a flowchart of a method for creating an identification model according to embodiments of the present application;

[0020] Fig. 2 is a structural diagram of a tea disease identification model according to embodiments of the present application;

[0021] Fig. 3 is a structural diagram of a convolution operation module according to embodiments of the present application;

[0022] Fig. 4 is a structural diagram of a spatial attention sub-module according to embodiments of the present application;

[0023] Fig. 5 is a network structure diagram of a MobileNetV3 model according to embodiments of the present application;

[0024] Fig. 6 is a diagram of experimental results of a tea disease identification model according to embodiments of the present application;

[0025] Fig. 7 is a diagram of experimental samples of a tea disease identification model according to embodiments of the present application;

[0026] Fig. 8 is a diagram of experimental results of a tea disease identification model according to embodiments of the present application. Embodiments of the present application

[0027] The present application will be described in detail below with reference to the embodiments shown in the drawings. However, these embodiments do not limit the present application, and modifications of structure, method, or function made by those skilled in the art based on these embodiments are included in the scope of the present application.

[0028] As used herein, terms such as "upper", "above", "lower", "below", and the like, that describe a spatial relationship between one element or feature to another element or feature as shown in the figures are described for purposes of convenience only and are not intended in a limiting sense to describe one element or feature being disposed above or under another element or feature. Spatially relative terms can be intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as being "below" or "beneath" other elements or features would then be oriented "above" the other elements or features. Thus, the example term "below" can encompass both an orientation of above and below. The device can be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly.

[0029] Embodiment one of the present application provides a method for creating a tea disease identification model, as shown in FIG. 1, comprising the following steps:

[0030] Step 101: Obtain images of a plurality of tea leaves and corresponding pest information for each image.

[0031] In practice, the inventor uses an image acquisition device to take images of healthy tea leaves and leaves with diseases, and performs cutting and labeling processing on the obtained images to reduce irrelevant content through cutting. The image data and category label data of the tea leaves are obtained to form a tea disease image data set. The obtained tea disease image data set is divided into a training data set and a test data set in a ratio of 8:2. When dividing, 80% of the images from each category are randomly selected and placed into the training set, and the remaining 20% are placed into the test set. The training data and the test data must not overlap.

[0032] In addition, the inventor also downloaded the Plant Village data set, and divided the Plant Village plant leaf disease data set into a training data set and a test data set in a ratio of 8:2. When dividing, 80% of the images from each category are randomly selected and placed into the training set, and the remaining 20% are placed into the test set. The training data and the test data must not overlap. These data will be used for pre-training of model weight parameters.

[0033] Step 102: Generate a tea disease identification model, which comprises a MobileNetV3 model, a super-light attention model, and a fully connected layer;

[0034] Here, as shown in FIG. 2, a fully connected layer for classification is added after the multi-stage feature fusion MobileNetV3 and the super-light attention model, and the number of output units of this layer is determined by the number of image categories in the training data set used.

[0035] Step 103: training the tea disease identification model based on the plurality of tea leaf images and the pest and disease information corresponding to each image.

[0036] Here, the training data can be samples in the Plant Village plant leaf disease training set, and the test data can be samples in the Plant Village plant leaf disease test set.

[0037] In FIG. 1, each arrow represents the data flow direction during the network forward operation; ULAM is an ultra-light attention module; The symbol represents the summation operation on the feature tensor; The symbol represents that the number of feature maps of the size is The PCBR operation is composed of four operation sequences of pooling, convolution, batch normalization and rectified linear unit.

[0038] The embodiment of the present application proposes a tea disease identification model improved by using an ultra-light attention module (ULAM) and multi-stage feature fusion (MSFF) on MobileNetV3-Large. The model realizes the reuse of the intermediate stage features in the network by using the multi-stage feature fusion strategy, and uses the ULAM attention to replace the Squeeze-Excitation (SE) attention mechanism in MobileNetV3, realizing the collaborative processing of channel attention and spatial attention, reducing the model parameters and operation amount, and greatly improving the performance. The tea disease identification model can reduce the network parameter amount and operation amount of the deep learning model currently used in tea disease identification, so that it can be used on resource-limited mobile terminals or embedded devices,

[0039] During training, the maximum iteration Epoch number for pre-training on the PlantVillage plant leaf disease training set is 200, the maximum iteration Epoch number on the tea disease image data set is 400, the batch size of the training data is set to 128, the learning rate of the stochastic gradient descent optimization algorithm is set to 0.01, the feature fusion coefficient =0.1, and the weight coefficient of the center loss function =0.0003.

[0040] In this embodiment, as shown in Figures 1 and 3, in the MobileNetV3 model, the convolution operation module is re-divided into seven convolution operation groups: 224×224, 112×112, 56×56, 28×28, 14×14, 7×7, and 1×1. The feature vectors output from the three convolution operation groups of size 56×56, 28×28, and 14×14 are processed using PCBR. The PCBR processing includes four operations: pooling, convolution, batch normalization, and ReLU nonlinear activation. The pooling operation uses global max pooling along both the height and width dimensions. The feature map of the shape is compressed into ,in, , and These refer to the height, width, and number of channels of the feature map, respectively; convolution operations use... The convolution kernel is applied, and grouped convolution with 8 groups is applied to map the features after pooling to 1×1×320; ReLU nonlinear activation is applied to the data nonlinearly through batch normalization and ReLU processing.

[0041] Subsequently, the feature vectors output from the three convolutional operation groups of sizes 56×56, 28×28, and 14×14 are concatenated to obtain a tensor of shape 1×1×960 for multi-stage feature fusion. This tensor is then transformed to a shape of 32×30×1, and a convolutional kernel of size 3×3 with a stride of 2 is applied to shrink the vector to an intermediate tensor of 16×15×1. Then, a transposed convolution of size 3×3 with a stride of 2 is used to restore the shape, and the shape is transformed again to obtain a branch vector of 1×1×960. Finally, The 1×1×960-dimensional vector extracted from the backbone network Perform the following weighted merging: ,in, For feature fusion coefficients; in obtaining Then, the subsequent convolution operations of MobileNetV3 are performed to obtain the embedding vector mapped to a 1280-dimensional space.

[0042] Here, Figure 5 shows the attribute values ​​of the seven convolution operation groups.

[0043] Here, using convolution and transposed convolution not only enhances the expressive power of features through transformation, but also has the advantage of low parameter count. Optional, =0.1.

[0044] In the multi-stage feature fusion stage, grouped convolution is needed for the three groups of features, and the new parameter quantity introduced is (24+40+112) x 320 / 8=7040, plus 3x3x2=18 parameters in the subsequent transpose convolution, the total number of new parameters introduced in the multi-stage feature fusion is 7058, which does not bring substantial impact on the parameters and operation quantity of the original MobileNetV3.

[0045] In this embodiment, as shown in FIG. 1, the specific calculation process of the channel attention sub-model in the ultra-light attention model is as follows:

[0046] First, maximum pooling and average pooling are performed along the height and width dimensions respectively, so as to obtain two feature tensors and , and the feature tensors and are further deformed to obtain a three-dimensional tensor with a shape of , wherein represents the concatenation operation of the tensor, represents the transformation from a vector to a matrix, and are obtained by integer decomposition with the smallest difference value: , , and and have a difference as small as possible;

[0047] Then, a convolution kernel with a size of 3x3, a padding of 1 and a step of 1 is applied to the three-dimensional tensor to obtain a temporary tensor with a size of and , and then a convolution kernel with a step of 2 is used to reduce the height and width to and respectively, and then a transpose convolution is used to obtain a tensor with a shape restored to , and then a ReLU activation function is used, wherein

[0048] is a transpose convolution operation, and the subscripts 3 and 2 respectively represent the size of the convolution kernel and the step value; Then, the Softmax function is applied to to deform into a shape of , i.e. to obtain a channel attention weighting tensor , wherein .This refers to the transformation operation from a matrix to a vector;

[0049] In obtaining Finally, channel attention , ,in, Indicates will Elements in each channel dimension Multiply the corresponding channels in the plane. This is a feature map.

[0050] In this embodiment, as shown in Figures 1 and 4, the specific calculation process of the spatial attention submodule in the ultra-lightweight attention model is as follows: First, max pooling and average pooling are performed along the channel dimension to obtain two shapes. process tensor With process tensor For process tensors With process tensor Obtained by splicing A temporary tensor is used, and a convolution operation is performed on the temporary tensor using a 3×3 kernel with padding of 1 and a stride of 1. Then, a ReLU activation function is applied. Finally, the result of the ReLU activation function is processed using Softmax to obtain the spatial attention weighting matrix. ;after, With feature map Spatial attention is obtained by multiplying all channel elements at each spatial location. .

[0051] Here, ULAM (Ultra Lightweight Attention Module) attention is executed first, followed by spatial attention, replacing the SE (Squeeze, Excitation) attention used in the original MobileNetV3. The specific placement of the ULAM attention module is shown in Figure 2. The operations in ULAM that include new parameters are: two convolutions and one transposed convolution in the channel attention module, with 3×3×4=36 parameters; and one convolution operation in the spatial attention module, with 3×3×2=18 parameters. Therefore, ULAM has only 36+18=54 parameters to be learned. This is consistent with the SE attention model used in MobileNetV3. ( The shrinkage coefficient is usually taken as... Compared with four learning parameters, ULAM is relatively light. After replacing all SE modules in MobileNetV3 with ULAM, the parameter quantity of the attention model can be reduced from 2x(242+2x402+802+3x1122+1602) / 4=36704 to 54x8=432, and considering the introduction of 7058 parameters in the multi-stage feature fusion branch, the parameter quantity of the entire model will be reduced by 29214.

[0052] In the embodiment, the "training the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image" specifically comprises:

[0053] Each image is processed as follows: the image is enlarged to a pixel size of 256x256, and then a random cropping operation is performed from the center to crop a sub-image with a pixel size of 224x224; the three channels of the sub-image are normalized, and the mean value used in the normalization is [0.485, 0.456, 0.406] and the standard deviation is [0.229, 0.224, 0.225]; a random horizontal flip processing with a probability of 0.5 is performed, and a random rotation processing with a probability of 0.5 is performed, and the rotation angle is a random value between -30° and 30°; a random jitter operation with a probability of 0.5 is performed on the hue, saturation and brightness of the image, and the jitter value is a random value between 0 and 0.2; then, the image is replaced by the sub-image;

[0054] Then, the tea disease identification model is trained based on the images of the plurality of tea leaves and the pest information corresponding to each image.

[0055] When training the tea disease identification model, the network is forward operated to obtain a fully connected layer feature vector with a dimension of 1280 in the penultimate layer of the network. Then, the feature vector is further forward operated through the network to obtain a feature expression vector in the last layer for image classification.

[0056] In the tea disease identification model, the cross-entropy loss function value , wherein, is the number of images in the training batch, is the number of classes of the images in the batch, is the true label of the image, when using one-hot encoding, only when is the same as the class, it takes the value of 1, is a label smoothing parameter, is the model prediction result, ; the center loss function , wherein, refers to all belonging to the class center of the sample; the loss function of the model on the current training batch image is calculated according to the following formula , wherein, is a center loss function is a weighted coefficient of the center loss function, .

[0057] Here, it can be understood that, in training the model, the compactness of each class sample in the embedding space is continuously enhanced by continuously minimizing , so as to achieve the goal of reducing the intra-class distance and increasing the inter-class difference.

[0058] During training, the learning rate is updated according to the back propagation operation of the stochastic gradient descent algorithm, and the network parameters of the recognition model are optimized and updated, and the above training needs to be repeated until the maximum training times are reached, and the cosine adjustment strategy is used to dynamically update the learning rate during the process. After the training is successful, the parameters of the model with the optimal performance can be saved to the hard disk.

[0059] In this embodiment, = 0.0003.

[0060] The tea disease recognition model in the embodiment of the application has the following advantages:

[0061] (1) MobileNetV3-Large is used as the backbone network of the tea disease recognition model. Compared with ResNet, VGG and other network architectures, MobileNetV3 has very few parameters and computational complexity, and the model can be conveniently deployed on mobile terminals or embedded devices with limited resources.

[0062] (2) The ULAM ultra-light attention model has only 54 learning parameters, but it realizes the cooperative processing of channel attention and spatial attention. Compared with SE, the ULAM has more advantages because the SE attention in MobileNetV3 can only process the correlation between channels.

[0063] (3) The multi-stage feature fusion strategy can realize the reuse of the intermediate stage features of the network, which can help to improve the feature extraction capability of the model.

[0064] (4) After using the multi-stage feature fusion strategy and the ULAM ultra-light attention on MobileNetV3, the parameter quantity and computational complexity of the model are reduced, but the performance is significantly improved.

[0065] In order to test the performance of the tea disease recognition model proposed in the present application, firstly, the MobileNetV3-ULAM applying the multi-stage feature fusion strategy and the common convolutional neural network architectures such as ResNet, VGG16, InceptionV3 and ShuffleNetV2 are verified in performance on the public CIFAR10 regular image classification dataset. The CIFAR10 classification dataset contains 10 categories of RGB color images including airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships and trucks, and all the images are uniformly scaled to 32x32 pixels in size, each category contains 6000 images, and the training set and test set contain 50000 and 10000 images respectively. When testing on the CIFAR10 classification dataset, no transfer learning is used for model pre-training, and the total number of iterations Epoch is set to 200. The experimental environment used is Ubuntu 20.04 system, the deep learning framework used is Pytorch 1.12, and Nvidia GTX 3090 GPU and CUDA 11.4 are used for hardware acceleration. Table 1 shows the comparison results of various network models, where FLOPs is the floating point operation amount of the model, MAdd is the multiplication and addition operation amount, Memory and MemR+W are the memory size and read-write memory size occupied by the model during running. From the statistical results, it can be seen that the model provided in the present application has a lower parameter amount and operation amount, and has achieved an accuracy close to ResNet, and has a significant advantage in comprehensive performance.

[0066] Figure 6 is a performance comparison of different models on the CIFAR10 dataset.

[0067] Figure 7 shows some sample images in the self-built dataset containing 6 common tea diseases, which contains 7 categories of 3300 images including 320 images of tea cercospora leaf spot, 320 images of tea white star disease, 320 images of tea algae spot disease, 240 images of tea anthracnose, 180 images of tea cloud pattern leaf disease, 640 images of tea brown leaf spot and 1280 images of healthy leaves. On the self-built dataset, the original MobileNetV3 and the MobileNetV3-ULAM model provided in the present application using multi-stage feature fusion are used for disease recognition, and the pre-trained weight parameters on Plant Village are used for fine-tuning in the experiment, and the parameter configurations involved in the training are exactly the same. The optimal results of the two models are shown in Figure 8. It can be seen that the model provided in the present application has a performance of 3.34 percentage points higher than the backbone network MobileNetV3 in disease recognition, which verifies the significant performance improvement of the disease recognition model proposed in the present application compared with the original MobileNetV3.

[0068] Embodiment two of the present application provides a device for creating a tea disease identification model, comprising the following modules:

[0069] An information acquisition module is configured to acquire images of a plurality of tea leaves and pest information corresponding to each image;

[0070] A model generation module is configured to generate a tea disease identification model, wherein the tea disease identification model comprises a MobileNetV3 model, an ultra-light attention model and a full connection layer;

[0071] A model training module is configured to train the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image.

[0072] Embodiment three of the present application provides a device, comprising:

[0073] A memory is configured to store executable instructions;

[0074] A processor is configured to execute the executable instructions stored in the memory to implement the creation method in embodiment one.

[0075] Embodiment four of the present application provides a storage medium storing executable instructions, which are configured to cause the processor to execute the creation method in embodiment one.

[0076] It should be understood that although the present specification is described in terms of embodiments, each embodiment does not contain only one independent technical solution, and the description manner of the specification is only for the sake of clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be combined appropriately to form other embodiments that can be understood by those skilled in the art.

[0077] The series of detailed descriptions listed above are only specific descriptions of the feasible embodiments of the present application, and are not intended to limit the protection scope of the present application. Any equivalent embodiments or changes made without departing from the spirit of the present application should be included in the protection scope of the present application.

Claims

1. A method of creating a tea disease identification model, characterized by, The method comprises the following steps: Obtaining images of a plurality of tea leaves and pest information corresponding to each image; Generating a tea disease identification model, wherein the tea disease identification model comprises a MobileNetV3 model, a super-light attention model, and a fully connected layer; Training the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image.

2. The creation method of claim 1, wherein: In the MobileNetV3 model, the convolution operation module is re-divided into 7 convolution operation groups with sizes of 224x224, 112x112, 56x56, 28x28, 14x14, 7x7 and 1x1, and the feature vectors output by three convolution operation groups with sizes of 56x56, 28x28 and 14x14 are subjected to PCBR processing, which includes four operations of pooling operation, convolution operation, batch normalization operation and ReLU nonlinear activation, wherein the pooling operation adopts global maximum pooling along the two dimensions of height and width, and the output of the PCBR processing is input into the next convolution operation group. shape feature map compression as wherein, 、 and These refer to the height, width, and number of channels of the feature map, respectively; convolution operations use... a convolution kernel of 3x3, and applies a grouped convolution processing with a group number of 8 to map the feature map after the pooling operation to ReLU nonlinear activation performs nonlinear mapping on data through BN batch normalization and ReLU processing; After that, the feature vectors of the three convolution operation groups with sizes of 56x56, 28x28 and 14x14 are spliced to obtain a multi-stage feature fusion tensor with a shape of 1x1x960, the tensor is transformed into a shape of 32x30x1, a convolution kernel with a size of 3x3 and a step of 2 is applied to shrink the vector into an intermediate tensor with a shape of 16x15x1, then a transpose convolution with a size of 3x3 and a step of 2 is used to restore the shape, and the shape is transformed again to obtain a branch vector with a shape of 1x1x960 ; finally the 1 x 1 x 960 dimensional vector extracted from the backbone network The weighted combination is made as follows: wherein, is a feature fusion coefficient; in obtaining Then, subsequent convolution operations of the MobileNetV3 are continued to obtain an embedding vector mapped to a 1280-dimensional space.

3. The creation method of claim 2, wherein: The specific calculation process of the channel attention submodel in the super-light attention model is as follows: First, maximum pooling processing and average pooling processing are respectively performed along the height and width dimensions to obtain two eigenvalues of the characteristic tensor and characteristic tensor and Further deformed to obtain a shape of three-dimensional tensor of the three-dimensional tensor wherein, denotes a concatenation operation of tensors, denotes the transformation from vector to matrix, With Through the The integer decomposition with the smallest difference is obtained: , and With The three conditions that the difference is as small as possible need to be met simultaneously; Afterwards, a convolution operation is first performed on the three-dimensional tensor using a convolution kernel with a size of 3x3, padding of 1, and a step of 1 to obtain a three-dimensional tensor of size 3x3x3 temporal tensor, and then using a convolution kernel with a step size of 2 to reduce the height and width to With , and then shape restoration is obtained using transposed convolution to tensor of size , followed by a ReLU activation function, wherein, For the transpose convolution operation, 3 and 2 in the subscript respectively represent the size of the convolution kernel and the step value; Afterwards, the Applying the Softmax function, we have deformed into Shape, and channel attention weighting tension can be obtained. , wherein, For the transformation operation from a matrix to a vector; In obtaining post, final channel attention , wherein, indicates that each channel dimension with the plane of the corresponding passage, For the feature map.

4. The creation method of claim 3, wherein: The specific calculation process of the spatial attention submodel in the super-light attention model is as follows: First, max-pooling and average-pooling are performed along the channel dimension, respectively, to obtain two tensors with shape process tensor of the process with process tensor ​ with process tensor stitching processing is performed to obtain temporal tensor, and then, using a ReLU activation function; and then, performing Softmax processing on the result obtained from the ReLU activation function to obtain a weighted matrix with spatial attention ; after, With the feature map all channel elements at each spatial location are multiplied to obtain spatial attention 。 5. The creation method of claim 4, wherein, The training of the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image specifically comprises: The following processing is performed on each image: the image is enlarged to a pixel size of 256x256, and then a random cropping operation is performed from the center to crop a sub-image with a pixel size of 224x224; normalization processing is performed on the three channels of the sub-image, and the mean value used in the normalization processing is [0.485, 0.456, 0.406], and the standard deviation is [0.229, 0.224, 0.225]; random horizontal flipping processing with a probability of 0.5 is performed, random rotation processing with a probability of 0.5 is performed, and the rotation angle is a random value between -30° and 30°; random jittering operation with a probability of 0.5 is performed on the hue, saturation, and brightness of the image, and the jittering value is a random value between 0 and 0.2; then, the image is replaced with the sub-image; Then, the tea disease identification model is trained based on the images of the plurality of tea leaves and the pest information corresponding to each image.

6. The creation method of claim 5, wherein: In the tea disease identification model, the cross-entropy loss function value wherein, for the number of images in the training batch, the number of classes of images in the batch, For the true label of an image, when adopting one-hot encoding, only when 1 if the same as the category, For the label smoothing parameter, For model prediction results, ; Center loss function wherein, refers to all belonging to the category the center of the sample; the loss function of the model on the current training batch of images is calculated according to the following formula wherein, center loss function a weighting factor of the i-th feature, 。 7. The creation method of claim 6, wherein: =0.0003。 8. An apparatus for creating a model for identifying tea diseases, characterized in that, The method comprises the following modules: An information acquisition module is configured to obtain images of a plurality of tea leaves and pest information corresponding to each image; A model generation module is configured to generate a tea disease identification model, wherein the tea disease identification model comprises a MobileNetV3 model, a super-light attention model, and a fully connected layer; A model training module is configured to train the tea disease identification model based on the images of the plurality of tea leaves and the pest information corresponding to each image.

9. An apparatus, comprising: The method comprises: A memory is configured to store executable instructions; A processor is configured to execute the executable instructions stored in the memory to implement the creation method of claim 1.

10. A storage medium, characterized by executable instructions for causing a processor to implement the creation method of claim 1 when executed by the processor.

Citation Information

Patent Citations

  • Tea disease identification method based on deep transfer learning

    CN113627282A

  • Apple leaf disease spraying auxiliary method, system and equipment based on deep learning

    CN115619765A

  • Rice insect pest recognition method, storage medium and equipment

    CN116343026A

  • Tea disease identification method based on DS-Net model

    CN116681938A

  • Creation method and device of tea disease recognition model, equipment and storage medium

    CN118609118A

Cited By

  • Improved YOLOv8-based low-altitude citrus pest and disease damage identification method, equipment and medium

    CN121545151A

  • Tea fermentation degree identification method, system and equipment and storage medium

    CN121746824A

  • A method, system, device, and storage medium for identifying the degree of tea fermentation.

    CN121746824B

  • Crop disease and pest identification and classification method and system, storage medium and equipment

    CN121937886A

  • Rice disease spot detection method based on edge sensing sampling and angle self-adaption

    CN122049687A