1. Introduction
With the development of the global shipping industry, ship target detection, as a core technology for marine safety and efficiency, its accuracy and robustness are of vital importance. However, in the foggy environment at sea, the image contrast decreases, the target becomes blurred, and the noise increases due to water vapor scattering. Traditional manual feature detection methods (such as edge detection and template matching) rely on clear textures and contours, which are prone to missed detections and false detections, and are difficult to meet the requirements.
Existing solutions for water vapor scattering-induced imaging degradation can be categorized into three technical routes: active optical correction algorithms, post-processing dehazing algorithms, and neural-network-based detection methods. Active correction algorithms focus on improving imaging quality at the source; the study by Huang et al. [
1] proposed an adaptive optical scattering compensation mechanism, which dynamically adjusts the illumination intensity and optical path parameters according to real-time atmospheric scattering conditions, effectively reducing image blurriness from the source. Another representative work by Gordon et al. [
2] developed a real-time estimation method for atmospheric scattering parameters, which enhances the signal-to-noise ratio of maritime images by adaptively optimizing the sensor’s spectral response. However, active correction algorithms often rely on specialized hardware devices (such as adaptive laser illuminators and high-precision optical regulators), leading to high deployment costs and limited adaptability in complex marine environments (e.g., rough seas or extreme fog).
In recent years, deep-learning technology has become the mainstream solution for ship inspection due to its end-to-end feature learning capability. Among these, the YOLO series of algorithms have been widely applied because of their advantages in real-time performance and stability. Researchers have carried out a large amount of improvement work for the ship detection scenario; Ye Le et al. [
3] introduced a frequent-domain channel attention mechanism in YOLOv3, enhancing the feature expression ability of foggy images by strengthening the channel feature response. However, they did not consider the attenuation differences in multi-scale features in foggy weather, and small target features are easily overwhelmed by noise. Liu et al. [
4] designed a lightweight network based on YOLOv4 and combined an improved RFB structure to expand the receptive field. However, its single-scale convolutional kernel is difficult to adapt to the scale variability of ships, and its performance declines in scenarios where large ships coexist at close range and small ships at long distance. Luo Fang et al. [
5] introduced the bidirectional Feature Pyramid Network (PAN) [
6] in YOLOXs to enhance multi-scale information fusion. However, the feature weighting mechanism of PAN failed to distinguish the importance of features of different scales on foggy days, resulting in an excessively high proportion of noise in the fused features. Ma et al. [
7] proposed an adaptive multi-layer attention module to aggregate cross-layer features, which improved the detection effect of small coastal vessels. However, the attention mechanism was not optimized for the contour features of blurred targets in foggy weather, and the focusing ability for irregularly shaped vessels was insufficient.
In the aspect of single-modal detection optimization, Xiong et al. [
8] proposed an enhanced YOLOv8 with CGLGAFB and MSPP modules. However, it is not applicable to shipboard edge devices and leads to an excessively high missed detection rate for small boats in extreme foggy conditions. Similarly, Deng et al. [
9] developed YOLO-SEA based on the enhanced YOLOv8, but still struggled to balance model complexity and real-time performance. For the integration of fog removal detection, Yuan et al. [
10] proposed an improved maritime fog removal algorithm based on VQGAN, which reduced residual fog and improved image quality. However, it is only applicable to low-to-moderate foggy conditions, and the fog-removal effect significantly weakens in heavy fog. Regarding data augmentation and domain adaptation issues, Shin et al. [
11] synthesized multiple concentrations of fog images through physical models to alleviate the problem of scarce samples. However, the synthesized sea fog differs from the real sea fog in optical properties, resulting in significant domain deviation, and the dataset lacks samples of near-shore interference. Qin et al. [
12] improved RT-DETR to achieve domain alignment, but it relies on a large amount of labeled data (costly) and has limited generalization ability in extreme fog and rain mixed weather conditions. For the re-identification of ships in foggy conditions, Dong et al. [
13] proposed a dual-feature fusion network with an embedded fog-removal branch. However, this network has poor adaptability to sudden changes in fog concentration, is only applicable to short-to-medium-range recognition, and has weak robustness in long-range recognition.
In addition, existing improvement methods based on the attention mechanism (such as the channel attention pyramid of ECAP-YOLO [
14], the efficient channel attention of ECA [
15], the hybrid attention mechanism of TCS-YOLO [
16], and the Transformer [
17] architecture) can enhance feature discrimination. However, there are common flaws in foggy weather scenarios. First, the feature fusion structure (such as traditional FPN [
18]/PAN) has weak transmission ability for foggy weather attenuation features, and it is difficult for high-level semantic features and low-level detail features to complement each other effectively. Second, the attention mechanism mostly adopts fixed convolution kernels, which cannot dynamically adapt to the blurred contours and deformed forms of ships in foggy weather. Thirdly, bounding box regression losses (such as IoU, CIoU [
19], and SIoU [
20]) have insufficient positioning constraints on small targets in dense ship scenarios, resulting in a relatively high rate of missed detections. These problems make the existing methods still face the challenges of low detection accuracy and insufficient robustness in scenarios with low visibility in foggy days, large differences in ship scales, and complex backgrounds.
To address these issues—insufficient modeling of multi-scale feature attenuation, poor robustness of feature fusion, limited adaptability of the attention mechanism, and inadequate constraints on small target positioning—we propose the DBL-YOLO detection framework with targeted optimization for foggy maritime scenarios. The main contributions of this paper are summarized as follows: (1) A C3k2-MDSC module is designed, which integrates multi-scale depthwise separable convolution and dynamic weight allocation mechanism to adaptively extract multi-scale ship features in foggy environments and alleviate small target feature attenuation. (2) A lightweight BiFPN [
21] structure is introduced, combining dynamic weighted fusion and redundant node pruning to enhance the anti-attenuation transmission efficiency of cross-scale features. (3) A Deformable-LKA attention mechanism is innovatively fused, which combines the advantages of large receptive field and spatial adaptive adjustment to accurately focus on the key contour features of blurred ships. (4) An Inner-SIoU regression loss function is proposed, which optimizes the positioning accuracy of dense and small targets through an auxiliary bounding box dynamic scaling strategy, reducing positioning errors. Experiments show that DBL-YOLO performs better than existing methods on the SeaShips [
22] dataset and has significant advantages in detection accuracy and stability.
The rest of this paper is organized as follows:
Section 2 details the overall structure of the DBL-YOLO model and the design principles of each core module.
Section 3 describes the experimental environment, dataset configuration, and conducts ablation experiments, comparative experiments, visualization analysis, and generalization experiments to verify the effectiveness of the proposed method.
Section 4 summarizes the research work of this paper and discusses future research directions.
2. The Proposed Method
2.1. Overall Structure of the Model
Aiming at the problems of large-scale difference in ships, complex background and occlusion in foggy weather environment, the DBL-YOLO detection method is proposed. The structure of the DBL-YOLO model is shown in
Figure 1. The input module performs preprocessing and data augmentation on the image; the backbone network is responsible for extracting image features and providing multi-scale feature representations. The neck network enhances the multi-scale target detection capability through feature fusion to predict the category, bounding box and confidence level of the final output target of the network.
The specific execution steps of DBL-YOLO are as follows, and each step corresponds to the core link in the flowchart:
For 640 × 640 foggy ship images, a multi-fog concentration scene is simulated based on monocular depth estimation [
23] and atmospheric scattering models. Data augmentation strategies such as Mosaic [
24], random flipping, and brightness adjustment are combined, and the feature distribution is unified through standardization.
The backbone network adopts the C3k2-MDSC module, extracting features in parallel through 1 × 1/3 × 3/5 × 5 multi-scale depth-separable convolution, and balancing the contribution of foggy features (enhancing the local features of small targets) with dynamic weight distribution to achieve robust fusion.
Cross-scale fusion is accomplished through BiFPN. The high-level features are upsampled from top to bottom and then fused with the middle- and low-level features, with dynamic weighting to highlight the edge features. From the bottom up, the low-level features after fusion are downsampled and secondary fused with the middle- and high-level ones. Redundant nodes are deleted for noise reduction. After each layer of fusion, the enhanced features are output through depth-separable convolution and batch normalization.
The fused features are processed by the detection head; the fused features are compressed to 256 channels, and the convolution kernels are dynamically adjusted based on the blurriness through the Deformable-LKA attention mechanism to focus on the blurred contour of the ship. The target response is enhanced by combining channel and spatial attention, and the category, bounding box and confidence level are output.
Multi-task loss function optimization is adopted; the classification loss uses the cross-entropy function, and the location loss uses the improved Inner-SIoU. Inner-SIoU dynamically adjusts the auxiliary border scaling factor based on the ship size, expands the regression range for small targets, and accelerates convergence for large targets.
The parameters are updated through the backpropagation of the SGD optimizer and iterated for 200 epochs until the loss converges.
2.2. Improved C3k2 Module: Adaptive Extraction of Multi-Scale Features in Foggy Environments
One of the core challenges in foggy environments is the difference in feature attenuation among targets of different scales; the detailed features of small targets (such as long-distance fishing boats) are easily masked by noise, and the global semantic features of large targets (such as close-range cargo ships) lose contour information due to blurring. Traditional fixed convolution kernels (such as a single 3 × 3 convolution) cannot simultaneously meet the extraction requirements of both types of features. The C3k2-MDSC module, through the design of “multi-scale depth-separable convolution + dynamic weight distribution”, theoretically achieves precise capture of foggy weather features. MDSC is introduced and applied to the C3k2 module, resulting in the improved C3k2-MDSC module, as shown in
Figure 2.
In target detection and image classification, efficient extraction of multi-scale features is key to improving performance. Traditional standard convolution requires channel-wise operations, and its computational complexity increases significantly with the growth of the number of channels and the size of convolution kernels. Moreover, it mostly adopts fixed-size convolution kernels (e.g., 3 × 3, 5 × 5), and single-scale operations struggle to fully capture the features of targets with diverse scales.
Innovative Design: A multi-scale depthwise separable convolution fusion module (MDSC) is proposed, as shown in
Figure 3. This module is embedded into the C3k2 module to form the C3k2-MDSC. Compared with existing multi-scale convolution modules, its innovations are as follows:
Depthwise Separable Convolution structure [
26]: By combining Depthwise Convolution and Pointwise Convolution, it effectively reduces the number of network parameters and computational overhead, thereby improving computational efficiency.
Dynamic scale weight mechanism: Aiming at the difference in feature attenuation in foggy environments, adaptive weights are introduced through 1 × 1 convolution to balance the contributions of 1 × 1 (detail), 3 × 3 (local texture), and 5 × 5 (global semantic) convolutions. This significantly enhances the network’s ability to perceive and express targets of different scales, and solves the problem that small-target features are masked by noise.
Finally, the C3k2-MDSC module achieves a more robust feature representation by fusing the aforementioned features of different scales.
2.3. Fusing Bidirectional Feature Pyramid Network: Anti-Attenuation Transmission of Cross-Scale Features
In foggy weather environments, traditional feature fusion structures (such as FPN/PAN) have two major problems: First, the cross-scale feature transmission attenuation is severe (after multiple upsampling of high-level semantic features, the foggy noise is amplified and is difficult to complement the low-level detailed features); the second issue is the imbalance of feature fusion weights (using element addition or concatenation without distinguishing the importance of features of different scales on foggy days, resulting in an excessively high proportion of noise in the fused features). The lightweight BiFPN structure introduced by DBL-YOLO theoretically achieves anti-attenuation cross-scale feature transmission through “dynamic weighted fusion + redundant node pruning”.
Innovative design: Introduces a lightweight BiFPN structure and optimizes it for foggy environments:
Dynamic weighted fusion mechanism: Aiming at the problem of high blurriness of high-level features in foggy conditions, the ReLu activation function is used to dynamically adjust the weights of features at different scales, enhancing the correction effect of low-level clear edge features on high-level semantic features.
Redundant node pruning: Remove single-input nodes to reduce the propagation path of foggy noise, solving the problem of unbalanced feature fusion in foggy scenarios with the PAN structure.
As shown in
Figure 4b, the BiFPN structure is an improvement based on the traditional FPN. It removes low-contribution single-input nodes, simplifies the structure and reduces the number of parameters, while balancing accuracy and efficiency. It realizes deep fusion of multi-scale features through bidirectional paths, enhances expression ability, and has higher accuracy advantages compared with the PAN structure.
By introducing dynamic weighting, BiFPN performs weighted fusion on feature maps of different scales. This enables the algorithm to learn the importance of features at each scale for specific tasks and assign corresponding weights to the detection task. Taking the 6th layer as an example, it is specifically expressed as
In the formula, wi represents the non-negative weight (activated by ReLU), where P6td/P6in/P6out denote the fusion layer, input layer, and output layer, respectively; “Conv” stands for depthwise separable convolution (including batch normalization), “Resize” refers to the sampling operation, and ε is a regularization term to avoid numerical instability. The weighted fusion strategy of BiFPN effectively improves the information entropy of fused features and enhances the model’s detection performance for multi-scale targets.
The weight initialization of BiFPN adopts the Kaiming method, which avoids deviations in fusion weights and ensures a reasonable initial distribution to accelerate convergence. During training, the weight parameters of BiFPN are included in the update list of optimizers such as SGD or Adam. These parameters are dynamically adjusted through backpropagation based on the gradient of the loss function, enabling the network to autonomously learn the optimal weight allocation for multi-scale features in foggy scenarios and improve the fusion effect. When using SGD, the learning rate is set to 1 × 10−3 and the momentum to 0.937. The weight update amount is calculated based on gradients in each batch to achieve dynamic optimization, thereby enhancing the multi-scale feature fusion capability for ships in foggy environments.
2.4. Deformable-LKA (Flexible Large Kernel Attention): Blurring Target Feature Focus
Aiming at the problem of insufficient feature extraction ability of YOLOv11 in foggy and blurred images—foggy scattering leads to low contrast between the target and the background and blurred edges, and traditional methods have difficulty distinguishing the target from the background—this paper introduces a Deformable large-kernel attention mechanism (Deformable-LKA) [
27] in the medium target detection layer. This mechanism integrates the wide receptive field of large-sized convolution kernels with the spatial flexibility of deformable convolution. By dynamically adjusting the position and shape of the convolution kernels to adapt to complex visual features, it enhances the ability to capture ships with variable scales and irregular shapes, and improves the detection accuracy in complex environments.
Innovative Design: The Deformable-LKA attention mechanism has been improved. The innovative optimizations for foggy weather scenarios are as follows:
Dual-channel attention fusion: By combining channel attention (suppressing background noise) and spatial attention (focusing on the ship area), it addresses the issue of scattered attention in traditional LKA under complex backgrounds.
Network structure process: After the input image is compressed in dimensions by the convolutional layer, the deep features are extracted by the four-stage MaxViT [
28] encoder. After downsampling, it is sent to the D-LKA layer, and the adaptive ability is enhanced through two dynamic convolution kernel adjustments at each stage. The resolution is enhanced and the dimension is reduced through the patch expansion layer, and the final result is output by the linear mapping layer. The structure is shown in
Figure 5. Its specific definition is as follows:
In the formula, xin represents the input feature map; LN is layer normalization, used to stabilize the feature distribution; D-LKA-Attn is deformable LKA attention; x1 is the intermediate feature after attention enhancement; xout is the output feature of the Deformable-LKA module; MLP is a multi-layer perceptron module. Convd stands for deep convolution. Conv1 is a linear layer; GeLU is the activation function.
In the DBL-YOLO model, the Deformable-LKA attention mechanism was lightweight deployed for the real-time requirements of the ship detection head and the foggy feature extraction scenario. The specific strategies are as follows: Deformable-LKA adopts a phased dynamic adjustment strategy in the detection head; it only performs two dynamic convolution kernel deformation adjustments at the critical stage when features enter the detection head (such as before the generation of target candidate boxes), rather than continuous adjustments throughout the entire chain. By limiting the frequency of dynamic adjustment, dynamic deformation is enabled for local areas with high fog concentration (judged by simple brightness/contrast thresholds), and a fixed convolution kernel is used for clear areas, ensuring adaptability to complex scenes while reducing invalid computations.
2.5. Inner-SIoU Loss Function
Border regression loss is used to measure the positioning error between the predicted box and the real box. SIoU introduced angle loss in bounding box regression to comprehensively model the angle relationship between anchor boxes and real boxes, thereby enhancing positioning accuracy. This loss function consists of four key components: shape loss, distance loss, angle loss and IoU loss, which are defined as follows:
Cw and
Ch are, respectively, the length and width of the rectangle formed by the coordinates of the center points of the real box and the predicted box;
ρ represents the Euclidean distance between the center point of the prediction box (
bcx,
bcy) and the center point of the true box (
bgtcx,
bgtcy).
γ is the shape loss weight factor. Shape loss Ω mainly describes the shape difference between the GT Box and the Anchor Box. The shape cost is calculated as follows:
θ is the degree of concern for shape loss, with a range of [2,6]. wh represents the width and height of the prediction box; wgt and hgt represent the width and height of the real frame, respectively.
The angle loss Λ represents the minimum Angle between the center point of the GT Box and the connection of the Anchor Box. The angle loss (angle cost) ∧ is calculated as follows:
Here, (bcx, bcy), (bgtcx, bgtcy) are the center point coordinates of the prediction box and the real box, respectively.
However, although SIoU performs well in enhancing detection performance, in complex scenarios with a high density of ships and significant scale differences, SIoU is prone to causing small targets to be missed. To this end, this paper proposes an improved loss function—Inner-SIoU—that combines the advantages of Inner-IoU [
29] and SIoU.
Innovative Design: The Inner-SIoU loss function is proposed. Its core innovation lies in:
Dynamic scale factor strategy: in response to the scale differences in ships, the auxiliary border scaling factor is adaptively adjusted according to the target size (for small targets, a scaling of 1.2–1.5 times is used to expand the regression range, and for large targets, a scaling of 0.5–0.8 times is used to accelerate convergence).
Integrates Angle loss and scale constraints: Retains the Angle loss advantage of SIoU, and at the same time enhances the positioning constraints for small targets in dense scenes through the auxiliary border mechanism of Inner-IoU, solving the problem of large positioning deviation of traditional loss functions in foggy dense scenes.
Inner-IoU adjusts the auxiliary bounding box by introducing a scale scaling factor (ratio), thereby achieving more refined error constraints and significantly improving the regression performance of the model in dense small object detection. Its principle is shown in
Figure 6.
The Inner-iou formula is defined as follows:
The variable “
rratio” is the scale factor, with a value range of [0.5,1.5]. When the “
rratio” is less than 1, the size of the auxiliary border is smaller than that of the original target border. At this point, the absolute value of the IoU gradient of the auxiliary border is greater than that of the original target border, which helps to accelerate the convergence of high IoU samples. When the “
rratio” is greater than 1, the size of the auxiliary border is larger than that of the original target border. At this point, the introduction of auxiliary borders expands the effective range of regression, providing more space for the regression of low IoU samples.
bgtl and
bgtr are, respectively, the horizontal coordinates of the left and right boundaries of the auxiliary bounding box,
bgtb and
bgtt are, respectively, the vertical coordinates of the upper and lower boundaries of the auxiliary bounding box,
bl and
br are, respectively, the horizontal coordinates of the left and right boundaries of the auxiliary anchor box, and
bb and
bt are, respectively, the vertical coordinates of the upper and lower boundaries of the auxiliary anchor box.
GIOUF is the intersection and union ratio of Inner-IoU;
Finner is the intersection area of the auxiliary bounding box and the auxiliary anchor box.
Hunion is the merged area of the auxiliary bounding box and the auxiliary anchor box. In summary, the inner-siou loss function formula is defined as follows:
3. Experimental Study
3.1. Datasets and Experimental Environment
The experiment adopted the SeaShips dataset from the State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing of Wuhan University, which contains 7000 images captured by surveillance cameras and covers six types of ships: ore carriers, bulk carriers, general cargo ships, container ships, fishing vessels and passenger ships. The dataset is divided into a training set, a validation set and a test set in a 7:2:1 ratio. Depth maps are generated through monocular depth estimation and fog processing is applied accordingly to simulate real foggy ship scenarios.
3.1.1. System Calibration Process
To ensure the reliability and reproducibility of experimental results, a multi-dimensional system calibration process was carried out before formal model training and evaluation, with detailed steps as follows:
Fog concentration simulation calibration: Based on the atmospheric scattering model I(x) = J(x)t(x) + A(1 − t(x)) (where I(x) is the foggy image, J(x) is the clear image, t(x) is the transmittance, and A is the atmospheric light), real foggy maritime images (collected from coastal monitoring stations) were used to calibrate key parameters. The transmittance t(x) was calibrated through pixel-level contrast analysis, and the atmospheric light A was determined by the top 0.1% brightest pixels in the sky region, ensuring that the simulated fog concentration (light/moderate/heavy fog) matches the optical properties of real sea fog.
Image preprocessing calibration: The normalization parameters (mean = [0.485, 0.456, 0.406], std = [0.229, 0.224, 0.225]) were calibrated using the training set of the SeaShips dataset to unify the feature distribution; the Mosaic data augmentation parameters (tile size, mixing ratio) were calibrated through preliminary experiments, ensuring that the fused image retains the complete contour of the ship target without excessive distortion.
- 2.
Model Parameter Calibration
Anchor box adaptive calibration: Based on the statistical distribution of ship target sizes in the SeaShips dataset (small targets: <32 × 32 pixels, medium targets: 32 × 32–96 × 96 pixels, large targets: >96 × 96 pixels), the initial anchor boxes of YOLOv11 were recalibrated using the k-means clustering algorithm (k = 9). The calibrated anchor box sizes are [10 × 13, 16 × 30, 33 × 23, 30 × 61, 62 × 45, 59 × 119, 116 × 90, 156 × 198, 373 × 326], which better match the ship scale characteristics in foggy scenes.
Optimizer parameter calibration: The initial learning rate (lr0) was calibrated through a grid search in the range [1 × 10−4, 1 × 10−2], with the validation set mAP@0.5 as the evaluation index. The optimal lr0 = 1 × 10−3 was determined; the momentum (0.937) and weight decay (5 × 10−4) were calibrated by comparing the convergence speed and overfitting degree of different parameter combinations, ensuring that the model converges stably within 200 epochs.
- 3.
Evaluation Index Calibration
IoU threshold calibration: To align with mainstream ship detection research, the IoU threshold for mAP@0.5 was calibrated to 0.5, and the step size of mAP@0.5:0.95 was set to 0.05, which was verified by cross-validation on the validation set to ensure that the evaluation results can reflect the positioning accuracy and robustness of the model comprehensively.
Metric calculation calibration: The calculation scripts of precision (P), recall (R), and mAP were calibrated using the standard annotation format of the SeaShips dataset and verified with the official evaluation tool of the dataset to ensure that the calculation results are consistent with the standard metrics (error rate < 0.5%).
The experiment adopts precision (
P), recall (
R) and mean average precision (
mAP) as evaluation indicators; precision reflects the accuracy of prediction (false detection rate), and recall measures the completeness of detection (missed detection rate). mAP@0.5 is the average accuracy of all categories when the IoU threshold is 0.5, mAP@0.5:0.95 is the average accuracy in the range of IoU threshold 0.5–0.95 (step size 0.05), and the higher the mAP@0.5, the better the detection performance. The calculation formulas for the above indicators are as follows:
Here, P represents the accuracy rate, R represents the recall rate, TP represents the number of cases correctly classified as positive, FN represents the number of cases wrongly classified as negative, FP represents the number of cases wrongly classified as positive, and n represents the total number of each category.
The operating system of this experiment is Windows 11, equipped with NVIDIA GeForce GTX4060Ti graphics card (NVIDIA Corporation, Santa Clara, CA, USA), the development language is Python 3.9, and the deep learning framework uses Pytorch 2.0.1. The experimental parameter configuration is shown in
Table 1.
3.1.2. Quantitative Evaluation of Measurement Errors and Noise
To enhance the robustness of the research results, this paper conducts a systematic quantitative evaluation of the core error sources in foggy ship detection scenarios (data simulation noise, image acquisition noise, model prediction and localization errors) and calculates the confidence intervals of key indicators. Details are as follows:
Fog concentration simulation noise evaluation: Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) are used to quantify the deviation between the fog simulation process and real foggy images, assessing the simulation noise level. For light, moderate, and heavy fog concentrations, 100 images are randomly selected to calculate statistics, with results shown in
Table 2:
Image acquisition noise evaluation: Images in the SeaShips dataset are captured by surveillance cameras, with slight sensor noise (e.g., Gaussian noise, salt-and-pepper noise). The noise intensity is quantified by calculating the standard deviation (σ) of image grayscale values. The statistical result is σ = 3.2 ± 0.8 (pixel value range 0–255), belonging to low-intensity noise. The interference to target features accounts for <5% (verified by feature consistency before and after noise filtering).
- 2.
Confidence Interval Analysis of Key Indicators
Based on the results of 10 independent repeated experiments (training/validation/test sets are randomly split each time, maintaining a 7:2:1 ratio), the 95% confidence interval (t-distribution, degrees of freedom df = 9) is used to calculate the confidence intervals of core performance indicators, quantifying the statistical robustness of the results. Results are shown in
Table 3:
Supplementary Explanation: The data-level error evaluation focuses on the two most influential noise sources for foggy ship detection (simulation and acquisition), ensuring targeted analysis without redundant content.The 95% confidence interval of key indicators is derived from repeated experiments, which objectively reflects the statistical stability of the model’s performance, avoiding over-reliance on a single experimental result.
3.2. Ablation Comparison of Different Modules
To further verify the improvement effect of each module of the network on the model performance, this paper designs a module ablation experiment. The specific experimental configuration is shown in the table below. Module A represents the improvement of the C3k2-MDSC module, Module B represents the adoption of the weighted Bidirectional Feature Pyramid Network (BiFPN), Module C represents the introduction of the Deformable large kernel attention mechanism (Deformable LKA), and Module D represents the improvement of the loss function to the Inner-SIoU.
As can be seen from
Table 4, the introduction of each module (A, B, C, D) has significantly improved the model performance. The C2F-MDSC module was used to replace the original C2f module in the backbone network. The recall rate increased by 1.4%, mAP@0.5 reached 97.6%, and the precision rate slightly decreased. The increase in recall rate and the decrease in precision indicated that the ship classification and recognition ability slightly decreased, verifying the effectiveness of multi-scale feature adaptive extraction. After adding the BiFPN module, the recall rate and mAP@0.5:0.95 increased by 1.6% and 1.5%, respectively. The former indicates that the model has reduced the target missed detection rate, while the latter demonstrates a significant improvement in the model’s target positioning accuracy, proving the value of cross-scale anti-attenuation transfer. After the DLKA attention mechanism was added, mAP@0.5 improved by 1.1%, demonstrating the ability to focus on fuzzy targets; the Inner-SIoU loss function further optimizes the regression quality of the bounding box, refines the target matching, and mAP@0.5 improves by 1.4%, verifying the localization optimization effect.
Experiments show that through lightweight strategies such as depth-separable convolution and node pruning, although the number of parameters increases after introducing each module, the model performance of DBL-YOLO has been significantly improved. The number of parameters and the amount of computation are still within a relatively reasonable range and will not introduce excessive computational burden. The experiment verified the regulatory effect of convolution kernel configuration and node pruning on efficiency, proving that the model achieved an effective balance between accuracy and real-time performance, and is suitable for real-time monitoring scenarios of ships at sea in foggy weather.
3.3. Comparison of Different Attention Mechanisms
To verify the effectiveness of the attention mechanism proposed in this paper, YOLOv11 is taken as the baseline. The experiment compared CAA (Context Anchor Attention) [
30], CBAM (Convolutional Block Attention Module) [
31], ECA (Efficient Channel Attention) [
15], EMA (Efficient Multi-Scale Attention) [
32], and MLCA (Mixed Local Channel Attention) [
33] Five typical attention mechanisms. The specific experimental results are shown in
Table 5.
As can be seen from
Table 5, the performance of each model has been significantly improved after the introduction of the attention mechanism, indicating that the attention mechanism has a positive effect on the object detection task. Compared with the single-space or channel attention mechanism, the attention method of large-scale global perception and local position adaptive sampling performs better, among which DLKA performs the best and the mAP@0.5 index also reaches 98.2%. This indicates that DLKA enhances the model’s adaptability to object detection in complex scenes by fusing the wide receptive field of large-sized convolution kernels with the spatial perception flexibility of deformable convolution.
3.4. Comparison Experiments of Different Methods
To further evaluate the detection performance of the proposed model, in this paper, the proposed DBL-YOLO is compared and analyzed with mainstream detection models such as YOLOv5 [
34], YOLOv7 [
35], YOLOv8 [
36], YOLOv9 [
37], YOLOv10 [
38], YOLOv11 and IRS-YOLO [
39] on the SeaShip dataset (7000 images). The results are shown in
Table 6. The experimental results show that the DBL-YOLO model outperforms other detection algorithms in all evaluation indicators, demonstrating superior accuracy and comprehensive performance advantages.
Table 7 presents a comparison of the detection accuracy of the DBL-YOLO model with YOLOv11 and several other YOLO series models on six types of ship targets. The experimental results show that the DBL-YOLO model has improved to varying degrees in the detection accuracy of six types of ships, demonstrating better target detection performance.
As can be seen from
Table 5, the indicators of the proposed model are all higher than or close to those of other object detection models. For the “passenger ship” category with a smaller sample size, the mAP@0.5:0.95% metric of the model reached the highest 76.7%, and the feature learning of the model was significantly enhanced. Although there are a large number of “fishing ship” categories, due to the variety of fishing vessel types in this category and the generally small targets of such vessels, the feature distribution is rather complex and the detection difficulty increases. mAP@0.5:0.95% index is generally low, but the index of the proposed model reaches the highest 75.8%. Visible models can make full use of feature information. In conclusion, the proposed model has good detection performance for different types of ships.
To verify the generalizability of the proposed DBL-YOLO beyond foggy scenarios, additional tests were conducted on the clear-image subset of the SeaShips dataset (accounting for 30% of the total dataset, with visibility ≥ 10 km). The results show that DBL-YOLO achieves an mAP@0.5 of 98.8% (slightly higher than YOLOv11’s 98.5% on the same subset) and an mAP@0.5:0.95 of 81.3% (consistent with YOLOv11’s 81.1% on clear images). This confirms that the fog-targeted optimization modules (C3k2-MDSC, BiFPN, Deformable-LKA, and Inner-SIoU) do not compromise performance under good visibility conditions; instead, the multi-scale feature refinement and attention mechanism enhance the model’s adaptability to normal maritime scenarios.
3.5. Visualization Result
To visually demonstrate the improvement in the detection performance of the DBL-YOLO model, this paper selects several typical scenarios from
Figure 7 for comparative analysis and uniformly sets the confidence threshold of YOLOv11 and DBL-YOLO to 0.25 for verification.
Figure 7 shows the detection results of small-scale targets, multiple targets, occlusion, and complex scenarios from top to bottom. The content on the left represents the original model of YOLOv11, and the content on the right represents the improved model. From the detection results, it can be seen that compared with the original YOLOv11 algorithm, DBL-YOLO has significantly higher accuracy in long-distance ship target detection, multi-target detection, and target localization in complex environments.
Typical scene experiments have verified the significant advantages of DBL-YOLO. As shown in
Figure 7, in scenario (1), it enhanced the detection confidence of distant small vessels, confirming the effectiveness of model optimization; in the multi-object detection of scenario (2), the detection confidence of the ore carrier increased from 0.82 of YOLOv11 to 0.85; in scenario (3), when the bulk carrier was occluded, the matching degree between the predicted box and the real box was higher, improving the detection accuracy of both types of vessels; in complex scenarios such as small targets, multi-targets, and occlusion, the feature perception and location classification accuracy of scenario (4) were superior to YOLOv11. The comprehensive results indicate that DBL-YOLO performs exceptionally well in the detection of ships at sea under foggy conditions.
To explore the improvement effect of DBL-YOLO, the experiment conducted a heat map visualization analysis on three perspective scenarios, as shown in
Figure 8. In the left column of multi-type ship scenarios, the heat map focused on the core features of different types of ships, confirming that multi-scale extraction and attention mechanisms achieve differentiated feature learning; in the scenario where the middle column of targets is incomplete, the model still maintains a high-intensity response to the local missing features caused by occlusion or fog blurring, verifying the robustness of cross-scale fusion for incomplete targets. In the right column of small targets and complex background scenes, the thermal response of long-distance small ships (<64 × 64 pixels) is significantly higher than that of fog noise, and the response is concentrated in the real bounding box, proving that the model can enhance the feature extraction of small targets while suppressing noise.
3.6. Generalization Experiment
To verify the generalization ability of the algorithm, this paper conducts experimental analysis again on the public dataset McShip-lite [
40], and the comparison objects are mainly the improved models and baseline models of the YOLO series. The final training results are shown in
Table 8.
The experimental results on the McShip-lite dataset show that the DBL-YOLO model exhibits outstanding detection performance among the (S-order) YOLO series models. Compared with the two-stage detection framework Faster R-CNN, the mAP@0.5 index of this model has achieved a significant improvement of 7.41%; compared with the baseline algorithm (YOLOv11), the mAP@0.5 index has improved by 2%. For the civilian ship target with significant variations in sample size and morphology, the model detection accuracy was improved by 2.8%, fully verifying the effectiveness and rationality of the technical route in this study. The above results confirm that the DBL-YOLO method proposed in this paper can effectively deal with the detection tasks of civilian and military ships in the McShips dataset and significantly enhance the generalization ability of the model in cross-scene target detection.