Foggy day target detection method based on dynamic cavity convolution and cross-dimensional attention

A fog-day target detection method based on dynamic multi-scale dilated convolution and cross-dimensional attention mechanism solves the problem of low image quality of UAVs in foggy weather, achieving high-precision and real-time target detection, which is suitable for UAV platform applications.

CN121639508APending Publication Date: 2026-03-10SHENYANG LIGONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In foggy conditions, drone images have low contrast and low brightness, resulting in reduced target detection accuracy. Existing methods struggle to achieve high-precision real-time detection in foggy environments.

Method used

A fog-day target detection method is proposed, which employs dynamic multi-scale dilated convolution and cross-dimensional attention mechanism. The method processes fog-day images through a dynamic multi-scale dilated convolution defogging module, and combines a fusion scale-aware dynamic branch and cross-dimensional attention mechanism module for feature extraction and target detection.

Benefits of technology

It improves the accuracy and real-time performance of target detection in foggy weather, enhances the ability to detect small targets, reduces the number of model parameters, and is suitable for deployment on UAV platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121639508A_ABST
    Figure CN121639508A_ABST
Patent Text Reader

Abstract

The invention provides a foggy day target detection method based on dynamic dilated convolution and cross-dimensional attention, relates to the crossing field of computer vision and artificial intelligence, and designs three parallel multi-scale dilated convolution to capture multi-scale features of near, middle and far fog clusters, design scale perception attention weights for different scales, and improve the detection accuracy of the foggy day target. And then the multi-scale features are spliced by adopting jump connection to generate a defogged clear image, so that the defogging effect is effectively improved, and the detail features of the target are reserved. Secondly, performing scale division of large targets and small targets on the input features, dividing channels into information branches and redundant branches, generating a space-channel incidence matrix, and completing bidirectional weighted optimization of space enhancement and channel compression at the same time; and finally, lightweight operation is carried out on information and redundant branches of the channels by adopting a depth separable convolution machine and sparse 11 convolution, and dual-channel features are fused to generate enhanced features, so that the detection precision of the unmanned aerial vehicle on small targets in foggy days is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of computer vision and artificial intelligence, specifically to a fog-day target detection method based on dynamic dilated convolution and cross-dimensional attention. Background Technology

[0002] With the continuous advancement of UAV autonomous navigation technology, the demand for computer vision and enhanced visual perception capabilities is increasing, particularly in how UAVs can achieve high-precision, real-time target detection in complex scenarios. Target detection is a key technology in UAV scene perception and understanding tasks, widely used in military reconnaissance, road monitoring, and autonomous navigation. However, fog severely interferes with UAVs' scene perception capabilities. Images acquired by UAVs in foggy conditions suffer from low contrast and brightness, blurred details and color distortion of small targets, and the scattering effect of fog particles makes it difficult to distinguish target edges from the background. Furthermore, the high coupling of spatial homogeneity and channel redundancy in foggy images leads to a significant decrease in target detection performance and accuracy. Therefore, conducting UAV target detection in foggy scenarios has significant research importance and practical value.

[0003] In recent years, with the increasing demand for computing power, deep learning-based object detection algorithms have become a major research trend. Deep learning object detection algorithms can be divided into two categories: one is single-stage detection algorithms, represented by networks such as SSD, RetinaNet, and the YOLO series, which directly regress the position and category of the target. These methods have fast inference speed and low memory consumption, but can lead to the loss of detailed information and reduced detection accuracy. The other category is two-stage object detection algorithms, represented by networks such as R-CNN, Faster R-CNN, and Mask R-CNN, which perform position regression and classification on the generated candidate boxes. These methods have high detection accuracy, but their inference speed is relatively slow and resource consumption is high, making them unsuitable for real-time detection tasks. The single-stage detection algorithm YOLO series detects targets by traversing the entire image in a single forward pass, offering better real-time performance and a smaller model size compared to other methods. However, high-accuracy target detection for UAVs is also crucial for safety and compliance with navigation rules; therefore, some researchers have improved the YOLO series to obtain methods with even higher detection accuracy. For example, Zhu et al. replaced the original YOLO detection head with a higher-resolution Transform Prediction Head and combined it with an attention mechanism, proposing the TPH-YOLOv5 small object detection network, which improved the accuracy of small object detection. Liu et al. proposed a feature fusion object detection method, which uses a parallel convolutional neural network structure to sample and fuse multi-scale feature information to improve the detection accuracy of cars and pedestrians in polarized images, but the model size increases due to multiple convolutions. Zhao et al. proposed the ITD-YOLOv8 object detection model based on YOLOv8, which effectively captures feature information of objects of different sizes.

