Lightweight cross-regional pine wood nematode disease detection method, system and device and storage medium
By using a lightweight pine wilt disease detection model and innovative design of feature extraction, fusion and prediction layers, the problem of insufficient computing power and detection capability for early lesion identification on UAV equipment has been solved, and efficient and accurate pine wilt disease detection has been achieved.
Patent Information
- Application Number
- CN202512003511.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-28
AI Technical Summary
Existing pine wilt disease detection technologies suffer from computational power constraints and generalization bottlenecks on UAV-borne edge computing devices, making it difficult to accurately identify early, minute lesions. Furthermore, lightweight models lack sufficient detection capabilities in complex environments.
A lightweight nematode disease detection model is adopted, which includes a feature extraction layer, a feature fusion layer, and a prediction layer. Feature extraction is performed through the feature extraction layer, and the inter-layer feature association module with semantic enhancement path and detail enhancement path and dual-branch downsampling module are used for prediction. Combined with parameterless attention mechanism and sparse convolution, the model can achieve accurate detection of early diseases.
It significantly improves the detection accuracy and identification capability of early-stage diseased trees under lightweight conditions, meets the real-time requirements of UAV-borne edge computing devices, and reduces computational complexity and the number of parameters.
Smart Images

Figure CN121937867A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of forest pest and disease monitoring technology, specifically relating to a lightweight, cross-regional pine wilt disease detection method, system, device, and storage medium. Background Technology
[0002] Pine wilt disease, a devastating forest epidemic, poses a severe challenge to global forest ecological security due to its complex pathogenic mechanism, rapid spread, and high host mortality rate. In practical forestry control, accurate identification and location of diseased trees in the early stages of infection (i.e., when the needles just begin to show slight discoloration) is crucial to breaking the transmission chain. However, existing monitoring technologies face significant spatial and temporal limitations in practical applications. On the one hand, traditional manual ground surveys are not only constrained by high labor costs and intensity but also struggle to achieve full coverage monitoring in vast, complex forest areas, often resulting in missed detections due to the inability to effectively observe early, subtle symptoms at the top of the tree canopy. On the other hand, while satellite remote sensing offers advantages in macroscopic monitoring, its low spatial resolution makes it difficult to analyze the textural details of individual infected trees, especially in the early stages of discoloration when disease characteristics are not yet obvious, leading to severely insufficient identification capabilities.
[0003] In recent years, deep learning technology has provided new opportunities for worm detection, but general target detection models still face the dual challenges of "computational constraints" and "generalization bottlenecks" in practical deployment. On the one hand, in order to capture early, small lesion features, existing models tend to stack complex network structures, leading to a surge in the number of parameters and computational complexity, making them difficult to adapt to UAV-borne edge computing devices with limited computing power and power consumption. On the other hand, existing lightweight models, after significantly reducing computational load, often sacrifice the ability to extract features from small targets in complex backgrounds, resulting in an increased false negative rate. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a lightweight, cross-regional method, system, device and storage medium for detecting pine wilt disease, thereby achieving lightweight detection of pine wilt disease while improving detection accuracy.
[0005] This invention provides the following technical solution:
[0006] Firstly, a lightweight, cross-regional method for detecting pine wilt disease is provided, including: acquiring original pine wood images;
[0007] The original pine wood image is input into a pre-trained nematode disease detection model to obtain nematode disease detection results;
[0008] The nematode disease detection model includes a feature extraction layer, a feature fusion layer, and a prediction layer.
[0009] The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, middle features, and deep features respectively;
[0010] The feature fusion layer includes a semantic enhancement path and a detail enhancement path. The semantic enhancement path includes an inter-layer feature association module, and the detail enhancement path includes an inter-layer feature association module and a dual-branch downsampling module. In the semantic enhancement path, deep features are upsampled and then fused with mid-layer features through the inter-layer feature association module to obtain mid-layer fused features. The mid-layer fused features are then fused with shallow features through the inter-layer feature association module to obtain shallow fused features. In the detail enhancement path, the shallow fused features are compressed in size through the dual-branch downsampling module and then aligned with mid-layer fused features through the inter-layer feature association module to obtain mid-layer aligned features. The mid-layer aligned features are compressed in size through the dual-branch downsampling module and then aligned with deep features through the inter-layer feature association module to obtain deep aligned features.
[0011] The prediction layers make predictions based on shallow fusion features, mid-layer alignment features, and deep alignment features, respectively, to obtain nematode disease detection results.
[0012] As a preferred technical solution of the present invention, after obtaining the original pine wood image, the original pine wood image is cropped to obtain an image block of a preset size.
[0013] As a preferred embodiment of the present invention, the feature extraction layer extracts features from the original pine wood image to obtain shallow features, middle features, and deep features, including:
[0014] The feature extraction layer includes a high-resolution grouped STEM module, a feature extraction module, a depthwise separable convolution module, and a spatial pyramid pooling module;
[0015] The original pine wood image is sequentially processed through a high-resolution grouped STEM module, a feature extraction module, a depthwise separable convolution module, and a feature extraction module to obtain shallow features. The shallow features are sequentially processed through a depthwise separable convolution module and three feature extraction modules to obtain mid-level features. The mid-level features are sequentially processed through a depthwise separable convolution module, a feature extraction module, and a spatial pyramid pooling module to obtain deep features.
[0016] The feature extraction module uses the HGBlock module in the improved HGNetV2 network, replacing the convolutions in HGBlock with phantom convolutions.
[0017] As a preferred embodiment of the present invention, the semantic enhancement path includes an upsampling module, an inter-layer feature association module, a reparameterized attention module, an upsampling module, an inter-layer feature association module, and a reparameterized attention module connected in sequence.
[0018] The deep features are upsampled by the module, fused with the mid-layer features by the inter-layer feature association module, and then processed by the reparameterized attention module to obtain the mid-layer fused features.
[0019] The mid-layer fusion features are upsampled by the module, fused with shallow features by the inter-layer feature association module, and then processed by the reparameterized attention module to obtain shallow fusion features.
[0020] The reparameterized attention module includes a structure reparameterization unit and an efficient multi-scale attention mechanism unit arranged sequentially.
[0021] As a preferred embodiment of the present invention, the fusion of inter-layer feature association module with mid-layer features includes:
[0022] Global features are obtained based on the mid-level features and the deep features after upsampling. , is represented as:
[0023] ;
[0024] in, This represents the convolution operation. Indicates deep features, This represents the spatial attention weights corresponding to deep features. Indicates mid-level features, This represents the spatial attention weights corresponding to the mid-level features;
[0025] The global features The features are divided into several groups along the channel dimension; for each group of features, the Softmax function is used to generate normalized attention weights and then weighted to obtain the weighted features of each group.
[0026] The weighted features of all groups are concatenated and standardized to obtain the standardized feature X, represented as:
[0027] ;
[0028] in, This represents the concatenated feature after weighting the features of all groups. and These represent splicing features. The mean and standard deviation, Represents a constant. All represent learnable parameters;
[0029] Channel importance weights are generated from the normalized feature X using global average pooling. , is represented as:
[0030] ;
[0031] in, This represents the activation function. This indicates an average pooling operation;
[0032] The standardized feature X is divided into strong semantic features. and weak semantic features , is represented as:
[0033] ;
[0034] ;
[0035] Based on the strong semantic features Weak semantic features Combined with the standardized feature X, we obtain the enhanced feature. , is represented as:
[0036] ;
[0037] in, express convolution, This represents depthwise separable convolution.
[0038] As a preferred embodiment of the present invention, the detail enhancement path includes a dual-branch downsampling module, an inter-layer feature association module, a reparameterized attention module, a dual-branch downsampling module, an inter-layer feature association module, and a reparameterized attention module connected in sequence.
[0039] The shallow fusion features are compressed in size by a dual-branch downsampling module, aligned with the mid-layer fusion features by an inter-layer feature association module, and then processed by a reparameterized attention module to obtain the mid-layer aligned features.
[0040] The mid-layer alignment features are compressed in size by a dual-branch downsampling module, aligned with deep features by an inter-layer feature association module, and then processed by a reparameterized attention module to obtain deep alignment features.
[0041] The dual-branch downsampling module includes a first branch and a second branch; the first branch performs downsampling through a kernel convolution with a stride of 2 to extract generalized features; the second branch... After convolutional channel adjustment, the data is passed in parallel through max pooling and average pooling layers; the generalized features and the outputs of the max pooling and average pooling layers are then concatenated along the channel dimension.
[0042] As a preferred technical solution of the present invention, the prediction layer includes a parameterless attention mechanism, depthwise separable convolution, and sparse convolution;
[0043] The shallow fusion features, mid-level alignment features, or deep alignment features are processed through a parameter-free attention mechanism, and then the nematode infection stage detection results are obtained through depth-separable convolution, while the nematode infection location detection results are obtained through sparse convolution.
[0044] Secondly, a lightweight, cross-regional pine wilt disease detection system is provided, comprising:
[0045] The data acquisition module is used to acquire raw pine wood images;
[0046] The detection module is used to input the original pine wood image into a pre-trained nematode disease detection model to obtain nematode disease detection results;
[0047] The nematode disease detection model includes a feature extraction layer, a feature fusion layer, and a prediction layer.
[0048] The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, middle features, and deep features respectively;
[0049] The feature fusion layer includes a semantic enhancement path and a detail enhancement path. The semantic enhancement path includes an inter-layer feature association module, and the detail enhancement path includes an inter-layer feature association module and a dual-branch downsampling module. In the semantic enhancement path, deep features are upsampled and then fused with mid-layer features through the inter-layer feature association module to obtain mid-layer fused features. The mid-layer fused features are then fused with shallow features through the inter-layer feature association module to obtain shallow fused features. In the detail enhancement path, the shallow fused features are compressed in size through the dual-branch downsampling module and then aligned with mid-layer fused features through the inter-layer feature association module to obtain mid-layer aligned features. The mid-layer aligned features are compressed in size through the dual-branch downsampling module and then aligned with deep features through the inter-layer feature association module to obtain deep aligned features.
[0050] The prediction layers make predictions based on shallow fusion features, mid-layer alignment features, and deep alignment features, respectively, to obtain nematode disease detection results.
[0051] Thirdly, a lightweight, cross-regional pine wilt disease detection device is provided, including a processor and a storage medium; the storage medium is used to store instructions.
[0052] The processor is configured to operate according to the instructions to execute the lightweight, cross-regional pine wilt disease detection method described in the first aspect.
[0053] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the lightweight, cross-regional pine wilt disease detection method described in the first aspect.
[0054] Compared with the prior art, the beneficial effects of the present invention are:
[0055] This invention provides a lightweight, cross-regional pine wilt disease detection method. Through an interlayer feature association module, it significantly enhances the nematode disease detection model's contextual understanding of early-stage infected trees. Through a dual-branch downsampling module, it simultaneously achieves near-non-destructive downsampling, preserving edge and color features that are beneficial for small target detection to the greatest extent, thus ensuring detection accuracy while achieving lightweight detection. Attached Figure Description
[0056] Figure 1 This is a flowchart of a lightweight, cross-regional pine wilt disease detection method according to an embodiment of the present invention;
[0057] Figure 2 This is a schematic diagram of the structure of the nematode disease detection model in an embodiment of the present invention;
[0058] Figure 3 This is an image showing the SSD detection results in an embodiment of the present invention;
[0059] Figure 4 This is an image showing the EfficientDet detection results in an embodiment of the present invention;
[0060] Figure 5 This is a diagram showing the YOLOv5n detection results in an embodiment of the present invention;
[0061] Figure 6 This is a YOLOv10n detection result diagram in an embodiment of the present invention;
[0062] Figure 7 This is a diagram showing the detection results of the method model in this embodiment of the invention. Detailed Implementation
[0063] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0064] Example 1
[0065] This embodiment provides a lightweight, cross-regional method for detecting pine wilt disease. For example... Figure 1As shown, the specific steps include the following:
[0066] Step 1: Obtain the original pine wood image.
[0067] In this embodiment, a DJI Mavic 3 drone, equipped with a Hasselblad L2D-20c aerial camera, is used to collect images in a representative forest area of the target region.
[0068] After acquiring the original pine image, the original pine image is cropped to obtain image blocks of a preset size. The original pine image is uniformly cropped into 3×3 image blocks to obtain sub-images with a resolution of 1333×1000, which reduces the computational burden while preserving details.
[0069] Step 2: Input the original pine wood image into the pre-trained nematode disease detection model to obtain the nematode disease detection results.
[0070] The nematode disease detection model includes a feature extraction layer, a feature fusion layer, and a prediction layer.
[0071] (1) The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, medium features, and deep features, which correspond to the texture details, geometric structure, and semantic information in the image, respectively, providing a foundation for subsequent feature fusion. Specifically, the feature extraction layer includes a high-resolution grouped Stem module, a feature extraction module (GhostHGB), a depthwise separable convolution module (DWConv), and a spatial pyramid pooling module (SPPF).
[0072] like Figure 2 As shown, the original pine wood image is sequentially processed through a high-resolution grouping Stem module, a feature extraction module, a depthwise separable convolution module, and a feature extraction module to obtain shallow features. The shallow features are sequentially processed through a depthwise separable convolution module and three feature extraction modules to obtain mid-level features. The mid-level features are sequentially processed through a depthwise separable convolution module, a feature extraction module, and a spatial pyramid pooling module to obtain deep features.
[0073] The feature extraction module employs the HGBlock module from the improved HGNetV2 network, replacing the convolutions in HGBlock with phantom convolutions. The module connects multiple cascaded phantom convolutions through a residual structure, utilizing the linear operation characteristics of phantom convolutions to generate redundant feature maps. This significantly reduces the number of parameters and floating-point operations while maintaining multi-scale feature extraction capabilities.
[0074] (2) The feature fusion layer includes a semantic enhancement path and a detail enhancement path. The semantic enhancement path includes an inter-layer feature association module, and the detail enhancement path includes an inter-layer feature association module and a dual-branch downsampling module. The feature fusion layer is reconstructed based on the Path Aggregation Network (PAN) architecture, aiming to solve the semantic gap problem when fusing deep semantics and shallow details.
[0075] (2.1) In the semantic enhancement path, deep features are upsampled and then fused with mid-level features through the inter-layer feature association module to obtain mid-level fused features. The mid-level fused features are then fused with shallow features through the inter-layer feature association module to obtain shallow fused features. Specifically, the semantic enhancement path includes an upsampling module, an inter-layer feature association module, a reparameterized attention module, and a reparameterized attention module connected sequentially. Deep features are upsampled, fused with mid-level features through the inter-layer feature association module, and then processed by the reparameterized attention module to obtain mid-level fused features. Mid-level fused features are upsampled, fused with shallow features through the inter-layer feature association module, and then processed by the reparameterized attention module to obtain shallow fused features. This process injects strong semantic information into the shallow layer, improving the model's ability to identify targets.
[0076] The reparameterized attention module comprises a structure reparameterization (RepBlock) unit and an efficient multi-scale attention mechanism (EMA) unit, arranged sequentially, aiming to address the challenge of fine-grained feature loss during lightweighting. The RepBlock unit employs a "multi-branch training, single-path inference" strategy, mathematically fusing complex parallel convolutional branches into a single-path structure during inference, thereby significantly reducing computational overhead and memory access costs while retaining the advantages of multi-branch feature extraction. To compensate for potential accuracy loss due to structural simplification, the module further introduces an EMA unit, which enhances the model's fine-grained perception of early, minute lesions through grouped cross-space learning and multi-scale feature aggregation without reducing dimensionality. The collaborative design of the reparameterized attention module effectively balances inference efficiency and detection accuracy, significantly improving the model's practicality in resource-constrained environments.
[0077] Furthermore, the fusion of inter-layer feature association module with mid-layer features includes:
[0078] First, convolution and sigmoid activation functions are applied to the deep and mid-level features respectively to generate spatial attention weight maps. Global features are obtained based on the mid-level features and the deep features after upsampling. , is represented as:
[0079] ;
[0080] in, This represents the convolution operation. Indicates deep features, This represents the spatial attention weights corresponding to deep features. Indicates mid-level features, This represents the spatial attention weights corresponding to the mid-level features;
[0081] The global features The features are divided into several groups along the channel dimension; for each group of features, the Softmax function is used to generate normalized attention weights and then weighted to obtain the weighted features of each group.
[0082] The weighted features of all groups are concatenated and standardized to obtain the standardized feature X, represented as:
[0083] ;
[0084] in, This represents the concatenated feature after weighting the features of all groups. and These represent splicing features. The mean and standard deviation, Represents a constant. All represent learnable parameters;
[0085] Channel importance weights are generated from the normalized feature X using global average pooling. , is represented as:
[0086] ;
[0087] in, This represents the activation function. This indicates an average pooling operation;
[0088] The standardized feature X is divided into strong semantic features. and weak semantic features , is represented as:
[0089] ;
[0090] ;
[0091] Use of strong semantic features Convolutional transformations are used to enhance semantic discriminative power; depthwise separable convolution (DWConv) is applied to weak semantic features to supplement details and reduce parameter overhead, ensuring the integrity of the global semantic expression while preserving minute lesion details. Based on these strong semantic features... Weak semantic features Combined with the standardized feature X, we obtain the enhanced feature. , is represented as:
[0092] ;
[0093] in, express convolution, This represents depthwise separable convolution.
[0094] In this embodiment, the data processing procedure for all inter-layer feature association modules is the same; only the deep features need to be processed. and mid-layer features Simply replace it with the corresponding input features; I won't go into details here.
[0095] (2.2) In the detail enhancement path, the shallow fusion features are compressed in size by the dual-branch downsampling module, and then aligned with the mid-layer fusion features by the inter-layer feature association module to obtain mid-layer aligned features; the mid-layer aligned features are compressed in size by the dual-branch downsampling module, and then aligned with the deep features by the inter-layer feature association module to obtain deep aligned features. Specifically, the detail enhancement path includes a dual-branch downsampling module, an inter-layer feature association module, a reparameterized attention module, a dual-branch downsampling module, an inter-layer feature association module, and a reparameterized attention module connected in sequence. The shallow fusion features are compressed in size by the dual-branch downsampling module, aligned with the mid-layer fusion features by the inter-layer feature association module, and then processed by the reparameterized attention module to obtain mid-layer aligned features. The mid-layer aligned features are compressed in size by the dual-branch downsampling module, aligned with the deep features by the inter-layer feature association module, and then processed by the reparameterized attention module to obtain deep aligned features.
[0096] The dual-branch downsampling module includes a first branch and a second branch; the first branch performs downsampling through a kernel convolution with a stride of 2 to extract generalized features; the second branch... After convolutional adjustment of channels, the feature maps are passed in parallel through max pooling and average pooling layers. The generalized features and the outputs of the max pooling and average pooling layers are concatenated along the channel dimension, reducing the feature map size while preserving edge and texture details.
[0097] (3) The prediction layer makes predictions based on shallow fusion features, medium alignment features and deep alignment features respectively, and obtains the nematode disease detection results.
[0098] Shallow fused features (small targets): Preserve extremely high spatial resolution and incorporate deep semantic guidance, specifically designed for detecting early, minute pine wilt disease lesions. Mid-layer aligned features (medium targets): Balance semantic information and spatial resolution, used for detecting mid-stage patchy diseases. Deep aligned features (large targets): Contain the strongest semantic information and a large receptive field, used for identifying large-scale targets in the late stage of whole-tree death.
[0099] The prediction layer includes a parameter-free attention mechanism (SimAM), depthwise separable convolution (DWConv), and sparse convolution (SPConv). The shallow-layer fused features, mid-layer aligned features, or deep-layer aligned features are processed by the parameter-free attention mechanism, which directly calculates the three-dimensional importance weights of each neuron based on an energy function, enhancing feature saliency without increasing parameters. The detection results for the nematode infection stage are obtained through depthwise separable convolution, and the detection results for the nematode infection location are obtained through sparse convolution, significantly improving inference speed while maintaining accuracy.
[0100] In this embodiment, the detection results of the nematode infection stage include early (PWD-E), middle (PWD-M), late (PWD-L), and death (PWD-D).
[0101] Example 2
[0102] This embodiment compares the detection performance of our model with other traditional models, based on Embodiment 1. The traditional models used in this embodiment include SSD, EfficientDet, YOLOv5n, and YOLOv10n. The comparative experimental data results are shown in Table 1.
[0103] Table 1 Comparison of experimental results for different models
[0104]
[0105] The proposed model, compared to SSD, EfficientDet, YOLOv5n, and YOLOv10n, exhibits extremely low levels of both parameter count and GFLOPs, comparable to the lightweight YOLOv5n model. Furthermore, the model demonstrates significant improvements in detection accuracy (mAP) and recall compared to all contrasting models, particularly excelling in early disease development (PWD-E) detection. Inference speed (FPS) also remains high, fully meeting the real-time requirements of edge devices. Experiments demonstrate that the method disclosed in this invention, through its novel architectural combination, achieves an optimal balance between lightweight design, detection accuracy, and inference speed, resulting in superior overall performance compared to existing contrasting models.
[0106] The detection results of each model are visualized and analyzed, and the detection performance of each model is as follows: Figures 3-7 As shown, the different infection stages (top left: early stage, top right: middle stage, bottom left: late stage, bottom right: death stage) are covered to comprehensively evaluate the detection performance of each model. Our method and YOLOv10n performed excellently in the pine wilt disease target detection task, accurately detecting all infected targets and demonstrating a strong ability to distinguish between different infection stages, exhibiting high detection accuracy and stability. In contrast, YOLOv5n showed some false negatives in detecting small targets in the early stages of pine wilt disease, with a total of 4 false negatives in its test samples, indicating relatively low sensitivity to the early infection stages. SSD and EfficientDet performed relatively poorly in the pine wilt disease detection task, exhibiting significant false negatives and false positives. SSD, in particular, showed 13 false negatives and 5 false positives, and was especially susceptible to interference in complex background environments, leading to some broadleaf deadwood being misidentified as infected areas. Although EfficientDet's overall detection accuracy is superior to SSD, it still exhibits 5 false negatives and 3 false positives, and its ability to detect small targets of pine wilt disease remains insufficient. Overall, the proposed model demonstrates high detection reliability and robustness in complex forest environments and at different stages of pine wilt disease infection.
[0107] Example 3
[0108] This embodiment provides a lightweight, cross-regional pine wilt disease detection system, including:
[0109] The data acquisition module is used to acquire raw pine wood images;
[0110] The detection module is used to input the original pine wood image into a pre-trained nematode disease detection model to obtain nematode disease detection results;
[0111] The nematode disease detection model includes a feature extraction layer, a feature fusion layer, and a prediction layer.
[0112] The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, middle features, and deep features respectively;
[0113] The feature fusion layer includes a semantic enhancement path and a detail enhancement path. The semantic enhancement path includes an inter-layer feature association module, and the detail enhancement path includes an inter-layer feature association module and a dual-branch downsampling module. In the semantic enhancement path, deep features are upsampled and then fused with mid-layer features through the inter-layer feature association module to obtain mid-layer fused features. The mid-layer fused features are then fused with shallow features through the inter-layer feature association module to obtain shallow fused features. In the detail enhancement path, the shallow fused features are compressed in size through the dual-branch downsampling module and then aligned with mid-layer fused features through the inter-layer feature association module to obtain mid-layer aligned features. The mid-layer aligned features are compressed in size through the dual-branch downsampling module and then aligned with deep features through the inter-layer feature association module to obtain deep aligned features.
[0114] The prediction layers make predictions based on shallow fusion features, mid-layer alignment features, and deep alignment features, respectively, to obtain nematode disease detection results.
[0115] Example 4
[0116] This embodiment provides a lightweight, cross-regional pine wilt disease detection device, including a processor and a storage medium; the storage medium is used to store instructions;
[0117] The processor is configured to operate according to the instructions to execute the lightweight, cross-regional pine wilt disease detection method described in the first aspect.
[0118] Example 5
[0119] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the lightweight cross-regional pine wilt disease detection method described in Embodiment 1.
[0120] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0121] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0122] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0123] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0124] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A lightweight, cross-regional method for detecting pine wilt disease, characterized in that, include: Obtain raw pine wood images; The original pine wood image is input into a pre-trained nematode disease detection model to obtain nematode disease detection results; The nematode disease detection model includes a feature extraction layer, a feature fusion layer, and a prediction layer. The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, middle features, and deep features respectively; The feature fusion layer includes a semantic enhancement path and a detail enhancement path. The semantic enhancement path includes an inter-layer feature association module, and the detail enhancement path includes an inter-layer feature association module and a dual-branch downsampling module. In the semantic enhancement path, deep features are upsampled and then fused with mid-layer features through the inter-layer feature association module to obtain mid-layer fused features. The mid-layer fused features are then fused with shallow features through the inter-layer feature association module to obtain shallow fused features. In the detail enhancement path, the shallow fused features are compressed in size through the dual-branch downsampling module and then aligned with mid-layer fused features through the inter-layer feature association module to obtain mid-layer aligned features. The mid-layer aligned features are compressed in size through the dual-branch downsampling module and then aligned with deep features through the inter-layer feature association module to obtain deep aligned features. The prediction layers make predictions based on shallow fusion features, mid-layer alignment features, and deep alignment features, respectively, to obtain nematode disease detection results.
2. The lightweight, cross-regional pine wilt disease detection method according to claim 1, characterized in that, After obtaining the original pine wood image, the original pine wood image is cropped to obtain an image block of a preset size.
3. The lightweight, cross-regional pine wilt disease detection method according to claim 1, characterized in that, The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, mid-level features, and deep features, including: The feature extraction layer includes a high-resolution grouped STEM module, a feature extraction module, a depthwise separable convolution module, and a spatial pyramid pooling module; The original pine wood image is sequentially processed through a high-resolution grouped STEM module, a feature extraction module, a depthwise separable convolution module, and a feature extraction module to obtain shallow features. The shallow features are sequentially processed through a depthwise separable convolution module and three feature extraction modules to obtain mid-level features. The mid-level features are sequentially processed through a depthwise separable convolution module, a feature extraction module, and a spatial pyramid pooling module to obtain deep features. The feature extraction module uses the HGBlock module in the improved HGNetV2 network, replacing the convolutions in HGBlock with phantom convolutions.
4. The lightweight, cross-regional pine wilt disease detection method according to claim 1, characterized in that, The semantic enhancement path includes an upsampling module, an inter-layer feature association module, a reparameterized attention module, an upsampling module, an inter-layer feature association module, and a reparameterized attention module connected in sequence. The deep features are upsampled by the module, fused with the mid-layer features by the inter-layer feature association module, and then processed by the reparameterized attention module to obtain the mid-layer fused features. The mid-layer fusion features are upsampled by the module, fused with shallow features by the inter-layer feature association module, and then processed by the reparameterized attention module to obtain shallow fusion features. The reparameterized attention module includes a structure reparameterization unit and an efficient multi-scale attention mechanism unit arranged sequentially.
5. The lightweight, cross-regional pine wilt disease detection method according to claim 4, characterized in that, The process of fusing inter-layer feature association modules with mid-layer features includes: Global features are obtained based on the mid-level features and the deep features after upsampling. , represented as: ; in, This represents the convolution operation. Indicates deep features, This represents the spatial attention weights corresponding to deep features. Indicates mid-level features, This represents the spatial attention weights corresponding to the mid-level features; The global features The features are divided into several groups along the channel dimension; for each group of features, the Softmax function is used to generate normalized attention weights and then weighted to obtain the weighted features of each group. The weighted features of all groups are concatenated and standardized to obtain the standardized feature X, represented as: ; in, This represents the concatenated feature after weighting the features of all groups. and These represent splicing features. The mean and standard deviation, Represents a constant. All represent learnable parameters; Channel importance weights are generated from the normalized feature X using global average pooling. , represented as: ; in, This represents the activation function. This indicates an average pooling operation; The standardized feature X is divided into strong semantic features. and weak semantic features , represented as: ; ; Based on the strong semantic features Weak semantic features Combined with the standardized feature X, we obtain the enhanced feature. , represented as: ; in, express convolution, This represents a depthwise separable convolution.
6. The lightweight, cross-regional pine wilt disease detection method according to claim 1, characterized in that, The detail enhancement path includes a dual-branch downsampling module, an inter-layer feature association module, a reparameterized attention module, a dual-branch downsampling module, an inter-layer feature association module, and a reparameterized attention module connected in sequence. The shallow fusion features are compressed in size by a dual-branch downsampling module, aligned with the mid-layer fusion features by an inter-layer feature association module, and then processed by a reparameterized attention module to obtain the mid-layer aligned features. The mid-layer alignment features are compressed in size by a dual-branch downsampling module, aligned with deep features by an inter-layer feature association module, and then processed by a reparameterized attention module to obtain deep alignment features. The dual-branch downsampling module includes a first branch and a second branch; the first branch performs downsampling through kernel convolution with a stride of 2 to extract generalized features; The second branch passes through After convolutional channel adjustment, the data is passed in parallel through max pooling and average pooling layers; the generalized features and the outputs of the max pooling and average pooling layers are then concatenated along the channel dimension.
7. The lightweight, cross-regional pine wilt disease detection method according to claim 1, characterized in that, The prediction layer includes a parameter-free attention mechanism, depthwise separable convolution, and sparse convolution. The shallow fusion features, mid-level alignment features, or deep alignment features are processed through a parameter-free attention mechanism, and then the nematode infection stage detection results are obtained through depth-separable convolution, while the nematode infection location detection results are obtained through sparse convolution.
8. A lightweight, cross-regional pine wilt disease detection system, characterized in that, include: The data acquisition module is used to acquire raw pine wood images; The detection module is used to input the original pine wood image into a pre-trained nematode disease detection model to obtain nematode disease detection results; The nematode disease detection model includes a feature extraction layer, a feature fusion layer, and a prediction layer. The feature extraction layer extracts features from the original pine wood image, obtaining shallow features, middle features, and deep features respectively; The feature fusion layer includes a semantic enhancement path and a detail enhancement path. The semantic enhancement path includes an inter-layer feature association module, and the detail enhancement path includes an inter-layer feature association module and a dual-branch downsampling module. In the semantic enhancement path, deep features are upsampled and then fused with mid-layer features through the inter-layer feature association module to obtain mid-layer fused features. The mid-layer fused features are then fused with shallow features through the inter-layer feature association module to obtain shallow fused features. In the detail enhancement path, the shallow fused features are compressed in size through the dual-branch downsampling module and then aligned with mid-layer fused features through the inter-layer feature association module to obtain mid-layer aligned features. The mid-layer aligned features are compressed in size through the dual-branch downsampling module and then aligned with deep features through the inter-layer feature association module to obtain deep aligned features. The prediction layers make predictions based on shallow fusion features, mid-layer alignment features, and deep alignment features, respectively, to obtain nematode disease detection results.
9. A lightweight, cross-regional pine wilt disease detection device, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the lightweight cross-regional pine wilt disease detection method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the lightweight, cross-regional pine wilt disease detection method according to any one of claims 1-7.