Remote sensing target detection method, device, equipment and medium
By integrating DCN v3 deformable convolution and LSK attention mechanism into the YOLOv8 network model and improving the border regression loss function, the problem of improving accuracy and speed in remote sensing target detection is solved, and the target scale is large, complex and Efficient detection of small targets.
Patent Information
- Application Number
- CN202411402515.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-10
AI Technical Summary
The current remote sensing object detection algorithm has low accuracy when dealing with large differences in target scales, complex image background and small object detection, and it is difficult to improve accuracy and speed at the same time.
By integrating DCN v3 deformable convolution into the backbone feature extraction network of the YOLOv8 network model, an LSK attention mechanism was introduced in the detection head, and the CIoU border regression loss function was replaced as the WIoU v3 border regression loss function, forming an improved DCN- YOLOv8 network model.
It significantly improves the detection accuracy and robustness of targets of different shape scales, enhances the detection ability of complex image background and small targets, reduces attention to low-quality data, and improves the overall detection accuracy and real-time performance of the model. .
Smart Images

Figure CN119295965A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of satellite remote sensing target detection technology, and in particular to a remote sensing target detection method, device, equipment and medium. Background Art
[0002] With the rapid development of satellite and imaging technology, remote sensing images have received more and more attention in the field of computer vision (CV). Information extraction from remote sensing images has extremely important application value and is widely used in military, urban planning, environmental monitoring and other fields. In remote sensing image analysis, target detection technology is particularly critical. It can automatically identify and locate specific targets such as airplanes, airports, cars and bridges from complex remote sensing images. It has important application value in urban planning, disaster response, military, agriculture, forestry, marine monitoring and other fields.
[0003] Compared with traditional target detection algorithms, target detection algorithms based on deep learning have significantly improved performance. They adopt an end-to-end learning method and can learn features directly from raw pixel data, thus avoiding the complex feature extraction and manual design process in traditional methods. The most widely used ones at this stage include single-stage detection algorithms and two-stage detection algorithms. The single-stage detection algorithm directly predicts the category and position of the target through a single network. Its speed is fast, but its accuracy is low. The two-stage detection algorithm first generates candidate target areas, and then classifies and regresses these areas in the second stage. Its accuracy is good, but its speed is slow. Although it has achieved good results, due to the low resolution, multi-spectral characteristics, multi-temporal data, small target detection, sparsity of features, and interference from environmental factors of remote sensing images, the accuracy of the target detection algorithm at this stage is still low.
[0004] In response to the difficulty of remote sensing target detection, some researchers proposed to improve the target detection algorithm of Faster R-CNN, using ResNet-50 as the main network for feature extraction and fusing multi-scale features, but its detection speed is slow; some researchers proposed to improve the SResNet network structure based on the Cascade R-CNN algorithm with the residual network (ResNet) as the feature extraction network, but its accuracy is only slightly increased; some researchers proposed an improved SSD algorithm, which enhances the detection accuracy of small targets by fusing multi-scale features and introducing a visual attention mechanism, and uses ResNet-50 as the feature extraction network to improve the detection accuracy, but the speed is slow; some researchers proposed an improved CenterNet remote sensing image detection algorithm, which uses a deep separable convolution to replace the standard convolution in the residual module, and adds an attention mechanism to suppress useless signals. information, but its accuracy is also slightly increased; some researchers proposed to improve the detection algorithm of YOLOv5, using a multi-scale feature enhancement network with joint attention, fully integrating multi-layer features and suppressing irrelevant information; researchers also replaced the ELAN module, introduced the EMA attention mechanism, and integrated the cascade fusion network on the basis of YOLOv7, significantly improving the model's detection accuracy for dense and small targets in complex backgrounds, but increased the number of parameters and reduced speed; some researchers used a lightweight feature pyramid network structure to improve the neck of YOLOv8, enhanced the model's multi-scale feature fusion capability, and used WIoU Loss to optimize the original network loss function, introducing a dynamic non-monotonic focusing mechanism, but it was slightly improved in both accuracy and speed.
[0005] Therefore, the target detection methods proposed at this stage are difficult to improve in terms of accuracy and speed, so they are usually less accurate when detecting targets with problems such as large target scale differences, complex image backgrounds, and small targets. Summary of the invention
[0006] The embodiments of the present invention provide a remote sensing target detection method, device, equipment and medium, which can solve the problem in the prior art that the accuracy is usually low when detecting targets with large target scale differences, complex image backgrounds and small targets.
[0007] The embodiment of the present invention provides a remote sensing target detection method, comprising the following steps:
[0008] Acquire multiple remote sensing images of the target and form a target remote sensing image dataset;
[0009] Construct a YOLOv8 network model, integrate the DCN v3 deformable convolution into the backbone feature extraction network Backbone of the YOLOv8 network model to form a DCN-DarkNet53 feature extraction network; integrate the LSK attention mechanism into the detection head Head of the YOLOv8 network model to form an improved detection head Head; replace the CIoU border regression loss function of the YOLOv8 network model with the WIoU v3 border regression loss function to form the DCN-YOLOv8 network model after improving the YOLOv8 network model;
[0010] The DCN-YOLOv8 network model is trained using the target remote sensing image dataset to obtain the trained DCN-YOLOv8 network model;
[0011] The remote sensing image of the target is input into the trained DCN-YOLOv8 network model, and the DCN-DarkNet53 feature extraction network is used to extract the features of the remote sensing image of the target to obtain a shallow feature map containing the shape, size and edge features of the target. The improved detection head Head is used to extract the features of the remote sensing image of the target to obtain a deep feature map containing detail features and background contrast features. The network layer containing the WIoU v3 bounding box regression loss function in the trained DCN-YOLOv8 network model is used to add the feature elements in the shallow feature map and the deep feature map, and visualize them to obtain the detection image of the target.
[0012] Preferably, the forming of the DCN-DarkNet53 feature extraction network comprises:
[0013] DCN v3 deformable convolution expands the convolution kernel training range by adding an offset to the sampling position of the standard convolution;
[0014] The DCN v3 deformable convolution is integrated into the backbone feature extraction network Backbone of the YOLOv8 network model, and its fusion equation is:
[0015]
[0016] Where: G represents the number of aggregation groups; for the gth group, w g Represents the position-independent projection weight; m gk represents the modulation factor of the kth sampling point; p0 represents the current pixel; K represents the total number of sampling points; k represents the current convolution sampling point; p k represents the kth position of the predefined grid sampling; x g ∈R C′×H×W Represents the slice input feature map; R C×H×W Represents the characteristic graph; △p gkis the grid sampling position p in the gth group k The corresponding offset.
[0017] Preferably, the forming of the improved detection head Head comprises:
[0018] The LSK attention mechanism consists of a cascade of a large kernel convolution sequence LKC and a spatial kernel selection mechanism SKSM;
[0019] The large kernel convolution sequence LKC is used to obtain context information in different ranges by decoupling the deep convolution containing the gradually expanding large-scale convolution kernel, and simultaneously performs channel mixing on each spatial feature vector;
[0020] The spatial kernel selection mechanism SKSM is used to select feature maps from large convolution kernels of different scales in space;
[0021] The LSK attention mechanism is integrated into the detection head of the YOLOv8 network model to distinguish the background and capture small target information.
[0022] Preferably, the WIoU v3 border regression loss function is:
[0023] L WIoU v3 =r×L WIoU v1
[0024]
[0025] Where: γ represents the non-monotonic focusing coefficient; β represents the outlier degree of the anchor box; a and δ represent hyperparameters; represents the monotonic focusing coefficient; represents a sliding average with momentum m.
[0026] The embodiment of the present invention further provides a remote sensing target detection device, comprising:
[0027] A remote sensing module is used to obtain multiple remote sensing images of the target and form a target remote sensing image data set;
[0028] The model module is used to build a YOLOv8 network model, integrate the DCN v3 deformable convolution into the backbone feature extraction network Backbone of the YOLOv8 network model to form a DCN-DarkNet53 feature extraction network; integrate the LSK attention mechanism into the detection head Head of the YOLOv8 network model to form an improved detection head Head; replace the CIoU border regression loss function of the YOLOv8 network model with the WIoU v3 border regression loss function to form a DCN-YOLOv8 network model that is improved on the YOLOv8 network model;
[0029] The DCN-YOLOv8 network model is trained using the target remote sensing image dataset to obtain the trained DCN-YOLOv8 network model;
[0030] The detection module is used to input the remote sensing image of the target into the trained DCN-YOLOv8 network model, use the DCN-DarkNet53 feature extraction network to extract features of the remote sensing image of the target, and obtain a shallow feature map including the shape, size and edge features of the target; use the improved detection head Head to extract features of the remote sensing image of the target, and obtain a deep feature map including detail features and background contrast features; use the network layer containing the WIoU v3 border regression loss function in the trained DCN-YOLOv8 network model to add and visualize the feature elements in the shallow feature map and the deep feature map to obtain the detection image of the target.
[0031] An embodiment of the present invention further provides an electronic device, including a memory and a processor;
[0032] The memory is used to store computer programs;
[0033] The processor is used to implement the steps of the remote sensing target detection method as described above when executing the computer program stored in the memory.
[0034] An embodiment of the present invention further provides a computer-readable storage medium, characterized in that it is used to store a computer program, and when the computer program is executed by a processor, the steps of the remote sensing target detection method described above are implemented.
[0035] The embodiments of the present invention provide a remote sensing target detection method, device, equipment and medium. Compared with the prior art, the beneficial effects thereof are as follows:
[0036] The present invention integrates DCN v3 deformable convolution into the backbone feature extraction network Backbone of the YOLOv8 network model, so that the network model can accurately extract targets of different shapes and scales; at the same time, the LSK attention mechanism is integrated into the detection head of the YOLOv8 network model, so that the network model can detect targets in the case of complex image background and small targets; and the original CIoU border regression loss function in the model is replaced by the WIoU v3 border regression loss function, so that the model pays less attention to the lower data in the image and pays more attention to the common samples of the target; the improved model solves the problems of large target scale difference, complex image background and difficult detection of small targets, greatly improves the accuracy of the model in remote sensing target detection, and has important improvements for policy making in the fields of military, engineering construction, environmental testing, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the overall process of a remote sensing target detection method provided by an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a YOLOv8 algorithm framework for a remote sensing target detection method provided by an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of a DCN-YOLOv8 algorithm framework of a remote sensing target detection method provided by an embodiment of the present invention;
[0040] Figure 4 A convolution comparison diagram of a remote sensing target detection method provided by an embodiment of the present invention; (a) is a standard convolution; (b) is a deformable convolution;
[0041] Figure 5 A schematic diagram of the C2f_SimAM module architecture of a remote sensing target detection method provided by an embodiment of the present invention;
[0042] Figure 6 A schematic diagram of the LSK attention mechanism architecture of a remote sensing target detection method provided by an embodiment of the present invention;
[0043] Figure 7 A schematic diagram of changes in YOLOv8 series training indicators for a remote sensing target detection method provided by an embodiment of the present invention;
[0044] Figure 8 A schematic diagram of a real scene comparison of a remote sensing target detection method provided by an embodiment of the present invention;
[0045] Fig. 9 A schematic diagram of a model heat map of a remote sensing target detection method provided in an embodiment of the present invention; (a) is a heat map of an original image; (b) is a heat map processed by YOLOv8s; (c) is a heat map processed by Ours-YOLOv8. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0047] See also Figure 1, an embodiment of the present invention provides a remote sensing target detection method; first, in order to solve the problems of irregular shapes and large scale differences of remote sensing targets, the DCN v3 deformable convolution is integrated into the backbone feature extraction network, and the DCN-DarkNet53 backbone feature extraction network is proposed. The convolution kernel is adaptively adjusted according to the shape and size of the object, so as to better extract features. Secondly, the SimAM attention mechanism is introduced into the C2f module for fusion. Secondly, the LSK attention mechanism is integrated into the Head structure to enhance the model's attention to small targets with complex backgrounds. Finally, considering the poor quality of remote sensing datasets, the WIoU v3 loss function with a dynamic non-monotonic focusing mechanism is introduced, and a reasonable gradient gain allocation strategy is designed to reduce the model's attention to low-quality data.
[0048] Specifically:
[0049] Firstly, the DCN v3 deformable convolution is integrated into the backbone network to construct the DCN-DarkNet53 feature extraction network; this network can adaptively adjust to targets of different shapes and scales, significantly improving the accuracy and robustness of target detection; in remote sensing images, due to the irregular shapes and variable scales of targets, conventional convolution methods often fail to achieve ideal results; the introduction of deformable convolution enables the model to be closer to the original shape and size of the object when sampling, thereby significantly improving the accuracy and robustness of target detection; at the same time, by optimizing the network structure and parameter settings, DCN-DarkNet53 also has high computational efficiency and accuracy ; Secondly, in order to further optimize the performance of the model, the LSK attention mechanism is introduced in front of the detection head; this mechanism mainly solves the problems of complex background and insufficient attention to small targets in remote sensing target detection; by dynamically adjusting the large spatial receptive field, the LSK attention mechanism can better model the context range of remote sensing targets, which not only enhances the model's recognition ability for different types of targets, but also significantly improves the accuracy of small target detection, so that the model can better focus on small targets that are easily ignored, thereby improving the accuracy and robustness of target detection as a whole; finally, the bounding box regression loss function of YOLOv8 is improved, and WIoU v3 with a dynamic non-monotonic focusing mechanism is introduced as a new bounding box regression loss function; this loss function can effectively reduce the impact of extreme targets on the overall detection by constructing a dynamic gradient gain coefficient, so that the model pays more attention to ordinary samples and reduces attention to low-quality data; this strategy improves the robustness of the model and makes it better adapt to the characteristics of real remote sensing data sets; the YOLOv8 algorithm framework is as follows Figure 2 As shown in Figure 2, the overall framework of the improved YOLOv8 algorithm is as follows: Figure 3 The specific network improvement process includes:
[0050] 1. DCN-DarkNet53 backbone feature extraction network.
[0051] Since traditional CNN networks mainly use fixed convolution kernel sizes to extract fixed features, the extraction ability of CNN will be affected by input space transformation; at the same time, due to the limitations of the C2f standard convolution kernel, YOLOv8 may face challenges when processing multi-scale targets; the same image may contain targets of different sizes at the same time, and small targets are often easily ignored or omitted because they occupy fewer pixels in the image; in multi-target scenes, there is also a tendency for overlap or occlusion between targets, and standard convolution operations may not be able to effectively separate and identify each target; the comparison between standard convolution and deformable convolution is shown in Figure 2. Figure 4 As shown in the figure; the principle of deformable convolution is to add an offset to the sampling position of the standard convolution so that the convolution kernel can be expanded to a larger range during the training process, so as to adapt to targets of different shapes and sizes, so that each sampling point can adaptively adjust its position according to the characteristics of the input image; during the training process, the network will automatically learn the appropriate offset according to the characteristics and label information of the input image, so that the convolution kernel can better adapt to the shape and size of the target; and by introducing long-range dependency and adaptive spatial aggregation into DCN v3, the convolution is successfully expanded to a large scale, and module customization, stacking rules and scaling strategies are explored; its calculation formula is:
[0052]
[0053] Where: G represents the number of aggregation groups; for the gth group, w g Represents the position-independent projection weight; m gk Represents the modulation factor of the kth sampling point and is normalized by softmax along dimension K. DCN v3 makes up for the shortcomings of conventional convolution in long-range dependency and adaptive spatial aggregation, integrates the inductive bias of CNN, and is more efficient in terms of computation and memory.
[0054] At the same time in this formula, input feature map x∈R C×H×W , p0 is the current pixel, g belongs to the subgroup, K represents the total number of sampling points, k is the convolution sampling point, W k ∈R C×C represents the projection weight of the kth sampling point, m k ∈R represents the modulation scalar of the kth sampling point, normalized by the sigmoid function; p k represents the k-th position of the predefined grid sampling {(-1, -1), (1, 0), ..., (0, +1) ..., {(-1, -1), (1, 0), ..., (0, +1) ..., (+1, +1)} (+1, +1)}, as shown in the regularized convolution, △p kis the offset corresponding to the kth grid sampling position; m gk ∈R represents the offset of the kth sampling point in the gth group, which is normalized along the dimension by the softmax function; x g ∈R C′×H×W represents the slice input feature map; △p gk is the grid sampling position p in the gth group k The corresponding offset.
[0055] Compared with traditional target detection models, DCN-Darknet not only enhances the model's adaptability to irregularly shaped targets, but also significantly improves the detection accuracy of multi-scale targets by introducing deformable convolutions. When faced with complex remote sensing images, especially those with more small targets, DCN-Darknet can more flexibly adjust the shape and size of the convolution kernel, thereby more effectively capturing target features and reducing the impact of noise and interference on image recognition.
[0056] 2. C2f_SimAM module.
[0057] The C2f module enhances the feature extraction capability by adding more skip connections and additional Split operations; however, it has certain limitations in capturing subtle features in images, especially in complex remote sensing detection scenarios; SimAM is a three-dimensional attention mechanism. After integrating the SimAM algorithm into the C2f module, the model can better focus on the key features in the image, thereby improving the accuracy and efficiency of feature extraction. Figure 5 In addition, the introduction of SimAM also improves the adaptability of the model to targets of different scales and directions, which is especially important for small targets and rotating targets in remote sensing target detection tasks.
[0058] 3. Large core selective attention mechanism.
[0059] In remote sensing target detection, the complexity of the background and the lack of attention to small targets have always been difficulties that plague the model; the introduction of the attention mechanism is to solve these problems. Through the learned spatial dependencies, the model can adapt to targets of various shapes and sizes, thereby improving the robustness of detection.
[0060] like Figure 6As shown in the figure, LSKNet is implemented through a spatial selection mechanism, which effectively weights the features processed by the large kernel convolution sequence (Large Kernel Convolutions) and merges them in space; the weight of the convolution kernel dynamically determined based on the input enables the model to adaptively use Large Kernel Convolutions of different sizes and adjust the receptive field of each target in the space as needed; LSKNet is mainly composed of two sub-modules: Large Kernel Selection (LK Selection) and Feed-forward Network (FFN); FFN is used for channel mixing and feature refinement, and consists of a fully connected layer, a deep convolution layer, a GELU activation function and a second fully connected layer; LK Selection consists of a fully connected layer, an LSK sub-module, a GELU activation function and a fully connected layer.
[0061] The core component of LSKNet is the LSK module, which consists of a sequence of large kernel convolutions and a spatial kernel selection mechanism. The large kernel convolution sequence is constructed by decoupling it into a series of deep convolutions with large kernels and gradual expansion. Specifically, assuming the expansion of various parameters in the i-th deep convolution in the sequence, the kernel size is k, the expansion rate is d, and the receptive field RF, they satisfy the following relationship:
[0062] k i-1 ≤k i ; d1=1,d i-1 <d i ≤RF i-1
[0063] RF1=k1,RF i =d i (k i -1)+RF i-1
[0064] The increasing kernel size and dilation rate ensure the rapid expansion of the receptive field. At the same time, an upper limit is set on the dilation rate to avoid the dilated convolution introducing gaps between feature maps. This method makes the subsequent convolution kernel selection easier and significantly reduces the number of parameters. At the same time, a series of decomposed deep convolutions with different receptive fields can be used to obtain contextual information in different ranges, and also allow channel mixing for each spatial feature vector, which is calculated as follows:
[0065] U0=X,U i+1 =F i dw (U i )
[0066]
[0067] in: The convolution kernel is k i , the expansion rate is d i Depth-wise convolution operation; assuming there are N decoupled convolution kernels, each convolution operation must be followed by a 1×1 convolution layer F 1×1 (·) Perform channel fusion of spatial feature vectors;
[0068] As mentioned above, LSKNet adopts a spatial kernel selection mechanism to enhance the network's ability to focus on the most relevant spatial context regions, thereby spatially selecting feature maps from large convolution kernels of different scales; the specific steps are:
[0069] (1) The features obtained from different convolution kernels and different receptive fields are concatenated:
[0070]
[0071] (2) Use channel-based average pooling and maximum pooling to efficiently extract spatial relationships:
[0072]
[0073] Among them: SA avg and SA max It is the spatial feature descriptor after average pooling and maximum pooling.
[0074] (3) Concatenate the pooled features and use a convolutional layer F 2→N (·) Convert these pooled features (two channels) into N spatial attention feature maps:
[0075]
[0076] (4) Use the sigmoid activation function to make each decoupled convolution kernel obtain an independent spatial selection mask:
[0077]
[0078] in: Represents each spatial attention feature map.
[0079] (5) The features in the decoupled large kernel convolution sequence are weighted with the corresponding spatial selection mask and fused through a convolutional layer F(·) to obtain the attention feature S:
[0080]
[0081] (6) The final output of the LSK module is the element-by-element product of the input feature X and S:
[0082] Y=X·S.
[0083] 4. Improved loss function.
[0084] In the target detection model, the bounding box regression loss function is crucial to improving the target positioning accuracy; the YOLOv8 model uses CIoU (Complete Intersection over Union) as the bounding box regression loss function, which combines the intersection over union ratio, Euclidean distance and corresponding aspect ratio to measure the overlapping area between the predicted box and the true box, and adds a penalty term for the aspect ratio; however, when CIoU processes the linear ratio of the aspect ratio between the predicted box and the true box, the penalty term will degenerate and become invalid; in addition, CIoU assumes that the data set quality is high, but does not fully consider that the remote sensing data set may be affected by various factors such as angle, lighting, equipment, etc., resulting in poor data set quality, which in turn affects the network convergence speed and the accuracy of target detection.
[0085] Therefore, the present invention uses WIoU v3 with a dynamic non-monotonic focusing mechanism as the bounding box regression loss, evaluates the outlier degree of the anchor box, reasonably designs the gradient allocation strategy, effectively suppresses the negative impact of low-quality image data, improves the model's detection ability for small targets and overlapping targets, and thus optimizes the overall performance and accuracy of the model; its expression is:
[0086] L WIoU v3 =r×L WIoU v1
[0087]
[0088]
[0089] Among them: γ represents the non-monotonic focusing coefficient; β represents the outlier degree of the anchor frame, and the larger the outlier degree, the worse the quality of the sample; a and δ represent hyperparameters; represents the monotonic focusing coefficient; Represents the sliding average with momentum m. Dynamically updating the normalization factor can keep the overall gradient gain at a high level, solve the problem of slow convergence in the late training period, and achieve good prediction results. WIoU v3 enables the model to pay more attention to the medium-quality data in the remote sensing dataset and assign larger gradients to it, thereby reducing the impact of better and extreme targets on the overall detection. This mechanism ensures that the model can accurately identify various targets when processing remote sensing images, improving the robustness and overall performance of the model.
[0090] Specific experiments:
[0091] 1. Experimental parameter settings.
[0092] The hyperparameter settings for model training are shown in Table 1.
[0093] Table 1 Hyperparameter settings for model training
[0094] Parameters Setup Total rounds 300 Batch size 32 momentum 0.932 Initial learning rate 0.01 Final learning rate 0.0001 Weight decay 0.0005 Input image size 640×640 Optimizer SGD Data augmentation strategy Mosaic δ(WIoU v3) 1.9 α(WIoU v3) 3
[0095] 2. Dataset.
[0096] The present invention uses a data set SIMD, which contains 6000 static images, divided into a training set and a validation set, of which 5000 are used for training and 1000 are used for validation; the data set includes 15 different categories: cars, trucks, vans, long cars, buses, passenger planes, propeller planes, trainer planes, charter planes, fighter planes, stair trucks, trailers, helicopters, ships, and other categories.
[0097] 3. Evaluation indicators.
[0098] The present invention uses precision (Precision), recall rate (Recall), average precision AP (AveragePrecision), category average precision mAP (mean Average Precision), F1Score, and model parameter quantity as evaluation indicators.
[0099] 4. Experimental results.
[0100] ① Loss function comparison experiment.
[0101] In order to verify the effectiveness of the improved loss function WIoU v3, the present invention designs a series of comparative experiments, as shown in Table 2; taking the YOLOv8s network as the benchmark model, the performance of six loss functions, including CIOU, EIoU, GIoU, SIoU, WIoU v1 and WIoU v2, on the SIMD dataset is systematically compared; specifically, WIoU v3 improves the accuracy by 5.6%, the mAP50 by 2.1%, and the recall by 1.2%; these data fully demonstrate the effectiveness of WIoU v3 in solving the problems of low quality and small target positioning in remote sensing datasets.
[0102] Table 2 Loss function comparison experiment
[0103] Models Precision% Recall% mAP 0.5% mAP0.5: 0.95% F1Score CIo 74.8 76.3 78.2 63.9 75.5 EIU 79.6 72.2 77.5 63.5 75.7 GIoU 78.1 75.4 78.3 64.2 76.7 ikB 78.6 77.6 79.0 65.3 78.1 WIoU v1 79.3 77.0 79.1 64.9 78.1 WIoU v2 79.9 76.5 80.0 65.1 78.2 WIoU v3 80.4 77.5 80.3 65.5 78.9
[0104] ②Add LSK attention mechanism experiment.
[0105] In order to verify the effectiveness of the LSK attention mechanism, the algorithm with improved backbone network, C2f_SimAM module and loss function is used as the benchmark model, and other configurations are the same; a series of comparative experiments are carried out on various mainstream attention modules, including SE, CoT, ECA, SimAM and EMA attention mechanisms; the experimental results can be seen from Table 3 that the introduction of SE, SimAM and EAM attention modules reduces the accuracy of the model, while other attention modules have an improvement effect on various indicators; the LSK attention mechanism improves the mAP50 indicator by about 1.9% and the F1Score by 1.4%; the LSK attention mechanism shows significant advantages in improving the overall performance of the model.
[0106] Table 3 Comparative experiments of different attention modules
[0107]
[0108]
[0109] ③Ablation experiment.
[0110] To verify the effectiveness of the improved model, an ablation experiment was conducted on the SIMD dataset based on YOLOv8s to explore the impact of each module on the model performance; the results are shown in Table 4. First, the effectiveness of the improved WIoU v3 loss function was verified. Using this loss function, the model achieved an improvement of about 2.1% in the mAP50 indicator and an increase of 5.6% in accuracy. This shows that by optimizing the gradient distribution strategy, the WIoU v3 loss function makes the model pay more attention to data of normal quality, thereby improving the regression accuracy of the bounding box and the overall model performance; secondly, the effectiveness of the DCN-DarkNet53 backbone feature extraction network is verified; using this network, the model improves the mAP50 indicator by about 2.9%, while reducing the number of parameters and computational consumption; DCN v3 convolution enhances the model's detection ability for irregular shapes and multi-scale targets, enabling it to more accurately identify various types of targets when processing remote sensing images; again, after adding the C2f_SimAM module, finally, the effectiveness of adding the LSK attention mechanism is verified; this mechanism enables the model to obtain a 1.6% improvement in the mAP50 indicator, and other indicators are also improved; the LSK attention mechanism effectively enhances the model's attention to small targets with complex backgrounds.
[0111] Table 4 Module ablation experiment
[0112]
[0113] ④Comparative test of YOLOv8 series algorithms.
[0114] The present invention selects different models of YOLOv8 series models to conduct a series of comparative experiments on SIMD data sets. The summary of the experimental results is shown in Table 5, which clearly shows the performance of DCN-YOLOv8 and other models in various evaluation indicators. The DCN-YOLOv8 model shows excellent performance with relatively low parameters. In terms of key indicators such as accuracy, recall, mAP50, mAP0.5:0.95 and F1Score, DCN-YOLOv8 exceeds other scale models. The DCN-YOLOv8 model proposed in the present invention has a mAP50 index that is 3.5% higher than YOLOv8l, and many other indicators are also higher than it, with a total parameter volume of only about 28% of YOLOv8l.
[0115] Table 5 YOLOv8 series comparison experiment table
[0116] Models Precision% Recall% mAP 0.5% mAP 0.75% mAP0.5: 0.95% F1Score GFLOPs YOLOv8n 82.8 71.6 78.2 73.7 63.5 76.8 8.7 YOLOv8s 74.8 76.3 78.2 72.0 63.9 75.5 28.6 YOLOv8m 79.5 76.4 80.1 73.9 65.8 77.9 78.9 YOLOv8l 84.2 77.5 81.3 76.0 66.8 80.7 165.2 Ours 83.1 80.0 84.8 79.5 69.3 81.5 30.0
[0117] like Figure 7As shown in the figure, the changes in key evaluation indicators of the DCN-YOLOv8 model and other YOLOv8 series configurations during the training process are shown; through observation, it can be clearly seen that DCN-YOLOv8 has shown superior performance in key indicators such as recall rate, mAP50 and mAP50:95, especially in the key evaluation indicator of mAP50, DCN-YOLOv8 has shown excellent performance.
[0118] ⑤Comparative experiment.
[0119] On the SIMD dataset, a rigorous comparison was conducted with the YOLO series models and mainstream algorithms. The results are shown in Table 6. Although the early YOLOv3 model achieved 82.5% in detection accuracy, its huge number of parameters and computational complexity made it difficult to deploy on edge devices. Although YOLOv5s is lighter and has a lower computational burden, its detection accuracy is almost the same as that of YOLOv3. Both of them use preset anchors for target detection, which is slightly insufficient in remote sensing applications, especially in scenes with variable target scales and a large number of small targets. YOLOv6 As an improved version of the two, an s-size model is deployed, but its detection accuracy is even worse than YOLOv5 and YOLOv3, and the number of parameters and calculations are still high, which cannot be applied in actual scenarios; at the same time, YOLOv7 and YOLOv7-Tiny are compared; YOLOv7 has a detection accuracy of 83.4%, but the model is too large; and although YOLOv7-Tiny has advantages in speed and number of parameters, its detection performance is relatively poor due to its lightweight characteristics; classic two-stage models such as FasterRCNN and Casade RCNN not only has low detection accuracy, but also has large computational complexity and poor real-time performance due to its two-stage characteristics, and cannot be applied to actual scenarios; Retinanet's detection accuracy is not very good either; however, the improved DCN-YOLOv8 model has a detection accuracy of up to 84.8%. Although the number of parameters is slightly higher than that of YOLOv5s and YOLOv7-Tiny, it achieves a 6.6% improvement in model detection accuracy through smaller parameters and computational costs. In summary, the improved DCN-YOLOv8 model performs well in remote sensing detection, has high detection accuracy and real-time performance, and is suitable for edge device deployment.
[0120] Table 6 YOLO series baseline algorithm comparison experiment
[0121] Models mAP 0.5% mAP0.5: 0.95% <![CDATA[Parameter / 10 6 ]]> <![CDATA[YOLOv3
[27] ]]> 82.5 65.2 61.5 YOLOv5s 82.4 64.2 7.2 <![CDATA[YOLOv6s
[28] ]]> 79.5 62.1 18.51 <![CDATA[YOLOv7
[29] ]]> 83.4 66.5 36.9 <![CDATA[YOLOv7-Tiny
[30] ]]> 80.3 63.6 6.2 <![CDATA[FasterRCNN
[31] ]]> 79.7 62.4 23.5 <![CDATA[CasadeRCNN
[32] ]]> 49.6 32.2 23.5 <![CDATA[Retinanet
[33] ]]> 76.3 59.7 23.5 Ours 84.8 69.3 12.0
[0122] ⑥Real comparison.
[0123] A series of representative application scene images were selected from the SIMD dataset, including busy docks, large airports, and parking lots. The DCN-YOLOv8 model was applied to each image, and its detection results were analyzed, such as Figure 8 As shown in the figure, some examples of test results are shown, with the original image on the left and the detection result of DCN-YOLOv8 on the right. It can be seen that the optimized model can accurately detect most targets in different scenarios such as ports, airports and parking lots.
[0124] In addition, the Gradient Weighted Activation Mapping (Grade CAM) technique is used to generate a heat map to show the feature areas that the model focuses on in image detection. The heat map results are as follows: Fig. 9 As shown in the figure, Grade CAM generates a heat map based on the gradient value of the model category confidence. The high gradient area is highlighted in dark red, indicating that the model pays high attention, which helps to improve the detection accuracy; the low gradient area is dark blue, indicating that the model pays less attention, which may lead to a decrease in detection accuracy.
[0125] By observing the heat map, it is found that the YOLOv8s model works better in detecting larger objects, but pays less attention to smaller targets, especially to distant targets. The DCN-YOLOv8 model not only effectively suppresses background noise and significantly improves the focus on small targets, but also maintains a high level of focus on small targets in dense and complex background scenes.
[0126] The present invention incorporates the DCN v3 deformable convolution, which can be adaptively adjusted according to the shape and size of the object. Secondly, the LSK attention mechanism is introduced to solve the problems of complex background and insufficient attention to small targets. Finally, the bounding box regression loss function is improved and the WIoU v3 loss function is adopted, which provides higher accuracy and robustness for remote sensing target detection applications.
[0127] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A remote sensing target detection method, characterized in that: The following steps are involved: Acquire multiple remote sensing images of the target and form a target remote sensing image dataset; Construct a YOLOv8 network model, integrate the DCN v3 deformable convolution into the backbone feature extraction network Backbone of the YOLOv8 network model to form a DCN-DarkNet53 feature extraction network; integrate the LSK attention mechanism into the detection head Head of the YOLOv8 network model to form an improved detection head Head; replace the CIoU border regression loss function of the YOLOv8 network model with the WIoU v3 border regression loss function to form the DCN-YOLOv8 network model after improving the YOLOv8 network model; The DCN-YOLOv8 network model is trained using the target remote sensing image dataset to obtain the trained DCN-YOLOv8 network model; The remote sensing image of the target is input into the trained DCN-YOLOv8 network model, and the DCN-DarkNet53 feature extraction network is used to extract the features of the remote sensing image of the target to obtain a shallow feature map containing the shape, size and edge features of the target. The improved detection head Head is used to extract the features of the remote sensing image of the target to obtain a deep feature map containing detail features and background contrast features. The network layer containing the WIoU v3 bounding box regression loss function in the trained DCN-YOLOv8 network model is used to add the feature elements in the shallow feature map and the deep feature map, and visualize them to obtain the detection image of the target.
2. A remote sensing target detection method according to claim 1, characterized in that: The DCN-DarkNet53 feature extraction network is formed, comprising: DCN v3 deformable convolution expands the convolution kernel training range by adding an offset to the sampling position of the standard convolution; The DCN v3 deformable convolution is integrated into the backbone feature extraction network Backbone of the YOLOv8 network model, and its fusion equation is: Where: G represents the number of aggregation groups; for the gth group, w g Represents the position-independent projection weight; m gk represents the modulation factor of the kth sampling point; p0 represents the current pixel; K represents the total number of sampling points; k represents the current convolution sampling point; p k represents the kth position of the predefined grid sampling; x g ∈R C′×H×W Represents the slice input feature map; R C×H×W Represents the characteristic graph; Δp gk is the grid sampling position p in the gth group k The corresponding offset.
3. A remote sensing target detection method according to claim 1, characterized in that: The improved detection head Head is formed, comprising: The LSK attention mechanism consists of a cascade of a large kernel convolution sequence LKC and a spatial kernel selection mechanism SKSM; The large kernel convolution sequence LKC is used to obtain context information in different ranges by decoupling the deep convolution containing the gradually expanding large-scale convolution kernel, and simultaneously performs channel mixing on each spatial feature vector; The spatial kernel selection mechanism SKSM is used to select feature maps from large convolution kernels of different scales in space; The LSK attention mechanism is integrated into the detection head of the YOLOv8 network model to distinguish the background and capture small target information.
4. A remote sensing target detection method according to claim 1, characterized in that: The WIoUv3 border regression loss function is: L WIoUv3 =r×L WIoUv1 Where: γ represents the non-monotonic focusing coefficient; β represents the outlier degree of the anchor box; a and δ represent hyperparameters; represents the monotonic focusing coefficient; represents a sliding average with momentum m.
5. A remote sensing target detection device, characterized in that: include: A remote sensing module is used to obtain multiple remote sensing images of the target and form a target remote sensing image data set; The model module is used to build a YOLOv8 network model, integrate the DCN v3 deformable convolution into the backbone feature extraction network Backbone of the YOLOv8 network model to form a DCN-DarkNet53 feature extraction network; integrate the LSK attention mechanism into the detection head Head of the YOLOv8 network model to form an improved detection head Head; replace the CIoU border regression loss function of the YOLOv8 network model with the WIoU v3 border regression loss function to form a DCN-YOLOv8 network model that is improved on the YOLOv8 network model; The DCN-YOLOv8 network model is trained using the target remote sensing image dataset to obtain the trained DCN-YOLOv8 network model; The detection module is used to input the remote sensing image of the target into the trained DCN-YOLOv8 network model, use the DCN-DarkNet53 feature extraction network to extract features of the remote sensing image of the target, and obtain a shallow feature map containing the shape, size and edge features of the target; use the improved detection head Head to extract features of the remote sensing image of the target, and obtain a deep feature map containing detail features and background contrast features; use the network layer containing the WIoUv3 border regression loss function in the trained DCN-YOLOv8 network model to add and visualize the feature elements in the shallow feature map and the deep feature map to obtain the detection image of the target.
6. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor is used to implement the steps of a remote sensing target detection method as described in any one of claims 1 to 4 when executing the computer program stored in the memory.
7. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the steps of a remote sensing target detection method as claimed in any one of claims 1 to 4.
Citation Information
Cited By
Target detection method and training method of target detection model
CN119723064A
Pedestrian multi-target tracking method based on improved YOLOv5 and feature extraction
CN119991744A
Image detection method and device, equipment and readable medium
CN120495155A
Coordinated multi-scale feature enhancement network-based driving scene multi-task perception method
CN120564151A