Unmanned aerial vehicle remote sensing image pine wood nematode disease detection method based on SLMW-Net

By using the self-learning feature extraction module SFEM and the subtle feature attention mechanism module MFAM in the SLMW-Net model, combined with the WLIoU Loss loss function, the problems of background interference and subtle feature extraction in the detection of pine wilt disease in UAV remote sensing images are solved, thereby improving the detection accuracy and model adaptability.

CN121033705APending Publication Date: 2025-11-28CENTRAL SOUTH UNIVERSITY OF FORESTRY AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511114479.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Existing UAV remote sensing image detection technology for pine wilt disease suffers from severe background interference, difficulty in extracting subtle features, and prediction box deviation, resulting in large detection errors and low accuracy.

Method used

The SLMW-Net model is adopted, and the self-learning feature extraction module SFEM and the mild feature attention mechanism module MFAM are introduced. Combined with the WLIoU Loss function, the model training process is optimized to enhance the accuracy of feature extraction and detection.

Benefits of technology

In scenarios with complex terrain and significant vegetation disturbance, it significantly improves the accuracy of pine wilt disease detection and the model's generalization ability, effectively extracts pine wilt disease characteristics, and reduces detection errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033705A_ABST
    Figure CN121033705A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pine wood nematode disease detection, in particular to an unmanned aerial vehicle remote sensing image pine wood nematode disease detection method based on SLMW-Net. According to the method, a pine wood nematode disease ARen data set is used for model training and testing, meanwhile, a self-learning feature extraction block is introduced and can effectively extract pine wood features infected with nematode diseases in a scene with complex surface conditions and remarkable vegetation interference, a slight feature attention mechanism is provided, and the method has the advantages of being high in accuracy and high in accuracy. The mechanism effectively enhances the capability of capturing slight details of pine wood nematode characteristics, keeps the attention on global characteristics, improves the accuracy of characteristic expression, and overcomes the limitation of a traditional attention mechanism in capturing slight disease characteristics, so that the accuracy of pine wood nematode detection is remarkably improved, and in addition, the mechanism can be applied to the field of detection of pine wood nematode. A WLIOU Loss loss function is designed to optimize a training process, and the problems of class imbalance and difficulty in sample detection are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pine wood nematode disease detection, in particular to a method for detecting pine wood nematode disease based on an unmanned aerial vehicle remote sensing image and an SLMW-Net. BACKGROUND

[0002] Pine forest is a vital resource in forest ecosystems, and the wood and resin provided by pine trees also have high economic value and are widely used in construction, papermaking, chemical industry and other industries. However, pine wood nematode disease, often referred to as the "cancer" of pine forests, is caused by pine wood nematodes and can quickly cause tree death and spread through the pine wood nematode transmission medium, i.e. infected sawdust ambrosid beetles (such as the pine brown beetle). Pine wood nematodes can quickly spread to the trunk after entering the pine tree, hindering the transport of water and nutrients in the tree, and thus causing the tree to die.

[0003] Due to the fatalness and extremely high transmission speed of pine wood nematode disease, it is particularly crucial to discover and diagnose diseased trees in a timely manner. Only by using efficient and accurate detection methods can effective prevention and control measures be taken at the early stage of the disease, thereby reducing economic losses and ecological damage caused by disease spread. At present, the detection methods for pine wood nematode disease trees mainly include manual ground investigation, satellite remote sensing and unmanned aerial vehicle remote sensing. Manual ground investigation has certain limitations in complex terrain and is extremely dependent on manual operation, resulting in low work efficiency and poor timeliness. Satellite remote sensing, although it can monitor a large area and has strong timeliness, is difficult to provide sufficiently accurate images of diseased trees due to its limitations in spatial resolution and weather conditions. In addition, satellite remote sensing cannot accurately locate single infected trees, which leads to its insufficient performance in fine management and accurate diagnosis of diseases. In contrast, unmanned aerial vehicle remote sensing has obvious advantages. It can collect high-precision images through directional flight path scanning and accurately locate diseased trees in combination with manual analysis, and has the advantages of low cost, simple operation, high image resolution and flexible data collection.

[0004] However, the existing unmanned aerial vehicle remote sensing image pine wood nematode disease detection technology at least has the following problems:

[0005] 1) Serious background interference: the similarity between the light changes, background noise and other ground objects (such as house colors, ponds, etc.) in the image and the characteristics of the nematode disease increases the difficulty of distinguishing between pine trees and the background, thereby increasing the detection error and further negatively affecting the model performance.

[0006] 2) Difficulty in extracting subtle features: the early symptoms of pine wood nematode disease are usually mild, and the changes in the lesions on the bark and branches are difficult to identify. Due to the lack of effective attention mechanisms, existing models are difficult to accurately capture and identify these subtle disease characteristics.

[0007] 3) Predicted bounding box bias: When infected pine trees are concentrated, traditional detection algorithms often generate too many redundant predicted bounding boxes, and the loss function fails to account for the directional mismatch between the ground truth bounding boxes and the predicted bounding boxes. This situation may make it difficult to accurately calibrate the location of infected pine trees, thereby affecting training efficiency and reducing detection accuracy.

[0008] Based on this, the present invention provides a method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net, in order to solve the above-mentioned technical problems. Summary of the Invention

[0009] To overcome the aforementioned deficiencies of the prior art, this invention provides a method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net.

[0010] To achieve the above objectives, the present invention provides the following technical solution:

[0011] The first aspect of the present invention provides a method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net, comprising the following steps:

[0012] Dataset construction: Obtain the pine wilt disease ARen dataset and preprocess the obtained pine wilt disease ARen dataset;

[0013] SLMW-Net Model Construction: In the Backbone part of the YOLOv11 model, a self-learning feature extraction module SFEM is introduced after the three C3k2 modules to capture feature information in the input image; in the Backbone part of the YOLOv11 model, a mild feature attention mechanism module MFAM is introduced after the SPPF module to enhance the input image features.

[0014] Loss function construction: WLIoU Loss is used as the loss function, and the parameters are updated by calculating the loss of the SLMW-Net model;

[0015] SLMW-Net model training: The SLMW-Net model is trained using the preprocessed ARaen dataset;

[0016] Pine wilt disease detection: The SLMW-Net model is used to detect pine wilt disease in UAV remote sensing images, and the inspection results are output.

[0017] The present invention is further configured such that the preprocessing procedure for the acquired pine wilt disease ARN dataset is as follows:

[0018] Images from the pine wilt disease ARN dataset were cut into 800×800 pixel blocks, and images containing multiple diseased pine trees were selected.

[0019] The images were randomly divided into a training set and a validation set in an 8:2 ratio.

[0020] The JPG image is loaded into the labelmg platform, and labels for the diseased areas are created by professional forestry workers. Finally, the labeling results are saved in TXT format.