[0004] However, in foggy conditions, images captured by drones suffer from low brightness and contrast, severe noise interference, and blurring distortion, leading to a significant drop in the performance of the aforementioned algorithms, or even their failure. Therefore, balancing computational efficiency and detection performance in foggy scenarios is crucial. Currently, common foggy target detection algorithms fall into two categories. One category employs a phased strategy of defogging first and then detecting. For example, Li et al. proposed an end-to-end target detection algorithm combining the optical scattering model-based defogging algorithm AOD-Net with Fast R-CNN, enhancing the training effect of the defogging model. Chen et al. proposed GCA-Net, a smooth dilated convolution and gated fusion subnet, which eliminates grid artifacts in the defogging subnet and improves feature fusion. Qin et al. proposed FFA-Net, a method that enhances the distinction between fog and background by introducing feature fusion attention, but its large number of parameters makes it unsuitable for drone use. In general, while these methods acquire high-quality defogging images, they suffer from the problems of requiring separate training, poor stability, and a large number of parameters. Another approach involves jointly optimizing dehazing and detection during training. For example, Singadi et al. used the dehazing algorithm PDR-Net and Fast R-CNN to jointly optimize target detection in foggy weather, effectively improving the visual quality of the dehazed image. Huang et al. proposed DSNet, a multi-task network for target detection in foggy weather, which uses two subnetworks to jointly learn image enhancement and target detection tasks, improving the overall image quality while enhancing detection performance. However, the two subnetworks share feature layers, making it difficult to achieve a balance by adjusting parameters during training.

[0005] In summary, foggy scenes result in reduced image contrast, difficulty in distinguishing foreground from background, and decreased image quality, making it difficult for traditional target detection methods to accurately identify targets. Furthermore, most existing fog-based target detection methods perform defogging and detection in separate stages, neglecting the interaction between fog and the target in the image, which does not necessarily improve the detection performance of the target detection model. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the present invention aims to propose a foggy target detection method based on dynamic dilated convolution and cross-dimensional attention, comprising: Acquire multiple video frames from a foggy day video and use these video frames as foggy day images. ; A dynamic multi-scale dilated convolution dehazing module is used for each foggy day. The process yields multiple clear feature maps after dehazing. ; By integrating scale-aware dynamic branching and cross-dimensional attention mechanism modules, the dehazed clear feature map is improved. The process is performed to obtain the target detection result image.

[0007] Optionally, a dynamic multi-scale dilated convolution dehazing module can be used for each foggy day. The process yields multiple clear feature maps after dehazing. ,include: For each input foggy image, multi-scale dilated convolution is used to process the foggy image to obtain the first convolutional feature map. F 1. Second convolution feature map F 2 and the third convolution feature map F 3; Specifically, the foggy image is subjected to three parallel dilated convolutions with different dilation rates to obtain three intermediate feature maps. These three intermediate feature maps are then passed through a nonlinear ReLU function to obtain the first convolutional feature map. F 1. Second convolution feature map F 2 and the third convolution feature map F 3; where the kernel size of the three parallel dilated convolutions with different dilation rates is 3. 3 convolutions, with receptive fields of 3 3, 5 5, 9 9, with void ratios of 1, 2, and 4 respectively; Calculate the first convolutional feature map F Weight of 1 w 1. Second convolution feature map F Weight of 2 w 2 and the third convolution feature map F Weight of 3 w 3. Specifically, regarding images of foggy weather. Global average pooling is performed to obtain the scale energy vector used to distinguish between large and small fog clusters. The weights are calculated using the Sigmoid function. w 1. Weight w 2 and weight w 3. Specifically, it is calculated using the following formula: ; in, For learnable parameters, The scaling factor. , , Set them to 0.3, 0.5, and 0.7 respectively; Through weight w 1. Weight w 2 and weight w 3 pairs of first convolutional feature maps F 1. Second convolution feature map F 2 and the third convolution feature map F 3. Weighted summation, followed by concatenation along the channel dimension, yields the fused feature map. ; Fuse feature maps conduct Relu Activation and global average pooling yield the global feature map. , will fuse feature maps With global feature map The feature maps are then stitched together, and the stitched feature maps are processed using standard 1. 1. Convolution and Sigmoid function generate gated weights , will fuse feature maps With gate weights Multiplication yields the filtered gating features. ; Select the gated features Images of foggy days By stitching the images together, a clear feature map with dehazing is obtained. This allows us to obtain clear feature maps of all foggy images after defogging.

[0008] Optionally, by fusing scale-aware dynamic branching and cross-dimensional attention mechanism modules, the dehazed clear feature map can be improved. The process yields the target detection result image, including: Clear feature map for dehazing Feature extraction is performed to obtain the P2 layer feature map. Based on the P2 layer feature map The channel branch ratio was calculated. ; According to the feature map of layer P2 Channel branch ratio For the feature map of layer P2 The channels are divided to obtain information-rich feature maps. and redundant information feature map ; Depthwise separable convolution and the sigmoid function are used to process information-rich feature maps. and redundant information feature map Processing is performed to obtain a spatial attention feature map; based on the information-enriched feature map... and redundant information feature map Generate a cross-dimensional correlation matrix , Specifically, this is expressed by the following formula: M=Softmax ; in, Represents matrix multiplication; Based on cross-dimensional correlation matrix For the feature map of layer P2 Compression is performed to obtain a spatial compression feature map. and channel compression feature map Specifically, for information-rich feature maps and redundant information feature map Compression is performed to obtain the channel vector. and redundant vectors For channel vectors and redundant vectors Matrix multiplication is used, and Softmax is applied for normalization along the channel space dimension to generate a cross-dimensional correlation matrix. Specifically, this is achieved through the following formula: ; ; Spatial compression feature map Using depthwise separable convolution, we obtain Channel compression feature map Using 1 1. Sparse convolution, resulting in ; respectively and Global average pooling is performed to obtain , , respectively , Use Sigmoid to generate weights , A simplified attention fusion strategy based on SKNet is adopted, using weights... , right and Perform fusion and output channel prior feature maps. The channel prior feature map and the spatial attention feature map are fused to obtain the target detection result map.

