A method and system for identifying early pine wood nematode diseases
By combining the ShuffleNetViT network, ECA attention mechanism and RFB receptive field module, the accuracy and efficiency of early pine nematode disease recognition are solved, and efficient and accurate disease recognition is achieved.
Patent Information
- Application Number
- CN202410735408.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The prior art is difficult to achieve accurate identification of early pine nematode diseases, resulting in poor prevention and control effects.
The ShuffleNetViT network module is used to combine the ECA attention mechanism and the RFB receptive field module to build a pine nematode disease recognition model through multi-scale feature fusion and information dissemination to improve the recognition efficiency and accuracy of the model.
It improves the accuracy and efficiency of the identification of pine nematode diseases by the model, reduces the number of parameters and calculation complexity of the model, and is suitable for the deployment of resource-constrained scenarios.
Smart Images

Figure CN118675049B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an early pine wood nematode disease identification method and an identification system, belonging to the technical field of forestry disease and insect pest monitoring. Background Art
[0002] Pine wood nematodes are a type of pest that causes serious damage to pine trees. The diseases they cause can lead to the death of pine trees. Since pine wood nematode diseases are not easily detected in the early stages, traditional monitoring methods often have difficulty in achieving early identification, resulting in poor control effects. Therefore, developing a method that can accurately and quickly identify early pine wood nematode diseases is of great significance for protecting forest resources.
[0003] In recent years, with the booming development of deep learning, convolutional neural networks have shown the potential for widespread application in pine wood nematode detection. With the help of large amounts of image data, these networks are able to automatically learn and identify the characteristics of pests and diseases, thereby achieving efficient and accurate detection. The local connection and weight sharing characteristics of convolutional neural networks make them efficient and robust when processing image data. They can not only capture local features in the image, but also significantly reduce the complexity of the model and the number of parameters required. However, as the depth of the network increases, more parameters and computing resources are required, which is challenging for deployment in resource-constrained scenarios. In addition, although convolutional neural networks perform well in extracting local features, they are limited in capturing long-distance dependencies in images, and the detection accuracy is not high for detecting pests and diseases with global symptoms, such as those caused by pine wood nematodes. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide an early pine wood nematode disease identification method and identification system. The pine wood nematode disease identification model is used to identify pine wood nematode diseases, which not only improves the efficiency and accuracy of model identification, but also reduces the number of model parameters and computational complexity.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0006] In one aspect, the present invention provides a method for identifying early pine wood nematode disease, comprising the following steps:
[0007] Acquire an image of pine wood nematode disease to be identified;
[0008] Inputting the pine wood nematode disease image into a trained pine wood nematode disease recognition model to obtain a corresponding pine wood nematode disease recognition result;
[0009] Wherein, the pine wood nematode disease identification model includes:
[0010] An input module, used to input pine wood nematode disease images;
[0011] A ShuffleNetViT network module is used to perform feature extraction based on the pine wood nematode disease image to obtain image extraction features of different scales, including a first extraction feature, a second extraction feature and a third extraction feature;
[0012] A first ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the first extracted features, and generate a first weighted feature;
[0013] A second ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the second extracted features, and generate a second weighted feature;
[0014] An RFB receptive field module, configured to obtain a third weighted feature by expanding the receptive field through multi-branch convolution according to the third extracted feature;
[0015] A PANet network module, used for obtaining image prediction features through multi-scale feature fusion and information propagation according to the first weighted features, the second weighted features and the third weighted features;
[0016] The output module is used to output the pine wood nematode disease identification result according to the image prediction features.
[0017] Furthermore, the ShuffleNetViT network module includes:
[0018] A preprocessing unit, used for performing convolution and maximum pooling operations on the pine wood nematode disease image to obtain preprocessing features;
[0019] A first feature extraction unit, configured to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the preprocessing features, to obtain first extracted features;
[0020] A second feature extraction unit, configured to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the first extracted features, to obtain second extracted features;
[0021] The third feature extraction unit is used to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the second extracted features to obtain third extracted features.
[0022] Furthermore, in the RFB receptive field module, obtaining the third weighted feature includes the following steps:
[0023] According to the third extracted feature, a processed extracted feature is obtained by performing multi-branch convolution and connected convolution operations;
[0024] The extracted features after the processing are fused with the third extracted features after the shortcut jump connection to obtain the third weighted features.
[0025] Furthermore, the PANet network module includes:
[0026] A multi-scale feature fusion unit, configured to obtain a first fused feature, a second fused feature, and a third fused feature through an upsampling operation according to the first weighted feature, the second weighted feature, and the third weighted feature;
[0027] A third ECA attention mechanism unit is used to extract feature space information based on the ECA attention mechanism according to the first fusion feature to generate a third weighted feature;
[0028] a fourth ECA attention mechanism unit, configured to extract feature space information based on the ECA attention mechanism according to the second fusion feature, and generate a fourth weighted feature;
[0029] A fifth ECA attention mechanism unit, configured to extract feature space information based on the ECA attention mechanism according to the third fused feature, and generate a fifth weighted feature;
[0030] Prediction unit: According to the third fusion feature, the third weighted feature, the fourth weighted feature and the fifth weighted feature, an image prediction feature is obtained through downsampling and convolution operations.
[0031] Furthermore, the training method of the pine wood nematode disease recognition model comprises the following steps:
[0032] Get the training set;
[0033] According to the training set, the pre-constructed pine wood nematode disease recognition model is trained based on a preset total loss function until a preset iteration termination condition is met and the trained pine wood nematode disease recognition model is output; the total loss function includes a bounding box loss function, a confidence loss function and a classification loss function,
[0034] Wherein, the total loss function includes a bounding box loss function, a confidence loss function and a classification loss function;
[0035] The iteration termination condition is that the training is considered to be terminated when the total loss function converges in n consecutive iterations, and n≥300.
[0036] Furthermore, the expression of the total loss function is as follows:
[0037]
[0038] In the formula, represents the total loss function; Represents the weight coefficient of the bounding box loss function; represents the bounding box loss function; Represents the weight coefficient of the confidence loss function; represents the confidence loss function; Represents the weight coefficient of the classification loss function; represents the classification loss function.
[0039] Furthermore, the bounding box loss function The expression is as follows:
[0040]
[0041] In the formula, Represents the intersection-over-union ratio of the predicted box and the true box; Represents the Euclidean distance between the center points of the predicted box and the true box; Indicates the minimum closure diagonal length of the predicted box and the true box; Indicates for balance and the balance coefficient of shape consistency loss, ; Represents the parameter used to measure the consistency of the aspect ratio of the predicted box and the true box. , Indicates the length of the real frame; Indicates the width of the real box; Indicates the length of the prediction box; Indicates the width of the prediction box.
[0042] Furthermore, the confidence loss function The expression is as follows:
[0043]
[0044] In the formula, represents the number of targets detected in the pine wood nematode disease image; Indicates An indicator variable indicating whether a target is a positive sample. 1 indicates a positive sample, 0 indicates a negative sample; Indicates The confidence prediction value of the target.
[0045] Furthermore, the classification loss function The expression is as follows:
[0046]
[0047] In the formula, Indicates the number of categories; Indicates The true labels of the categories; Indicates The predicted probability of each class.
[0048] In another aspect, the present invention provides an early pine wood nematode disease identification system, which is applicable to the above-mentioned early pine wood nematode disease identification method, comprising:
[0049] A data acquisition module, used for acquiring images of pine wood nematode diseases to be identified;
[0050] A disease recognition module, used for inputting the pine wood nematode disease image into a trained pine wood nematode disease recognition model to obtain a corresponding pine wood nematode disease recognition result;
[0051] Wherein, the pine wood nematode disease identification model includes:
[0052] An input module, used to input pine wood nematode disease images;
[0053] A ShuffleNetViT network module is used to perform feature extraction based on the pine wood nematode disease image to obtain image extraction features of different scales, including a first extraction feature, a second extraction feature and a third extraction feature;
[0054] A first ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the first extracted features, and generate a first weighted feature;
[0055] A second ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the second extracted features, and generate a second weighted feature;
[0056] An RFB receptive field module, configured to obtain a third weighted feature by expanding the receptive field through multi-branch convolution according to the third extracted feature;
[0057] A PANet network module, used for obtaining image prediction features through multi-scale feature fusion and information propagation according to the first weighted features, the second weighted features and the third weighted features;
[0058] The output module is used to output the pine wood nematode disease identification result according to the image prediction features.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] The early pine wood nematode disease identification method and identification system of the present invention, through the pine wood nematode disease identification model, performs pine wood nematode disease identification, which not only improves the efficiency and accuracy of model identification, but also reduces the number of parameters and computational complexity of the model. Specifically, based on the ShuffleNetViT network module, point convolution and channel reorganization technology are used to reduce the amount of calculation and the number of parameters, improve the reasoning speed, improve the model's ability to extract features, and enhance the model's recognition accuracy of pine wood nematode diseases. Based on the first ECA attention mechanism module, the second ECA attention mechanism module and the RFB receptive field module, the model's recognition ability for small targets is improved, and the model's recognition accuracy for pine wood nematode diseases is further enhanced. Based on the PANet network module, multi-scale feature fusion and information propagation are realized, the model's detection ability for multi-scale targets is improved, and the model's recognition accuracy for pine wood nematode diseases is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a schematic flow chart of an early pine wood nematode disease identification method provided in Example 1;
[0062] Figure 2 is a schematic diagram of the structure of the pine wood nematode disease identification model provided in Example 1;
[0063] Figure 3 It is a schematic diagram of the structure of the ShuffleNetViT network module provided in Example 1;
[0064] Figure 4 is a schematic diagram of the structure of the ShuffleViT network provided in Example 1;
[0065] Figure 5 is a schematic diagram of the structure of the first ECA attention mechanism module or the second ECA attention mechanism module provided in Example 1;
[0066] Figure 6 is a schematic diagram of the structure of the RFB receptive field module provided in Example 1;
[0067] Figure 7 is a schematic diagram of a collection data set provided in Example 1;
[0068] Figure 8 1 is a schematic diagram of an iterative curve of the total loss function of the model provided in Example 1;
[0069] Fig. 9 This is an example diagram of pine wood nematode disease identification results output in different scenarios provided in Example 1. DETAILED DESCRIPTION
[0070] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0071] Example 1
[0072] This embodiment 1 provides a method for identifying early pine wood nematode diseases, comprising the following steps:
[0073] Acquire an image of pine wood nematode disease to be identified;
[0074] Input the pine wood nematode disease image into the trained pine wood nematode disease recognition model to obtain the corresponding pine wood nematode disease recognition result;
[0075] Among them, the pine wood nematode disease identification model includes:
[0076] An input module, used to input pine wood nematode disease images;
[0077] The ShuffleNetViT network module is used to extract features based on the pine wood nematode disease image to obtain image extraction features of different scales, including a first extraction feature, a second extraction feature and a third extraction feature;
[0078] A first ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the first extracted feature, and generate a first weighted feature;
[0079] A second ECA attention mechanism module is used to extract feature space information based on the ECA attention mechanism according to the second extracted feature, and generate a second weighted feature;
[0080] The RFB receptive field module is used to expand the receptive field through multi-branch convolution according to the third extracted feature to obtain the third weighted feature;
[0081] A PANet network module, used for obtaining image prediction features through multi-scale feature fusion and information propagation according to the first weighted feature, the second weighted feature and the third weighted feature;
[0082] The output module is used to output the pine wood nematode disease identification results based on the image prediction features.
[0083] The technical concept of the present invention is: by using the pine wood nematode disease recognition model to identify pine wood nematode diseases, not only the efficiency and accuracy of model recognition are improved, but also the number of parameters and computational complexity of the model are reduced. Specifically, based on the ShuffleNetViT network module, point convolution and channel reorganization technology are used to reduce the amount of calculation and the number of parameters, improve the reasoning speed, improve the model's ability to extract features, and enhance the model's accuracy in identifying pine wood nematode diseases. Based on the first ECA attention mechanism module, the second ECA attention mechanism module and the RFB receptive field module, the model's ability to recognize small targets is improved, and the model's accuracy in identifying pine wood nematode diseases is further enhanced. Based on the PANet network module, multi-scale feature fusion and information propagation are realized, the model's ability to detect multi-scale targets is improved, and the model's accuracy in identifying pine wood nematode diseases is enhanced.
[0084] like Figure 1 As shown, the early identification method of pine wood nematode disease includes the following steps:
[0085] Step 1: Model construction.
[0086] like Figure 2 As shown, the pine wood nematode disease recognition model in this embodiment includes an input module, a ShuffleNetViT network module, a first ECA attention mechanism module, a second ECA attention mechanism module, an RFB receptive field module, a PANet network module and an output module.
[0087] 1.1. Input module, used to input pine wood nematode disease images.
[0088] 1.2. ShuffleNetViT network module, used to extract features based on pine wood nematode disease images to obtain image extraction features of different scales, including first extraction features, second extraction features and third extraction features.
[0089] like Figure 3 and Figure 4As shown, this embodiment designs a new feature extraction network - ShuffleNetViT network module, which serves as the backbone structure of this model. In the ShuffleNetViT network module, the lightweight network ShuffleNetV2 is used as the basic architecture, and the ShuffleViT network is integrated on it. The ShuffleNetV2 network uses point convolution and channel reorganization technology to effectively extract local information, reduce the amount of calculation and the number of parameters, improve the reasoning speed, and shorten the reasoning time, while the ShuffleViT network can capture the global context information in the image, improve the model's ability to extract global features, and enhance the model's recognition accuracy of pine wood nematode diseases. Combining the advantages of the ShuffleNetV2 network and the ShuffleViT network, the extraction of local and global features is achieved.
[0090] like Figure 3 As shown, the ShuffleNetViT network module includes:
[0091] A preprocessing unit, used for performing convolution and maximum pooling operations on the pine wood nematode disease image to obtain preprocessing features;
[0092] A first feature extraction unit is used to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the preprocessing features to obtain first extracted features;
[0093] A second feature extraction unit is used to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the first extracted features to obtain second extracted features;
[0094] The third feature extraction unit is used to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the second extracted features to obtain third extracted features.
[0095] 1.3. A first ECA attention mechanism module is used to extract feature space information based on the ECA attention mechanism according to the first extracted feature to generate a first weighted feature. A second ECA attention mechanism module is used to extract feature space information based on the ECA attention mechanism according to the second extracted feature to generate a second weighted feature.
[0096] like Figure 5 As shown in Figure 1, the principle of the ECA attention mechanism is as follows: the spatial information of the feature map is extracted by using dilated convolution and global average pooling, and an attention map is generated for weighted features. The use of the ECA attention mechanism can improve the model's ability to recognize small targets and enhance the model's recognition accuracy for pine wood nematode disease.
[0097] 1.4. RFB receptive field module, used to extract features according to the third, expand the receptive field through multi-branch convolution, and obtain the third weighted feature.
[0098] like Figure 6 As shown in the figure, in order to enhance the network's perception of early PWD and better understand the contextual information and features of the infected area, the RFB receptive field module is embedded after the third feature extraction of the output of the ShuffleNetViT network module to expand the receptive field. The specific principles are as follows:
[0099] According to the third extracted feature, a processed extracted feature is obtained through multi-branch convolution and connected convolution operations;
[0100] The processed extracted features are fused with the third extracted features after the shortcut jump connection to obtain the third weighted features.
[0101] 1.5. The PANet network module is used to obtain image prediction features through multi-scale feature fusion and information propagation according to the first weighted feature, the second weighted feature and the third weighted feature.
[0102] like Figure 2 As shown, this embodiment uses the PANet network module to connect different weighted features to achieve multi-scale feature fusion and information propagation, improve the model's detection ability for multi-scale targets, and enhance the model's recognition accuracy for pine wood nematode diseases.
[0103] Specifically, the PANet network module includes:
[0104] A multi-scale feature fusion unit, used to obtain a first fusion feature, a second fusion feature and a third fusion feature through an upsampling operation according to the first weighted feature, the second weighted feature and the third weighted feature;
[0105] A third ECA attention mechanism unit is used to extract feature space information based on the ECA attention mechanism according to the first fusion feature, and generate a third weighted feature;
[0106] A fourth ECA attention mechanism unit, configured to extract feature space information based on the ECA attention mechanism according to the second fused feature, and generate a fourth weighted feature;
[0107] a fifth ECA attention mechanism unit, configured to extract feature space information based on the ECA attention mechanism according to the third fused feature, and generate a fifth weighted feature;
[0108] Prediction unit: According to the third fusion feature, the third weighted feature, the fourth weighted feature and the fifth weighted feature, an image prediction feature is obtained through downsampling and convolution operations.
[0109] 1.6. Output module, used to output pine wood nematode disease identification results based on image prediction features, such as Fig. 9 shown.
[0110] In summary, the pine wood nematode disease recognition model of this embodiment realizes the rapid and accurate recognition of pine wood nematode disease. Among them, the ShuffleNetViT network module is responsible for feature extraction; the first ECA attention mechanism module, the second ECA attention mechanism module, and the RFB receptive field module are responsible for enhancing the detection ability of small targets; the PANet network module is responsible for multi-scale feature fusion and information propagation. Each module is interconnected and works together to complete the task of identifying pine wood nematode disease.
[0111] Step 2: Model training.
[0112] The training method of the pine wood nematode disease recognition model includes the following steps:
[0113] 2.1. Obtain training set, validation set and test set.
[0114] like Figure 7 As shown in FIG. 1 , a data set is obtained by collecting image data at different heights and angles above a forest farm in a certain area using a drone.
[0115] The collected data set is preprocessed to filter and remove blurred and distorted images. The high-resolution images are equally divided in a 3×3 ratio to reduce the image resolution and alleviate the computational burden of model training, thus obtaining the preprocessed data set.
[0116] The diseased part of the preprocessed data image is annotated, and the annotated data set is constructed and divided into training set, validation set and test set in a ratio of 8:1:1.
[0117] 2.2. According to the training set and the validation set, the pre-built pine wood nematode disease recognition model is trained based on the preset total loss function until the preset iteration termination condition is met and the trained pine wood nematode disease recognition model is output.
[0118] The design of the total loss function of the model is an important part of the algorithm. It is used to measure the difference between the predicted box and the true labeled box, and optimize the model parameters by minimizing the total loss function to achieve more accurate target detection results.
[0119] The total loss function in this embodiment includes a bounding box loss function, a confidence loss function, and a classification loss function, wherein the bounding box loss function uses CIoU loss (Complete Intersection over Union Loss) to measure the difference between the predicted bounding box and the true bounding box. CIoU loss combines IoU, center point distance, and aspect ratio consistency. The confidence loss function uses binary cross entropy loss to measure the confidence of whether the predicted box contains an object. The classification loss function also uses binary cross entropy loss to measure the difference between the prediction and the true category of each category.
[0120] The expression of the total loss function is as follows:
[0121]
[0122] In the formula, represents the total loss function; Represents the weight coefficient of the bounding box loss function; represents the bounding box loss function; Represents the weight coefficient of the confidence loss function; represents the confidence loss function; Represents the weight coefficient of the classification loss function; represents the classification loss function.
[0123] Furthermore, the bounding box loss function The expression is as follows:
[0124]
[0125] In the formula, Represents the intersection-over-union ratio of the predicted box and the true box; Represents the Euclidean distance between the center points of the predicted box and the true box; Indicates the minimum closure diagonal length of the predicted box and the true box; Indicates for balance and the balance coefficient of shape consistency loss, ; Represents the parameter used to measure the consistency of the aspect ratio of the predicted box and the real box. , Indicates the length of the real frame; Indicates the width of the real box; Indicates the length of the prediction box; Indicates the width of the prediction box.
[0126] Furthermore, the confidence loss function The expression is as follows:
[0127]
[0128] In the formula, represents the number of targets detected in the pine wood nematode disease image; Indicates An indicator variable indicating whether a target is a positive sample. 1 indicates a positive sample, 0 indicates a negative sample; Indicates The confidence prediction value of the target.
[0129] Furthermore, the classification loss function The expression is as follows:
[0130]
[0131] In the formula, Indicates the number of categories; Indicates The true labels of the categories; Indicates The predicted probability of each class.
[0132] The preset iteration termination condition in this embodiment is that the training is terminated when the total loss function converges in n consecutive iterations, n≥300. Figure 8 shown.
[0133] 2.3. According to the test set, the performance of the trained pine wood nematode disease recognition model is evaluated based on preset evaluation parameters. In this embodiment, the preset evaluation parameters include average accuracy AP and computing power GFLOPs.
[0134] In addition, three other models are constructed in this embodiment, namely:
[0135] Construct model a, including input module, ShuffleNetViT network module and output module.
[0136] Construct model b, including input module, ShuffleNetViT network module, PANet network module and output module.
[0137] Construct model c, including input module, ShuffleNetViT network module, first ECA attention mechanism module, second ECA attention mechanism module, PANet network module and output module.
[0138] After the training of model a, model b, model c and the pine wood nematode disease recognition model of this embodiment is completed, the performance indicators such as the average accuracy AP and the computing amount GFLOPs of the model are evaluated using the test set to ensure the stability and reliability of the model.
[0139] The specific test results are shown in the following table:
[0140] name Average accuracy AP (%) Computing capacity GFLOPs Model a 71.7 7.0 Model b 71.8 14.1 Model c 72.3 12.6 Pine wood nematode disease identification model 72.6 12.7
[0141] It can be seen from the table that the average accuracy AP of the output of the trained pine wood nematode disease recognition model in this embodiment is the highest, and the amount of calculation is also low.
[0142] Example 2
[0143] This embodiment 2 provides an early pine wood nematode disease identification system, which is applicable to the early pine wood nematode disease identification method of embodiment 1, including:
[0144] A data acquisition module, used for acquiring images of pine wood nematode diseases to be identified;
[0145] A disease recognition module is used to input the pine wood nematode disease image into the trained pine wood nematode disease recognition model to obtain the corresponding pine wood nematode disease recognition result;
[0146] Among them, the pine wood nematode disease identification model includes:
[0147] An input module, used to input pine wood nematode disease images;
[0148] The ShuffleNetViT network module is used to extract features based on the pine wood nematode disease image to obtain image extraction features of different scales, including a first extraction feature, a second extraction feature and a third extraction feature;
[0149] A first ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the first extracted feature, and generate a first weighted feature;
[0150] A second ECA attention mechanism module is used to extract feature space information based on the ECA attention mechanism according to the second extracted feature, and generate a second weighted feature;
[0151] The RFB receptive field module is used to expand the receptive field through multi-branch convolution according to the third extracted feature to obtain the third weighted feature;
[0152] A PANet network module, used for obtaining image prediction features through multi-scale feature fusion and information propagation according to the first weighted feature, the second weighted feature and the third weighted feature;
[0153] The output module is used to output the pine wood nematode disease identification results based on the image prediction features.
[0154] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0155] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0158] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for identifying early pine wood nematode disease, characterized in that: The steps include: Acquire an image of pine wood nematode disease to be identified; Inputting the pine wood nematode disease image into a trained pine wood nematode disease recognition model to obtain a corresponding pine wood nematode disease recognition result; Wherein, the pine wood nematode disease identification model includes: An input module, used to input pine wood nematode disease images; A ShuffleNetViT network module is used to perform feature extraction based on the pine wood nematode disease image to obtain image extraction features of different scales, including a first extraction feature, a second extraction feature and a third extraction feature; A first ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the first extracted features, and generate a first weighted feature; A second ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the second extracted features, and generate a second weighted feature; An RFB receptive field module, configured to obtain a third weighted feature by expanding the receptive field through multi-branch convolution according to the third extracted feature; A PANet network module, used for obtaining image prediction features through multi-scale feature fusion and information propagation according to the first weighted features, the second weighted features and the third weighted features; An output module, used for outputting pine wood nematode disease identification results according to the image prediction features; Wherein, the ShuffleNetViT network module includes: A preprocessing unit, used for performing convolution and maximum pooling operations on the pine wood nematode disease image to obtain preprocessing features; A first feature extraction unit, configured to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the preprocessing features, to obtain first extracted features; A second feature extraction unit, configured to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the first extracted features, to obtain second extracted features; The third feature extraction unit is used to extract local and global features based on the ShuffleNetV2 network and the ShuffleViT network according to the second extracted features to obtain third extracted features.
2. The method for identifying early pine wood nematode disease according to claim 1, characterized in that: In the RFB receptive field module, obtaining the third weighted feature includes the following steps: According to the third extracted feature, a processed extracted feature is obtained by performing multi-branch convolution and connected convolution operations; The extracted features after the processing are fused with the third extracted features after the shortcut jump connection to obtain the third weighted features.
3. The method for identifying early pine wood nematode disease according to claim 1, characterized in that: The PANet network module includes: A multi-scale feature fusion unit, configured to obtain a first fused feature, a second fused feature, and a third fused feature through an upsampling operation according to the first weighted feature, the second weighted feature, and the third weighted feature; A third ECA attention mechanism unit is used to extract feature space information based on the ECA attention mechanism according to the first fusion feature to generate a third weighted feature; a fourth ECA attention mechanism unit, configured to extract feature space information based on the ECA attention mechanism according to the second fusion feature, and generate a fourth weighted feature; A fifth ECA attention mechanism unit, configured to extract feature space information based on the ECA attention mechanism according to the third fused feature, and generate a fifth weighted feature; Prediction unit: According to the third fusion feature, the third weighted feature, the fourth weighted feature and the fifth weighted feature, an image prediction feature is obtained through downsampling and convolution operations.
4. The method for identifying early pine wood nematode disease according to claim 1, characterized in that: The training method of the pine wood nematode disease recognition model comprises the following steps: Get the training set; According to the training set, the pre-constructed pine wood nematode disease recognition model is trained based on a preset total loss function until a preset iteration termination condition is met and the trained pine wood nematode disease recognition model is output; the total loss function includes a bounding box loss function, a confidence loss function and a classification loss function, Wherein, the total loss function includes a bounding box loss function, a confidence loss function and a classification loss function; The iteration termination condition is that the training is considered to be terminated when the total loss function converges in n consecutive iterations, and n≥300.
5. The method for identifying early pine wood nematode disease according to claim 4, characterized in that: The expression of the total loss function is as follows: L=γ bbox L bbox +g obj L obj +g cls L cls Where L represents the total loss function; γ bbox Represents the weight coefficient of the bounding box loss function; L bbox represents the bounding box loss function; γ obj Represents the weight coefficient of the confidence loss function; L obj represents the confidence loss function; γ cls Represents the weight coefficient of the classification loss function; L cls represents the classification loss function.
6. The method for identifying early pine wood nematode disease according to claim 5, characterized in that: The bounding box loss function L bbox The expression is as follows: Where IoU represents the intersection-over-union ratio between the predicted box and the real box; ρ 2 (b,b gt ) represents the Euclidean distance between the center points of the predicted box and the real box; c represents the minimum closure diagonal length of the predicted box and the real box; α represents the balance coefficient used to balance the IoU and shape consistency loss. v represents the parameter used to measure the consistency of the aspect ratio of the predicted box and the real box. ω gt Indicates the length of the real frame; h gt represents the width of the real box; ω represents the length of the predicted box; h represents the width of the predicted box.
7. The method for identifying early pine wood nematode disease according to claim 5, characterized in that: The confidence loss function L conf The expression is as follows: Where N obj represents the number of targets detected in the pine wood nematode disease image; c i Indicator variable indicating whether the i-th target is a positive sample, c i 1 indicates a positive sample, c i 0 indicates a negative sample; Represents the confidence prediction value of the i-th target.
8. The method for identifying early pine wood nematode disease according to claim 5, characterized in that: The classification loss function L cls The expression is as follows: Where N cls Indicates the number of categories; y i Represents the true label of the i-th category; represents the predicted probability of the i-th category.
9. An early pine wood nematode disease identification system, applicable to the early pine wood nematode disease identification method according to any one of claims 1 to 8, characterized in that: include: A data acquisition module, used for acquiring images of pine wood nematode diseases to be identified; A disease recognition module, used for inputting the pine wood nematode disease image into a trained pine wood nematode disease recognition model to obtain a corresponding pine wood nematode disease recognition result; Wherein, the pine wood nematode disease identification model includes: An input module, used to input pine wood nematode disease images; A ShuffleNetViT network module is used to perform feature extraction based on the pine wood nematode disease image to obtain image extraction features of different scales, including a first extraction feature, a second extraction feature and a third extraction feature; A first ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the first extracted features, and generate a first weighted feature; A second ECA attention mechanism module, configured to extract feature space information based on the ECA attention mechanism according to the second extracted features, and generate a second weighted feature; An RFB receptive field module, configured to obtain a third weighted feature by expanding the receptive field through multi-branch convolution according to the third extracted feature; A PANet network module, used for obtaining image prediction features through multi-scale feature fusion and information propagation according to the first weighted features, the second weighted features and the third weighted features; The output module is used to output the pine wood nematode disease identification result according to the image prediction features.
Citation Information
Patent Citations
Image information extraction model and method based on circular Transform and application of image information extraction model and method
CN115984574A
Crop pest detection method, device and equipment based on deep learning and medium
CN117333694A