[0021] The present invention is further configured such that the process of capturing feature information in the input image using the self-learning feature extraction module SFEM is as follows:

[0022] Feature extraction for basic convolution: Y = Conv(X) = W * X, where X represents the input feature map, W is the convolution kernel parameter, * represents two-dimensional convolution, and Y represents the convolution output;

[0023] Then perform batch normalization:

[0024]

[0025] Z = LeaBN(Y) C,H,W ),

[0026] In the formula, Y C,H,W This represents the convolutional output pixel value of a single sample at channel c and position (h, w), where C, H, and W represent the number of channels, height, and width, respectively, and μ. c , γ represents the mean and variance of each channel, respectively; c β c These represent the scaling and translation parameters for each channel, respectively, with α being the self-learning parameter, and the initial value of α being 1;

[0027] The SiLU function is used for activation to obtain the complex nonlinear relationship of the input features: Output = SiLU(Z) = Z × σ(Z), where σ(Z) represents the Sigmoid function, which is defined as... It maps any real number to the (0,1) interval and is often used to introduce nonlinearity and control the numerical range.

[0028] The present invention is further configured such that the process of enhancing the image input features using the Minor Feature Attention (MFAM) module is as follows:

[0029] Assume the input feature size is

[0030] The input features are subjected to dimensionality-increasing convolution processing, and then dimensionality splitting is performed to obtain split part one and split part two. Split part one is not processed, and split part two is input into the gated transformer module GTM in the slight feature attention mechanism module MFAM for processing.

[0031] The first split part and the processed second split part are spliced ​​together and then dimensionality reduction is performed to return to the original feature map size.

[0032] A further configuration of the present invention is that the gated transformer module GTM is composed of a grouped attention module GA and a gated feedforward module GFF.

[0033] The present invention is further configured such that the processing procedure in the group attention module (GA) is as follows:

[0034] For the input feature B, generate Q, K, and V, where Q, K, and V represent the query matrix, key matrix, and value matrix generated from the input feature B through linear mapping (convolution operation), respectively, used for subsequent attention weight calculation and feature weighting; in the self-attention mechanism, they respectively represent the feature matching requirement, matching reference, and feature content itself:

[0035]

[0036] (Q1,K1,Q2,K2,V)=chunk(QKV raw ,5;along channel),

[0037] In the formula, B represents the batch size, Conv1×1 C→5C This indicates that the input feature B will be used.

[0038] Expand to 5C dimensions in the channel dimension using 1×1 convolution. Representing depthwise separable convolution, chunk divides the channel into 5 parts, each with C channels. Q1 and Q2 represent the two query matrices obtained through the chunking operation, and K1 and K2 represent the two key matrices obtained through the chunking operation.

[0039] Then sort the data and flatten V into... Sort the data in ascending order, then rearrange Q1, K1, Q2, and K2 using index operations to ensure consistency with V:

[0040] (V sorted ,idx)=sort(V,dim=2),

[0041] In the formula, V sortedThis represents the V feature map sorted in ascending order by channel dimension (dim=2), idx represents the sort index tensor, and sort(V,dim=2) means sorting V in ascending order along the specified dimension and returning the sort result and the corresponding index.

[0042] Attention calculation is adjusted by modifying temperature parameters to control the sensitivity of similarity between features, enabling dynamic range adjustment, and is then compared with V. sorted Multiply to get the result O:

[0043]

[0044] O = Attention × V sorted ,

[0045] In the formula, O is the output feature map after attention weighting, Attention represents the attention weight matrix, used to represent the correlation between different feature locations, and V sorted It is the sorted value matrix, which is multiplied by Attention to obtain the weighted result;

[0046] Then a scatter operation is performed to restore O to its original pixel position, and finally the reshape is performed.

[0047] Output = Conv1 × 1 C→C (Reshape(O)).

[0048] The present invention is further configured such that the processing procedure in the gated feedforward module (GFF) is as follows:

[0049] For input features Perform up-dimensional convolution:

[0050]

[0051] In the formula, C h =r×C is the number of hidden channels, and r is the channel dimension expansion factor;

[0052] Then, PixelShuffle upsampling is performed to move the spatial information in the channel dimension to H and W, where the spatial resolution is magnified by 2 times and the number of channels is reduced by 4 times. The channels are then split into two branches U1' and U'2. Large kernel convolution is performed on branch U1', and dilated convolution is performed on branch U'2.

[0053]

[0054] U' = [U'1; U'2]

[0055]

[0056] In the formula, U′1 and U′2 represent the two branch feature maps that are split in the channel dimension after PixelShuffle upsampling, and DWConv 5×5 (U′1) indicates that a 5×5 depthwise separable convolution is used to extract features with a large receptive field. DWConv 3×3,d=2 (U'2) indicates that a depthwise separable convolution with a dilation rate of d = 23 × 3 is used to expand the receptive field to obtain more contextual information; V1 and V2 are the output feature maps after performing corresponding convolution operations on U′1 and U'2, respectively.

[0057] Then, nonlinear activation is applied to branch U'2, and then multiplied element-wise with branch U′1 to complete the dual-scale gated fusion:

[0058]

[0059] In the formula, mish is a smooth non-monotonic activation function, tanh(.) is a hyperbolic tangent function, and G represents the fused gated feature map;

[0060] Then, PixelUnshuffle downsampling is used to move the spatial information back to the channel dimension, and finally, a 1×1 convolution is used to reduce the number of channels from C. h Projecting back to input C:

[0061]

[0062] In the formula, This represents a 1×1 convolution, where C represents the number of channels. h From compression back to C, channel fusion is performed simultaneously.

[0063] The present invention is further configured such that the WLIoU Loss is used as a loss function, and its processing procedure is as follows:

[0064] IoU is the intersection-union ratio.

[0065]

[0066] In the formula, inter is the intersection area of ​​the predicted box and the ground truth box, and union is the union area of ​​the predicted box and the ground truth box.

[0067] Calculate the minimum bounding box diagonal length:

[0068]

[0069] In the formula, (x 1,1 ,y 1,1 ), (x 1,2 ,y 1,2 ) are the top-left and bottom-right coordinates of the prediction box, respectively. 2,1 ,y2,1 ), (x 2,2 ,y 2,2 ) are the top-left and bottom-right coordinates of the true bounding box, respectively, C w C h Let represent the width and height of the minimum bounding rectangle of the predicted bounding box and the ground truth bounding box, respectively;

[0070] Calculate the squared Euclidean distance between the center of the predicted bounding box and the center of the true bounding box:

[0071]

[0072] In the formula, Vx and Vy represent the differences between the center coordinates of the predicted bounding box and the ground truth bounding box;

[0073] Calculate the aspect ratio penalty term and coefficient:

[0074]

[0075] In the formula, (w1, h1) represents the width and height of the predicted bounding box, and (w2, h2) represents the width and height of the ground truth bounding box. α1 is the normalization factor, and α1 is the coefficient, which dynamically measures the weight of the aspect ratio difference on the overall loss.