[0009] Optionally, based on the P2 layer feature map The channel branch ratio was calculated. : P2 layer feature map The feature maps obtained by average pooling and max pooling are concatenated using global averaging and max pooling respectively to obtain the scale vector. The Sigmoid function is used to map T to a clear, dehazed feature map. Channel branch ratio Specifically, this is achieved through the following formula: ; in, , These are learnable parameters.

[0010] The beneficial effects of adopting the above technical solution are as follows: This invention designs a 3-way parallel multi-scale dilated convolution to capture multi-scale features of near, mid, and far fog clouds. This effectively captures fog features at different distances and concentrations, improving global defogging and thus increasing target detection accuracy. To preserve detailed features of targets under near-fog coverage and completely remove distant fog, a sigmoid function is used to design scale-aware attention weights for different scales. Then, skip connections are used to stitch together multi-scale features to generate a cleared defogging image, effectively improving the defogging effect while preserving target details. Secondly, the output layer of the defogging subnet is associated with the input layer of the detection subnet, and D2-SCC is integrated into layers 3 to 5 of the backbone network's feature extraction module. The input features are divided into large and small target scales, and channels are segmented into information branches and redundant branches. A spatial-channel correlation matrix is ​​generated using the sigmoid function, simultaneously performing bidirectional weighted optimization of spatial enhancement and channel compression. Finally, depth-separable convolution and sparse 1 / 2 convolution are applied to the channel information and redundant branches, respectively. 1. Lightweight convolution is used to fuse dual-channel features to generate enhanced features, thereby improving the detection accuracy of UAVs for small targets in foggy weather. Attached Figure Description

[0011] Figure 1 This is a simplified hardware structure diagram of the UAV target detection implementation method in this embodiment of the invention; Figure 2 This is a flowchart illustrating the fog-day target detection method based on dynamic dilated convolution and cross-dimensional attention in an embodiment of the present invention. Figure 3 This is a design diagram of the Dynamic Multi-Scale Dilated Convolution (DMS-GCA) dehazing module in an embodiment of the present invention. Figure 4 This is a technical design diagram of the feature enhancement module that integrates scale-aware dynamic branching and cross-dimensional attention mechanism (D2-SCC) in an embodiment of the present invention. Figure 5 shows a comparison of the visualization results of the baseline model YOLOv8s and DSC-YOLO in different experimental environments in the embodiments of the present invention. In the figure, (a1), (a2), and (a3) ​​are the YOLOv8s detection results for scenarios 1, 2, and 3, respectively, and (b1), (b2), and (b3) are the DSC-YOLO detection results for scenarios 1, 2, and 3, respectively. Detailed Implementation

[0012] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0013] Combination Figure 1Currently, methods for target detection in drones involve using drone hardware, including a marker rotor, fuselage, and gimbal (equipped with cameras and sensors). Data is collected through hardware sensor models, which include cameras (RGB / infrared / multispectral), ranging radar, and GPS positioning modules. In the drone's onboard vision module, data exchange occurs between the drone and the ground station, allowing the transmission of images and other data. The drone and differential GPS base station can also exchange differential GPS signals. On edge computing devices, algorithms such as YOLO, SDD, Faster, and R-CNN are used for target detection.

[0014] To address the problems of existing technologies, a dual-sub-network DSC-YOLO for foggy target detection based on joint optimization is proposed. The core of the defogging sub-network is DSM-GCA, and the core of the detection sub-network is YOLOv8s with D2-SCC embedded in the backbone network. In designing DSC-YOLO, firstly, foggy UAV images are input into the front-end defogging sub-network. A three-way parallel dilated convolution is designed to capture multi-scale features of near, mid, and far fog clouds. A sigmoid function is used to design scale-aware attention weights for different scales. Then, skip connections are used to stitch together multi-scale features to generate a cleared defogging image, effectively improving the defogging effect while preserving target detail features. Secondly, the output layer of the defogging sub-network is associated with the input layer of the detection sub-network, and D2-SCC is integrated into the third to fifth layers of the backbone network's feature extraction module. The input features are divided into large and small target scales, and the channels are segmented into information branches and redundant branches. A spatial-channel correlation matrix is ​​generated using the sigmoid function, simultaneously performing bidirectional weighted optimization of spatial enhancement and channel compression. Finally, depth-separable convolute and sparse 1 are used to process the channel information and redundant branches, respectively. 1. Lightweight convolution is used to fuse dual-channel features and generate enhanced features.

