Plant disease and insect pest identification method and system, processing equipment and storage medium
Patent Information
- Application Number
- CN202510878295.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-17
AI Technical Summary
Existing plant disease and pest identification methods have complex backbone models with many parameters, making them difficult to deploy on edge devices. The training process is highly dependent on the amount of data and unstable. The optimizer fails to effectively distinguish the learning dynamics of network layers, and the learning rate decay strategy is simplistic, easily getting trapped in local optima, resulting in low training efficiency.
The EfficientNet-B3 lightweight convolutional neural network was used as the backbone network. The CBAM module was introduced, and the LARS optimizer and the Cosine Annealing with Warm Restarts learning rate scheduler were combined to perform data augmentation and visualization heat map annotation to generate disease areas.
It enables rapid and stable training on edge devices, improving recognition accuracy and training efficiency, and supports lightweight deployment, making it suitable for agricultural fields, greenhouses, and mobile terminal scenarios.
Smart Images

Figure CN120808144A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of agricultural production management and pest control, and particularly to a plant pest identification method and system, a processing device and a storage medium. BACKGROUND
[0002] With the development of modern agriculture towards informatization and intelligentization, the identification and control of plant pests become the key link to improve crop yield and ensure food safety. Traditional pest identification methods mainly rely on agricultural experts to make judgments through visual observation, which is greatly affected by subjective factors and has low identification efficiency, and thus cannot meet the needs of large-scale production management.
[0003] In recent years, pest classification methods based on image recognition have gradually emerged. Early methods mainly rely on image color, texture and other manual features, and use SVM classifiers to realize pest identification. However, due to the limitations of feature extraction ability and environmental adaptability, such methods have poor generalization ability. With the development of deep learning technology, convolutional neural networks (CNN) are widely used in agricultural image recognition tasks and have achieved good results in pest image classification. Key technologies such as transfer learning, model structure optimization and optimizer improvement have become the main factors affecting model performance.
[0004] However, the existing methods still have the following problems: the backbone model structure is complex and has many parameters, which is difficult to deploy on edge devices; the training process relies heavily on data volume, is prone to overfitting, and is unstable; the optimizer cannot effectively distinguish the learning dynamics of different network layers, affecting the convergence speed; the learning rate decay strategy is single and prone to local optimum, with low training efficiency. SUMMARY
[0005] To solve the above problems, the present application provides a plant pest identification method, system, processing device and storage medium, which can be deployed on edge devices, has fast convergence speed, stable training and high training efficiency.
[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solutions: in the first aspect, a plant pest identification method is provided, comprising:
[0007] obtaining a plant image to be identified, and performing data preprocessing on the plant image to be identified;
[0008] inputting the plant image after data preprocessing into a trained plant pest identification model to obtain a disease class prediction result and a visualized heat map annotation result, wherein the plant pest identification model uses EfficientNet-B3 lightweight convolutional neural network as the backbone network and introduces a CBAM module.
[0009] Further, the plant disease and pest recognition model construction process comprises:
[0010] Data augmentation method is used for data preprocessing of the input image;
[0011] EfficientNet-B3 lightweight convolutional neural network is used as the backbone network, and CBAM module is introduced, and based on the input image after data preprocessing, a plant disease and pest recognition model is constructed;
[0012] Based on the plant disease data set, the constructed plant disease and pest recognition model is trained;
[0013] The trained plant disease and pest recognition model is evaluated
[0014] In the inference stage, Grad-CAM method is used to track the gradient information of the target class, generate a visual heat map, and mark the disease area on the plant leaf.
[0015] Further, the plant disease and pest recognition model construction process further comprises:
[0016] After training, the model is saved in.pth format and can be exported to ONNX, supporting edge device deployment.
[0017] Further, the data augmentation method used for data preprocessing of the input image comprises:
[0018] The input image is randomly horizontally flipped;
[0019] The input image after random horizontal flipping is size normalized;
[0020] The adjusted input image is mean-variance normalized;
[0021] The input image after mean-variance normalization is subjected to color disturbance and random erasing operation to obtain the processed RGB image.
[0022] Further, the plant disease and pest recognition model comprises:
[0023] The input module is used for inputting the processed RGB image;
[0024] The basic convolution module is used to extract primary edge and texture features of the input RGB image;
[0025] The MBConv module group is used to extract multi-level, high semantic depth image features based on the RGB image after extracting primary edge and texture features;
[0026] The CBAM module is configured to strengthen multi-level and high semantic depth image features based on channel attention and spatial attention mechanisms.
[0027] The global average pooling layer is configured to map and compress the strengthened multi-level and high semantic depth image features into a feature vector.
[0028] The multi-classification fully connected layer is configured to obtain a corresponding disease category prediction result according to the feature vector.
[0029] The output module is configured to output the disease category prediction result, including a vector with a length of N, representing probability prediction values of each disease category, and N is the number of disease categories.
[0030] Further, the plant disease data set is used to train the constructed plant disease and pest recognition model, including:
[0031] Based on the plant disease data set, an SGD optimizer combined with LARS characteristics is used to optimize the plant disease and pest recognition model.
[0032] A Cosine Annealing with Warm Restarts learning rate scheduler is used to dynamically adjust the learning rate of the optimized plant disease and pest recognition model, to obtain a trained plant disease and pest recognition model.
[0033] Further, in the inference stage, a Grad-CAM method is used to generate a visual heat map by tracking gradient information of a target category, and to mark a disease area on a plant leaf, including:
[0034] The end output of the MBConv module group or the output of the CBAM module is selected as the feature map.
[0035] The feature map is backpropagated to obtain a gradient corresponding to a target disease category.
[0036] The global average pooling is performed on each channel gradient to obtain a weight.
[0037] After the weight of each channel gradient is weighted and summed, a visual heat map is generated through ReLU activation, and the visual heat map is superimposed with the original image to highlight the model attention area.
[0038] In a second aspect, a plant disease and pest recognition system is provided, including:
[0039] The data preprocessing module is configured to obtain a plant image to be recognized, and to perform data preprocessing on the plant image to be recognized.
[0040] The plant disease and pest recognition module is used for inputting the plant image after data preprocessing into a trained plant disease and pest recognition model to obtain a disease category prediction result and a visualized heat map annotation result.
[0041] In a third aspect, a processing device is provided, including computer program instructions, wherein the computer program instructions are used to implement the steps corresponding to the plant disease and pest recognition method when executed by the processing device.
[0042] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, wherein the computer program instructions are used to implement the steps corresponding to the plant disease and pest recognition method when executed by a processor.
[0043] The present application has the following advantages due to the above technical solutions.
[0044] 1. Model structure: the present application adopts EfficientNet-B3 as the backbone feature extraction network, has good parameter efficiency and precision performance, introduces a channel attention mechanism (CBAM) in the feature extraction stage of the backbone network, improves the perception ability of the model to the key disease area, and replaces the original output layer of EfficientNet-B3 with a multi-class classifier suitable for the task to realize transfer learning.
[0045] 2. Optimizer strategy: the present application proposes a hierarchical learning rate grouping optimization strategy simulating the LARS idea, divides different layers into feature extraction layers, attention modules and classifier layers, respectively configures different learning rates, realizes the unification of training stability and rapid convergence, and based on the SGD optimizer, constructs a parameter group, and considers the global learning rate control and local fine-tuning ability.
[0046] 3. Learning rate scheduling: the present application introduces the CosineAnnealingWarmRestarts learning rate scheduling mechanism, combines the periodic restart strategy, simulates the "annealing + reheating" process, avoids the training from falling into local optimum, maintains a high learning rate in the early stage of training to enhance the exploration ability, and gradually reduces it in the later stage to improve the generalization ability.
[0047] 4. Data enhancement: the present application adopts multi-strategy image enhancement before training, including random flipping, color disturbance, random erasing and the like, which can improve the robustness of the model to environmental changes.
[0048] 5. Training and evaluation aspects: the application records the Loss, Accuracy and other key indicators of the training set and validation set in each round of training, and generates training process curve graph; independent test set is used for generalization ability verification, and the final accuracy rate is more than 95%.
[0049] 6. Visual reasoning and deployment support aspects: the application generates disease heat map by using Grad-CAM visualization method to explain the model attention area; after training, the model is exported in PyTorch format, supporting lightweight deployment and reasoning acceleration.
[0050] Compared with the traditional method, the application has obvious advantages in model structure, optimization strategy and practicability, and is suitable for intelligent identification system construction and edge deployment demand of plant diseases and insect pests, and can be widely applied to agricultural field, greenhouse and mobile terminal and other scenes. BRIEF DESCRIPTION OF DRAWINGS
[0051] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the application. Throughout the drawings, the same reference designates the same elements. In the drawings:
[0052] Figure 1 is a model construction process schematic diagram provided by an embodiment of the application;
[0053] Figure 2 is a comparison schematic diagram of the accuracy rate of the application and ResNet50 and VGG16 in the prior art relative to the training epoch (Accuracy vs Epoch);
[0054] Figure 3 is a comparison schematic diagram of the Raspberry Pi 4B single board computer reasoning time (Raspberry Pi 4B) of the application and ResNet50 and VGG16 in the prior art;
[0055] Figure 4 is a comparison schematic diagram of the model parameter amount and calculation amount (Parameters & FLOPs) of the application and ResNet50 and VGG16 in the prior art. DETAILED DESCRIPTION
[0056] Exemplary embodiments of the present application will be described more fully hereinafter with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is to be understood that the present application can be embodied in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and fully convey the scope of the present application to those skilled in the art.
[0057] It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and the like are to be construed to be inclusive (i.e., to include both instances of open ended terms and instances of terms limiting to a specific number) unless otherwise indicated as otherwise limited by context. The methods described herein can be implemented as a method, an apparatus, a system, a computer program product, or any combination thereof.
[0058] Although the terms first, second, third, etc. can be used herein to describe various elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can be only used to distinguish one element, component, region, layer or section from another region, layer or section. Terms such as "first", "second", and other numerical terms when used herein do not imply a sequence or order unless clearly indicated by the context. Thus, a first element, component, region, layer or section discussed below could be termed a second element, component, region, layer or section without departing from the teachings of the example embodiments.
[0059] Currently, existing pest and disease identification methods still have the following problems: the backbone model has a complex structure and many parameters, making it difficult to deploy on edge devices; the training process is highly dependent on the amount of data, prone to overfitting, and unstable training; the optimizer fails to effectively distinguish the learning dynamics of different network layers, affecting the convergence speed; the learning rate decay strategy is simple, prone to falling into local optimality, and has low training efficiency. An embodiment of the present invention provides a plant pest and disease identification method, comprising: obtaining a plant image to be identified and performing data preprocessing on the plant image to be identified; inputting the preprocessed plant image into a trained plant pest and disease identification model to obtain a disease category prediction result and a visual heat map annotation result. The plant pest and disease identification model uses the EfficientNet-B3 lightweight convolutional neural network as the backbone network and introduces the CBAM module. The present invention improves the model structure, optimizer strategy, learning rate scheduling, data augmentation, training and evaluation, and visual reasoning and deployment support. It can be deployed on edge devices, has fast convergence speed, stable training, and high training efficiency, and can be widely applied in scenarios such as agricultural fields, greenhouses, and mobile terminals.
[0060] Example 1
[0061] This embodiment provides a method for identifying plant diseases and insect pests, comprising the following steps:
[0062] 1) If Figure 1 As shown in the figure, a plant disease and insect pest recognition model is constructed and trained, specifically:
[0063] 1.1) Use data augmentation methods to preprocess the input images to increase data diversity and model robustness:
[0064] 1.1.1) Randomly flip the input image horizontally.
[0065] 1.1.2) Normalize the size of the randomly flipped input image to a uniform resolution of 224x224.
[0066] 1.1.3) Perform mean-variance normalization on the adjusted input image.
[0067] 1.1.4) Perform color jitter and random erasing operations on the mean-variance normalized input image to obtain a processed RGB image to improve the model's adaptability to complex natural scenes.
[0068] 1.2) EfficientNet-B3 lightweight convolutional neural network is used as the backbone network, and CBAM module (Convolutional Block Attention Module) is introduced to enhance the feature expression ability. Based on the input image after data preprocessing, a plant disease and pest recognition model is constructed.
[0069] Specifically, the plant disease and pest recognition model includes an input module, a basic convolution module, an MBConv (Mobile Inverted Bottleneck Convolution) module group, a CBAM module, a global average pooling layer, a multi-classification fully connected layer, and an output module.
[0070] The input module is used to input the processed RGB image with a size of 224x224.
[0071] The basic convolution module is used to extract primary edge and texture features from the input RGB image.
[0072] The MBConv module group is used to extract multi-level, high semantic depth image features based on the RGB image after extracting primary edge and texture features.
[0073] The CBAM module is used to strengthen the multi-level, high semantic depth image features based on channel attention and spatial attention mechanisms, and enhance the model's perception ability of plant disease areas.
[0074] The global average pooling layer is used to map and compress the strengthened multi-level, high semantic depth image features into a feature vector.
[0075] The multi-classification fully connected layer is used to obtain the corresponding disease category prediction result according to the feature vector.
[0076] The output module is used to output the disease category prediction result, including a vector with a length of N (N is the number of disease categories), representing the probability prediction value of each disease category.
[0077] Compared with the traditional ResNet50 model, the EfficientNet-B3 model improves the Top-1 accuracy on ImageNet (a large visual database) by 3.3%, while reducing the parameter amount by 25%.
[0078] 1.3) Based on the Plantdiseases dataset, the constructed plant disease and pest recognition model is trained.
[0079] Specifically, the plant disease data set is a plant disease and pest image training data set established based on an Internet public resource, and includes leaf images of crops such as potato, watermelon, sugarcane, lemon and the like in a healthy state and different disease states. The specific process of this step is as follows:
[0080] 1.3.1) Based on the plant disease data set, an SGD (stochastic gradient descent with momentum term) optimizer combined with the LARS (layer-wise adaptive rate scaling) feature is used to optimize the plant disease and pest recognition model.
[0081] Specifically, in the parameter grouping of the plant disease and pest recognition model, a small learning rate is set for the basic convolution module, a medium learning rate is set for the CBAM module, and a large learning rate is set for the multi-classification full connection layer.
[0082] Specifically, the traditional SGD update formula is as follows:
[0083]
[0084] wherein, is the gradient; and η is the learning rate.
[0085] In the present application, a hierarchical learning rate adjustment strategy is introduced to simulate the LARS principle:
[0086]
[0087] wherein, η l is the actual learning rate of the lth layer; W l is the lth layer parameter; and ∈ is a constant to prevent the denominator from being zero. This hierarchical adjustment mechanism improves the training stability and accelerates the convergence.
[0088] 1.3.2) A cosine annealing with warm restarts learning rate scheduler is used to dynamically adjust the learning rate of the optimized plant disease and pest recognition model, to obtain a trained plant disease and pest recognition model. In the training process, a gradually cooling “annealing” process is simulated to prevent overfitting and accelerate convergence.
[0089] Specifically, the learning rate scheduler simulates a cosine annealing curve, gradually reduces the learning rate and restarts in each cycle:
[0090]
[0091] wherein, η max is the initial learning rate; η min is the minimum learning rate; T curis the round for the current cycle; T max is the total cycle length. This strategy can avoid the model falling into local optimum and improve the final generalization ability.
[0092] 1.4) Evaluate the trained plant disease and pest recognition model.
[0093] Specifically, the trained plant disease and pest recognition model records the training loss (Loss) and accuracy (Accuracy) after each round of training, and plots the curve with Epoch as the variable, which is used to visualize the training trend and assist in determining whether overfitting or underfitting occurs.
[0094] 1.5) In the inference stage, the Grad-CAM (Gradient-weighted Class Activation Mapping) method is used to generate a visual heat map by tracking the gradient information of the target class, and to mark the disease area on the plant leaf:
[0095] 1.5.1) Select the last convolutional layer with spatial information of the model (i.e. the output of the MBConv module group or the output of the CBAM module) as the feature map.
[0096] 1.5.2) Perform backpropagation on the feature map to obtain the gradient corresponding to the target disease class.
[0097] 1.5.3) Perform global average pooling on each channel gradient as a weight.
[0098] 1.5.4) After weighting and summing the weights of each channel gradient, generate a visual heat map through ReLU activation, and superimpose it with the original image to highlight the model's focus area.
[0099] 1.6) After training, save the model as.pth format and export it as ONNX, which supports edge device deployment (such as Raspberry Pi, embedded system) to meet the real-time disease recognition needs in the field.
[0100] 2) Obtain the plant image to be recognized, and perform data preprocessing on the plant image to be recognized as described in step 1.1) above, and input the plant image after data preprocessing into the trained plant disease and pest recognition model to obtain the disease class prediction result and visual heat map labeling result.
[0101] The plant disease and pest recognition model constructed by the present application has a simple structure, stable training, and high accuracy, and is especially suitable for agricultural mobile terminals and field deployment scenarios. The plant disease and pest recognition method of the present application will be described in detail through specific embodiments as follows:
[0102] I. Explanation of comparative experiment process:
[0103] To verify the effectiveness of the scheme in the plant pest identification task, the following comparative experiments are designed:
[0104] The experimental environment is consistent: all models are trained on the same dataset (Plantdiseases), the image preprocessing process is consistent, and the same batch size (batch size = 64), training rounds (epoch = 20) and loss function (CrossEntropyLoss) are used.
[0105] II. Comparison model setting:
[0106] The model of the application: EfficientNet-B3 main network + CBAM attention mechanism + hierarchical LARS optimization strategy + CosineAnnealingWarmRestarts learning rate control.
[0107] Control model A: standard ResNet50 + ordinary SGD optimizer + StepLR fixed step learning rate.
[0108] Control model B: standard VGG16 + Adam optimizer + fixed learning rate (0.001).
[0109] Evaluation index: the following indexes are used to measure the performance of the model: Top-1 classification accuracy (Accuracy), model parameter quantity (Parameters) and computational complexity (FLOPs), model training convergence speed (required Epoch number), generalization ability (performance on the test set) and inference speed and resource occupation (adaptability of edge deployment ability).
[0110] III. Experimental result explanation:
[0111] As shown in Figures 2 to 4 , the model of the application can complete convergence within 20 epochs, with an accuracy of 95.3%, which is better than ResNet50 (91.2%) and VGG16 (88.7%). In terms of parameter quantity and computational quantity, the model of the application only occupies 12M parameters and 1.8B FLOPs, which is much lower than the control group model. The visualized heat map shows that the model of the application can more accurately focus on the disease spot area, while the control model has the phenomenon of misactivation of normal areas. The model of the application is deployed and tested on Raspberry Pi 4B, with an inference time of 280ms / image, which is significantly better than the deployment effect of traditional models.
[0112] IV. Conclusion:
[0113] The scheme has higher recognition accuracy and convergence efficiency while keeping low resource consumption, has stronger model interpretability, excellent visualization effect, and enhanced application feasibility in actual agricultural production scenarios, and all experimental results show that the scheme has overall advantages in performance, efficiency and adaptability compared with the prior art.
[0114] Embodiment 2
[0115] The embodiment provides a plant pest and disease identification system, which comprises:
[0116] A data preprocessing module is configured to acquire a plant image to be identified and perform data preprocessing on the plant image to be identified.
[0117] A plant pest and disease identification module is configured to input the plant image after data preprocessing into a trained plant pest and disease identification model to obtain a disease category prediction result and a visualized heat map annotation result, wherein the plant pest and disease identification model adopts an EfficientNet-B3 lightweight convolutional neural network as a backbone network and introduces a CBAM module.
[0118] The system provided in the embodiment is used for executing the above method embodiments, and specific processes and detailed contents are referred to the above embodiments, which will not be described herein.
[0119] Embodiment 3
[0120] The embodiment provides a processing device corresponding to the plant pest and disease identification method provided in the embodiment 1, and the processing device can be applied to a processing device of a client, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer and the like, to execute the method of the embodiment 1.
[0121] The processing device comprises a processor, a memory, a communication interface and a bus, the processor, the memory and the communication interface are connected through the bus to complete the communication among each other. The memory stores a computer program capable of running on the processing device, and the processing device runs the computer program to execute the plant pest and disease identification method provided in the embodiment 1.
[0122] In some implementations, the memory can be a high-speed random access memory (RAM), and can also include a non-volatile memory, such as at least one disk memory.
[0123] In other implementations, the processor can be a central processing unit (CPU), a digital signal processor (DSP) or various types of general-purpose processors, which are not limited herein.
[0124] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.
[0125] Those skilled in the art can understand that the structure of the above-mentioned computing device is only part of the structure related to the present application scheme, and does not constitute a limitation on the computing device to which the present application scheme is applied. The specific computing device can include more or fewer components, or combine certain components, or have a different component arrangement.
[0126] Embodiment 4
[0127] The embodiment provides a computer program product corresponding to the plant disease and pest identification method provided in embodiment 1. The computer program product can include a computer readable storage medium, which is loaded with computer readable program instructions for executing the plant disease and pest identification method described in embodiment 1.
[0128] The computer readable storage medium can be a tangible device that maintains and stores instructions for use by an instruction execution device. The computer readable storage medium can be, for example but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the above.
[0129] The above-mentioned embodiment provides a computer readable storage medium, and the implementation principle and technical effects are similar to the above-mentioned method embodiments, which will not be described here.
[0130] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flows and / or block or blocks in the block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more flows and / or blocks.
[0131] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flows and / or block or blocks in the block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more flows and / or blocks.
[0132] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flows and / or block or blocks in the block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more flows and / or blocks.
[0133] The above-described embodiments are merely intended to illustrate the present application, and the structure, connection manner, and manufacturing process of each component can be changed. Any equivalent changes and improvements made on the basis of the technical solutions of the present application shall not be excluded from the protection scope of the present application.
Claims
1. A method for identifying plant diseases and insect pests, characterized in that: include: Acquire a plant image to be identified and perform data preprocessing on the plant image to be identified; The plant images after data preprocessing are input into a trained plant disease and pest recognition model to obtain disease category prediction results and visual heat map annotation results. The plant disease and pest recognition model uses the EfficientNet-B3 lightweight convolutional neural network as the backbone network.
2. A method for identifying plant diseases and insect pests according to claim 1, characterized in that: The construction process of the plant disease and insect pest identification model is as follows: Use data enhancement method to preprocess the input image; The EfficientNet-B3 lightweight convolutional neural network is used as the backbone network, and the CBAM module is introduced to build a plant disease and insect pest recognition model based on the input image after data preprocessing; Based on the plant disease dataset, the constructed plant disease and insect pest recognition model is trained; Evaluate the trained plant pest and disease recognition model In the inference stage, the Grad-CAM method is used to generate a visual heat map by tracking the gradient information of the target category and mark the diseased areas on the plant leaves.
3. A method for identifying plant diseases and insect pests according to claim 2, characterized in that: The process of constructing the plant disease and insect pest identification model further includes: After training is completed, the model is saved in .pth format and can be exported to ONNX to support edge device deployment.
4. A method for identifying plant diseases and insect pests according to claim 2, characterized in that: The data enhancement method is used to preprocess the input image, including: Randomly flip the input image horizontally; Normalize the size of the input image after random horizontal flipping; Perform mean-variance normalization on the adjusted input image; The input image after mean-variance normalization is subjected to color perturbation and random erasing operations to obtain the processed RGB image.
5. A method for identifying plant diseases and insect pests according to claim 2, characterized in that: The plant disease and insect pest identification model includes: Input module, used to input the processed RGB image; Basic convolution module, used to extract primary edge and texture features from the input RGB image; MBConv module group, used to extract multi-level, high semantic depth image features based on RGB images after extracting primary edge and texture features; The CBAM module is used to enhance multi-level, high-semantic depth image features based on channel attention and spatial attention mechanisms; A global average pooling layer is used to compress the enhanced multi-level, high semantic depth image feature map into a feature vector; The multi-classification fully connected layer is used to obtain the corresponding disease category prediction results based on the feature vector; The output module is used to output the disease category prediction results, including a vector of length N, which represents the probability prediction value of each disease category, where N is the number of disease categories.
6. A method for identifying plant diseases and insect pests according to claim 2, characterized in that: The plant disease and insect pest recognition model constructed based on the plant disease dataset is trained, including: Based on the plant disease dataset, the SGD optimizer combined with LARS characteristics is used to optimize the plant disease and insect pest recognition model; The Cosine Annealing with Warm Restarts learning rate scheduler is used to dynamically adjust the learning rate of the optimized plant disease and pest recognition model to obtain a trained plant disease and pest recognition model.
7. A method for identifying plant diseases and insect pests according to claim 5, characterized in that: In the inference phase, the Grad-CAM method is used to generate a visual heat map by tracking the gradient information of the target category and marking the diseased areas on the plant leaves, including: Select the terminal output of the MBConv module group or the output of the CBAM module as the feature map; Backpropagate the feature map to obtain the gradient corresponding to the target disease category; Perform global average pooling on the gradient of each channel as weight; After weighted summation of the gradients of each channel, a visual heat map is generated through ReLU activation and superimposed with the original image to highlight the model's focus area.
8. A plant disease and insect pest identification system, characterized in that: include: A data preprocessing module is used to obtain plant images to be identified and perform data preprocessing on the plant images to be identified; The plant disease and pest identification module is used to input plant images after data preprocessing into a trained plant disease and pest identification model to obtain disease category prediction results and visual heat map annotation results. The plant disease and pest identification model uses the EfficientNet-B3 lightweight convolutional neural network as the backbone network.
9. A processing device, characterized in that The method comprises computer program instructions, wherein when the computer program instructions are executed by a processing device, they are used to implement the steps corresponding to the plant disease and insect pest identification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the plant disease and insect pest identification method according to any one of claims 1 to 7.