[0076] Calculate IoU' and IoU":

[0077]

[0078] w f =(IoU) κ

[0079] IoU”=(1-IoU')×w f ,

[0080] In the formula, κ is the adjustment factor, ρ is the Euclidean distance between the center points of the predicted box and the ground truth box, c represents the length of the diagonal of the minimum bounding rectangle that encloses the predicted box and the ground truth box, v is the aspect ratio consistency penalty term, which is used to measure the difference in aspect ratio between the predicted box and the ground truth box, and α is the aspect ratio penalty coefficient, which adjusts the weight of the v term in the total penalty.

[0081] Linear stretching and truncation of the IoU value amplifies the gradient signal in the high IoU region and compresses the minimum region:

[0082]

[0083]

[0084] In the formula, ∑ i w iThis represents the normalization of the sum of weights of all positive samples. `clamp` is the cutoff function, which restricts the values ​​to a preset range. `d` and `u` are the lower and upper bounds of the linear stretching, respectively, used to adjust its distribution. `w`... i The weight of the i-th positive sample is used to balance the contributions of different samples in the loss calculation.

[0085] A second aspect of the present invention provides an electronic device comprising: a memory and a processor; the memory storing a computer program, wherein the processor executes the computer program to implement the steps of the above-described method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net.

[0086] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net.

[0087] Compared with the prior art, the beneficial effects of the present invention are:

[0088] This invention uses the ARN dataset for pine wilt disease for model training and testing. It introduces a self-learning feature extraction block, which preserves the original local details of the input and forms a more discriminative pine wilt disease feature representation based on standardization. This block can effectively extract pine wood features infected with nematodes in scenarios with complex surface conditions and significant vegetation disturbance. Furthermore, a subtle feature attention mechanism is proposed, which effectively enhances the ability to capture subtle details of pine wilt disease features while maintaining attention to global features, improving the accuracy of feature representation and overcoming the limitations of traditional attention mechanisms in capturing subtle disease features. This significantly improves the accuracy of pine wilt disease detection. In addition, a WLIoU Loss function is designed to optimize the training process. This loss function is specifically optimized for pine trees infected with pine wilt disease. By adjusting the factor, the WLIoU Loss function effectively solves the problems of class imbalance and difficult-to-detect samples. By introducing stretching and truncation strategies, it enhances the attention to positive samples, thereby adjusting the model's training strategy and enhancing its generalization ability. Attached Figure Description

[0089] Figure 1 This is a schematic diagram of the structure of the SLMW-Net model in this invention;

[0090] in, Figure 1 (a) is a schematic diagram of the SLMW-Net model. The Backbone is the backbone network, the Neck is the neck network, and the Head is the detection head network. Figure 1(b) is a schematic diagram of the self-learning feature extraction module SFEM; Figure 1 (c) is a schematic diagram of the Minor Feature Attention (MFAM) module.

[0091] Figure 2 This is a visualization of the target detection method of the present invention;

[0092] In the figure, (a) represents the original input image, and (b)-(f) represent the detection results of different methods in five local regions.

[0093] Figure 3 This is a schematic diagram of the structure of an electronic device provided by the present invention.

[0094] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation

[0095] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0096] Example 1:

[0097] like Figure 1 As shown, this embodiment provides a method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net, including the following steps:

[0098] S1. Dataset Construction: Obtain the pine wilt disease ARen dataset and preprocess the obtained pine wilt disease ARen dataset.

[0099] The preprocessing process for the acquired ARN dataset on pine wilt disease is as follows:

[0100] Images from the pine wilt disease ARN dataset were cut into 800×800 pixel blocks, and images containing multiple diseased pine trees were selected.

[0101] The images were randomly divided into a training set and a validation set in an 8:2 ratio.

[0102] The JPG image is loaded into the labelmg platform, and labels for the diseased areas are created by professional forestry workers. Finally, the labeling results are saved in TXT format.

[0103] In this embodiment, it should be noted that the ARN dataset for pine wilt disease used in this embodiment comes from the Hunan Academy of Forestry Sciences, China. The dataset was collected in Anren County, Chenzhou City, Hunan Province, with geographical coordinates of 113°05' to 113°36' E and 26°17' to 26°51' N. This area is located in southeastern Hunan Province and has a typical subtropical monsoon climate. The main forest types include slow-growing broad-leaved forests, Masson pine, and slash pine, among which pine forests account for a high proportion, and the infection level of pine trees is relatively high, making this area a typical representative area for pine wilt disease infection. The pine trees in this embodiment area vary in age and have different distributions in both vertical and horizontal directions. Vertically, the forest is divided into three main layers: the uppermost layer consists of mature and tall pine trees, forming the canopy layer; the middle layer mainly consists of medium-height pine trees and other tree species; and the ground layer is mainly composed of shrubs and herbaceous plants. Horizontally, the distribution of trees in the forest is uneven, exhibiting an alternating pattern of dense areas and open spaces, demonstrating the high complexity and diversity of the forest structure. Data collection was conducted from September to October 2024 using the Zongheng CW-15 UAV as the flight platform. During this period, most pine trees infected with pine wilt disease showed typical reddish-brown symptoms, while other broad-leaved trees did not show significant changes. Therefore, this period represents the optimal time when the symptoms of pine wilt disease are most pronounced.

[0104] In addition, it should be noted that in this embodiment, a total of 750 images containing multiple diseased pine trees were selected, of which 600 were used for training and 150 for validation.

[0105] To quickly and accurately detect pine wilt disease in the natural environment, this embodiment provides an SLMW-Net model, such as... Figure 1 As shown.

[0106] S2 and SLMW-Net model construction: In the backbone of the YOLOv11 model, a self-learning feature extraction module SFEM is introduced after the three C3k2 modules to capture feature information in the input image; in the backbone of the YOLOv11 model, a slight feature attention mechanism module MFAM is introduced after the SPPF module to enhance the input image features.

[0107] Specifically, an SFEM operation is performed before the feature output at each scale in the YOLOv11 Backbone to capture feature information from the input image.

[0108] The process of capturing feature information from the input image using the self-learning feature extraction module SFEM is as follows:

[0109] SFEM is performed before the feature output at each scale in the YOLOv11 Backbone to capture feature information in the input image and perform feature extraction of the basic convolution: Y = Conv(X) = W*X, where X represents the input feature map, W is the convolution kernel parameter, * represents two-dimensional convolution, and Y represents the convolution output.

[0110] Then perform batch normalization:

[0111]

[0112] Z = LeaBN(Y) C,H,W ),