[0015] This invention provides a fog-day target detection method based on dynamic dilated convolution and cross-dimensional attention, combined with... Figure 2 This may include the following steps: Step 1: Acquire multiple video frames from the foggy weather video, and use these video frames as foggy weather images to obtain multiple foggy weather images. ; To address the issue of fixed-size convolution failure caused by the coexistence of near-field, medium-field, and distant fog, and the difficulty in distinguishing foreground from background in drone-captured images in foggy conditions, a front-end module, DMS-GCA, was designed to improve the GCANet gated context aggregation module. The original standard convolution with a fixed dilation rate of 1 was replaced with a 3-way parallel dynamic multi-scale dilated convolution, which effectively captures fog features at different distances and concentrations, improving global dehazing and thus enhancing target detection accuracy. To preserve detailed features of targets under near-fog coverage and completely remove distant fog, a multi-scale perception module was designed to dynamically allocate weights across the 3-way dilated convolution, generating adaptive weights based on the scale distribution of the fog. The dehazing module was designed to serve the detection module. After dehazing by the DMS-GCA module, skip connections are used to supplement details lost during dehazing, ultimately resulting in a more accurate image. 3. Convolution outputs a clear image after dehazing, which is specifically achieved through step 2.

[0016] Step 2: Apply the dynamic multi-scale dilated convolution dehazing module to each foggy image. The process yields multiple clear feature maps after dehazing. ;in, These are batch, channel, height, and width, respectively.

[0017] For each input foggy image, multi-scale dilated convolution is used to process the foggy image to obtain the first convolutional feature map. F 1. Second convolution feature map F 2 and the third convolution feature map F 3. Specifically includes: Combination Figure 3 The foggy image is processed through three parallel dilated convolutions with different dilation rates to obtain three intermediate feature maps. These three intermediate feature maps are then processed through a nonlinear ReLU function to obtain the first convolutional feature map. F 1. Second convolution feature map F 2 and the third convolution feature map F 3. Specifically, it is expressed by the following formula: ; in, , and Both represent void ratio, and , , , Indicates the void ratio 3 3 convolutions; Among them, the kernel size of the three parallel dilated convolutions with different dilation rates is 3. 3 convolutions, with receptive fields of 3 3, 5 5, 9 9. The void ratios are 1, 2, and 4, respectively. When the void ratio is 1, it focuses on extracting the local features of small fog particles in the foreground; when the void ratio is 2, it captures the distribution features of fog clusters in the midground; and when the void ratio is 4, it captures the global features of fog over a larger area in the distance.

[0018] Among them, when The above formula calculates the first convolutional feature map. F 1. When The above formula calculates the second convolutional feature map. F 2, when The formula above calculates the third convolutional feature map. F 3.

[0019] Calculate the first convolutional feature map F Weight of 1 w 1. Second convolution feature map F Weight of 2 w 2 and the third convolution feature map F Weight of 3 w 3. Specifically includes: To adaptively generate weights based on the scale of fog, a scale-aware module is designed to dynamically allocate weights across three branches for foggy images. Global average pooling is performed to obtain the scale energy vector used to distinguish between large and small fog clusters. The weights are calculated using the Sigmoid function. w 1. Weight w 2 and weight w 3. Specifically, it is calculated using the following formula: ; in, For learnable parameters, The scaling factor. , which are the near-scale, medium-scale, and far-scale coefficients, respectively; Among them, when The weights calculated by the above formula are... w 1. When The weights calculated by the above formula are... w 2, when The weights calculated by the above formula are... w 3.

[0020] Gated Context Fusion uses upsampling and skip connections to concatenate features at different levels along the channel dimension. Specifically, it uses weights... w 1. Weight w 2 and weight w 3 pairs of first convolutional feature mapsF 1. Second convolution feature map F 2 and the third convolution feature map F 3. Weighted summation, followed by concatenation along the channel dimension, yields the fused feature map. Specifically, it is expressed by the following formula: ; Fuse feature maps conduct Relu Activation and global average pooling yield the global feature map. , will fuse feature maps With global feature map The feature maps are then stitched together, and the stitched feature maps are processed using standard 1. 1. Convolution and Sigmoid function generate gated weights The large number of channels after splicing are compressed to reduce the amount of computation and generate high-resolution output. Value is a fog characteristic, low The value is a background feature, and gating is used to efficiently distinguish fog patches from background features; Fuse feature maps With gate weights Multiplication yields the filtered gating features. Specifically, it can be expressed by the following formula: ; Filtered gating features Images of foggy days By stitching the images together and filling in the details lost during dehazing, a clear feature map with dehazed imagery is obtained. This allows us to obtain all foggy day images. Clear feature map of dehazing ; The challenge of drone target detection in foggy weather lies in the weak features of small targets, making them difficult to distinguish from the background, and the limited computing power of the platform. YOLOv8s suffers from excessive loss of detail due to the stacking of downsampling modules during the feature extraction stage, and deep features fail to accurately capture the high-level semantic information of the target, reducing the accuracy of drone detection of small targets in foggy weather. To improve the model's feature representation capability, the spatial-channel serial reconstruction logic of SCConv is improved. A D2-SCC structure integrating cross-dimensional attention and scale-aware dynamic branches is constructed, and the Conv2d layer inside the C2f module in the Backbone and the PAN-FPN convolutional layer in the Neck are replaced, specifically implemented in step 3.

