Lightweight detection network based on bidirectional weighted feature fusion with small target enhancement for USVs Authors: Yong Li, Dehang Lian, Jialong Du, Chunning Bu, Dongxu Gao Published: 2026 ABSTRACT AbstractWater surface floating waste collection using uncrewed surface vehicles (USVs) is essential for combating pollution caused by floating waste. However, the unique challenges of water surface images collected by vision sensors, such as small object sizes, wave disturbances, light reflections, and shoreline shadows, significantly reduce the effectiveness of existing object detection methods for identifying floating objects. In light of the above issues, we propose a novel network named SEBR-YOLOv8n. This method adopts an RT-DETR decoder based on Transformer architecture, combined with our proposed bidirectional weighted feature pyramid SE-BiFPN with small target enhancement, to significantly improve the detection performance of small objects from the USV perspective by enhancing the network’s information fusion capability. In addition, the Inner-SIoU was introduced to the network to accelerate bounding box regression and enhance the object detection capabilities. Experimental results show that SEBR-YOLOv8n (the model size is 5.0 M) can achieve the of 91.2% and the of 49.9% on the FloW-Img dataset, representing improvements of 6.2% in and 4.2% in compared to YOLOv8n. Furthermore, on Floating Waste-I dataset, the can reach 92.4% and the can reach 50.1%, validating the generalization of SEBR-YOLOv8n. We also use Image-enhancement projects to synthesize samples and further validate the performance of the algorithm. The and of SEBR-YOLOv8n on the dataset containing synthetic samples reached 95.5% and 58.2%, respectively. The results show that SEBR-YOLOv8n can achieve high-precision detection of floating objects on the water surface while maintaining a lightweight structure.Keywords: Object detection, Small objects, BiFPN, Loss function, Attention mechanismSubject terms: Engineering, Environmental sciences, Mathematics and computing Introduction Floating garbage pollution in water bodies is a global crisis that demands immediate attention. In recent years, visual sensor technology has been widely applied in the detection and recognition of floating objects on water surfaces1. The perception of floating debris using visual sensors primarily involves data acquisition, feature extraction, and obstacle detection. High-resolution cameras are used to capture real-time images of the water surface, followed by the application of image processing and deep learning algorithms to classify and locate the debris. The data obtained from these sensors can be used not only for real-time monitoring and tracking of floating objects but also to provide decision support for cleanup operations, thereby improving cleaning efficiency and reducing environmental pollution2,3. Currently, manual cleaning is the main way to control floating garbage pollution in inland waters. However, this method relies on professional personnel to drive the ship to clean up the garbage at regular intervals, which results in a large workload and low efficiency. Additionally, it incurs high labor costs and presents safety hazards for operators. In recent years, uncrewed surface vehicles (USVs) have begun to appear in the public eye. USV is adaptable to various inland waters and offers higher efficiency, better safety, and lower costs. It is set to become a key method for cleaning up floating debris in inland waters in the future4. The object perception capability of a USV, encompassing the identification, detection, and understanding of objects in its surroundings, forms the cornerstone of its perception module. Consequently, investigating high-precision surface object perception algorithms is crucial. Contemporary object detection algorithms are predominantly based on deep learning and can be categorized into two main types: two-stage and one-stage detectors. Two-stage detectors5–9. Most of these methods face problems such as complex training processes, slow detection speeds, and difficulties in optimization10,11. At present, the YOLO series uses a single neural network for forward inference, while generating the coordinates of predicted boxes and classification results, which can greatly improve detection speed. The effectiveness of Transformer models in the visual field is increasingly improving12,13, which has opened up new avenues for object detection research. However, due to the low viewing angle of floating objects, the motion of unmanned ships, and complex environments, the water surface images captured by visual sensors installed on unmanned ships still pose many challenges for detecting floating objects. By analyzing the images and existing research14, we have summarized the main factors and challenges affecting water surface floating object detection: 1). Water surface fluctuations and light variations. 2). Background interferences. 3). Low contrast and pixel information of small objects 4). Complex lighting and variable viewing angles. The aforementioned challenges are not isolated but interwoven, creating a compounded difficulty for robust detection. Firstly, water surface fluctuations not only cause blur but also create dynamic, non-rigid textures (waves, ripples) that can be mistaken for small, moving targets or, conversely, occlude real targets. This demands a detector with strong capabilities in dynamic feature disentanglement and stability. Secondly, the issue of background interference (e.g., floating leaves, foam, sun glints) is exacerbated by the low perspective of USVs, which increases the clutter in the field of view. Traditional methods relying solely on appearance similarity struggle here, suggesting the need for mechanisms that can prioritize semantically relevant features over spurious visual similarities. Recent work in related domains, such as combining background subtraction with deep learning for initial motion cue generation, highlights the value of leveraging motion or contextual priors to suppress static background clutter. Thirdly, the core challenge of small objects with low contrast and limited pixels leads to feature dilution in deep networks; as spatial resolution decreases through pooling and striding, the already-weak semantic signals from small objects can vanish entirely before reaching the detection head. This necessitates dedicated architectural designs to preserve and enhance high-resolution, semantically rich feature maps throughout the network. Finally, the variability in lighting and viewpoint underscores the requirement for models that learn invariant representations rather than memorizing specific object appearances, which calls for advanced data augmentation strategies and loss functions that promote generalization. Therefore, an effective solution for USV-based floating object detection must be a cohesive system that simultaneously addresses: (1) Multi-scale representation, ensuring tiny objects retain discernible features across network stages; (2) Feature discrimination, enhancing the model’s focus on target-specific patterns while suppressing backgrounds and noise; (3) Robust localization, providing precise bounding box regression even with limited pixel evidence; and (4) Operational efficiency, maintaining real-time inference speed suitable for onboard processing. While current state-of-the-art detectors like YOLOv8 offer an excellent balance of speed and accuracy, their performance on the specific and demanding task of aquatic small object detection remains suboptimal, as they are not explicitly designed for the challenges outlined above. To address these issues, we propose an improved surface floating object detection algorithm based on YOLOv8n, named SEBR-YOLOv8n. Our main contributions are as follows. We propose SE-BiFPN, a novel bidirectional feature pyramid network augmented with a small object enhancement branch and an EMA attention mechanism to improve multi-scale feature fusion for small targets. We propose SE-BiFPN, a novel bidirectional feature pyramid network augmented with a small object enhancement branch and an EMA attention mechanism to improve multi-scale feature fusion for small targets. We introduce a decoder based on the transformer architecture that utilizes the IoU-Aware Query Selection mechanism to focus objects queries more on the foreground range, thereby addressing the interference of environmental noise from the perspective of USVs. We introduce a decoder based on the transformer architecture that utilizes the IoU-Aware Query Selection mechanism to focus objects queries more on the foreground range, thereby addressing the interference of environmental noise from the perspective of USVs. We employ Inner-IoU to SIoU to design the Inner-SIoU loss function, which improves convergence speed and the generalization capability of the algorithm. Inner-SIoU effectively enhances the detection capability for small objects. We employ Inner-IoU to SIoU to design the Inner-SIoU loss function, which improves convergence speed and the generalization capability of the algorithm. Inner-SIoU effectively enhances the detection capability for small objects. Our algorithm achieves good performance in detecting small floating objects on the water surface while maintaining a lightweight model. The effectiveness of the improvements was validated on FloW-Img dataset and Floating Waste-I dataset. Related work Current methods for detecting floating objects on water surfaces are primarily categorized into traditional digital image processing and deep learning-based approaches. Early research predominantly relied on techniques such as background subtraction, frame differencing, or the combination of hand-crafted features (e.g., Haar-like, HOG) with machine learning classifiers15–18. These methods often face challenges in dynamic aquatic environments, including complex feature design, limited robustness, cumbersome parameter tuning, and low processing efficiency. In recent years, deep learning methods, represented by YOLO and Faster R-CNN, have become mainstream due to their powerful feature learning and end-to-end detection capabilities. Notably, the YOLOv8 model, with its novel backbone network, anchor-free detection head, and loss function, has set a new benchmark for real-time detection in terms of speed and accuracy [Ultralytics, 2023]. Concurrently, to meet deployment requirements on mobile platforms like Unmanned Surface Vehicles (USVs), research on computational efficiency has emerged, such as C-X-YOLOv719, which employs strategies like structured pruning and lightweight module replacement. Recent advances in related fields such as remote sensing and intelligent transportation have also provided valuable insights. For instance, Gomaa et al.have proposed methods combining classical computer vision with deep learning for efficient object detection in aerial videos20 and developed semi-automatic frameworks to reduce labeling dependency21. These works collectively provide a crucial foundation for efficient detection on resource-constrained edge devices22. The research in this paper focuses on improving the detection performance for small objects on water surfaces by enhancing network architecture and the learning process. Related work is centered around the following four core directions. Feature fusion networks The significant scale variation of targets on water surfaces makes efficient multi-scale feature fusion crucial for detection performance. Classical Feature Pyramid Networks (FPN) and their variants like PANet fuse deep semantic features and shallow localization features through top-down and bottom-up pathways. Building on this, the Weighted Bidirectional Feature Pyramid Network (BiFPN) enables more efficient and adaptive fusion of features at different scales by introducing learnable weights. For floating object detection, Wang Yizao et al.23 integrated multi-scale pooling modules and a multi-directional pyramid network into YOLOv3 to fuse multi-scale features. Li et al.24 proposed a pyramid anchor generation method within the Faster R-CNN framework, making candidate boxes more focused on target center regions, thereby improving object resolution. These studies demonstrate that designing efficient feature fusion structures is a key approach to enhancing a model’s multi-scale perception capability, particularly for detecting small objects. Furthermore, cross-modal learning offers new perspectives for feature enhancement. For instance, Muksimova et al.25 enriched video features with external textual knowledge through cross-modal memory retrieval for dense video captioning, generating richer contextual descriptions. The idea of leveraging external knowledge or cross-modal information to enhance unimodal feature representation is inspiring for resolving feature ambiguity in complex water surface backgrounds. Attention mechanisms Complex water surface backgrounds (e.g., ripples, glare, reflections) can severely interfere with the extraction of target features. Attention mechanisms address this by dynamically adjusting feature weights, enabling the model to focus on critical informational regions. Trinh et al.26 integrated an Efficient Channel Attention (ECA) module into the backbone network of an improved YOLOv5, allowing the model to better focus on the characteristics of surface waste. The C-X-YOLOv7 model proposed by Xu Hongwei et al.19 also incorporates a Channel Attention (CA) module to enhance feature extraction capabilities. In remote sensing, Gomaa et al.proposed SCAR-Net, which integrates lightweight residuals with a channel attention mechanism based on squeeze-and-excitation (SE) units to selectively emphasize discriminative features and suppress background information27. Further advancing this, the Efficient Multi-scale Attention (EMA) module28 employs a parallel substructure to capture cross-spatial information across horizontal, vertical, and channel dimensions, achieving richer multi-scale feature aggregation while avoiding excessive computational overhead. These studies indicate that incorporating suitable attention mechanisms is an effective strategy for enhancing a model’s feature discriminative power in complex backgrounds. Advanced attention designs are also evolving to integrate with multi-scale and streaming processing to meet both accuracy and real-time requirements25. Loss function optimization The precision of bounding box regression directly impacts localization performance, especially for small, irregularly shaped objects on water surfaces. The design of the loss function is central to optimizing the regression process. Early research primarily used Intersection over Union (IoU) and its variants (e.g., GIoU, DIoU, CIoU) to measure the overlap between predicted and ground truth boxes. Trinh et al.19 employed the Alpha-CIoU loss function in their study to enhance regression accuracy. Wang Yizao et al.23 introduced Focal Loss to address the foreground-background class imbalance. The SIoU loss29 further considers the vector angle between bounding boxes, introducing a directional penalty term to accelerate convergence. The recently proposed Inner-IoU enhances the generalization capability of models across different data distributions by utilizing auxiliary bounding boxes and a scale factor for loss calculation. The evolution of loss functions aims to provide more precise and stable optimization gradients for the model, which is particularly important for improving the localization accuracy of small objects. The optimization process itself can also be improved from the perspective of data distribution. For example, Song et al30. enhanced the efficiency of logit-based Knowledge Distillation (KD) by increasing the symmetry of training data, offering a new perspective for designing more stable and efficient optimization objectives. Model optimization and lightweight strategies To enable practical deployment on edge devices like USVs, optimizing and lightweighting the entire model is as crucial as improving individual network components. A primary challenge is the scarcity of high-quality, large-scale annotated datasets. Innovative semi-automatic and unsupervised frameworks that reduce dependency on manual labeling are therefore highly valuable. Gomaa et al.have proposed methods that combine classical background subtraction techniques with modified versions of YOLO (v4 and v8) to generate training labels automatically from motion information, effectively creating a self-building dataset for fine-tuning the detector22. This strategy offers a promising direction to overcome the data bottleneck in specialized domains like water surface detection. Beyond data efficiency, architectural efficiency is key. Knowledge Distillation (KD) is an effective technique for model compression and performance enhancement. In remote sensing image classification, Song et al31. proposed innovative frameworks—a cross-modal KD method (CMKD-Net) and a symmetry-enhanced learning approach—to address data sparsity. These methods facilitate efficient knowledge transfer from a powerful Vision Transformer (ViT) teacher model to a more compact Convolutional Neural Network (CNN) student model, significantly boosting the student’s accuracy while drastically reducing model size and inference time. For real-time processing, efficient architectures are essential. Research in aerial video analysis has employed morphological operations and feature point motion analysis for efficient vehicle detection and tracking20. Furthermore, transformer-based architectures have shown great potential for real-time tasks. Hassan et al.32 demonstrated the exceptional accuracy and efficiency of Vision Transformer (ViT) and Swin-Transformer for real-time driver drowsiness detection. Similarly, Muksimova et al.25 proposed a Streaming Multi-Scale Transformer Decoder for real-time video captioning. These works demonstrate that advanced architectures, when properly designed, can achieve an optimal balance between accuracy and speed, providing crucial design insights for developing high-performance, real-time detectors suitable for USV platforms. Although existing research has made progress in the individual or several aspects mentioned above, achieving synergistic optimization of multi-scale feature fusion, background interference suppression, and bounding box regression accuracy for floating object detection—particularly realizing high-precision, real-time detection on computationally constrained mobile platforms—remains a challenge. Proposed method The structure of SEBR-YOLOv8n (Based on YOLOv8n) is shown in Fig. 1 SEBR-YOLOv8n primarily consists of the backbone, neck, and head. In this method, after the data-augmented images are input into the network, features are first extracted through the backbone. Then, further feature extraction and fusion are performed through the branches in the neck. Finally, three heads complete the detection tasks. Compared to YOLOv8, our main improvements include the C2f-Faster-EMA, the feature extraction and fusion network (SE-BiFPN) in the neck, and the decoder in the head (RT-DETR Decoder). Additionally, we have introduced the Inner-SIoU loss function to further enhance the performance of the algorithm. Structure of SEBR-YOLOv8n (Efficient Multi-Scale Attention (EMA), Real-time end-to-end Transformer-based detectors (RT-DETR), Small Object Enhancement (SOE)). SE-BiFPN In the field of object detection, feature pyramid structures are commonly introduced to address the problem of scale variation, with the most widely used being the FPN (Feature Pyramid Network) structure. However, the commonly used FPN and PAFPN may cause the loss of semantic information from high-level or low-level features during the feature interaction process. In the context of detecting floating garbage on the water surface from the perspective of USVs, significant scale differences exist among various objects, and small objects in the distance are often particularly tiny. In the feature fusion strategy of YOLOv8, these small features are frequently blurred or ignored. To address this issue, a Small Object Enhanced Multi-Scale Bidirectional Feature Pyramid Network (SE-BiFPN, specifically SOE-EMA-BiFPN) is proposed. This approach effectively leverages large-scale features while improving the recognition capability of small objects, thereby enhancing the detection accuracy of floating debris on water surfaces. Specifically, we added a small object feature extraction branch to the BiFPN to improve the utilization of small object features. Additionally, we incorporated the EMA mechanism into the BiFPN, dynamically adjusting the attention focus on objects of different scales, enhancing information fusion capabilities, and improving the detection accuracy of small objects as well as objects in complex backgrounds. The overall structure of the SE-BiFPN is shown in Fig. 2. Structure of SE-BiFPN. Efficient multi-scale attention Adding a branch to enhance small object features may lead to the loss of feature information for objects at other scales. To address the significant scale variations in the USV perspective, we introduced the EMA attention mechanism, combining it with the small-object-enhanced BiFPN to balance the weights of features at different scales. This improves the ability to distinguish features across scales and enhances detection performance for objects of varying sizes. EMA28 is an efficient multi-scale attention module, which belongs to the hybrid-domain attention mechanism. The structure of EMA attention module is shown in Fig. 3. EMA attention mechanism structure. In EMA module, a parallel sub-structure strategy similar to CA module is adopted to help the network avoid excessive sequential processing and large depth computation. After the input is grouped, it is processed through different branches: one branch performs one-dimensional global pooling, while the other extracts feature through a 3 × 3 convolution. The output features of the two branches are then modulated through a sigmoid function and normalization operation, and finally merged through a cross-dimensional interaction module to capture pixel-level pairwise relationships. After the final sigmoid adjustment, the output feature map enhances or suppresses the original input features to obtain the final output. The one-dimensional global pooling branch processes the global information of the input features by performing global pooling along the horizontal and vertical dimensions separately, and its calculation expressions are: where is the one-dimensional global average pool used to encode global information along the horizontal dimension direction in Cat height H; is the pooled output in Cat width W; and denotes the input feature of the c-th channel. In the 3 × 3 branch, only a 3 × 3 kernel is used to capture multi-scale feature representations. EMA attention also provides a method for cross-spatial information aggregation in different spatial dimensions to achieve richer feature aggregation. The expression for its calculation is: Where represents the feature map in the c-th channel, i denotes the coordinate in the vertical direction of the image, and j represents the coordinate in the horizontal direction of the image. We also improved the C2f module through the EMA attention mechanism. First, we introduced the C2f-Faster module to replace the C2f module. The C2f-Faster module draws on the concept of the novel partial convolution PConv proposed by Chen et al.33. The PConv works by applying regular convolution for spatial feature extraction only to the non-zero parts of the input channels while keeping the remaining channels unchanged. This approach can capture spatial features in the image more effectively, improve the model accuracy, and reduce redundant computations and memory accesses. Then, based on C2f-Faster, we introduced the EMA, forming C2f-Faster-EMA. This not only reduces the model parameters but also enhances the model’s accuracy. The structure of the C2F-Faster-EMA is shown in Fig. 4. In addition, in the SE-BiFPN module, C2f-Faster-EMA can significantly improve model accuracy by improving the C2f module near the detection head. It should be noted that after multiple experiments, if more or all C2f modules are replaced, the accuracy of the model will significantly decrease. This is because the EMA attention mechanism, when used to process shallow multi-level features, cannot effectively filter out useless features, but instead leads to the loss of some key information, resulting in a decrease in model accuracy. Structure of the C2F-Faster-EMA. Small object enhancement BiFPN34 is a weighted bidirectional feature fusion architecture that allows feature pyramids to efficiently fuse features from different scales. The feature fusion process of BiFPN is computed as: Here, and represent the input feature maps, represents the output feature map, BN denotes batch normalization, ReLU indicates the activation function, Conv represents the convolution operation, denotes the weight of the feature map, and ϵ is a small constant used to avoid division by zero errors. The traditional BiFPN reconstructs the top-down and bottom-up pathways by introducing bidirectional cross-scale connections and a weighted fusion mechanism, as shown in Fig. 5. This paper addresses the issue of predominantly small targets on the water surface and the significant scale variation between different targets by introducing a small target feature enhancement branch based on BiFPN. By applying additional 1 × 1 convolutions and depthwise separable convolutions, we directly feed P2-P4 layer features back to different fusion layers, addressing the dilution of small object features by higher-level features, as show in Fig. 5. Feature network of BiFPN and SE-BiFPN. Here, is the small object enhancement feature extracted by the small object enhancement branch. is the dynamic fusion weight for the small object enhancement feature, which is used to control the influence of and avoid computational instability caused by the addition of the feature enhancement branch. This weight is a learnable parameter. Decoder and head The YOLOv8 decoder performs well in achieving efficient object detection; however, its architecture has certain limitations when it comes to detecting small objects in complex backgrounds, especially when they are partially occluded or affected by surface reflections. Moreover, objects from the perspective of USVs have distinct characteristics: the objects are typically concentrated near the centerline of the field of view with significant scale variations, while environmental noise is often located on the sides of the field of view. To improve detection accuracy, we introduced the RT-DETR decoder35–37. The RT-DETR decoder leverages the advantages of the Transformer architecture, particularly the multi-head self-attention mechanism and cross-attention mechanism, which enable it to capture contextual information and relationships between objects, making it more sensitive to small objects. Additionally, IoU-Aware Query Selection mechanism selects high-quality queries that concentrate on foreground objects, enhancing the focus on small objects and reducing interference from background noise. Furthermore, the denoising optimization strategy improves the model’s robustness in predicting small objects in complex scenes. Incorporating RT-DETR detection head into YOLOv8 effectively combines YOLO’s real-time detection capabilities with RT-DETR’s deep feature understanding. This integration significantly enhances the algorithm’s ability to detect small and occluded objects, thereby improving the accuracy of detecting floating objects on water surfaces. In our method, a relatively lightweight parameter setting is adopted, where the number of hidden layers is 256, the number of queries is 200, the number of decoder points is 4, the number of decoder points is 4, the number of attention heads and decoder layers are 8 and 3, respectively. Loss function In the task of detecting floating objects on water surfaces, a significant challenge alongside the complexity of the floating objects themselves is the presence of many small objects in the scene. These include not only the floating objects but also numerous small distracting objects, which reduce the algorithm’s detection accuracy. The original CIoU loss function29 only considers the distance, aspect ratio, and overlap region between the actual and predicted bounding boxes, without accounting for angular differences, which slows down the model’s convergence speed. Additionally, for smaller objects, the CIoU loss function tends to cause overfitting. When faced with issues such as the irregular shapes, varying sizes of bounding boxes, and differences in object categories, CIoU fails to handle them effectively. To address these issues, we introduce the Inner-SIoU loss function, which is better suited for fine object detection and small object detection, to replace the CIoU loss function. Inner-SIoU is a bounding box loss function derived from applying Inner-IoU to SIoU38,39. By incorporating angle considerations and scale sensitivity, SIoU loss introduces a more complex bounding box regression method, overcoming the limitations of previous loss functions and improving small object detection. However, its slower convergence speed may lead to lower efficiency during the training process. Additionally, SIoU’s insufficient generalization ability when facing different datasets or detectors may result in a decline in model performance in real-world applications. Inner-IoU loss enhances the generalization capability and convergence speed of existing IoU loss functions by utilizing auxiliary bounding boxes to calculate loss and accelerate bounding box regression. In Inner-IoU, a scale factor ratio is introduced to control the size of the auxiliary bounding boxes. By using auxiliary bounding boxes of different scales for different datasets and detectors, Inner-SIoU overcomes the limitations of existing methods in terms of generalization capability. Figure 6 shows a schematic of the Inner-IoU loss, which is calculated as follows: Schematic of Inner-IoU. The calculation process of SIoU is shown schematically in Fig. 7. The calculation process is as follows: Schematic of SIoU angle calculation. After applying Inner-IoU to the boundary regression loss function SIoU, we obtain: Summary SEBR-YOLOv8n has made targeted improvements to the four core parts of the backbone network, neck network, detection head, and loss function to address challenges such as numerous small targets on the water surface, large differences in target scales, and complex backgrounds. The overall structure is shown in Fig. 1. Firstly, the C2f Faster EMA module is introduced into the backbone network, which integrates more efficient PConv and EMA attention mechanism that can dynamically focus on multi-scale features, enhancing feature extraction capability while reducing the number of parameters. Secondly, a multi-scale bidirectional feature pyramid network (SE-BiFPN) with small target enhancement was proposed in the neck network. By adding specialized small target feature enhancement branches and combining EMA mechanism to optimize multi-scale feature fusion weights, the feature utilization and detection sensitivity of small-scale floating objects were significantly improved. Again, in the detection head section, a Transformer decoder from RT-DETR was used to replace the original structure, utilizing its powerful global context modeling capability and IoU aware query selection mechanism to improve the recognition accuracy of the model for small and occluded targets in complex backgrounds. Finally, the bounding box regression loss function is replaced with Inner-SIOU, which introduces scale sensitive auxiliary bounding box computation to further optimize the training convergence speed and model generalization ability based on SIoU, especially for small object detection. These improvements work together to comprehensively enhance the accuracy and robustness of floating object detection on the water surface without significantly sacrificing inference speed. Experiments Experimental environment The experimental environment is as follows. Operating System: Ubuntu 20.04; Graphics Card: NVIDIA RTX A6000, 48GB; Programming Language: Python 3.10; CUDA Version: 11.7; YOLOv8 dependency library ultralytics version: 8.0.157; Some key training parameters are shown in Table 1. Table 1Some key parameters set during model training.ParametersSetupEpochs300MomentumInitial learning rate0.90.001Weight decay0.0001Batch size32Input image size640*640OptimizerAdamW Some key parameters set during model training. Momentum Initial learning rate 0.9 0.001 Datasets FloW-Img dataset Benefiting from the rapid development of autonomous driving, the research on uncrewed ships has increasingly gained attention. Many datasets have emerged in the field of surface object detection, effectively supporting its development. The FloW-Img dataset40 is the first inland waterway floating waste dataset collected by a camera-equipped uncrewed vessel. It takes into account the diversity of collection scenes, variability in lighting conditions, the appearance of detection objects, and diversity in viewpoints as much as possible. The objects’ distribution and variety of distances are ensured by repeatedly navigating on the water surface. The algorithm we proposed is mainly used for USVs to clean floating waste on lake surfaces, so the FloW-Img dataset was chosen as the dataset for algorithm evaluation. As shown in Fig. 8, the FloW-Img dataset was obtained by an uncrewed vessel equipped with dual cameras cruising in inland waterways. The lighting conditions were all daylight, and the scenes were highly diverse. By sampling the video sequences, 2,000 images were obtained, with image resolutions of 1280 × 720 and 1280 × 640. The data label is ‘bottle,’ and to avoid ambiguity, the shadow of the bottle is not included in the labeled region. There are 5,272 samples, of which 2,962 are small objects (56.18%), 2,001 are medium objects (37.95%), and large objects account for 5.87%. It is evident that small objects constitute a larger proportion while large objects are less frequent. Some images from the FloW-Img dataset. The dataset configuration is as follows: the ratio of the training set plus validation set to the test set is 8:2, and the ratio of the training set to the validation set is also 8:2: Training set: 1280; Verification set: 320; Test set: 400. Due to the relatively small amount of data in the FloW-Img dataset and the limited environmental and lighting conditions, there may be an issue of model overfitting in object detection. This means that the model performs well on the training set but poorly on the test set, failing to generalize well to new data. To verify the model generalization capabilities, sample synthesis was performed by modifying weather, lighting, and color temperature, expanding the dataset to 4,160 images. The specific augmentation methods are as follows: first, 1,800 images were randomly selected and divided into six groups, with each group containing 360 images. Then, using the Image-Augmentation project, weather and lighting variations were applied to the images, including light rain, heavy rain, fog, midday sunlight, nighttime, and the addition of blurred areas. After generating the new 2,160 images, they were combined with the original 2,000 images to form the new dataset. As shown in Fig. 9. The dataset configuration as the same of FloW-Img dataset: Training set: 2262; Verification set: 666; Test set: 832. Example of the dataset containing synthetic samples. Floating Waste-I dataset Floating Waste-I dataset41 is a multi-category dataset of floating waste on water surfaces, containing two common types of domestic waste: bottles and boxes. The dataset features scenes from four inland lakes and includes images taken during three different time periods: midday, evening, and night, totaling 1,867 images. It contains 3,213 samples of the bottle category and 1,302 samples of the box category. Among these, there are 3,158 small objects, accounting for 69.95%; 1,207 medium objects, accounting for 26.75%; and large objects account for 3.3%. The example of dataset is shown in Fig. 10. Example of floating waste-I DATASET. Evaluation metrics To quantify the effectiveness of SEBR-YOLOv8n, we use mean Average Precision (mAP), Recall, and Precision42 to evaluate the model’s accuracy. Average Precision (AP) calculates the region under the PR curve for a given category, while mAP computes the average of the regions under the PR curves for all categories. The calculation formulas are shown below. Here, P, R, and N represent Precision, Recall, and the number of categories, respectively. TP (True Positives): the number of correctly predicted positive samples; FP (False Positives): the number of samples incorrectly predicted as positive. For mAP, we use and metrics. represents the mean Average Precision calculated at an IoU (Intersection over Union) threshold of 0.5, used to evaluate the performance of the object detection model under a relatively lenient overlap criterion. represents the mean Average Precision calculated at different IoU thresholds (from 0.5 to 0.95, in intervals of 0.05), used to evaluate the comprehensive performance of the object detection model under multiple overlap criteria. Ablation experiments To verify the performance of SEBR-YOLOv8n and thoroughly investigate the effectiveness of each module in the proposed algorithm, we designed a series of ablation experiments consisting of five models on FloW-Img dataset.The ablation experiment results are shown in Table 2. Table 2Ablation experiments on the FloW-Img dataset.Methods GFLOPFPS/HzBaseline (YOLOv8n)86.779.485.045.53.08.190.4YOLOv8n+RTDET Decoder90.081.586.645.96.111.764.2YOLOv8n+Decoder+EMA88.782.587.045.45.710.883.7YOLOv8n+Decoder + EMA+BiFPN87.587.689.547.85.311.074.2YOLOv8n+Decoder + EMA+SE-BiFPN89.488.790.249.35.010.677.9SEBR-YOLOv8n91.088.791.249.95.010.678.4 Ablation experiments on the FloW-Img dataset. Baseline (YOLOv8n) Table 2 indicates that the baseline model achieved a Precision of 86.7%, a Recall of 79.4%, and and of 85.0% and 45.5%, respectively. YOLOv8 with RT-DETR decoder After introducing the RT-DETR decoder, the model’s Precision increased to 90.0%, Recall rose to 81.5%, and reached 86.6%, demonstrating that the RT-DETR decoder significantly enhances the model’s detection capability. Based on this, if we only introduce the C2F-Faster-EMA module, the model size and GFLOPs will decrease to some extent, but it will result in a loss of some mAP at 50–95. YOLOv8 with RT-DETR, C2F-Faster-EMA and BiFPN Building on E2, the E3 model introduced BiFPN, resulting in a slight decrease in Precision to 87.5%, Recall to 87.6%, while and improved to 89.5% and 47.8%, respectively, indicating the positive impact of BiFPN on feature fusion efficiency. YOLOv8 with RT-DETR, C2F-Faster-EMA and SE-BiFPN Based on E2, With the introduction of SE-BiFPN, greatly improved the detection capabilities for small objects. The Precision and Recall of the E4 model increased to 89.4% and 88.7%, while and rose to 90.2% and 49.3%. SE-BiFPN effectively utilized small object features by adding a small object feature extraction branch, while the incorporated EMA dynamically adjusted the attention focus on objects of different scales, enhancing the information fusion ability and improving detection precision for surface objects in complex backgrounds. SEBR-YOLOv8n After incorporating the Inner-SIoU loss functionon top of E4, SEBR-YOLOv8n achieved a Precision of 91.0%, a Recall of 88.7%, and a corresponding increase in to 91.2%, to 49.9%. This indicates that SEBR-YOLOv8n outperformed the baseline model with a 4.3% increase in Precision, a 9.3% increase in Recall, and a 6.2% increase in and a 4.4% increase in , fully validating the critical roles of our improvements in enhancing small object feature detection capabilities. Furthermore, SEBR-YOLOv8n maintained a parameter count of 5.0 million, with a GFLOP rate of 10.6, demonstrating excellent performance and computational efficiency. These results prove that although our method has increased in computational cost and model size, it still maintains a lightweight level, achieving a combination of efficiency and top-notch accuracy, making it particularly suitable for deployment on resource constrained USV platforms. Regarding the inference speed of the model, as shown by the FPS data in Table 2, each improved module has a varying degree of impact on the algorithm’s real-time performance. The baseline model, YOLOv8n, achieves the highest FPS (90.4 Hz), demonstrating excellent real-time processing capability. However, after introducing the Transformer-based RT-DETR decoder, the model’s FPS significantly drops to 64.2 Hz. This is primarily attributed to the additional computational overhead brought by the self-attention and cross-attention mechanisms within the decoder. Notably, the subsequently introduced C2f-Faster-EMA module partially offsets this overhead by employing more efficient PConv operations, increasing the FPS to 83.7 Hz, which highlights the advantage of its lightweight design. When further integrating feature fusion networks, the introduction of BiFPN leads to a decrease in FPS to 68.2 Hz due to the added operations for bidirectional cross-scale connections and weighted fusion. The SE-BiFPN we ultimately adopted, which builds upon BiFPN by incorporating a targeted small-object enhancement branch and EMA attention, achieves a slightly higher FPS than the standard BiFPN. This indicates that the designed EMA mechanism optimizes the computational pathway through more efficient feature selection. Finally, the complete SEBR-YOLOv8n model attains an FPS of 78.4 Hz. Compared to the baseline model, although the maximum throughput decreased by approximately 13.3%, it is exchanged for a significant improvement in detection accuracy. Currently, there are various types of loss functions in the field of object detection, but not all of them can have a positive impact on the model. To validate the advantages of Inner-SIoU compared to other loss functions, this study introduced several loss functions based on the E4 model for comparison. The experimental results are shown in Table 3. The loss functions evaluated include CIoU, SIoU, DIoU, WIoU, and GIoU43. In Table 3, while DIoU and WIoU achieved slightly higher Precision, Inner-SIoU provided the best balance with superior Recall and Precision and got the best map, indicating it is more effective at finding all objects without a significant drop in precision. Table 3Comparison of results with different loss functions.Methods CIoU (baseline)89.488.790.249.3SIoU89.887.890.149.4DIoU91.187.289.949.2WIoU91.287.090.248.7GIoU90.488.490.749.0Inner-SIoU91.088.791.249.9 Comparison of results with different loss functions. In order to more intuitively demonstrate the advantages of Inner-SIOU in detecting small targets from the perspective of unmanned ships, we compared the convergence of CIoU and Inner-SIOU, as shown in Fig. 11. It can be seen that Inner-SIOU has a faster convergence speed while achieving better accuracy results. Comparison of convergence between CIoU and Inner-SIOU. Comparative experiments In this section, SEBR-YOLOv8n is compared with the YOLO family of algorithms on the FloW-Img dataset. The results of the quantitative experiments are shown in Table 4. The algorithms follow the ref44 to set the version of each model. Table 4Comparative experiments on the FloW-Img dataset.Methods Param/mYOLOv3tiny4579.466.177.643.712.1YOLOv5n84.778.384.245.12.5YOLOv8n86.779.485.045.53.0YOLOv10n4684.775.983.543.72.7YOLO1187.378.484.545.82.6YOLOv124787.180.486.145.32.5YOLO-Float4187.581.486.647.591.8SEBR-YOLOv8n91.088.791.249.95.0 Comparative experiments on the FloW-Img dataset. From Table 4, it can be observed that, compared to other YOLO series algorithms and an improved algorithm, SEBR-YOLOv8n achieves the best performance in detecting floating objects on water surfaces. As shown in Table 5. We also compared SEBR-YOLOv8n with other mainstream models to evaluate the performance of our proposed model. Table 5Detection results of the classical model and the proposed model.Methods Param/mSSD4884.541.524.1Faster R-CNN4987.446.841.3RetinaNet5088.346.236.3EfficientDet3486.242.718.4DETR5187.241.541.6DiffusionDet5287.746.132.1SEBR-YOLOv8n91.249.95.0 Detection results of the classical model and the proposed model. The models used in the comparison experiments are as follows. SSD48 (Single Shot MultiBox Detector) achieves fast and efficient one-stage detection by performing object detection on feature maps of different scales. Faster R-CNN49 introduces a Region Proposal Network (RPN), which optimizes the high computational and structural complexity issues associated with R-CNN. RetinaNet50 employs Focal Loss to effectively address the class imbalance problem, thereby enhancing the detection performance of small objects. EfficientDet34 optimizes model size and speed through a compound scaling method and an efficient backbone network, all while maintaining high accuracy in object detection. DETR51 uses transformers for object detection, simplifying the process by eliminating the need for anchor boxes and enabling end-to-end prediction. DiffusionDet52 applies diffusion models to object detection, refining noisy inputs into accurate detections, and showcasing a novel framework that combines generative modeling with object detection. To further validate model performance, comparative experiments were conducted on the dataset containing synthetic samples, as shown in Table 6. The results indicate that our SEBR-YOLOv8n demonstrates better generalization. Table 6Comparative experiments on the dataset containing synthetic samples.Methods YOLOv5n87.980.788.253.2YOLOv8n90.482.690.155.0YOLOv10n89.486.391.156.1YOLO-Float87.684.291.056.2YOLO1191.985.891.357.9YOLOv1288.584.190.057.4SEBR-YOLOv8n94.792.895.558.2 Comparative experiments on the dataset containing synthetic samples. To comprehensively validate the effectiveness and robustness, we compared SEBR-YOLOv8n with the advanced algorithms in the YOLO series on the Floating Waste-I dataset. The quantitative experimental results are shown in Table 7. It can be seen that the P, R, and mAP of SEBR-YOLOv8n are still the best among the compared methods, and reaching 92.4%, 47.4%, and 50.1%, respectively. SEBR-YOLOv8n demonstrates better stability and efficiency. Table 7Comparative experiments on floating Waste-I dataset.Methods YOLOv3tiny84.641.258.537.936.6YOLOv5n84.368.176.844.244.2YOLOv8n84.669.977.946.446.6YOLO10n83.768.374.640.241.1YOLO1184.468.377.143.043.5YOLOv1282.865.773.938.740.0SEBR-YOLOv8n94.391.792.447.250.1 Comparative experiments on floating Waste-I dataset. Visualization analysis Deep learning models are often characterized by poor interpretability, which can hinder their development and application. To intuitively and conveniently illustrate the detection effectiveness of the model proposed in this paper, we conducted comparative experiments to analyze its performance from heat map and model inference results. Gradient-weighted Class Activation Mapping (Grad-CAM)38 was employed to generate heat maps for YOLOv8s and SEBR-YOLOv8n, as shown in Fig. 12. Comparison of heat maps. (a) original images, (b) YOLOv8n, (c) SEBR-YOLOv8n. The input layer used for the heatmap corresponds to the input layer used for the detection layer, and the threshold for the label boxes is set to 0.2. These heat maps visually illustrate the regions of the feature map that the model focuses on. The gradient values are derived from backpropagating the confidence scores of the model’s output categories using Grad-CAM. In the heat maps, pixels with higher gradient values are depicted with deeper shades of red, while pixels with lower gradients are shown in deeper shades of blue. As shown in Fig. 12, the three scenarios examined include environments with a high density of small objects, those with complex interference, and situations with strong light exposure. It is evident that YOLOv8n tends to prioritize larger objects, achieving relatively accurate detection in these cases. However, its sensitivity to small, distant objects is lacking, resulting in a significant number of missed detections. In scenarios characterized by complex interference or strong light exposure, YOLOv8n can accurately identify larger objects but struggles with truncated objects, leading to an increased rate of false detections. In contrast, SEBR-YOLOv8n exhibits improved sensitivity to small objects and effectively differentiates between light interference and complex environmental disturbances, significantly reducing both false detection and missed detection rates. Figure 13 illustrates the detection performance of different algorithms on the FloW-Img dataset. Here, (a) is the input image, while (b) to (e) correspond to YOLOv5, YOLOv8, YOLOv10 and SEBR-YOLOv8n. Each algorithm showcases three different scenarios. The first scenario depicts strong lighting interference; the second scenario involves multi-scale objects with strong background interference; and the third scenario features numerous small, distant objects. It is evident that, compared to other algorithms, our algorithm can correctly predict the vast majority of objects. Especially for small-scale objects at a distance, our algorithm accurately detected these objects. Detection results of different algorithms on FloW-Img dataset. To further validate the generalizability of our proposed method, we collected representative image data for inference experiments in this study. The image data were primarily gathered from various scenes on the campus of Guangxi University, encompassing three different time periods: early morning, daytime, and evening. These scenes feature a high density of small objects, complex backgrounds, and various interferences. The results of the inference experiments are presented in Fig. 14. The findings indicate that our model exhibits virtually no missed detections or false detections for water surface objects across different environments. And it also achieved higher level of confidence. These experimental results effectively demonstrate the robustness and generalizability of our method. Detection results of different algorithms. Conclusion To address the challenges of detecting small objects and strong background interference in floating debris detection on water surfaces, we propose an improved object detection algorithm based on YOLOv8, named SEBR-YOLOv8n. To address the challenges of detecting small objects and strong background interference in floating debris detection on water surfaces, we propose an improved object detection algorithm based on YOLOv8, named SEBR-YOLOv8n. In SEBR-YOLOv8n, we enhance the algorithm’s ability to fuse water surface object features through a Small Object Enhanced Feature Fusion Network (SE-BiFPN); utilize the RT-DETR decoder to increase the model’s focus on small objects and reduce the impact of complex backgrounds; and introduce the Inner-SIoU loss function to improve the algorithm’s generalization capability and bounding box regression speed. These enhancements work together to improve the algorithm’s performance in detecting small floating objects while maintaining a lightweight model size. Ablation experiments conducted on the FloW-Img dataset demonstrate that each improvement contributes significantly to overall performance. Comparative experiments further reveal that SEBR-YOLOv8n achieves a of 91.2% and a of 49.9%, representing improvements of 6.2% and 4.4%, respectively, over YOLOv8n. Additionally, this algorithm outperforms other mainstream object detection models in terms of accuracy. Further experiments on the dataset containing synthetic samples and the Floating Waste-I dataset confirm the robustness and generalization capabilities of SEBR-YOLOv8n. In conclusion, SEBR-YOLOv8n achieves superior accuracy in detecting small floating objects on water surfaces while maintaining a compact model size, demonstrating high efficiency and effectiveness for practical applications. Author contributions Conceptualization, Y.L.; methodology, Y.L. and D.L.; software, D.L. and J.D.; validation, D.L. and D.G.; data curation, Y.L. and D.L.; writing—original draft preparation, Y.L. and D.L.; writing—review and editing, J.D. and Y.L.; supervision, Y.L. and D.G.; project administration, Y.L. and D.G. Funding This research was funded by the Guangxi Science and Technology base and Talent Project (Grant No. Guike AD22080043), the Key Laboratories of Sensing and Application of Intelligent Optoelectronic System in Sichuan Provincial Universities (Grant No. ZNGD2206), the Youth Fund Project of Hebei Province Higher Education Science Research (Grant No. QN2024209), Guangxi Science and Technology Program: Guangxi key research and development program (Grant No.Guike AB21220039) and Innovation Project of Guangxi Graduate Education (Grant No. YCSW2025125). Data availability The data in this study are related to the research project and have not been made publicly available. If you need relevant data, please contact Dehang Lian (E-mail: dehang_lian@163.com). Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The data in this study are related to the research project and have not been made publicly available. If you need relevant data, please contact Dehang Lian (E-mail: dehang_lian@163.com).