[0113] In the formula, Y C,H,W This represents the convolutional output pixel value of a single sample at channel c and position (h, w), where C, H, and W represent the number of channels, height, and width, respectively, and μ. c , γ represents the mean and variance of each channel, respectively; c β c These represent the scaling and translation parameters for each channel, respectively. α is the self-learning parameter, initially set to 1. The self-learning parameter is optimized during training, controlling the direct input Y. C,H,W The proportion of the feature information is preserved;

[0114] The SiLU function is used for activation to obtain the complex nonlinear relationship of the input features: Output = SiLU(Z) = Z × σ(Z), where σ(Z) represents the Sigmoid function, which is defined as... It maps any real number to the (0,1) interval and is often used to introduce nonlinearity and control the numerical range.

[0115] In this embodiment, it should be noted that convolution is the core computational module of the neural network in pine wilt disease detection. It can filter features in the receptive field and extract the most significant local features, which is crucial for disease identification. However, in UAV remote sensing images, the complex and varied background makes it difficult for traditional single-scale convolution to take into account features at different spatial scales, resulting in incomplete information extraction. At the same time, commonly used normalization methods are not adaptable enough to image noise and illumination changes, thus limiting model performance. To address these issues, this paper proposes a self-learning feature extraction module (SFEM) to improve feature representation capabilities while ensuring the efficiency of subsequent deployment. The SFEM module can progressively enhance the feature extraction capability related to pine wilt disease on multi-level feature maps. Simultaneously, it preserves the original local details of the input and reconstructs a more discriminative feature representation based on standardization. This design performs particularly well in scenarios with complex surface conditions and significant vegetation disturbance.

[0116] The self-learning feature extraction module SFEM enhances local features of lesions and effectively suppresses random noise in the background during feature extraction, thereby improving the model's ability to focus on pine wilt disease areas and improving model performance.

[0117] Furthermore, it should be noted that some infected pine trees initially exhibit mild nematode disease characteristics. Traditional models are inefficient in identifying these characteristics because these subtle features are more difficult to extract. Therefore, the ability to accurately identify and extract these subtle features is crucial for the detection of pine wilt disease. Inspired by human visual processing mechanisms, attention mechanisms, by assigning a series of weight coefficients, can more accurately extract key features from neural networks. Currently, attention mechanisms have been widely integrated into various neural network architectures, including convolutional neural networks (CNNs) and graph convolutional networks (GCNs). However, with the continuous development of attention mechanisms, traditional mechanisms have also revealed some limitations. Traditional mechanisms typically focus on the entire feature map or a large region, leading to the neglect of many important details, especially when dealing with the subtle features of pine wilt disease. To overcome these problems, this application proposes a novel attention module—the Subtle Feature Attention Mechanism Module (MFAM). This module demonstrates significant advantages in handling subtle and diverse features. It not only efficiently extracts the subtle features of pine wilt disease but also exhibits excellent adaptability and robustness.

[0118] As an example, the process of enhancing image input features using the Minor Feature Attention (MFAM) module is as follows:

[0119] Assume the input feature size is

[0120] The input features are subjected to dimensionality-increasing convolution processing, and then dimensionality splitting is performed to obtain split part one and split part two. Split part one is not processed, and split part two is input into the gated transformer module GTM in the slight feature attention mechanism module MFAM for processing.

[0121] The first split part and the processed second split part are spliced ​​together and then dimensionality reduction is performed to return to the original feature map size.

[0122] The gated transformer module (GTM) consists of a grouped attention module (GA) and a gated feedforward module (GFF).

[0123] Specifically, the processing procedure in the Group Attention (GA) module is as follows:

[0124] For the input feature B, generate Q, K, and V, where Q, K, and V represent the query matrix, key matrix, and value matrix generated from the input feature B through linear mapping (convolution operation), respectively, used for subsequent attention weight calculation and feature weighting; in the self-attention mechanism, they respectively represent the feature matching requirement, matching reference, and feature content itself:

[0125]

[0126] (Q1,K1,Q2,K2,V)=chunk(QKV raw ,5;along channel),

[0127] In the formula, B is the batch size, Conv1×1 C→5C This means that the input feature B is expanded to 5C dimensions in the channel dimension through a 1×1 convolution. Representing depthwise separable convolution, chunk divides the channel into 5 parts, each with C channels. Q1 and Q2 represent the two query matrices obtained through the chunking operation, and K1 and K2 represent the two key matrices obtained through the chunking operation.

[0128] Then sort the data and flatten V into... Sort the data in ascending order, then rearrange Q1, K1, Q2, and K2 using index operations to ensure consistency with V:

[0129] (V sorted ,idx)=sort(V,dim=2),

[0130] In the formula, V sorted This represents the V feature map sorted in ascending order by channel dimension (dim=2), idx represents the sort index tensor, and sort(V,dim=2) means sorting V in ascending order along the specified dimension and returning the sort result and the corresponding index.

[0131] Attention calculation is adjusted by modifying temperature parameters to control the sensitivity of similarity between features, enabling dynamic range adjustment, and is then compared with V. sorted Multiply to get the result O:

[0132]

[0133] O = Attention × V sorted ,

[0134] In the formula, Q represents the query matrix, which is obtained by mapping the input features, and K... T , denotes the transpose of the bond matrix K, d k V represents the dimension of the key vector.sorted It is the sorted value matrix (Value), which is weighted according to the attention weights and output; temperature represents the temperature parameter; it should be noted that the role of the temperature parameter is to control the smoothness of the score; the higher the temperature, the smoother the attention distribution; the lower the temperature, the sharper the attention distribution.

[0135] Then, a scatter operation (using the inverse mapping of the sorted index to restore the weighted result sorted by channel to its original channel / pixel position) is performed to restore O to its original pixel position. Finally, a reshape operation (changing only the tensor shape without altering the data order) is performed to return it to its original position.

[0136] Output = Conv1 × 1 C→C (Reshape(O)).

[0137] Furthermore, the processing procedure in the gated feedforward module (GFF) is as follows:

[0138] For input features Perform up-dimensional convolution:

[0139]

[0140] In the formula, C h =r×C is the number of hidden channels, and r is the channel dimension expansion factor;

[0141] Then, PixelShuffle upsampling is performed to move the spatial information in the channel dimension to H and W, where the spatial resolution is magnified by 2 times and the number of channels is reduced by 4 times. The channels are then split into two branches U1' and U'2. For branch U1', a large kernel convolution (kernel = 5) is performed, and for branch U'2, a dilated convolution (3×3 depthwise convolution with dilation = 2) is performed.

[0142]

[0143] U' = [U1'; U'2]

[0144]