[0021] Step 3: By fusing the scale-aware dynamic branch and cross-dimensional attention mechanism modules, the dehazed clear feature map is processed. The process is performed to obtain the target detection result image; Combination Figure 4The SCConv algorithm no longer uses a fixed threshold for channel segmentation; instead, it dynamically adjusts the branch ratio based on the target scale of different feature layers. Specifically, this applies to the dehazed, clear feature maps. Feature extraction is performed to obtain the P2 layer feature map. Based on the P2 layer feature map The channel branch ratio was calculated. Specifically, it includes: Specifically, the feature map of layer P2 The feature maps obtained by average pooling and max pooling are concatenated using global averaging and max pooling respectively to obtain the scale vector. , T A larger value corresponds to a larger target, and a smaller value corresponds to a smaller target. The Sigmoid function is used to map T to a clearer feature map after dehazing. Channel branch ratio Specifically, this is achieved through the following formula: ; in, , These are learnable parameters; According to the feature map of layer P2 Channel branch ratio For the feature map of layer P2 The channels are divided to obtain information-rich feature maps. and redundant information feature map ; In the specific implementation process, the proportion of channel branches Greater than or equal to 0.2 and less than or equal to 0.8, when When it approaches 0.2, When a branch is identified as having rich detail, more channels are retained for small target feature enhancement. When it approaches 0.8, Redundant information branches identified as background or large targets are compressed to suppress redundant features.

[0022] To address the low computational efficiency of SCConv serial reconstruction in UAV target detection tasks in foggy weather, depthwise separable convolution and the Sigmoid function are employed to optimize information-rich feature maps. and redundant information feature map The process is performed to obtain a spatial attention feature map. To address the issue of insufficient multi-scale adaptability, channel priors and depthwise separable convolutions are used to evaluate spatial importance and channel redundancy. Parallel cross-dimensional attention gates are designed to establish a spatial-channel redundancy correlation mapping and generate cross-dimensional attention maps.

[0023] Specifically, based on information-rich feature maps and redundant information feature map Generate a cross-dimensional correlation matrix Specifically, for information-rich feature maps... and redundant information feature map Compression yields channel vectors that reflect the importance of the channels. and the redundancy vector reflecting channel redundancy For channel vectors and redundant vectors Matrix multiplication is used, and Softmax is applied for normalization along the channel space dimension to generate a cross-dimensional correlation matrix. Specifically, it is expressed by the following formula: M=Softmax ; in, This indicates matrix multiplication. A high M value indicates that the spatial characteristics of that location are strongly correlated with channel redundancy, which is the background noise left over from foggy weather.

[0024] The spatial feature enhancement and channel redundancy feature compression are combined with a two-way weighted optimization. Features with high spatial feature M-values ​​are suppressed and small target features are enhanced. Features with high channel redundancy M-values ​​are compressed more significantly, as shown in equations (5) and (6). Input feature · Effectively suppresses noise, enhances edge features of small targets, and generates This approach compresses redundant channels in the input feature M. It allocates more computational resources to dense fog regions, simultaneously handling spatial fog distribution and channel feature importance. By using an association matrix to preserve details in information branches and efficiently compressing redundant branches, it effectively reduces the number of model parameters while improving the accuracy of small target detection.

[0025] Based on cross-dimensional correlation matrix For the feature map of layer P2 Compression is performed to obtain a spatial compression feature map. and channel compression feature map Specifically, this is achieved through the following formula: ; ; To enable its use on drones, the two channel branches mentioned above underwent differentiated lightweight design. (Update) = , .

[0026] Spatial compression feature map Using depthwise separable convolution, we obtain While maintaining the receptive field, it effectively reduces the number of model parameters and compresses the feature map of the channel. Using 1 1. Sparse convolution, resulting in To further reduce computational load and achieve lightweight model processing, respectively... and Global average pooling is performed to obtain , , respectively , Use Sigmoid to generate weights , It adopts a simplified SKNet attention fusion strategy, through weights , right and Perform fusion and output channel prior feature maps. Specifically, this is achieved through the following formula: ; The channel prior feature map and the spatial attention feature map are fused to obtain the target detection result map; Based on the above technical solution, the present invention conducted the following experiments: The experiment utilizes HazyDet, a large-scale dataset focused on drone target detection in foggy conditions, to evaluate drone target detection performance in foggy weather. The dataset contains 383,000 images, categorizing targets into eight classes: pedestrians, cars, trucks, drones, power towers, streetlights, bicycles, and motorcycles. It provides high-quality bounding box annotations and depth information, covering different fog concentrations, lighting conditions, and drone flight altitudes. It offers mixed data of real fog and synthetic fog effects, perfectly matching the difficulty level of drone target detection in foggy conditions set for this experiment. After data filtering, 25,000 images were selected, divided into 7,000 images of natural fog scenes and 18,000 images of artificially simulated fog effects. Training data was generated using an atmospheric scattering model. Images were categorized into three levels based on transmittance: low fog, medium fog, and high fog. Low fog transmittance was 0.6-0.8 (6000 composite images, 2300 real images), medium fog transmittance was 0.3-0.6 (7000 composite images, 2500 real images), and high fog transmittance was 0.1-0.3 (5000 composite images, 2200 real images). The training set consisted of 20000 images (14500 composite images, 5500 real images), and the test set consisted of 5000 images (3500 composite images, 1500 real images).

