Leaf pest recognition method and device based on deep learning model
Through the leaf pest identification method based on deep learning model, the destructive, time-consuming and subjective problems of traditional methods are solved, and fast and accurate pest identification and monitoring are achieved, which is suitable for a wide range of agricultural fields.
Patent Information
- Application Number
- CN202411649088.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional leaf area measurement methods are destructive, time-consuming and labor-intensive, and prone to subjective errors, making it difficult to achieve fast and accurate pest identification and monitoring.
The blade pest recognition method based on the deep learning model is adopted. By collecting multiple blade pictures, using the target detection model to identify and locate the main parts of the blade, combining manual scoring of tag values, the VGG16 basic model is constructed and the residual network structure block is added, and the training and preprocessing is performed to achieve automated pest recognition.
The rapid and accurate detection of different types and severity of pests is achieved, eliminating the need for subjectivity and manual work, greatly improving efficiency, reducing labor costs, and suitable for a wide range of agricultural fields.
Smart Images

Figure CN119600539A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grape pest identification, and in particular to a leaf pest identification method and device based on a deep learning model. Background Art
[0002] Insect pests have long been a direct threat to crop yield and quality. Insects such as aphids, locusts, and moths feed directly on crop leaves, directly affecting crop photosynthesis, leading to reduced yields. Other pests such as scale insects and thrips indirectly harm crops by spreading plant viruses. The widespread spread of these pests not only reduces agricultural productivity but also threatens food security and farmers' livelihoods. For many years, farmers have mainly controlled crop pests by using chemical pesticides. However, excessive use of pesticides pollutes the environment and harms human and animal health. In addition, the evolution of pesticide resistance in insect populations has gradually reduced the efficacy of these chemicals. Therefore, new monitoring methods and control technologies are needed to accurately locate and manage agricultural pests.
[0003] Monitoring and judging the occurrence of pests is a vital part of crop field management. Traditional leaf area measurement methods have a series of significant problems. First, they are often destructive, and surveyors need to collect leaf samples, which may affect the health and growth of plants. This poses a challenge for long-term monitoring of leaf growth and behavior throughout the life cycle. Collecting leaf samples may interfere with the natural growth process of plants and lead to inaccurate data. Second, traditional measurement methods are time-consuming and laborious. Manual measurement requires a lot of manpower and time resources, especially in large-scale farmlands or vineyards. This limits farmers or researchers from being able to frequently monitor and measure a large range of plants, which is essential for timely detection of problems or necessary intervention measures. Third, manual measurement is prone to subjective errors. Different surveyors may have different subjective judgments on the shape and size of leaves, which may lead to inconsistent measurement results. This subjectivity may reduce the reliability and consistency of the data, thereby affecting the accurate assessment of plant health. Despite the emergence of some new technologies such as handheld laser leaf area meters, manual operation is still required and it is still a labor-intensive process. In addition, the equipment needs to be calibrated and maintained regularly to ensure accuracy, which also increases the complexity of management. Summary of the invention
[0004] According to the first embodiment of the present invention, a leaf pest identification method based on a deep learning model is provided, comprising the following steps: Collect multiple leaf images covering different backgrounds, colors, and levels of insect damage; Use the target detection model to identify and locate the main parts of the leaves and remove irrelevant pixel information from multiple leaf images; Obtain manually scored label values of the degree of leaf damage caused by insect pests for multiple leaf images, where the score of the label value ranges from 1 to 5, representing different degrees of leaf damage caused by insect pests; Divide all leaf images into training set, validation set and test set according to preset ratios; A leaf recognition deep learning model is built based on Keras and TensorFlow. The leaf recognition deep learning model is based on the VGG16 model and adds a residual network structure block. The residual network structure block contains two convolutional layers. After the last convolutional layer of the convolutional neural network, a global average pooling (GAP) layer is added, followed by three fully connected (FC) layers. To reduce overfitting, each fully connected layer is followed by a dropout layer. In the final fully connected layer, the output is processed using the Sigmoid activation function. The output value of this final layer will be used to assess the degree of pest impact. Preprocess multiple leaf images; The convolutional layer parameters of the leaf recognition deep learning model were pre-trained on the ImageNet dataset. The mean square error was selected as the loss function for optimization during the pre-training process, and the mean absolute error was used as the performance indicator. Formally train the deep learning model for leaf recognition and evaluate its performance on a new test set; The trained leaf recognition deep learning model is deployed to the test set to test the recognition effect of the leaf recognition deep learning model.
[0005] Furthermore, the score label value ranges from 1 to 5, representing different degrees of leaf damage caused by pests: when the degree of leaf damage caused by pests is less than 20%, the score label value is 1, and for every 20% increase in the degree of leaf damage caused by pests, the score label value increases by 1. The highest score label value of 5 indicates that the degree of leaf damage caused by pests exceeds 80%.
[0006] Furthermore, each convolutional layer has 512, 256, 128, and 64 filters.
[0007] Furthermore, each FC layer is a FC layer with relu activation, and each FC layer has 1024 neurons.
[0008] Furthermore, preprocessing the multiple leaf images includes: performing unifying processing on the multiple leaf images and normalizing pixel values.
[0009] Furthermore, preprocessing the multiple leaf images also includes: performing random transformation and enhancement on the multiple leaf images belonging to the training set, and the random transformation and enhancement include: random rotation within a range of 45°, random width and height movement of 15%, horizontal flipping, and random scaling within a range of 50%.
[0010] Furthermore, when evaluating the performance of the leaf recognition deep learning model on a completely new test set, the Pearson correlation coefficient between the pest impact score and the scoring label value was calculated using the Numpy library to evaluate the linear relationship between them.
[0011] According to a second embodiment of the present invention, a grape pest identification device based on a deep learning model is provided, comprising: The acquisition module is used to collect multiple leaf images, covering different backgrounds, colors and degrees of leaf damage caused by insect pests; The positioning and elimination module is used to use the target detection model to identify and locate the main part of the leaf and eliminate irrelevant pixel information on multiple leaf images; An acquisition module is used to obtain manually scored label values of the degree of leaf damage caused by insect pests in multiple leaf images, where the score of the scored label value ranges from 1 to 5, representing different degrees of leaf damage caused by insect pests; A division module is used to divide multiple leaf images into a training set, a validation set and a test set according to a preset ratio; A building block for building a leaf recognition deep learning model based on Keras and TensorFlow. The leaf recognition deep learning model is based on the VGG16 model and adds a residual network structure block, which contains two convolutional layers. Add a module to add a GAP layer and three FC layers after the last convolutional layer, add a dropout layer after each FC layer, use sigmoid activation as the activation function of the last FC layer, and use the output value of the last FC layer as the pest impact score; A preprocessing module, used for preprocessing multiple leaf images; The pre-training module is used to pre-train the convolutional layer parameters of the leaf recognition deep learning model on the ImageNet dataset. During the pre-training process, the mean square error is selected as the loss function for optimization, and the mean absolute error is used as the performance indicator; The formal training module is used to formally train the deep learning model for leaf recognition and evaluate the performance of the deep learning model for leaf recognition on a new test set. The test module is used to deploy the trained leaf recognition deep learning model to the test set and test the recognition effect of the leaf recognition deep learning model.
[0012] According to a third embodiment of the present invention, a device is provided, including: a memory, a processor, and a computer program. The computer program is stored in the memory, and the processor runs the computer program to execute the leaf pest identification method based on the deep learning model of the first embodiment.
[0013] According to a fourth embodiment of the present invention, a readable medium having a non-volatile program code executable by a processor is provided, and the program code enables the processor to run the leaf pest identification method based on the deep learning model of the first embodiment.
[0014] The leaf pest identification method and device based on the deep learning model according to the embodiment of the present invention have the following beneficial effects: 1. It can quickly and accurately detect pests of different types and severity. Its real-time nature makes it suitable for real-time monitoring and early intervention, which helps to accurately locate, prevent the spread of pests, reduce the use of pesticides, and reduce agricultural losses.
[0015] 2. It can be widely used in the agricultural field, including leaf pest monitoring in different environments such as farmland, orchards, vegetable gardens, greenhouses and botanical gardens. It is applicable to various crops, horticultural crops and plants.
[0016] 3. Compared with traditional artificial vision and manual inspection, the present invention realizes automated pest identification, eliminating subjectivity and the need for manual work. This greatly improves efficiency and reduces labor costs.
[0017] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Flow chart of a leaf pest identification method based on a deep learning model according to an embodiment of the present invention.
[0019] Figure 2 It is a schematic diagram of the regression model structure of the present invention; Figure 3 An example of the labeling results for the model’s prediction of leaf pest severity; Figure 4 This is a correlation diagram between the model prediction scoring results and the manual scoring labels; Figure 5 is a structural diagram of a leaf pest identification device based on a deep learning model according to an embodiment of the present invention.
[0020] Figure 6 The figure is a structural diagram of a device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings to further illustrate the present invention.
[0022] First, combine Figures 1 to 6A leaf pest identification method based on a deep learning model according to an embodiment of the present invention is described, which is used to identify the degree of pest damage on leaves of various crops, horticultural crops and plants, and has a wide range of application scenarios.
[0023] like Figure 1 As shown, the leaf pest identification method based on the deep learning model of the embodiment of the present invention, taking grape leaves as an example, comprises the following steps: like Figure 1 As shown, in S1, multiple leaf images are collected, covering different backgrounds, colors and degrees of leaf damage caused by insect pests. In this embodiment, a large number of high-definition grape leaf images (e.g., 2620 images) can be collected and photographed in different scenes such as farms, greenhouses, and the wild, and auxiliary photography can be achieved with the help of drones.
[0024] like Figure 1 As shown, in S2, the target detection model is used to identify and locate the main part of the leaf and remove irrelevant pixel information on multiple leaf images, so that we can accurately and automatically truncate the leaf bounding box.
[0025] like Figure 1 As shown, in S3, the manually scored label values of the degree of leaf damage caused by pests in multiple leaf images are obtained, and the scores of the scored label values range from 1 to 5, representing different degrees of leaf damage caused by pests. Further, in this embodiment, the scores of the scored label values range from 1 to 5, representing different degrees of leaf damage caused by pests. Specifically, when the degree of leaf damage caused by pests is less than 20%, the scored label value is 1, and the score label value increases by 1 for every 20% increase in the degree of leaf damage caused by pests. The highest score label value of 5 indicates that the degree of leaf damage caused by pests exceeds 80%. The determination of the score label value for each leaf image is ultimately determined by the average score of multiple raters.
[0026] like Figure 1 As shown, in S4, multiple leaf images are divided into a training set, a validation set, and a test set according to a preset ratio. In this embodiment, there are 2620 leaf photos, 439 of which are test sets, and the remaining 2181 are divided into 80% and 20%, and the photos are randomly divided into a training set and a validation set. The training set is the data set used for model training. The model uses the data in the training set (leaf photos) to reduce the loss function to learn the relationship between features and targets, so that it can make predictions about unknown data. The validation set is used to adjust the hyperparameters of the model and perform model selection. By comparing the validation set performance under different settings, the optimal hyperparameter settings can be selected, and overfitting can also be detected. The test set is the data set for the final performance evaluation of the model after the model training is completed to see how the model performs on unseen data and to help understand the generalization ability of the model. As Figure 1As shown, in S5, a leaf recognition deep learning model is built based on Keras and TensorFlow. The leaf recognition deep learning model is based on the VGG16 model, and a residual network structure block is added. The residual network structure block contains two convolutional layers. In this embodiment, all modeling processes are performed on a Linux platform, using a GeForce RTX3090 GPU with 24gb memory. A convolutional neural network (CNN) is built based on Tensorflow (Python), and the possibility of network degradation caused by stacking deeper convolutional neural networks (CNN) is reduced by adding a residual network structure block.
[0027] Furthermore, in this embodiment, each convolutional layer has 512, 256, 128 and 64 filters.
[0028] like Figure 1 As shown in S6, a global average pooling (GAP) layer and three fully connected (FC) layers are added after the last convolutional layer, a dropout layer is added after each FC layer, the dropout rate is 0.3, and the sigmoid activation is used as the activation function of the last FC layer. The output value of the last FC layer is used as the pest impact score, which corresponds to the score label value.
[0029] Furthermore, in this embodiment, each FC layer is a FC layer with relu activation, and each FC layer has 1024 neurons.
[0030] like Figure 1 As shown, in S7, a plurality of leaf images are preprocessed.
[0031] Furthermore, in this embodiment, preprocessing the multiple leaf images includes: performing uniform size and pixel value normalization processing on the multiple leaf images, the uniform size is a fixed size of 224 x 224 pixels to ensure that all input images have a consistent size for subsequent processing and model input, and scaling the pixel values to a range of 0-1 to normalize the images.
[0032] Furthermore, in this embodiment, preprocessing the multiple leaf images also includes: creating a data generator using the imagedataggenerator class in the Keras library, and performing random transformation and enhancement on the multiple leaf images belonging to the training set, the random transformation and enhancement including: random rotation within a range of 45°, random width and height movement of 15%, horizontal flipping, and random scaling within a range of 50%.
[0033] like Figure 1As shown in S8, the convolutional layer parameters of the leaf recognition deep learning model are pre-trained on the ImageNet dataset. The mean square error is selected as the loss function for optimization during the pre-training process, and the mean absolute error is used as the performance indicator. Through K-fold cross-validation K=5, the model uses the Adam optimizer with a learning rate of 1e-3. The batch size is set to 64, the entire training process consists of 300 epochs, and an early stopping mechanism (patience = 35) is added to avoid unnecessary training.
[0034] like Figure 1 As shown, in S9, the leaf recognition deep learning model is formally trained, and the performance of the leaf recognition deep learning model is evaluated on a new test set. In this embodiment, in order to verify the generalization ability of the model, a series of leaf photos that are not involved in the model training are collected and used as test data (i.e., test set). Figure 3 As shown in the figure, the trained model can effectively score the different degrees of insect damage on the leaves, which further demonstrates its practicality and accuracy. Furthermore, when evaluating the performance of the leaf recognition deep learning model on a new test set, the Numpy library was used to calculate the Pearson correlation coefficient between the pest impact score and the score label value to show the linear relationship between them. Figure 4 As shown, there is a strong correlation between the manual label values and the predicted values in the test set, with a Pearson correlation coefficient of 0.94 and a determination coefficient R2 = 0.88.
[0035] like Figure 1 As shown, in S10, the trained blade recognition deep learning model is deployed to the test set to test the recognition effect of the blade recognition deep learning model.
[0036] Above, refer to Figure 1 The leaf pest identification method based on the deep learning model according to an embodiment of the present invention is described, which has the following beneficial effects: 1. It can quickly and accurately detect pests of different types and severity. Its real-time nature makes it suitable for real-time monitoring and early intervention, which helps to accurately locate, prevent the spread of pests, reduce the use of pesticides, and reduce agricultural losses.
[0037] 2. It can be widely used in the agricultural field, including leaf pest monitoring in different environments such as farmland, orchards, vegetable gardens, greenhouses and botanical gardens. It is applicable to various crops, horticultural crops and plants. 3. Compared with traditional artificial vision and manual inspection, the present invention realizes automated pest identification, eliminating subjectivity and the need for manual work. This greatly improves efficiency and reduces labor costs.
[0038] The above combined with Figure 1 The leaf pest identification method based on the deep learning model according to the embodiment of the present invention is described. Furthermore, the present invention can also be applied to the leaf pest identification device based on the deep learning model.
[0039] like Figure 5 As shown, according to the second embodiment of the present invention, a grape pest identification device based on a deep learning model is provided, comprising: a collection module 100, a positioning and rejection module 200, an acquisition module 300, a division module 400, a construction module 500, an addition module 600, a pre-processing module 700, a pre-training module 800, a formal training module 900 and a testing module 1000.
[0040] The acquisition module 100 is used to acquire multiple leaf images, covering different backgrounds, colors and degrees of leaf damage caused by insect pests; The positioning and elimination module 200 is used to use the target detection model to identify and locate the main part of the leaf and eliminate irrelevant pixel information on multiple leaf images; The acquisition module 300 is used to obtain manually scored label values of the degree of leaf damage caused by insect pests for multiple leaf images, where the score of the scored label value ranges from 1 to 5, representing different degrees of leaf damage caused by insect pests; The division module 400 is used to divide the plurality of leaf images into a training set, a validation set and a test set according to a preset ratio; The construction module 500 is used to construct a leaf recognition deep learning model based on Keras and TensorFlow. The leaf recognition deep learning model is based on the VGG16 model and adds a residual network structure block. The residual network structure block includes two convolutional layers. An adding module 600 is used for adding a GAP layer and three FC layers after the last convolution layer, adding a dropout layer after each FC layer, using a sigmoid activation as the activation function of the last FC layer, and using the output value of the last FC layer as the pest impact score; The preprocessing module 700 is used to preprocess the multiple leaf images; The pre-training module 800 is used to pre-train the convolution layer parameters of the leaf recognition deep learning model on the ImageNet dataset. During the pre-training process, the mean square error is selected as the loss function for optimization, and the mean absolute error is used as the performance indicator; The formal training module 900 is used to formally train the leaf recognition deep learning model and evaluate the performance of the leaf recognition deep learning model on a new test set; The testing module 1000 is used to deploy the trained blade recognition deep learning model into the test set to test the recognition effect of the blade recognition deep learning model.
[0041] Above, refer to Figure 1The leaf pest identification device based on the deep learning model according to an embodiment of the present invention is described, which has the following beneficial effects: 1. It can quickly and accurately detect pests of different types and severity. Its real-time nature makes it suitable for real-time monitoring and early intervention, which helps to accurately locate, prevent the spread of pests, reduce the use of pesticides, and reduce agricultural losses.
[0042] 2. It can be widely used in the agricultural field, including leaf pest monitoring in different environments such as farmland, orchards, vegetable gardens, greenhouses and botanical gardens. It is applicable to various crops, horticultural crops and plants. 3. Compared with traditional artificial vision and manual inspection, the present invention realizes automated pest identification, eliminating subjectivity and the need for manual work. This greatly improves efficiency and reduces labor costs.
[0043] The above combined with Figure 1 The leaf pest identification device based on the deep learning model according to the embodiment of the present invention is described. Furthermore, the present invention can also be applied to a device.
[0044] According to a third embodiment of the present invention, a device is provided, including: a memory 1, a processor 2 and a computer program 3, the computer program 3 is stored in the memory 1, and the processor 2 runs the computer program 3 to execute the leaf pest identification method based on the deep learning model of the first embodiment.
[0045] The deep learning model provided by the present invention is based on VGG16 and adds an incomplete network structure block. The model can be trained through standard format images and can monitor leaf pests of all crops under different environments. After training, the MSE of the model on the training set and the validation set was only 0.02 and 0.09, and the MAE was only 0.11 and 0.18. On the test set, the MSE was 0.19 and the MAE was 0.35. Through correlation analysis, the Pearson correlation coefficient between the value predicted by DCNN-PDS based on the picture and the value of manual visual review was 0.94, which has high accuracy. This model can be widely used in crop field production monitoring to accurately locate the occurrence of pests, and has important application value in the future crop production and pest control markets. According to a fourth embodiment of the present invention, a readable medium having a non-volatile program code executable by a processor is provided, and the program code enables the processor to run the leaf pest identification method based on the deep learning model of the first embodiment.
[0046] Specifically, the fourth embodiment of the present invention provides a readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to run the above-mentioned leaf pest identification method based on the deep learning model. Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general or special-purpose computer. For example, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in a dedicated integrated circuit. In addition, the dedicated integrated circuit can be located in a device. Of course, the processor and the readable storage medium can also exist in a communication device as discrete components. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc. The present invention also provides a program product, which includes an execution instruction, and the execution instruction is stored in a readable storage medium. At least one processor of the device can read the execution instruction from a readable storage medium, and at least one processor executes the execution instruction so that the device implements the leaf pest identification method based on the deep learning model provided by the various embodiments described above. In the embodiment of the above-mentioned device, it should be understood that the processor can be a central processing unit (English: Central Processing Unit, referred to as: CPU), or other general-purpose processors, digital signal processors (English: Digital Signal Processor, referred to as: DSP), application-specific integrated circuits (English: Application Specific Integrated Circuit, referred to as: ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the present invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0047] It should be noted that, in this specification, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprises..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0048] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A leaf pest identification method based on a deep learning model, characterized in that: The following steps are included: Collect multiple leaf images, covering different backgrounds, colors, and degrees of leaf damage caused by insect pests; Using the target detection model, identifying and locating the main part of the leaf, and removing irrelevant pixel information on the multiple leaf images; Obtaining manually scored label values of the degree of leaf damage caused by insect pests in the plurality of leaf images, wherein the scores of the scored label values range from 1 to 5, representing different degrees of leaf damage caused by insect pests; Dividing the plurality of leaf images into a training set, a validation set and a test set according to a preset ratio; A leaf recognition deep learning model is constructed based on Keras and TensorFlow. The leaf recognition deep learning model is based on the VGG16 model and adds a residual network structure block. The residual network structure block includes two convolutional layers. A GAP layer and three FC layers are added after the last convolution layer, a dropout layer is added after each FC layer, a sigmoid activation is used as the activation function of the last FC layer, and the output value of the last FC layer is used as the pest impact score; Preprocessing the multiple leaf images; Pre-training the convolutional layer parameters of the leaf recognition deep learning model on the ImageNet dataset, selecting mean square error as the loss function for optimization during the pre-training process, and using mean absolute error as the performance indicator; Formal training of the leaf recognition deep learning model, and evaluation of the performance of the leaf recognition deep learning model on a new test set; The trained leaf recognition deep learning model is deployed to the test set to test the recognition effect of the leaf recognition deep learning model.
2. The leaf pest identification method based on the deep learning model as claimed in claim 1, characterized in that: The score label value ranges from 1 to 5, representing different degrees of leaf damage caused by pests. Specifically, when the degree of leaf damage caused by pests is less than 20%, the score label value is 1. For every 20% increase in the degree of leaf damage caused by pests, the score label value increases by 1. The highest score label value 5 indicates that the degree of leaf damage caused by pests exceeds 80%.
3. The leaf pest identification method based on the deep learning model as claimed in claim 1, characterized in that: Each of the convolutional layers has 512, 256, 128 and 64 filters.
4. The leaf pest identification method based on the deep learning model as claimed in claim 1, characterized in that: Each of the FC layers is a FC layer with relu activation, and each of the FC layers has 1024 neurons.
5. The leaf pest identification method based on the deep learning model as claimed in claim 1, characterized in that: The preprocessing of the plurality of leaf images includes: performing size unification and pixel value normalization processing on the plurality of leaf images.
6. The leaf pest identification method based on the deep learning model as claimed in claim 5, characterized in that: The preprocessing of the plurality of leaf images further includes: performing random transformation and enhancement on the plurality of leaf images belonging to the training set, wherein the random transformation and enhancement include: random rotation within a range of 45°, random width and height movement of 15%, horizontal flipping, and random scaling within a range of 50%.
7. The leaf pest identification method based on the deep learning model as claimed in claim 1, characterized in that: When evaluating the performance of the leaf recognition deep learning model on a new test set, the Pearson correlation coefficient between the pest impact score and the scored label value was calculated using the Numpy library to evaluate the linear relationship between them.
8. A grape pest identification device based on a deep learning model, characterized in that: Include: The acquisition module is used to collect multiple leaf images, covering different backgrounds, colors and degrees of leaf damage caused by insect pests; A positioning and elimination module is used to use a target detection model to identify and locate the main part of the leaf and eliminate irrelevant pixel information on the plurality of leaf images; An acquisition module is used to obtain manually scored label values of the degree of leaf damage caused by insect pests in the plurality of leaf images, where the score of the scored label value ranges from 1 to 5, representing different degrees of leaf damage caused by insect pests; A division module, used for dividing the plurality of leaf images into a training set, a validation set and a test set according to a preset ratio; A construction module is used to build a leaf recognition deep learning model based on Keras and TensorFlow. The leaf recognition deep learning model is based on the VGG16 model and adds a residual network structure block. The residual network structure block includes two convolutional layers. An adding module is used to add a GAP layer and three FC layers after the last convolution layer, add a dropout layer after each FC layer, use sigmoid activation as the activation function of the last FC layer, and use the output value of the last FC layer as the pest impact score; A preprocessing module, used for preprocessing the plurality of leaf images; A pre-training module, used for pre-training the convolutional layer parameters of the leaf recognition deep learning model on the ImageNet dataset, selecting mean square error as the loss function for optimization during the pre-training process, and using mean absolute error as the performance indicator; A formal training module, used for formally training the leaf recognition deep learning model and evaluating the performance of the leaf recognition deep learning model on a new test set; The testing module is used to deploy the trained leaf recognition deep learning model into a test set to test the recognition effect of the leaf recognition deep learning model.
9. A device, characterized in that: include: A memory, a processor and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute the leaf pest identification method based on the deep learning model according to any one of claims 1 to 7.
10. A readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to run the leaf pest identification method based on the deep learning model as described in any one of claims 1 to 7.
Citation Information
Patent Citations
A method for identifying diseases and insect pest of field crops based on an improved total convolution neural network
CN109359681A
Apple leaf disease classification method based on deep learning and automatic identification device thereof
CN110097104A
Tomato recognition method based on deep learning
CN112232263A
Pepper disease identification method, identification system and computer readable storage medium
CN114170137A
Skin disease identification model and auxiliary diagnosis platform based on VGG-16 fusion residual network
CN114693976A