[0145] In the formula, U1' and U'2 represent the two branch feature maps that are split in the channel dimension after PixelShuffle upsampling, and DWConv 5×5 (U′1) indicates that a 5×5 depthwise convolution is used to extract features with a large receptive field. 3×3,d=2(U'2) represents the use of a 3×3 depthwise separable convolution with a dilation rate of d=2 to expand the receptive field and obtain more contextual information; V1 and V2 are the output feature maps after performing the corresponding convolution operations on U′1 and U'2, respectively.

[0146] Then, nonlinear activation is applied to branch U'2, and then multiplied element-wise with branch U1' to complete the dual-scale gated fusion:

[0147]

[0148] In the formula, mish is a smooth non-monotonic activation function, tanh(.) is a hyperbolic tangent function, and G represents the fused gated feature map;

[0149] Then, PixelUnshuffle downsampling is used to move the spatial information back to the channel dimension, restoring the spatial resolution and increasing the number of channels by 4 times. Finally, a 1×1 convolution is used to increase the number of channels from C... h Projecting back to input C:

[0150]

[0151] In the formula, This represents a 1×1 convolution, where C represents the number of channels. h From compression back to C, channel fusion is performed simultaneously.

[0152] In this embodiment, it should be noted that the Minor Feature Attention (MFAM) module helps the model accurately identify lesion areas of pine wilt disease by modeling multi-level features of the image. Even if the differences between these areas are small, the model can capture this information through group attention and feature fusion mechanisms. This module effectively solves the challenge of extracting subtle features in the early stages of pine wilt disease, providing powerful representation and learning capabilities for minor disease features in remote sensing images, thereby significantly improving the effectiveness of disease detection.

[0153] In deep learning, the loss function is crucial for measuring the difference between the model's predictions and the actual labels, directly affecting the updating and optimization of network parameters. In image detection tasks, choosing a suitable loss function is particularly critical, as it determines the fit between the model and the training data and is key to the optimization objective. Therefore, the loss function plays a central role in neural network model training. For the pine wilt disease target detection task, we chose the Intersection over Union (IoU) loss function because it can effectively handle difficult-to-detect samples. Based on this, we propose a hybrid loss function combining IoU sample weight adjustment and linear stretching truncation, named the WLIoU Loss function. Compared with traditional loss functions, WLIoU significantly improves the model's learning efficiency on the dataset by adjusting the weights of positive and negative samples. By optimizing the weight parameters, this method effectively balances the model's fitting ability and generalization ability, and effectively avoids overfitting. The specific construction of the loss function is described below:

[0154] S3. Loss Function Construction: WLIoU Loss is used as the loss function, and the parameters are updated by calculating the loss of the SLMW-Net model.

[0155] The WLIoU Loss, used as the loss function, is processed as follows:

[0156] IoU is the intersection-union ratio.

[0157]

[0158] In the formula, inter is the intersection area of ​​the predicted box and the ground truth box, and union is the union area of ​​the predicted box and the ground truth box.

[0159] Calculate the minimum bounding box diagonal length:

[0160]

[0161] In the formula, (x 1,1 ,y 1,1 ), (x 1,2 ,y 1,2 ) are the top-left and bottom-right coordinates of the prediction box, respectively. 2,1 ,y 2,1 ), (x 2,2 ,y 2,2 ) are the top-left and bottom-right coordinates of the true bounding box, respectively, C w C h Let represent the width and height of the minimum bounding rectangle of the predicted bounding box and the ground truth bounding box, respectively;

[0162] Calculate the squared Euclidean distance between the center of the predicted bounding box and the center of the true bounding box:

[0163]

[0164] In the formula, Vx and Vy represent the differences between the center coordinates of the predicted bounding box and the ground truth bounding box;

[0165] Calculate the aspect ratio penalty term and coefficient:

[0166]

[0167] In the formula, (w1, h1) represents the width and height of the predicted bounding box, and (w2, h2) represents the width and height of the ground truth bounding box. α1 is the normalization factor, and α1 is the coefficient, which dynamically measures the weight of the aspect ratio difference on the overall loss.

[0168] Calculate IoU' and IoU":

[0169]

[0170] w f =(IoU) κ