[0027] The experiment used the deep learning framework PyTorch. The server configuration was an Intel i7-12700k CPU and an NVIDIA GeForce RTX 3090 (24GB) GPU. The software environment included CUDA version 11.6, cuDNN 8.9.2, PyTorch 1.12, and Python version 3.8. GPU-accelerated model training was performed. Training parameters included a batch size of 16, an initial learning rate of 0.0001, the Adam optimizer, 100 epochs, a learning rate decay step size of 20, and a decay rate of 0.5.

[0028] Based on the above technical solution, in conducting experiments, this invention divides the HazyDet dataset, which contains the location and category information of the target object, into training, validation, and test sets in a 7:2:1 ratio. The CPU environment is set up using `conda creat-n YOLOv8s python==3.8.1`, importing PyTorch, torchvision, and cv2 libraries. The GPU environment is configured, CUDA and CUDNN are installed, a project file is created, and the original YOLOv8s model is imported from the configuration file.

[0029] The original drone image in foggy weather was input in size (256). The image (256) undergoes preprocessing including uniform size, random flipping, and pixel value normalization, followed by a 3x3 process. 3. Convolution is performed, and batch normalization is used to accelerate training. Finally, downsampling is performed to expand the receptive field and extract multi-scale degradation feature maps. Steps 2 and 3 are executed, with the batch size set to 16 and the epochs set to 100. The improved DSC-YOLO is trained, the trained model is exported, and the exported model is integrated into the UAV vision module. OpenCV is used for deployment optimization.

[0030] Next, we will conduct experimental verification: The model system selects Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity as evaluation metrics for dehazing performance. PSNR measures the pixel error between the dehazed and clear images; a higher value indicates better dehazing. Structural Similarity measures the structural consistency between the dehazed and clear images; a value closer to 1 indicates better dehazing.

[0031] The model selects average precision (mAP_0.5), recall, frame rate (FPS), number of parameters, and computational cost (FLOPs) as performance metrics for object detection. When the IoU threshold is 0.5, average precision reflects detection accuracy, and recall is the ratio of correctly detected targets to the total number of actual targets; a higher value indicates fewer missed detections. Frame rate reflects the number of images processed per second, number of parameters reflects the model's lightweight nature, and computational cost measures the number of floating-point operations per second; a lower value indicates lower computational complexity. These metrics effectively evaluate detection accuracy, false negative rate, overall performance, and lightweight nature, providing a multi-dimensional evaluation system for object detection.

[0032] (1) Comparative experiment of defogging modules To verify the effectiveness and superiority of the Dynamic Multi-Scale Dilated Convolutional (DMS-GCA) dehazing module, under the same training method and training environment, a comparative experiment was conducted on the HazyDet synthetic foggy image test set using YOLOv8s as the baseline model, as shown in Table 1.

[0033] Table 1 Comparison of different defogging methods on the HazyDet test set

[0034] As shown in Table 1, DMS-GCA outperforms other comparative models in dehazing across different fog concentration ranges in the HazyDet dataset, validating that DMS-GCA can more accurately capture the multi-scale distribution features of fog in real-world drone scenarios. Particularly in the high fog range of HazyDet (t=0.1-0.3), DMS-GCA improves PSNR and SSIM by 2.23 dB and 0.13 respectively compared to FFA-Net, and by 1.77 dB and 0.11 respectively compared to PFF-Net. This further validates that DMS-GCA effectively addresses the uneven dehazing problem caused by the intermingling of dense and thin fog in localized high fog images in the HazyDet dataset through scale-aware attention that dynamically adjusts dehazing weights. In the low fog images of the HazyDet dataset, which contain numerous small target details, DMS-GCA's gated context aggregation preserves these details. Compared to GCA-Net, DMS-GCA improves SSIM by 0.10 in low fog concentrations, providing a clearer feature base for subsequent detection.

[0035] (2) Comparative experiment of DSC-YOLO twin nets To verify the superiority of the DSC-YOLO algorithm in foggy target detection, it is compared with some representative and high-performing algorithms. The HazyDet full test set (synthetic) will be used. A total of 5000 real foggy images were used to conduct comparative experiments on DSC-YOLO and current mainstream object detection methods under the same experimental conditions, including DETR series, Faster R-CNN, various versions of YOLO algorithms, improved YOLO algorithms, and YOLO methods with dehazing networks (AOD, GridDehazeNet, GCA-Net, FFA-Net). The experimental results are shown in Table 2.

[0036] Table 2 Comparison of different models on the full HazyDet test set.

[0037] On this dataset, the DSC-YOLO algorithm achieves an mAP of 81.4% (0.5), which is 8.6% higher than the baseline YOLOv8s model and 6% higher than the two-stage best YOLOv8s+FFA-Net, validating that the proposed end-to-end object detection framework can simultaneously optimize dehazing and detection tasks. In the HazyDet dataset, small targets with pixels less than 300 pixels account for 42%. DSC-YOLO's small target detection accuracy is 3.3% higher than FFA-Net, indicating that the scale-aware dynamic branch with more channels and cross-dimensional attention to suppress residual fog noise enhance the discriminative power of small target features. The algorithm has 6.3M parameters, 1.2M fewer than the baseline model, and achieves an FPS of 30, validating that the algorithm meets the real-time detection requirements of UAVs while compressing the number of parameters. Compared with the recently proposed Transformer-based DETR and Deformable DETR, the average accuracy is improved by 2% and 1.1%, respectively. By jointly optimizing the dehazing-detection strategy, the model's adaptability to different environments is improved. Experiments further validate the superior performance of the model in foggy scenes.

[0038] (3) Ablation test To verify the effectiveness of the various improvement strategies proposed in the DSC-YOLO method, 3500 images of a foggy test set synthesized using HazyDet were compared and analyzed under the same experimental environment. B represents the baseline model YOLOv8s, with the addition of the DMS-GCA dehazing method denoted as M1, and the addition of the D2-SCC method denoted as M2.

[0039] Table 3. Impact of different modules on model performance

[0040] As shown in the table above, when only DMS-GCA is added, mAP_0.5 is improved by 4.7%, PNSR by 6.02dB, and recall by 5.6%, proving that dehazing reduces target occlusion and that the effect of dehazing directly affects the detection accuracy. When only D2-SCC is added, mAP_0.5 is improved by 2.1%, recall by 1.8%, and AP for small targets by 2.5%, while the computational cost is reduced from 16.2G to 14.5G. This shows that even without dehazing, D2-SCC can suppress the interference of fog noise through cross-dimensional attention mechanism to achieve feature enhancement, thereby improving the detection accuracy of small targets. It also shows that D2-SCC is the core of lightweight design. When the two modules work synergistically, mAP_0.5 is improved by 8.6%, far exceeding the 4.7% and 2.1% improvements when each module is added individually, respectively. Recall is improved by 10.3%, AP for small targets is improved by 9.6%, and computational cost is reduced again to 14.3G. This indicates that after dehazing with DMS-GCA, the model provides D2-SCC with low-noise features containing more details and texture information. At the same time, the dynamic branching of DMS-GCA avoids redundant computations of full-scale convolution. Overall, the improved modules achieve synergistic optimization of dehazing to reduce occlusion and enhancing feature enhancement to improve detection performance.

[0041] (4) Visualization of experiments and results analysis To further verify and analyze the detection performance of the improved DSC-YOLO algorithm under different angles, scenes, fog concentrations, and lighting conditions, three sets of real foggy drone images were used to test and evaluate its generalization ability and detection performance. Figure 5 (a1), (a2), and (a3) ​​represent the YOLOv8s detection results for scenes 1, 2, and 3, respectively, while (b1), (b2), and (b3) represent the DSC-YOLO detection results for scenes 1, 2, and 3, respectively. The DSC-YOLO detection results are the detection results of this invention. It can be seen that under conditions of low contrast and dense fog with high target density, YOLOv8s exhibits significant false negatives, especially when target occlusion is severe. The improved algorithm, by adding D2-SCC to the backbone network, enhances the correlation between spatial detail features and channel information, enabling the detection of easily missed targets around the image and reducing the false negative rate. Under daytime conditions of uniform illumination and near-vertical fog, the low distinction between white vehicles and the background due to fog interference leads to false positives in YOLOv8s. The DSC-YOLO's dynamic multi-scale defogging module, DMS-GCA, effectively removes fog patches of different scales, preserving detail features and effectively avoiding detection errors. Overall, the proposed DSC-YOLO algorithm achieved better detection results under different fog concentrations, different drone aerial shooting angles, and different scenarios.

[0042] To improve target detection accuracy for UAVs in foggy conditions, an end-to-end UAV target detection method, DSC-YOLO, integrating DMS-GCA and D2-SCC, is proposed. The DMS-GCA image dehazing network dynamically captures multi-scale fog features from UAV-acquired images through dynamic multi-scale dilated convolution and scale-aware attention. In dense fog, the PSNR reaches 19.45 dB, 1.77 dB higher than PFF-Net, improving dehazing accuracy while preserving target details. The D2-SCC feature enhancement module simultaneously enhances small target features and compresses redundant information through scale-aware dynamic branching and cross-dimensional attention mechanisms. The recall rate reaches 90.8%, 10.3% higher than the baseline model, with only 6.3M parameters, 1.2M less than the baseline model, demonstrating that the DSC-YOLO algorithm can be deployed on UAV platforms with limited computing power. On synthetic and real foggy drone datasets, DSC-YOLO achieved mAP_0.5 of 81.4% and 75.9%, respectively, which are 8.6% and 9.7% higher than YOLOv8s, respectively. The FPS remained between 29 and 30, indicating that the proposed method achieves a balance between improving detection accuracy and maintaining model lightweight.