[0171] IoU”=(1-IoU')×w f ,

[0172] In the formula, κ is the adjustment factor, ρ is the Euclidean distance between the center points of the predicted box and the ground truth box, c represents the length of the diagonal of the minimum bounding rectangle that encloses the predicted box and the ground truth box, v is the aspect ratio consistency penalty term, which is used to measure the difference in aspect ratio between the predicted box and the ground truth box, and α is the aspect ratio penalty coefficient, which adjusts the weight of the v term in the total penalty.

[0173] Linear stretching and truncation of the IoU value amplifies the gradient signal in the high IoU region and compresses the minimum region:

[0174]

[0175] In the formula, ∑ i w i This represents the normalization of the sum of weights of all positive samples. `clamp` is the cutoff function, which restricts the values ​​to a preset range. `d` and `u` are the lower and upper bounds of the linear stretching, respectively, used to adjust its distribution. `w`... i The weight of the i-th positive sample is used to balance the contributions of different samples in the loss calculation; in this embodiment, d = 0.00, u = 0.95.

[0176] In this embodiment, it should be noted that the provided WLIoU Loss takes into account overlap, position, and shape, and performs multi-level focusing and weighting on easy and difficult samples. It is more advantageous for handling class imbalance and difficult-to-detect samples, and can optimize multiple objectives at the same time.

[0177] S4, SLMW-Net Model Training: The SLMW-Net model is trained using the preprocessed ARaen dataset.

[0178] In this embodiment, it should be noted that training the SLMW-Net model using the preprocessed ARN dataset can complete the training of the SLMW-Net model on the dataset, which can then be used for the detection of pine wilt disease in UAV remote sensing images.

[0179] S5. Pine wilt disease detection: The SLMW-Net model is used to detect pine wilt disease in UAV remote sensing images, and the inspection results are output.

[0180] In this embodiment, it should be noted that the SLMW-Net model can effectively extract the characteristics of pine wood infected with nematode disease in scenarios with complex surface conditions and significant vegetation disturbance, and significantly improve the accuracy of pine wood nematode disease detection. At the same time, the training strategy of the model was adjusted to enhance its generalization ability.

[0181] Performance Test 1:

[0182] Experimental Environment: All experiments in this study were conducted in the same hardware and software environment to avoid the influence of different experimental conditions on the results of SLMW-Net. The experimental environment parameters are shown in Table 1.

[0183] Table 1: Hardware and Software Environment Setup

[0184]

[0185] Training: During the training phase, WLIoU Loss was used as the loss function. The parameters were updated by calculating the model loss, thereby accelerating the model's convergence and improving its stability. The experiment consisted of 300 training epochs. The optimizer used was SGD with an initial learning rate of 0.01 and a learning rate decay factor of 0.01. Other hyperparameters were set to a batch size of 4, momentum of 0.937, and weight decay factor of 0.0005.

[0186] Evaluation metrics: The model's performance was evaluated using mAP@0.5, precision (P), recall (R), and mAP@0.5:0.95. The relevant formulas are as follows:

[0187] mAP is a comprehensive metric derived from the average AP (mean precision), where AP is calculated using the area under the curve (AUC) to strike a balance between precision and recall across various thresholds. This makes mAP a more comprehensive measure of overall model performance in detection tasks. mAP@0.5 represents the average precision at an IoU threshold of 0.5. mAP@0.5:0.95 refers to the average mAP value with a step size of 0.05 within the range of IoU from 0.5 to 0.95.

[0188]

[0189] Precision indicates the probability of correctly predicting the target. TP means that a diseased tree was correctly detected. FP means that a healthy pine tree was detected as diseased.

[0190]

[0191] A recall indicates the probability that a diseased pine tree was correctly predicted. FN means that a diseased tree was incorrectly predicted as healthy.

[0192]

[0193] Module Validity Analysis: This paper proposes three modules: SFEM, MEAM, and WLIoU Loss. To verify the effectiveness of these three modules, the SFEM module is compared with other feature extraction modules, then MEAM is compared with different attention mechanisms, and WLIoU Loss is compared with different loss functions. Under the same parameters, the feasibility of our proposed modules is verified by adding different modules to the YOLOv11 model. Specifically:

[0194] Effectiveness of the SFEM module: It was compared with Fourier convolution (FFC), pyramid convolution (PyConv) and multi-scale convolution (MSCA), and the experimental results are shown in Table 2.

[0195] Table 2: Experimental Data Recording Table

[0196]

[0197]

[0198] As shown in Table 2, adding the SFEM module and the Fourier convolution module to the network respectively significantly improved the detection of pine wilt disease. Fourier convolution is highly praised for its directness, adaptability, and efficient computation; however, it often struggles to effectively distinguish between background and target, especially in complex background scenarios of UAV remote sensing images, potentially leading to decreased target detection accuracy and limiting its effectiveness in handling complex background problems. This invention adds the SFEM module to the Backbone to improve the model's performance and efficiency in pine wilt disease detection.

[0199] Effectiveness of the Minor Feature Attention Module (MFAM): It was compared with three existing attention mechanisms: CBAM, Star Blocks, and SimAM. The experimental results are shown in Table 3.

[0200] Table 3: Experimental Data Recording Table

[0201]

[0202] As shown in Table 3, CBAM weights features by applying channel and spatial attention mechanisms separately. However, this method may not fully consider the interrelationship between channel and spatial information, and the separate use of spatial and channel attention may lead to a loss of feature representation. While SimAM does not increase the number of network parameters, it has limitations in capturing details and subtle features, especially in handling the subtle features of pine wilt disease. Star Blocks, without expanding the network, maps the input to a high-dimensional nonlinear feature space through star operations, significantly improving the model's efficiency in feature processing; however, this method is less effective than MEAM in extracting subtle features of pine wilt disease. The MEAM proposed in this invention can effectively extract subtle pine wilt disease features, improving the model's performance to some extent.

[0203] The effectiveness of the WLIoU Loss function: It is compared with the first CIoU (from [Rezatofighi, Hamid, et al. "Generalized Intersection of Unions: A Metric and Loss for Bounding Box Regression." IEEE / CVF Conference Proceedings on Computer Vision and Pattern Recognition. 2019.], which introduces center point distance and aspect ratio penalty terms on the basis of IoU to more comprehensively measure the matching degree between the predicted box and the ground truth box.) and the second GIoU (from [Zheng, Zhaohui, et al. "Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression." AAAI Conference Proceedings on Artificial Intelligence. Vol. 34. No. 07. 2020.], which introduces the area difference of the minimum bounding rectangle on the basis of IoU, and can provide effective gradient information even when the predicted box and the ground truth box do not overlap, thus accelerating convergence.) The experimental results are shown in Table 4.

[0204] Table 4: Experimental Data Recording Table

[0205]

[0206] As shown in Table 4, the model's various indicators were improved after adopting WLIoU Loss, indicating that this method can more effectively locate nematode lesions.

[0207] Performance Test 2:

[0208] Comparative experiments were conducted on seven state-of-the-art object detection methods under the same testing environment, including Faster R-CNN [Ren Shaoqing et al. "Faster R-CNN: Real-time Object Detection Using Region Proposal Networks." Advances in Neural Information Processing Systems 28 (2015).], YOLOv3 [Redmond, Joseph, and Ali Farhadi. "Yolov3: Progressive Improvements." ARXIV Preprint ARXIV: 1804.02767 (2018).], YOLOv5s [Wang, Dandan, and He Dongjian. "A Deep Learning Method Based on YOLO V5s for Channel Pruning: Fast and Accurate Detection of Apple Fruits Before Fruit Thinning." Biological Systems Engineering 210 (2021): 271-281.], and YOLOv7 [Wang D, Qian Y, Lu J, et al.]. Fs-yolo: Fire-Smoke Detection Based on Improved YOLOv7 [J]. Multimedia Systems, 2024, 30(4): 215., YOLOv8n [Zhang Z, Qu Y, Wang T et al. An Improved YOLOv8n for Fish Detection in Natural Aquatic Environments [J]. Animals, 2024, 14(14): 2022.], YOLOv9m [Ya Xin. What is YOLOv9: In-depth Exploration of the Internal Characteristics of Next-Generation Target Detectors [J]. ARXIV Preprint ARXIV: 2409.07813, 2024.] and YOLOv10n [Gong Y, Ding W, Huang N et al. Improved YOLOv10n Model to Enhance Cotton Recognition Ability in Complex Environments [J]. Smart Agriculture Technology, 2025: 101209.], to deeply analyze the performance of SLMW-Net. The test results are shown in Table 5, and the visualization of the experimental results is as follows. Figure 2 As shown.

[0209] Table 5: Experimental Data Recording Table

[0210]

[0211]

[0212] As shown in Table 5, the SLMW-Net model provided by this invention outperforms other models.

[0213] Depend on Figure 2 It can be seen that, Figure 2 (a) and (b) in the figure show pine trees initially infected with pine wilt disease. It can be seen that the SLMW-Net proposed in this invention has achieved optimal performance, successfully achieved the highest detection accuracy, and no false negatives occurred. Figure 2 (c), (d), and (e) in the figure demonstrate the detection of pine wilt disease in a complex background. Figure 2In (c), the other seven models all exhibited false detections, misidentifying houses as pine trees infected with pine wilt disease, while SLMW-Net did not produce any false detections and had the highest accuracy among correctly detected targets. Figure 2 In (d), all models except YOLOv9m exhibited false detections. Although YOLOv9m had no false detections, its detection accuracy was lower than our proposed SLMW-Net. While YOLOv3 achieved the same accuracy as SLMW-Net in correctly detected targets, it still had four false detections. Figure 2 In (e), YOLOv3, YOLOv7, and YOLOv8n all incorrectly detected some ground features similar to pine wilt disease as infected pine trees. Although Faster R-CNN, YOLOv5s, YOLOv9m, and YOLOv10 did not show any false detections, their detection accuracy was lower than that of SLMW-Net. Figure 2 (f) shows a more obvious pine wilt disease. It can be seen that the detection accuracy of other models is not as high as that of the SLMW-Net proposed in this invention. In summary, SLMW-Net can more effectively extract the complex features of pine wilt disease, achieving higher detection accuracy and meeting the precision requirements in pine wilt disease detection.

[0214] Performance of SLMW-Net on the Roboflow dataset: A public dataset for pine wilt disease detection was obtained from the Roboflow platform (https: / / universe.roboflow.com / project-dkq3q / -9pmdt / dataset / 8). This dataset contains 4301 training images, 412 validation images, and 202 test images, each image being 640×640 pixels. The training images were brightness-adjusted from -15% to +15%. We selected images from this dataset and performed performance validation on seven other models under the same software and hardware conditions. The experimental results are shown in Table 6.

[0215] Table 6: Experimental Data Recording Table

[0216]

[0217] As shown in Table 6, SLMW-Net performs best in detecting pine wilt disease compared to the other models in the table.

[0218] Ablation Experiment: This experiment aimed to verify the contribution of each module in the SLMW-Net network to the detection performance of pine wilt disease. Specific modules in the network were sequentially removed or replaced, and comparative tests were conducted under the same dataset and training settings, recording the changes in various evaluation metrics. The experimental results quantify the impact of each module on the overall performance, thus demonstrating the effectiveness and necessity of the proposed modules. The quantitative results are shown in Table 7.

[0219] Table 7: Experimental Data Recording Table

[0220]

[0221]

[0222] Note: In Table 7, “A” represents the SFEM module; “B” represents the MEAM module; “C” represents the WLIoU Loss function; “-” indicates missing; and “√” indicates present.

[0223] As shown in Table 7, SLMW-Net achieved peak performance on all key metrics: mAP@0.5 at 86.7%, Precision at 80.5%, Recall at 80.6%, and mAP@0.5:0.95 at 40.1%. This validates the significant advantages of SFEM, MFAM, and WLIoU Loss in the synergistic detection of pine wilt disease. Specifically, through the combined application of different modules in SLMW-Net, the synergistic effect enables the model to more accurately distinguish targets from backgrounds when encountering complex image content. In other words, in scenes with complex or similar features, SFEM, MFAM, and WLIoU Loss effectively reduce false recognitions, enhance the attention to subtle initial features, and ensure highly accurate target detection.

[0224] Technical load performance: A high-resolution UAV remote sensing image dataset containing pine wilt disease samples was used, and the dataset was proportionally divided into training, validation, and test sets. Annotations were performed in Pascal VOC or COCO format to accurately depict target bounding boxes, ensuring complete coverage of the diseased area. Detection performance evaluation metrics included mAP@0.5, mAP@0.5:0.95, Precision, Recall, and F1-score. Model parameters (params), computational cost (FLOPs), and inference speed (FPS) were also recorded to measure technical load performance. During detection, test images were input into the trained model, which output predicted bounding boxes and class confidence scores. Redundant boxes were removed using non-maximum suppression (NMS), and various detection metrics were calculated. A correct detection was considered achieved when the IoU between the predicted and ground truth bounding boxes was greater than or equal to 0.5. The results are shown in Table 8.

[0225] Table 8: Experimental Data Recording Table

[0226] Group Parameter quantity Params (M) Floating-point operation quantity FLOPs (G) Faster R-CNN 28.3 492.9 YOLOv3 61.5 155.3 YOLOv5s 7.0 15.9 YOLOv7 37.2 105.1 YOLOv8n 3.0 8.2 YOLOv9m 20.2 77.5 YOLOv10n 2.7 8.4 SLMW-Net 3.9 8.8

[0227] As shown in Table 8, SLMW-Net has only 3.9M parameters, significantly lower than other high-complexity models. Compared with other high-complexity models, SLMW-Net's design effectively controls computational complexity, achieving excellent performance with a relatively low computational burden. By optimizing the number of parameters and floating-point operations, SLMW-Net effectively reduces computational complexity while maintaining high accuracy, thus achieving a balance between performance and computational burden. This model is particularly suitable for applications in environments with limited computing resources.

[0228] Example 2:

[0229] like Figure 3 As shown, this embodiment provides an electronic device, including: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net.

[0230] Since the electronic device described in this embodiment is the electronic device used to implement the UAV remote sensing image pine wilt disease detection method based on SLMW-Net in the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the UAV remote sensing image pine wilt disease detection method based on SLMW-Net described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. Any electronic device used by those skilled in the art to implement the UAV remote sensing image pine wilt disease detection method based on SLMW-Net in the embodiments of this application falls within the scope of protection of this application.

[0231] Example 3:

[0232] like Figure 4 As shown, this embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the above-described method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net.

[0233] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters, weights, and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0234] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless network. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0235] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0236] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0237] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only one method, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0238] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0239] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0240] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0241] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting pine wilt disease using UAV remote sensing images based on SLMW-Net, characterized in that, Includes the following steps: Dataset construction: Obtain the pine wilt disease ARen dataset and preprocess the obtained pine wilt disease ARen dataset; SLMW-Net Model Construction: In the Backbone part of the YOLOv11 model, a self-learning feature extraction module SFEM is introduced after the three C3k2 modules to capture feature information in the input image; in the Backbone part of the YOLOv11 model, a mild feature attention mechanism module MFAM is introduced after the SPPF module to enhance the input image features. Loss function construction: WLIoU Loss is used as the loss function, and the parameters are updated by calculating the loss of the SLMW-Net model; SLMW-Net model training: The SLMW-Net model is trained using the preprocessed ARaen dataset; Pine wilt disease detection: The SLMW-Net model is used to detect pine wilt disease in UAV remote sensing images, and the inspection results are output.

2. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 1, characterized in that, The preprocessing process for the acquired pine wilt disease ARN dataset is as follows: Images from the pine wilt disease ARN dataset were cut into 800×800 pixel blocks, and images containing multiple diseased pine trees were selected. The images were randomly divided into a training set and a validation set in an 8:2 ratio. The JPG image is loaded into the labelmg platform, and labels for the diseased areas are created by professional forestry workers. Finally, the labeling results are saved in TXT format.

3. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 1, characterized in that, The process of capturing feature information from the input image using the self-learning feature extraction module SFEM is as follows: Feature extraction for basic convolution: Y = Conv(X) = W * X, where X represents the input feature map, W is the convolution kernel parameter, * represents two-dimensional convolution, and Y represents the convolution output; Then perform batch normalization: Z=LeaBN(Y C,H,W ), In the formula, Y C,H,W This represents the convolutional output pixel value of a single sample at channel c and position (h, w), where C, H, and W represent the number of channels, height, and width, respectively, and μ. c , γ represents the mean and variance of each channel, respectively; c β c These represent the scaling and translation parameters for each channel, respectively, with α being the self-learning parameter, and the initial value of α being 1; The SiLU function is used for activation to obtain the complex nonlinear relationship of the input features: Output = SiLU(Z) = Z × σ(Z), where σ(Z) represents the Sigmoid function, which is defined as...

4. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 1, characterized in that, The process of enhancing image input features using the Minor Feature Attention (MFAM) module is as follows: Assume the input feature size is The input features are subjected to dimensionality-increasing convolution processing, and then dimensionality splitting is performed to obtain split part one and split part two. Split part one is not processed, and split part two is input into the gated transformer module GTM in the slight feature attention mechanism module MFAM for processing. The first split part and the processed second split part are spliced ​​together and then dimensionality reduction is performed to return to the original feature map size.

5. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 4, characterized in that, The gated transformer module GTM consists of a grouped attention module GA and a gated feedforward module GFF.

6. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 5, characterized in that, The processing procedure in the Group Attention (GA) module is as follows: Generate Q, K, and V from the input feature B, where Q, K, and V represent the query matrix, key matrix, and value matrix generated from the input feature B through a linear mapping, respectively: (Q1,K1,Q2,K2,V)=chunk(QKV raw ,5;along channel), In the formula, B is the batch size, Conv1×1 C→5C This means that the input feature B is expanded to 5C dimensions in the channel dimension through a 1×1 convolution. This represents a depthwise separable convolution. A chunk divides the channels into 5 parts, each with C channels. Q1 and Q2 represent the two query matrices obtained through the chunking operation. K1 and K2 represent the two key matrices obtained through the block operation, respectively; Then sort the data and flatten V into... Sort the data in ascending order, then rearrange Q1, K1, Q2, and K2 using index operations to ensure consistency with V: (V sorted ,idx)=sort(V,dim=2), In the formula, V sorted This represents the V feature map sorted in ascending order by channel dimension, idx represents the sort index tensor, and sort(V,dim=2) means sorting V in ascending order along the specified dimension and returning the sort result and the corresponding index. Attention calculation is adjusted by modifying temperature parameters to control the sensitivity of similarity between features, enabling dynamic range adjustment, and is then compared with V. sorted Multiply to get the result O: O=Attention×V sorted , In the formula, O is the output feature map after attention weighting, Attention represents the attention weight matrix, used to represent the correlation between different feature locations, and V sorted It is the sorted value matrix, which is multiplied by Attention to obtain the weighted result; Then a scatter operation is performed to restore O to its original pixel position, and finally the reshape is performed. Output=Conv1×1 C→C (Reshape(O))。 7. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 5, characterized in that, The processing procedure in the gated feedforward module (GFF) is as follows: For input features Perform up-dimensional convolution: In the formula, C h =r×C is the number of hidden channels, and r is the channel dimension expansion factor; Then, PixelShuffle upsampling is performed to move the spatial information in the channel dimension to H and W, where the spatial resolution is magnified by 2 times and the number of channels is reduced by 4 times. The channels are then split into two branches U1' and U'2. Large kernel convolution is performed on branch U1', and dilated convolution is performed on branch U'2. U' = [U1'; U'2] In the formula, U1' and U'2 represent the two branch feature maps that are split in the channel dimension after PixelShuffle upsampling, and DWConv 5×5 (U1') indicates that a 5×5 depthwise separable convolution is used to extract features with a large receptive field. DWConv 3×3,d=2 (U'2) represents the use of a 3×3 depthwise separable convolution with a dilation rate of d=2 to expand the receptive field and obtain more contextual information; V1 and V2 are the output feature maps after performing the corresponding convolution operations on U1' and U'2, respectively. Then, nonlinear activation is applied to branch U'2, and then multiplied element-wise with branch U1' to complete the dual-scale gated fusion: In the formula, mish is a smooth non-monotonic activation function, tanh(.) is a hyperbolic tangent function, and G represents the fused gated feature map; Then, PixelUnshuffl downsampling is used to move the spatial information back to the channel dimension, and finally, a 1×1 convolution is used to reduce the number of channels from C. h Projecting back to input C: In the formula, This represents a 1×1 convolution, where C represents the number of channels. h From compression back to C, channel fusion is performed simultaneously.

8. The method for detecting pine wilt disease in UAV remote sensing images based on SLMW-Net according to claim 1, characterized in that, The WLIoU Loss, used as a loss function, is processed as follows: IoU is the intersection-union ratio. In the formula, inter is the intersection area of ​​the predicted box and the ground truth box, and union is the union area of ​​the predicted box and the ground truth box. Calculate the minimum bounding box diagonal length: In the formula, (x 1,1 ,y 1,1 ), (x 1,2 ,y 1,2 ) are the top-left and bottom-right coordinates of the prediction box, respectively. 2,1 ,y 2,1 ), (x 2,2 ,y 2,2 ) are the top-left and bottom-right coordinates of the true bounding box, respectively, and C w C h Let represent the width and height of the minimum bounding rectangle of the predicted bounding box and the ground truth bounding box, respectively; Calculate the squared Euclidean distance between the center of the predicted bounding box and the center of the true bounding box: In the formula, Vx and Vy represent the differences between the center coordinates of the predicted bounding box and the ground truth bounding box; Calculate the aspect ratio penalty term and coefficient: In the formula, (w1, h1) represents the width and height of the predicted bounding box, and (w2, h2) represents the width and height of the ground truth bounding box. α1 is the normalization factor, and α1 is the coefficient, which dynamically measures the weight of the aspect ratio difference on the overall loss. Calculate IoU' and IoU": w f =(IoU) κ IoU”=(1-IoU')×w f , In the formula, κ is the adjustment factor, ρ is the Euclidean distance between the center points of the predicted box and the ground truth box, c represents the length of the diagonal of the minimum bounding rectangle that encloses the predicted box and the ground truth box, v is the aspect ratio consistency penalty term, which is used to measure the difference in aspect ratio between the predicted box and the ground truth box, and α is the aspect ratio penalty coefficient, which adjusts the weight of the v term in the total penalty. Linear stretching and truncation of the IoU value amplifies the gradient signal in the high IoU region and compresses the minimum region: In the formula, ∑ i w i This represents the normalization of the sum of weights of all positive samples. `clamp` is the cutoff function, which restricts the values ​​to a preset range. `d` and `u` are the lower and upper bounds of the linear stretching, respectively, used to adjust its distribution. `w`... i The weight of the i-th positive sample is used to balance the contributions of different samples in the loss calculation.

9. An electronic device, comprising: Memory and processor; The memory stores a computer program, characterized in that: when the processor executes the computer program, it implements the steps of the method for detecting pine wilt disease based on UAV remote sensing images according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for detecting pine wilt disease based on UAV remote sensing images according to any one of claims 1 to 8.