[0043] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for foggy target detection based on dynamic dilated convolution and cross-dimensional attention, characterized in that, Includes: Obtain a plurality of video frames under the fog video, take the video frame as the fog image, obtain a plurality of fog images ; A dynamic multi-scale dilated convolution dehazing module is used to process each foggy image. The process yields multiple clear feature maps after dehazing. ; By fusing scale perception dynamic branch and cross-dimension attention mechanism module, the foggy clear feature map is obtained is processed to obtain a target detection result map.

2. The method of claim 1, wherein the method is a method of haze target detection based on dynamic dilated convolution and cross-dimensional attention. A dynamic multi-scale dilated convolution dehazing module is used to process each foggy image. The process yields multiple clear feature maps after dehazing. ,include: For each input hazy image, the hazy image is processed by multi-scale dilated convolution to obtain a first convolution feature map F 1, a second convolution feature map F 2 and a third convolution feature map F 3; specifically, the hazy image is processed by three parallel dilated convolutions with different dilated rates to obtain three intermediate feature maps, and the three intermediate feature maps are respectively processed by a nonlinear Relu function to obtain the first convolution feature map F 1, a second convolution feature map F 2 and a third convolution feature map F 3; wherein the convolution kernel size of the three parallel dilated convolutions with different dilated rates is 3 3 convolution, the receptive field is 3 respectively 3, 5 5, 9 9, the dilated rate is 1, 2 and 4 respectively; computing the first convolutional feature map F 1, weights of w 1, the second convolutional feature map F 2, weights of w 2, and the third convolutional feature map F 3, weights of w 3, specifically, for a foggy image performing global average pooling to obtain a scale energy vector for distinguishing between large and small fog clusters , the weights are calculated by a Sigmoid function w 1, the weights w 2, and the weights w 3, are specifically calculated by the following formula: ; wherein, is a learnable parameter, is a scale coefficient, , , are set to 0.3, 0.5, 0.7, respectively. Through weight w 1. Weight w 2 and weight w 3 pairs of first convolutional feature maps F 1. Second convolution feature map F 2 and the third convolution feature map F 3. Weighted summation, followed by concatenation along the channel dimension, yields the fused feature map. ; Fuse feature maps conduct Relu Activation and global average pooling yield the global feature map. , will fuse feature maps With global feature map The feature maps are then stitched together, and the stitched feature maps are processed using standard 1.

1. Convolution and Sigmoid function generate gated weights , will fuse feature maps With gate weights Multiplication yields the filtered gating features. ; Select the gated features Images of foggy days By stitching the images together, a clear feature map with dehazing is obtained. This allows us to obtain clear feature maps of all foggy images after defogging.

3. The method of claim 1, wherein the method is based on dynamic dilated convolution and cross-dimensional attention. By fusing scale perception dynamic branch and cross-dimension attention mechanism module, the defogging clear feature map is processed to obtain a target detection result map, including: To defogging clear feature map Feature extraction is performed to obtain a P2 layer feature map Based on the P2 layer feature map The channel branch ratio is calculated ; According to the feature map of layer P2 Channel branch ratio For the feature map of layer P2 The channels are divided to obtain information-rich feature maps. and redundant information feature map ; Depthwise separable convolution and the sigmoid function are used to process information-rich feature maps. and redundant information feature map Processing is performed to obtain a spatial attention feature map; based on the information-enriched feature map... and redundant information feature map Generate a cross-dimensional correlation matrix , Is expressed by the following formula: M = Softmax ; wherein denotes matrix multiplication; Based on cross-dimension correlation matrix , the P2 layer feature map is compressed to obtain a spatial compressed feature map and a channel compressed feature map , specifically, the information-rich feature map and the redundant information feature map are compressed respectively to obtain a channel vector and a redundant vector , the channel vector and the redundant vector are normalized along the channel space dimension using matrix multiplication and using Softmax to generate a cross-dimension correlation matrix , specifically through the following formula: ; ; Spatial compression feature map Using deep separable convolution, get , channel compression feature map Using 1 1 sparse convolution, get ; respectively, global average pooling and Get , , respectively , Using Sigmoid to generate weight , ; using the attention fusion strategy of simplified SKNet, through the weight , Fusion and , output channel prior feature map ; the channel prior feature map and the spatial attention feature map are fused to obtain the target detection result map.

4. The method of claim 3, wherein the method is based on dynamic dilated convolution and cross-dimensional attention. Based on the p2 layer feature map , the channel branch ratio is calculated : The P2 layer feature map is obtained by The average pooled feature map and the max-pooled feature map are spliced by global average and max double pooling respectively to obtain a scale vector T is mapped to a defogging clear feature map by a Sigmoid function The channel branch ratio of the defogging clear feature map is specifically realized by the following formula: ; wherein, , are learnable parameters.