Multi-scale beach litter detection method based on improved YOLOv11 algorithm

By improving the YOLOv11 algorithm and introducing the ECASPDConv and C3k2DualAFE modules, feature extraction and fusion are optimized, solving the problems of inter-class imbalance, difficulty in detecting small targets, and interference from complex backgrounds in beach litter detection. This achieves high-precision and robust litter detection and supports automated monitoring and cleanup of beach litter.

CN121415057BActive Publication Date: 2026-03-31GUANGDONG OCEAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for beach litter detection suffer from problems such as inter-class imbalance, diversity, interference from complex backgrounds, and difficulty in detecting small targets, resulting in low detection accuracy and low efficiency.

Method used

An improved YOLOv11 algorithm is adopted, which enhances the detection capability of multi-scale garbage targets by introducing ECASPDConv and C3k2DualAFE modules into the backbone and neck networks and combining them with a high-resolution detection head to optimize feature extraction and fusion.

Benefits of technology

It significantly improves the detection accuracy and robustness of multi-scale and small-sized debris targets in complex beach environments, enabling more accurate debris identification and location, and supporting automated monitoring and cleanup of beach debris.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121415057B_ABST
    Figure CN121415057B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-scale beach litter detection methods based on improved YOLOv11 algorithm, belong to the field of coastal environment monitoring and protection, including: constructing beach litter detection dataset, beach litter detection dataset includes training set, verification set and test set;Improved YOLOv11 network model is constructed, wherein, ECASPDConv module is used in the down-sampling layer of backbone network and neck network, C3k2DualAFE module is used in the preset C3k2 module position of backbone network, C3k2Dual module is used in the preset C3k2 module position of neck network, and high-resolution detection head is added in model head;The training set is used to train the improved YOLOv11 network model to obtain the target detection model;The test set is input into target detection model to obtain beach litter detection result.The application can realize more accurate garbage identification and positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coastal environmental monitoring and protection technology, and in particular relates to a multi-scale beach litter detection method based on an improved YOLOv11 algorithm. Background Technology

[0002] Currently, traditional methods for monitoring beach litter mainly rely on manual patrols, aerial imagery, and on-site photography. These methods suffer from drawbacks such as being time-consuming, labor-intensive, having a limited monitoring range, and low efficiency. Furthermore, they are susceptible to subjective interference, leading to uncertainties in the monitoring results. Therefore, researchers are gradually exploring the introduction of computer vision and deep learning technologies for automated beach litter detection.

[0003] Among the currently popular deep learning-based object detection methods, convolutional neural network detection models, such as Faster R-CNN, RT-DETR, and the YOLO (You Only Look Once) series, have demonstrated high accuracy and real-time performance in general object detection tasks. The YOLO series, in particular, is increasingly being applied to the field of marine environmental monitoring due to its end-to-end detection framework, fast inference speed, and good detection accuracy.

[0004] However, existing target detection methods face multiple challenges in beach litter detection tasks:

[0005] Interclass imbalance and diversity: Beach litter is diverse in type, size, and distribution, with some categories having very few samples, posing challenges to the model's feature learning and generalization capabilities.

[0006] Small target detection is difficult: There are many tiny targets in beach litter, such as cigarette butts, plastic fragments, and glass shards. These targets are easy to lose features in complex backgrounds, resulting in very low detection accuracy.

[0007] Complex background interference: Beach scenes usually contain background elements such as sand, seawater, gravel, and vegetation. These elements are similar to the garbage targets in color and texture, which can easily lead to false positives and false negatives.

[0008] Therefore, how to enhance the detection accuracy of the model for multi-scale garbage targets, while improving the ability to identify small targets, enhancing robustness in complex scenarios, and achieving lightweight and efficient models have become urgent problems to be solved by existing technologies. Summary of the Invention

[0009] To address the aforementioned technical problems, this invention proposes a multi-scale beach litter detection method based on an improved YOLOv11 algorithm, thereby resolving the issues present in the existing technologies.

[0010] To achieve the above objectives, this invention provides a multi-scale beach litter detection method based on an improved YOLOv11 algorithm, comprising:

[0011] Collect images of beach litter to construct a beach litter detection dataset, which includes a training set, a validation set, and a test set;

[0012] An improved YOLOv11 network model is constructed, wherein the improvement process of the improved YOLOv11 network model includes: using ECASPDConv modules in the downsampling layers of the backbone network and neck network of the improved YOLOv11 network model; using C3k2DualAFE modules at the preset C3k2 module positions of the backbone network; using C3k2Dual modules at the preset C3k2 module positions of the neck network; and adding a high-resolution detection head based on deep feature upsampling and fusion with shallow features at the model head.

[0013] The improved YOLOv11 network model is trained using the training set, and the performance is evaluated using the validation set to obtain the object detection model;

[0014] The test set is input into the target detection model to obtain the beach litter detection results.

[0015] Optionally, the process of collecting beach litter images to construct a beach litter detection dataset includes:

[0016] The collected images of beach litter were screened and labeled, with the labeled categories including plastic, foam, paper, metal, wood, fabric, glass, rubber, fishing nets, cigarette butts, and biological remains.

[0017] The labeled dataset was divided into training, validation, and test sets in a ratio of 7:2:1.

[0018] Optionally, the improved YOLOv11 network model includes: a backbone network, a neck network, and a head network; the backbone network includes: ordinary convolutional layers, ECASPDConv modules, C3k2DualAFE modules, and spatial pyramid pooling fast layers;

[0019] The process of using the C3k2DualAFE module for feature extraction at the preset C3k2 module locations in the backbone network includes:

[0020] The first feature map is obtained by performing a convolution operation on the input feature map;

[0021] Based on the segmentation of the first feature map, two second and third feature maps with half the number of channels are obtained;

[0022] The third feature map is passed to the adaptive feature enhancement bottleneck module, where bi-branch convolution and ordinary convolution operations are performed sequentially to obtain the fourth feature map.

[0023] The fourth feature map is regressively joined with the third feature map to obtain the fifth feature map;

[0024] The fifth feature map and the second feature map are concatenated along the channel dimension to obtain the sixth feature map;

[0025] A convolution operation is performed on the sixth feature map to obtain a multi-scale feature map.

[0026] Optionally, the process of performing the bi-branch convolution operation in the adaptive feature enhancement bottleneck module includes:

[0027] The third feature map is subjected to parallel convolution using parallel 3×3 grouped convolution and 1×1 convolution;

[0028] The output feature map of the 3×3 grouped convolution is added element-wise to the output feature map of the 1×1 convolution to obtain the output of the bi-branch convolution.

[0029] Optionally, the neck network includes an upsampling layer, a feature splicing layer, a C3k2Dual module, and an ECASPDConv module;

[0030] The process of using the C3k2Dual module to perform cross-layer fusion of multi-scale feature maps output by the backbone network at the preset C3k2 module location in the neck network includes:

[0031] The seventh feature map is obtained by performing a convolution operation on the multi-scale feature map output by the backbone network.

[0032] The seventh feature map is segmented to obtain two eighth and ninth feature maps with half the number of channels;

[0033] The ninth feature map is passed to the dual-branch bottleneck module to perform dual-branch convolution and ordinary convolution operations in sequence to obtain the tenth feature map;

[0034] The eleventh feature map is obtained by performing a residual connection operation between the tenth feature map and the ninth feature map.

[0035] The eleventh feature map and the eighth feature map are concatenated along the channel dimension to obtain the twelfth feature map;

[0036] The twelfth feature map is convolved to obtain the final output feature map.

[0037] Optionally, the process of feature extraction using the ECASPDConv module in the downsampling layers of the backbone network and neck network includes:

[0038] The images in the beach litter detection dataset are processed by a regular convolutional layer and then input into the ECASPDConv module to obtain the main branch feature map and the residual branch feature map.

[0039] The main branch feature map is convolved sequentially using a dual-branch convolution module and a spatial-to-channel convolution module to obtain the feature map output by the spatial-to-channel convolution.

[0040] An efficient channel attention mechanism is used to weight the feature maps output by spatial-to-channel convolution to obtain the final main branch output feature map.

[0041] The residual branch feature map is then subjected to average pooling and 1×1 convolution operations in sequence to obtain the final residual branch output feature map.

[0042] The final fused feature map is obtained by adding the final main branch output feature map and the final residual branch output feature map element by element.

[0043] Optionally, the process of weighting the feature maps output by the spatial-to-channel convolution using an efficient channel attention mechanism includes:

[0044] Global average pooling is performed on the feature map output by the spatial-to-channel convolution to obtain the channel descriptor;

[0045] After processing the channel descriptor with one-dimensional convolution, the channel attention weight vector is obtained by activation with the Sigmoid function;

[0046] The channel attention weight vector is multiplied at the channel level with the feature map output by the spatial-to-channel convolution to obtain the final main branch output feature map.

[0047] Optionally, the performance metrics used for performance evaluation with the validation set include: precision, recall, and mean precision.

[0048] The present invention also provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described thereon.

[0049] The present invention also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0050] Compared with the prior art, the present invention has the following advantages and technical effects:

[0051] The main technical advantage of this invention lies in its significantly improved detection accuracy and robustness for multi-scale, especially small-sized, debris targets in complex beach environments. By introducing the ECASPDConv module to optimize feature preservation during downsampling, combining it with the C3k2DualAFE module to enhance deep semantic feature representation, and adding a high-resolution detection head to fuse shallow detail information, this invention effectively alleviates the technical bottlenecks of traditional methods in dealing with inter-class imbalance, loss of small target features, and interference from complex backgrounds. This method enables more accurate debris identification and localization, providing reliable technical support for the automated monitoring and cleanup of beach debris, and improving the overall efficiency and intelligence level of coastal environmental monitoring. Attached Figure Description

[0052] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0053] Figure 1 This is a schematic diagram of the multi-scale beach litter detection method based on the improved YOLOv11 algorithm according to an embodiment of the present invention;

[0054] Figure 2 This is a diagram illustrating the overall structure of the improved YOLOv11 algorithm according to an embodiment of the present invention.

[0055] Figure 3 This is a structural diagram of the spatial-to-channel convolution module (ECASPDConv) based on an efficient channel attention mechanism according to an embodiment of the present invention;

[0056] Figure 4 This is a structural diagram of a cross-stage network module (C3k2Dual) combining dual-branch convolution in an embodiment of the present invention;

[0057] Figure 5 This is a structural diagram of the cross-stage network module (C3k2DualAFE) combined with the adaptive feature enhancement module in an embodiment of the present invention. Detailed Implementation

[0058] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0059] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0060] Example 1.

[0061] like Figure 1 As shown, this embodiment provides a multi-scale beach litter detection method based on an improved YOLOv11 algorithm. The aim is to improve the YOLOv11 algorithm, overcome its shortcomings in beach litter detection, enhance detection accuracy, and achieve rapid and precise detection of beach litter. This provides strong technical support for beach environmental monitoring and litter cleanup. The method includes the following steps:

[0062] Step 1. Construct a beach litter detection dataset. Collected beach litter images are filtered and labeled, and the dataset is divided into training, validation, and test sets in a 7:2:1 ratio. The dataset in Step 1 includes samples of various types of beach litter, covering plastic, cigarette butts, foam, fishing nets, paper, metal, glass, wood, woven fabrics, rubber, and biological remains. The dataset is divided into training, validation, and test sets in a 7:2:1 ratio.

[0063] As a specific implementation method in this embodiment, in the initial stage of dataset construction, a large number of beach scene images were captured using a digital camera, and different types of litter in the images were finely labeled. The labels not only distinguished the litter from the background but also clearly differentiated various litter categories, including plastic, cigarette butts, foam, fishing nets, paper, metal, glass, wood, woven fabrics, rubber, and biological remains. This multi-category labeling method ensures that the training data covers the main types of litter in the actual beach environment, guaranteeing the diversity and representativeness of the dataset. By dividing the data into training, validation, and test sets in a 7:2:1 ratio, sufficient training samples are provided for the model. The validation set is used to adjust parameters and select the model, while the test set provides an independent benchmark for final performance evaluation, thus ensuring the standardization of the model training process and the objectivity of the detection results. This dataset construction method provides a solid data foundation for the subsequent training and performance validation of the improved model (EDA-YOLO).

[0064] Step 2. Construct an improved YOLOv11 network model. The improved YOLOv11 network model consists of three parts: backbone, neck, and head.

[0065] The proposed feature layering process using the ECASPDConv module in the downsampling layers of the backbone and neck networks includes: processing images from the beach litter detection dataset through ordinary convolutional layers and inputting them into the ECASPDConv module to obtain main branch feature maps and residual branch feature maps; sequentially performing convolution processing on the main branch feature maps using a dual-branch convolution module and a spatial-to-channel convolution module to obtain spatial-to-channel convolution output feature maps; employing an efficient channel attention mechanism to weight the spatial-to-channel convolution output feature maps to obtain the final main branch output feature map; sequentially performing average pooling and 1×1 convolution operations on the residual branch feature maps to obtain the final residual branch output feature map; and element-wise summing of the final main branch output feature map and the final residual branch output feature map to obtain the final fused feature map.

[0066] Furthermore, the Backbone section includes ordinary convolutional layers, ECASPDConv modules, C3k2DualAFE modules, and spatial pyramid pooling fast layers (SPPF) to achieve hierarchical extraction of multi-scale features.

[0067] Furthermore, the ECASPDConv module includes the following steps:

[0068] Step 201. Divide the input feature map into two identical feature maps, one as the input of the main branch and the other as the input of the residual branch;

[0069] Step 202. Perform a bi-branch convolution operation on the main branch feature map to simultaneously extract local spatial features and cross-channel information;

[0070] Step 203. Input the feature map after the bi-branch convolution into the spatial-to-channel convolution module, and achieve lossless downsampling through spatial-to-channel transformation and non-stride convolution.

[0071] Step 204. Introduce an efficient channel attention mechanism to the feature map output by spatial-to-channel convolution. Use one-dimensional convolution with adaptive convolution kernels to generate attention weights between channels, thereby highlighting key features and suppressing irrelevant background information.

[0072] Step 205. Perform average pooling on the residual branch feature map to match the spatial size of the main branch;

[0073] Step 206. Perform a 1×1 convolution operation on the residual feature map after average pooling to adjust the number of channels and ensure consistency with the main branch result in terms of dimension;

[0074] Step 207. Add the outputs of the main branch and the residual branch element by element to obtain the final fused feature map.

[0075] In this specific implementation, the ECASPDConv module first copies the input feature map to the main branch and the residual branch. The main branch performs preliminary feature extraction through bi-branch convolution, utilizing a parallel mechanism of 3×3 grouped convolution and 1×1 pointwise convolution to achieve local feature capture and cross-channel fusion. Next, the main branch feature map passes through a space-to-channel convolution module, employing space-to-channel rearrangement to map spatial resolution information to the channel dimension, completing downsampling while preserving complete information. Since space-to-channel convolution may introduce redundant information, this invention introduces an efficient channel attention mechanism, generating channel weights through global average pooling and adaptive kernel-size one-dimensional convolution to enhance important features and suppress irrelevant noise. Simultaneously, the residual branch aligns its size and channels through average pooling and 1×1 convolution to ensure matching with the output features of the main branch. Finally, the results of the main branch and the residual branch are added element-wise, ensuring both the integrity of the information flow and enhancing the stability of gradient propagation.

[0076] Through this "extraction-downsampling-attention enhancement-residual alignment fusion" process, the ECASPDConv module effectively maintains feature representation capabilities while significantly reducing information loss and background interference. Compared to traditional convolutional downsampling, this module can better preserve spatial details and improve sensitivity to small target features, providing crucial support for high-precision detection of beach debris.

[0077] Furthermore, the C3k2DualAFE module includes the following steps:

[0078] Step 211. After performing a convolution operation on the input feature map, it is divided into two feature maps with half the number of channels;

[0079] Step 212. Pass one segmentation feature map directly to the concatenation layer, and the other to the adaptive feature enhancement bottleneck module for processing;

[0080] Step 213. In the adaptive feature enhancement bottleneck module, perform double-branch convolution operation and ordinary convolution operation in sequence, then pass it to the adaptive feature enhancement module for feature enhancement, then perform residual connection operation, and pass the intermediate results to the subsequent adaptive feature enhancement bottleneck module and splicing layer.

[0081] Step 214. Concatenate the outputs of all adaptive feature enhancement bottleneck modules and the directly passed feature maps along the channel dimension, and generate the final feature map through a convolutional layer.

[0082] In this specific implementation, the C3k2DualAFE module first convolves and segments the input feature map by channels. Half of the input feature map is directly passed as a shortcut connection, while the other half enters the adaptive feature enhancement bottleneck module. Internally, the adaptive feature enhancement bottleneck module first uses bi-branch convolution for efficient local feature extraction and channel information fusion, then further enhances its expressive power through ordinary convolution, and finally inputs the result into the adaptive feature enhancement module. The adaptive feature enhancement module includes a convolutional embedding module, a spatial context module, a feature refinement module, and a convolutional multilayer perceptron (MLP) module, capable of multi-scale context modeling, adaptive refinement, and non-linear enhancement of the input features. During processing, intermediate results are concatenated with the directly passed features along the channel dimension, and finally fused through convolutional layers to generate the output feature map. Through this "segmentation-feature extraction-feature enhancement-concatenation fusion" structure, the C3k2DualAFE module significantly improves deep semantic modeling capabilities and small object recognition capabilities while maintaining the network's lightweight nature, enabling the network to better adapt to garbage detection tasks in complex backgrounds.

[0083] As a preferred embodiment, the process of using the C3k2DualAFE module for feature extraction at the preset C3k2 module position of the backbone network includes: performing a convolution operation on the input feature map to obtain a first feature map; segmenting the first feature map to obtain two second and third feature maps with half the number of channels; passing the third feature map to the adaptive feature enhancement bottleneck module to perform bi-branch convolution and ordinary convolution operations in sequence to obtain a fourth feature map; performing a residual connection operation on the fourth and third feature maps to obtain a fifth feature map; concatenating the fifth and second feature maps in the channel dimension to obtain a sixth feature map; and performing a convolution operation on the sixth feature map to obtain a multi-scale feature map.

[0084] Furthermore, the neck network in Step 2 includes an upsampling layer, a feature splicing layer, a C3k2Dual module, and an ECASPDConv module, which perform cross-layer fusion of multi-scale features output by the backbone network.

[0085] Furthermore, the C3k2Dual module includes the following steps:

[0086] Step 221. After performing a convolution operation on the input feature map, it is divided into two feature maps with half the number of channels;

[0087] Step 222. Pass one segmentation feature map directly to the stitching layer, and the other to the dual-branch bottleneck module for processing;

[0088] Step 223. In the dual-branch bottleneck module, perform dual-branch convolution and ordinary convolution operations in sequence, then perform residual connection operations, and pass the intermediate results to the subsequent dual-branch bottleneck module and splicing layer.

[0089] Step 224. Concatenate the outputs of all dual-branch bottleneck modules and the directly passed feature maps along the channel dimension, and generate the final feature map through a convolutional layer.

[0090] As a specific implementation method in this embodiment, the C3k2Dual module first performs convolution and channel segmentation on the input feature map, dividing it into two parts. One part of the feature map is directly passed as a shortcut connection, while the other part enters the dual-branch bottleneck module. The dual-branch bottleneck module employs a dual-branch convolution structure, that is, spatial feature extraction and channel fusion are achieved through parallel 3×3 grouped convolutions and 1×1 pointwise convolutions, further enhanced by ordinary convolutions. During processing, intermediate results are retained and fed into the stitching layer along with the directly passed features. Finally, the stitched features are uniformly fused through convolutional layers. Through this "segmentation-feature extraction-stitching fusion" approach, the C3k2Dual module significantly reduces the number of model parameters and computational cost while maintaining feature richness, keeping the model lightweight and improving its operating efficiency, thereby achieving efficient detection of multi-scale beach debris targets.

[0091] As a preferred embodiment, the process of using the C3k2Dual module to perform cross-layer fusion of the multi-scale feature maps output by the backbone network at the preset C3k2 module position of the neck network includes: performing a convolution operation on the multi-scale feature maps output by the backbone network to obtain a seventh feature map; segmenting the seventh feature map to obtain two eighth and ninth feature maps with half the number of channels; passing the ninth feature map to the dual-branch bottleneck module to perform dual-branch convolution and ordinary convolution operations in sequence to obtain a tenth feature map; performing a residual connection operation on the tenth and ninth feature maps to obtain an eleventh feature map; concatenating the eleventh and eighth feature maps in the channel dimension to obtain a twelfth feature map; and performing a convolution operation on the twelfth feature map to obtain the final output feature map.

[0092] Furthermore, in Step 2, the detection head network adds a small target detection head to the original three detection head branches of YOLOv11.

[0093] Furthermore, the high-resolution detection head includes the following steps:

[0094] Step 231. Upsample the deep feature map of layer 16 to restore spatial resolution and enhance detail information;

[0095] Step 232. The upsampled deep feature map is concatenated with the shallow feature map of layer 3 to combine high-level semantic information with low-level fine-grained features;

[0096] Step 233. Input the stitched feature map into the C3k2Dual module for feature fusion, and use dual-branch convolution and ordinary convolution operations to enhance cross-channel interaction and local spatial feature extraction.

[0097] Step 234. Pass the fused feature map to the detection head to generate a high-resolution prediction layer for detecting small targets.

[0098] As a specific implementation of this embodiment, the high-resolution detection head significantly improves the ability to perceive small targets by effectively fusing deep semantic features and shallow fine-grained features. Specifically, the deep feature map of layer 16 contains rich high-level semantic information, but its low resolution is not conducive to preserving the edge and texture details of small targets; the shallow feature map of layer 3 retains more spatial details, but lacks semantic expressive power. By upsampling the features of layer 16 to the same size as the features of layer 3 and stitching them together in the channel dimension, the complementarity of semantic information and fine-grained information can be achieved.

[0099] In the stitched feature maps, directly stacking features from different levels can lead to redundant and imbalanced representations. Therefore, the C3k2Dual module is further introduced for fusion. The C3k2Dual module utilizes a hybrid bottleneck structure of dual-branch convolution and ordinary convolution to effectively compress redundant features, enhance key detail representations, and improve feature interaction capabilities. Finally, the fused features are passed to the detection head, constructing a high-resolution detection branch based on shallow features from layer 3 and deep features from layer 16. This detection branch can perceive and locate the input image at a finer scale, thereby improving the detection accuracy of small litter targets (such as cigarette butts, plastic fragments, and glass shards).

[0100] Through this process of "deep upsampling - shallow stitching - feature fusion - detection prediction," this invention adds a micro-scale detection head to the original YOLOv11 three-scale detection structure, forming a four-scale detection structure. This improvement expands the hierarchical range of the detection network, enhances the ability to perceive small targets, effectively reduces the false negative rate of small targets, and improves the overall detection accuracy and robustness.

[0101] Through the aforementioned structural modifications, EDA-YOLO significantly improves the recognition rate of small-target litter (such as cigarette butts, plastic fragments, and glass shards) while maintaining inference speed, thereby enhancing overall detection accuracy and robustness. This invention overcomes the shortcomings of traditional manual inspections, which are time-consuming, labor-intensive, and have unstable accuracy. It enables real-time automated detection and classification of beach litter, providing strong technical support for marine ecological protection and intelligent waste management.

[0102] Step 3. Input the training set obtained in Step 1 into the improved YOLOv11 network model and train it using the preferred training parameters.

[0103] Furthermore, the training parameters include the number of training epochs, batch size, learning rate, optimizer, and weight decay. The preferred settings are: 100 training epochs, 16 batch size, Auto optimizer, initial learning rate 0.01, momentum 0.937, and weight decay 0.0005.

[0104] As a specific implementation method in this embodiment, precise setting of training parameters effectively ensures stable convergence of the model and the reliability of the final detection results. Specifically, setting the number of training epochs to 100 ensures sufficient training within a limited time while avoiding overfitting risks from overtraining; setting the batch size to 16 achieves a good balance between memory consumption and gradient update stability; using the Auto mode for the optimizer allows for adaptive adjustment of parameter update methods during training; setting the initial learning rate to 0.01, combined with momentum of 0.937 and weight decay of 0.0005, effectively suppresses oscillations, accelerates convergence, and prevents overfitting caused by excessively large model parameters. Through this scientifically sound parameter configuration, the EDA-YOLO model of this invention can quickly converge during the training phase and exhibit excellent detection accuracy and robustness during the testing phase, providing strong support for real-time automated detection of beach debris targets.

[0105] Step 4. Input the validation set obtained in Step 1 into the improved YOLOv11 network model during the training process in Step 3, and evaluate the model performance by calculating metrics such as precision (P), recall (R), and mean average precision (mAP).

[0106] Step 5. Input the test set obtained in Step 1 into the improved YOLOv11 network model optimized in Step 4 to obtain the final detection results and complete the detection of beach litter.

[0107] Example 2.

[0108] like Figure 1As shown, this embodiment designs a multi-scale beach litter detection method based on the improved YOLOv11 algorithm, including a method for constructing a beach litter dataset and a multi-scale beach litter detection method based on the improved YOLOv11 algorithm.

[0109] The specific process of constructing the beach litter dataset includes:

[0110] Step 1. At several representative beaches, use high-resolution cameras to collect images of litter at different times of day and under different lighting conditions, including early morning, noon, and evening;

[0111] The purpose of the above process is to ensure that the dataset can cover various real-world scenarios for beach litter detection;

[0112] Step 2. Filter the data from the images acquired in Step 1;

[0113] Step 3. Perform rigorous, completely manual annotation on the high-quality samples obtained from Step 2.

[0114] Step 4. Screen and compare the annotation results of Step 3 one by one, and discuss the controversial samples to finally form a high-quality annotated dataset;

[0115] Step 5. Analyze the high-quality labeled dataset obtained in Step 4, and implement targeted data augmentation strategies and divide the dataset according to a 7:2:1 ratio.

[0116] Preferably, the images acquired in Step 1 cover 11 common types of beach litter: plastic, foam, paper products, metal, wood, fabric, glass, rubber, fishing net, cigarette butt, and biological debris.

[0117] Preferably, the data filtering of the images acquired in Step 1 in Step 2 includes the following filtering criteria:

[0118] Step 201. Considering image quality, eliminate images with blurred focus, overexposure, and severe shadow interference;

[0119] Step 202. Consider the effectiveness of annotations and remove images that are severely occluded or show significant disagreement among annotators in the category annotations;

[0120] Step 203. Consider the representativeness of the scene and remove images that do not conform to the actual application scenario.

[0121] Preferably, the labeling process in Step 3 uses the LabelImg tool and is performed independently by two labelers.

[0122] Preferably, the targeted data augmentation strategy and dataset partitioning in Step 5 include:

[0123] Step 501. To address the issues of class imbalance and insufficient sample size in the dataset, a two-stage progressive data augmentation strategy is adopted.

[0124] The two-stage progressive data augmentation strategy comprises two phases: In the first phase, sample augmentation is performed on niche categories to alleviate class imbalance; these niche categories include rubber, fishing nets, cigarette butts, and animal carcasses. In the second phase, based on the results of the previous phase, all categories are further augmented to expand the dataset size. Each augmented image is generated by randomly combining multiple data augmentation techniques, including adding noise, adjusting brightness, cropping, translation, rotation, mirroring, and random occlusion of image regions (Cutout).

[0125] Preferably, the dataset obtained after augmentation using a two-stage progressive data augmentation strategy is divided into a training set, a validation set, and a test set in a ratio of 7:2:1.

[0126] Step 502. For categories that are too small in size and visually similar to the beach background or other objects, making it difficult for the model to extract their features, a cross-domain detection enhancement strategy is adopted.

[0127] Preferably, the cross-domain detection enhancement strategy in step 502 is adopted for the cigarette butt category, that is, the cross-domain cigarette butt detection enhancement strategy is adopted;

[0128] Among them, the cross-domain cigarette butt detection enhancement strategy refers to improving the model's ability to detect cigarette butts in beach scenes by fusing cigarette butt data from different data distribution domains; where different data distribution domains include real beach cigarette butt sample data and synthetic cigarette butt sample data;

[0129] The synthetic cigarette butt sample data comes from a cigarette butt dataset, which consists of a set of 2,200 synthetic images of cigarettes on the ground. The images were automatically synthesized by custom code, and random scaling, rotation, brightness and other factors were applied to the foreground cutout using a Python image library. The photos of the ground and cigarette butts were taken by the provider on a beach off the coast of Austin, Texas, USA.

[0130] The approach to cross-domain cigarette butt enhancement is as follows:

[0131] Select images from the cigarette butt dataset that are similar to the beach background;

[0132] Manually label images that resemble beach backgrounds;

[0133] The manually labeled images are added to the training set defined in step 501.

[0134] Example 3.

[0135] The specific process of improving the multi-scale beach litter target detection method of the YOLOv11 algorithm includes:

[0136] Step 1. Based on the method for constructing the beach litter dataset proposed in this invention, construct the training set, validation set, and test set;

[0137] Step 2. Construct the improved YOLOv11 network (EDA-YOLO) model;

[0138] Step 3. Set the training parameters, including 100 training epochs, batch size 16, optimizer set to Auto, initial learning rate 0.01, momentum 0.937, and weight decay 0.0005. Use the training set obtained in step S1 to train the EDA-YOLO model constructed in step S2, and obtain the trained EDA-YOLO model weight file.

[0139] Step 4. Input the training set obtained in Step 1 into the EDA-YOLO model for training;

[0140] Step 5. Input the validation set obtained in Step 1 into the EDA-YOLO model during the training process in Step 4, and evaluate the model performance by calculating metrics such as precision, recall, and mean precision.

[0141] Step 6. Input the test set obtained in Step 1 into the optimized EDA-YOLO model in Step 5 to obtain the final detection results and complete the detection of beach litter.

[0142] like Figure 2 As shown, the EDA-YOLO model consists of three parts: the backbone, the neck, and the head. The backbone includes convolutional layers, ECASPDConv modules, C3k2DualAFE modules, and SPPF layers, which are used to extract multi-scale features in a hierarchical manner.

[0143] The neck section includes an upsampling layer, a splicing layer, a C3k2Dual module, and an ECASPDConv module, which are used to perform cross-layer fusion of multi-scale features output from the backbone to generate multi-scale feature maps.

[0144] The detection head network is based on the original detection head branch of YOLOv11 ( ~ Based on this, a small target detection head was added. Its downsampling rate is 1 / 4; High-resolution feature maps directly processed by the detection head This establishes a four-level detection system, corresponding to the four scale feature maps output by the neck network.

[0145] As a preferred embodiment, YOLOv11 incorporates the ECASPDConv module in both its backbone and neck network (except for layer 1). This module consists of Dual Convolution (DualConv), Space-to-Depth Convolution (SPDConv), Efficient Channel Attention (ECA), and residual connections, and its overall structure is as follows: Figure 3 As shown.

[0146] For the input feature map ,in, Indicates the feature map height. Indicates the width of the feature map. This indicates the number of channels. The ECASPDConv module processes the data as follows:

[0147] Step 1. Input feature map Copy into two branches: the main branch With residual branch ,Right now:

[0148]

[0149] Step 2. Optimize the main branch Input a two-branch convolution module. Two-branch convolution consists of parallel... Grouped convolution and Convolutional structure:

[0150]

[0151] in, Represents grouped convolution. This represents element-wise summation for feature maps. , This represents the number of output channels for a two-branch convolution;

[0152] Step 3. Feature map The input is a spatial-to-channel convolution module. First, through spatial-to-channel mapping, we obtain... .in, This represents the scaling factor. The features are then transformed using a standard convolution:

[0153]

[0154] Step 4. Process the feature map Perform global average pooling (GAP) and generate attention weight vectors through one-dimensional convolution. ,in:

[0155]

[0156] in, This represents the Sigmoid activation function. The final attention-weighted features are:

[0157]

[0158] Step 5. Residual Branching Adjust the spatial resolution using average pooling. After Convolution adjustment channel number:

[0159]

[0160] Step 6. Modify the main branch With residual branch Add element by element:

[0161]

[0162] in, This is the final output feature map.

[0163] The ECASPDConv module can maintain information integrity while reducing the spatial resolution of the feature map, highlight key target features and suppress invalid background interference, effectively improving the network's ability to detect small targets in complex beach scenes.

[0164] In a preferred embodiment, the C3k2 modules in layers 13, 16, 19, 22, 25, and 28 of the YOLOv11 network neck region are replaced with C3k2Dual modules. This module consists of an input convolutional layer, a dual-branch bottleneck module, a feature concatenation layer, and an output convolutional layer, and its overall structure is as follows: Figure 4 As shown.

[0165] For the input feature map ,in, Indicates the feature map height. Indicates the width of the feature map. This indicates the number of channels. The processing procedure of the C3k2Dual module is as follows:

[0166] Step 1. Input feature map After performing a convolution transformation, it is divided into two parts:

[0167]

[0168] in, , .

[0169] Step 2. Process the segmented feature maps Input a two-branch bottleneck module. The bottleneck module consists of a two-branch convolution and a regular convolution:

[0170]

[0171] The bi-branch convolution simultaneously includes Grouped convolution (GC) and convolution.

[0172] Step 3. The feature map after bottleneck processing With feature map Perform residual join operation by adding elements one by one:

[0173]

[0174] Step 4. Process the unprocessed feature map Feature map after bottleneck processing splicing:

[0175]

[0176] Step 5. Process the feature map Perform convolutional fusion to obtain the final output feature map:

[0177]

[0178] in, , This represents the number of output channels.

[0179] The C3k2Dual module effectively reduces the number of model parameters and computational load while ensuring detection accuracy, achieving lightweight and efficient network performance.

[0180] In a preferred embodiment, the C3k2 modules in layers 3, 5, 7, and 9 of the YOLOv11 network backbone are replaced with C3k2DualAFE modules. This module, based on the C3k2Dual structure, further introduces an Adaptive Feature Enhancement Block (AFEBlock) to enhance the deep semantic feature representation capability. Its overall structure is as follows: Figure 5 As shown.

[0181] For the input feature map ,in, Indicates the feature map height. Indicates the width of the feature map. This indicates the number of channels. The processing procedure of the C3k2DualAFE module is as follows:

[0182] Step 1. Process the input feature map Perform a convolution operation and split the result into two parts:

[0183]

[0184] in, , .

[0185] Step 2. Segment feature map Inputting the dual-branch convolutional module yields a preliminary enhanced feature map:

[0186]

[0187] Step 3. Feature map The input is an adaptive feature enhancement module, which includes convolutional embedding (CE), spatial context modeling (SCM), feature refinement module (FRM), and convolutional MLP (ConvMLP). The combined effect yields the enhanced feature map. ;

[0188] Step 4. The feature map after bottleneck processing With feature map Perform residual join operation by adding elements one by one:

[0189]

[0190] Step 5. Transfer the feature map With enhanced feature maps splicing along the channel dimension:

[0191]

[0192] Step 6. Process the stitched feature map Perform convolutional fusion to obtain the final output feature map:

[0193]

[0194] in, , This represents the number of output channels.

[0195] The C3k2DualAFE module significantly improves the feature modeling capabilities for small targets and complex scenes while maintaining a lightweight design, thereby enhancing the network's robustness and detection accuracy.

[0196] As a preferred embodiment, a high-resolution detection head is added to the YOLOv11 detection head network to enhance the detection capability for small targets. Its structure includes an upsampling layer, a feature stitching layer, a C3k2Dual module, and a detection output layer.

[0197] For the 16th layer deep feature map , third layer shallow feature map ,in This requires upsampling to adjust both to the same spatial size. The processing procedure for the high-resolution detection head is as follows:

[0198] Step 1. Process the deep feature map Perform an upsampling operation to make its spatial dimensions consistent with those of the shallow features:

[0199]

[0200] Step 2. Upsample the deep feature map With shallow feature map splicing along the channel dimension:

[0201]

[0202] Step 3. Features The image is input into the C3k2Dual module for deep fusion and feature compression to obtain the feature map. ;

[0203] Step 4. Merge the feature maps Input the P2 detector head to generate the final prediction result. ;in, The number of predicted boxes for each grid. The number represents the number of waste categories, and 5 represents the bounding box parameters (center point coordinates, width, height, and confidence level).

[0204] By adding a high-resolution detection head layer, a four-scale detection head structure is constructed in the EDA-YOLO model. This design significantly improves the detection capability of small targets (such as cigarette butts and glass fragments), reduces the false negative rate, and enhances the overall detection accuracy and robustness of the model.

[0205] In a preferred embodiment, step 4, which involves inputting the training set obtained in step 1 into the EDA-YOLO model, includes:

[0206] Step 401. Process the training data in ordinary convolutional layer 1;

[0207] In this case, convolutional layer 1 has 3 input channels, 64 output channels, and a kernel size of [missing value]. The step size is 2; the purpose of this step is to reduce the size of the output feature map and change the number of data channels, reducing the feature map size from... Reduce to To achieve downsampling, the number of output channels of ordinary convolutional layer 1 is changed from 3 to 64, and the image is mapped from the RGB space to a higher-dimensional feature space. The number of channels is increased to enhance the expressive power.

[0208] Step 402. Process the data obtained in Step 401 into ECASPDConv module 1;

[0209] Among them, ECASPDConv module 1 has 64 input channels, 128 output channels, and a feature map size of [size missing]. The purpose of this step is to expand the receptive field during downsampling while preserving spatial details as much as possible. It also uses a high-efficiency channel attention mechanism to adaptively enhance useful channels, suppress background noise, and further increase the number of data channels to 128 to enhance feature representation capabilities and prepare for subsequent mining of deeper features.

[0210] Step 403. Process the data obtained in Step 402 into C3k2DualAFE module 1 for feature fusion and extraction to obtain feature maps. ;

[0211] In this module, C3k2DualAFE has 128 input channels, 128 output channels, and a feature map size of [size missing]. The purpose of this step is to enhance the features by adaptively enhancing their context and details through the feature adaptive enhancement module, thereby improving the low-level fine-grained representation.

[0212] Step 404. The feature map obtained in Step 403 Processing will then proceed within module 2 of ECASPDConv.

[0213] Among them, the ECASPDConv module 2 has 128 input channels, 256 output channels, and a feature map size of [size missing]. The purpose of this step is to expand the receptive field and retain key details as much as possible during downsampling, and to further increase the number of data channels to 256, thereby increasing the feature representation capability and preparing for subsequent mining of deeper features.

[0214] Step 405. Process the data obtained in Step 404 into C3k2DualAFE module 2 for feature fusion and extraction to obtain feature maps. ;

[0215] In this module, C3k2DualAFE has 256 input channels, 256 output channels, and a feature map size of [size missing]. The purpose of this step is to enrich the multi-scale mid-level semantic features by adaptively enhancing the features in terms of context and detail through the feature adaptive enhancement module.

[0216] Step 406. Transfer the feature map obtained in Step 405. Processing will then proceed within module 3 of ECASPDConv.

[0217] Among them, the ECASPDConv module 3 has 256 input channels, 512 output channels, and a feature map size of [size missing]. The purpose of this step is to expand the receptive field and retain key details as much as possible during downsampling, and to further increase the number of data channels to 512, thereby increasing the feature representation capability and preparing for subsequent mining of deeper features.

[0218] Step 407. Process the data obtained in Step 406 into the C3k2DualAFE module 3 to perform feature fusion and extraction, and obtain the feature map. ;

[0219] Among them, the C3k2DualAFE module 3 has 512 input channels, 512 output channels, and a feature map size of [size missing]. The purpose of this step is to enrich multi-scale, high-level semantic features by adaptively enhancing the features in terms of context and detail through the feature adaptive enhancement module.

[0220] Step 408. Transfer the feature map obtained in Step 407. Processing will then proceed within module 4 of ECASPDConv.

[0221] Specifically, the ECASPDConv module 4 has 512 input channels, 1024 output channels, and a feature map size of [size missing]. The purpose of this step is to expand the receptive field and retain key details as much as possible during downsampling, and to further increase the number of data channels to 512, thereby increasing the feature representation capability and preparing for subsequent mining of deeper features.

[0222] Step 409. Process the data obtained in Step 408 into the C3k2DualAFE module 4 to perform feature fusion and extraction, and obtain the feature map. ;

[0223] Among them, the C3k2DualAFE module 4 has 1024 input channels, 1024 output channels, and a feature map size of [size missing]. The purpose of this step is to enhance the high-level semantic representation by adaptively enhancing the features in terms of context and details through the feature adaptive enhancement module.

[0224] Step 410. The data obtained in Step 409 is processed in the SPPF layer. Multi-scale pooling is used to extract information at different scales from the input feature map, and contextual information from different receptive fields is aggregated to enhance adaptability to targets at different scales, resulting in the final feature map. ;

[0225] The SPPF layer has 1024 input channels, and the pooling kernel size is [missing value]. The number of output channels is 1024, and the feature map size is [size missing]. ;

[0226] Step 411. Transfer the feature map obtained in Step 410. Processing is performed within the upsampling layer 1;

[0227] In this layer, upsampling layer 1 uses nearest neighbor interpolation to achieve a 2x upsampling, which modifies the feature map. The size is determined by Zoom in ;

[0228] Step 412. Transfer the feature map obtained in Step 407. The data obtained in Step 411 is processed in the feature splicing layer 1.

[0229] In this process, feature stitching layer 1 will stitch together the feature map with 512 channels obtained in step 407. The data with 1024 channels obtained in Step 411 is concatenated along the channel dimension to output a feature map with 1536 channels.

[0230] Step 413. Process the data obtained in Step 412 into C3k2Dual module 1 to obtain the feature map. ;

[0231] Among them, the C3k2Dual module 1 has 1536 input channels and 512 output channels;

[0232] Step 414. Transfer the feature map obtained in Step 413. Processing is performed within the upper sampling layer 2;

[0233] In this layer, upsampling layer 2 uses nearest neighbor interpolation to achieve a 2x upsampling, which modifies the feature map. The size is determined by Zoom in ;

[0234] Step 415. Transfer the feature map obtained in Step 405. The data obtained in Step 414 is processed in the feature splicing layer 2.

[0235] In this process, the feature splicing layer 2 will combine the feature map with 256 channels obtained in step 405. The data with 512 channels obtained in Step 414 is concatenated along the channel dimension to output a feature map with 768 channels.

[0236] Step 416. Process the data obtained in Step 415 into C3k2Dual module 2 to obtain the feature map. ;

[0237] Among them, the C3k2Dual module 2 has 768 input channels and 256 output channels;

[0238] Step 417. Transfer the feature map obtained in Step 416 Processing is performed within the upsampling layer 3;

[0239] Among them, upsampling layer 3 uses the nearest neighbor interpolation method to achieve 2x upsampling, which will improve the feature map. The size is determined by Zoom in ;

[0240] Step 418. Transfer the feature map obtained in Step 403. The data obtained in Step 417 is processed in the feature splicing layer 3.

[0241] Among them, the feature splicing layer 3 will use the feature map with 128 channels obtained in step 403. The data with 256 channels obtained in Step 417 is concatenated along the channel dimension to output a feature map with 384 channels.

[0242] Step 419. Process the data obtained in Step 418 into C3k2Dual module 3 to obtain the feature map. ;

[0243] Among them, the C3k2Dual module 3 has 384 input channels and 128 output channels;

[0244] Step 420: Obtain the feature map from Step 419. Processing will then proceed within module 5 of ECASPDConv.

[0245] In this module, ECASPDConv 5 has 128 input channels and 128 output channels; the purpose of this step is to reduce the size of the output feature map, changing the feature map size from... Reduce to This achieves downsampling while preserving key detail features as much as possible;

[0246] Step 421. Transfer the feature map obtained in Step 416. The data obtained in Step 420 is processed in the feature splicing layer 4.

[0247] Among them, the feature splicing layer 4 uses the feature map with 256 channels obtained in step 416. The data with 128 channels obtained in Step 420 is concatenated along the channel dimension to output a feature map with 384 channels.

[0248] Step 422. Process the data obtained in Step 421 into C3k2Dual module 4 to obtain the feature map. ;

[0249] Among them, the C3k2Dual module 4 has 384 input channels and 256 output channels;

[0250] Step 423. Transfer the feature map obtained in Step 422. Processing will then proceed within module 6 of ECASPDConv.

[0251] In this module, ECASPDConv 6 has 256 input channels and 256 output channels. The purpose of this step is to reduce the size of the output feature map, decreasing its size from... Reduce to This achieves downsampling while preserving key detail features as much as possible;

[0252] Step 424: The feature map obtained in Step 413 and the data obtained in Step 423 are processed in the feature splicing layer 5.

[0253] Among them, the feature splicing layer 5 will use the feature map with 512 channels obtained in step 413. The data with 256 channels obtained in Step 423 is concatenated along the channel dimension to output a feature map with 768 channels.

[0254] Step 425. Process the data obtained in Step 424 into C3k2Dual module 5 to obtain the feature map. ;

[0255] Among them, the C3k2Dual module 5 has 768 input channels and 512 output channels;

[0256] Step 426. Transfer the feature map obtained in Step 425. Processing will then proceed within module 7 of ECASPDConv.

[0257] In this module, ECASPDConv 7 has 512 input channels and 512 output channels. The purpose of this step is to reduce the size of the output feature map, decreasing its size from... Reduce to This achieves downsampling while preserving key detail features as much as possible;

[0258] Step 427. Transfer the feature map obtained in Step 410. The data obtained in Step 426 is processed in the feature splicing layer 6.

[0259] Among them, the feature splicing layer 6 uses the feature map with 1024 channels obtained in step 410. The data with 512 channels obtained in Step 426 is concatenated along the channel dimension to output a feature map with 1536 channels.

[0260] Step 428. Process the data obtained in Step 427 into C3k2Dual module 6 to obtain the feature map. ;

[0261] Among them, the C3k2Dual module 6 has 1536 input channels and 1024 output channels;

[0262] Step 429. Input the data obtained in Step 419. The detection head performs the detection;

[0263] in, The downsampling rate of the detection head is 1 / 4, and the processing resolution is [missing information]. Feature map ;

[0264] Step 430. Input the data obtained in Step 422. The detection head performs the detection;

[0265] in, The downsampling rate of the detection head is 1 / 8, and the processing resolution is... Feature map ;

[0266] Step 431. Input the data obtained in Step 425. The detection head performs the detection;

[0267] in, The downsampling rate of the detection head is 1 / 16, and the processing resolution is [missing information]. Feature map ;

[0268] Step 432. Input the data obtained in Step 428. The detection head performs the detection;

[0269] in, The downsampling rate of the detection head is 1 / 32, and the processing resolution is [missing information]. Feature map .

[0270] In step S3, the specific implementation method is as follows:

[0271] In terms of the experimental environment, the host operating system was Ubuntu 24.04 LTS, the CPU was an AMD Ryzen 9 7900X (12-core processor), and the GPU was an NVIDIA GeForce RTX 4090 with 24 GB of video memory to meet the needs of large-scale data training. For the software environment, Python 3.9.19 was used as the development language, PyTorch 2.4.1 as the deep learning framework, and CUDA version 12.4. Visual Studio Code was chosen as the code development and debugging platform, and the YOLOv11 framework was configured and extended, with improved modules used to build the EDA-YOLO model. Regarding training parameters, the model training was set to 100 epochs, a batch size of 16, an initial learning rate of 0.01, an Auto optimizer, a momentum parameter of 0.937, and a weight decay of 0.0005, which can suppress overfitting while ensuring convergence speed.

[0272] In step S4, the specific implementation method is as follows:

[0273] After the model training is completed, the performance of the EDA-YOLO model trained in step S3 is evaluated using the independent test set in the pre-divided dataset in step S1.

[0274] First, all images in the test set are preprocessed using a uniform method and input into the trained model. The model outputs detection results, including the predicted object category, bounding box location, and confidence score. Then, the prediction results are compared one by one with the manually labeled ground truth tags to calculate the detection performance metrics.

[0275] Regarding evaluation metrics, this invention adopts precision, recall, and mean average precision (mAP), which are commonly used in object detection tasks, as the main evaluation standards:

[0276]

[0277]

[0278]

[0279]

[0280] in, It is the correct target for detection. It is the target of error detection. It is an undetected target. It is the total number of categories. It is the average precision. It is a category The average accuracy.

[0281] To further verify the effectiveness of the model in detecting small targets, this invention performs stratified statistical analysis on the detection accuracy of targets of different sizes. Specifically, beach litter targets are divided into four categories—micro-targets, small targets, medium targets, and large targets—based on the pixel area of ​​their bounding boxes. The corresponding precision and recall are calculated for each category, thereby objectively evaluating the performance of the improved model in detecting micro-targets such as cigarette butts, plastic fragments, and glass shards.

[0282] In addition, this invention also conducted ablation experiments, comparative experiments, and generalization experiments. In the ablation experiments, improved modules such as ECASPDConv, C3k2Dual, C3k2DualAFE, and a high-resolution detection head were introduced to analyze model performance and verify the role of each improved module in improving overall detection performance. In the comparative experiments, EDA-YOLO was compared with the original YOLOv11 algorithm and other algorithms under the same dataset and parameter settings. The results showed that the method of this invention has significant advantages in both overall mAP value and detection accuracy for small targets. In the generalization experiments, the method of this invention and other algorithms underwent cross-domain generalization experiments on the publicly available VisDrone2019 dataset and BePLi v2 dataset to verify the generalization ability and robustness of the improved algorithm of this invention.

[0283] Table 1

[0284]

[0285] The ablation experiment results are shown in Table 1. Using YOLOv11 as the baseline model, its precision, recall, and mAP were 96.5%, 90.7%, and 94.3%, respectively, with 2.9M parameters. The detection performance was continuously improved as more modules were introduced: In Scheme A, after introducing a high-resolution detector, the recall increased from 90.7% to 93.7%, and the mAP increased to 97.0%, indicating that this module effectively improved the detection capability of small targets, and this model was used as the baseline model in subsequent experiments; Scheme B further added the C3k2DualAFE module to the high-resolution detector, increasing the recall to 94.2% and the mAP to 97.3%, indicating that this module has good feature enhancement effects in complex scenes; Scheme C further added C... The 3k2Dual module improved the model's recall to 93.6% and mAP to 97.0%, demonstrating that dual-branch convolution maintains strong feature representation capabilities while reducing computational cost. Scheme D further added the ECASPDConv module to the high-resolution detection head, improving recall to 94.1% and mAP to 97.2%, showcasing the module's advantage in preserving fine-grained information during downsampling. When all four improved modules were applied to EDA-YOLO, precision, recall, and mAP reached 97.6%, 97.9%, and 97.9%, respectively, with a parameter count of 3.9M. This achieved optimal overall performance without a significant increase in parameter count, balancing detection accuracy and efficiency.

[0286] Table 2

[0287]

[0288] The comparative experimental results are shown in Table 2. Under the same dataset and training conditions, EDA-YOLO and YOLOv11 showed significant differences in detection accuracy for different categories of beach litter. The overall mAP of YOLOv11 was 94.3%, while the overall mAP of EDA-YOLO was improved to 97.9%. Specifically, for most categories, including plastics, foam, paper, metals, wood, textiles, glass, rubber, fishing nets, and biological remains, the AP values ​​of EDA-YOLO were higher than those of YOLOv11, with improvements ranging from 1% to 3%, indicating that the method of this invention can maintain high robustness even in complex backgrounds. In the detection of small targets such as cigarette butts, the AP value of YOLOv11 was only 65.4%, while EDA-YOLO improved to 89.5%, significantly improving the detection rate of small targets. Furthermore, in comparison with novel lightweight detectors, EDA-YOLO achieved an overall mAP 4.0% and 23.8% higher than YOLOv10 and YOLOv11, respectively, demonstrating its stronger feature extraction capabilities while maintaining a lightweight structure. Compared to YOLOv12, which has an overall mAP of 92.0% and a cigarette butt detection accuracy of only 54.8%, EDA-YOLO improved the overall mAP by 5.9% and the cigarette butt detection accuracy by 34.7%, fully demonstrating the model's superior performance and generalization ability in fine-grained litter detection and adaptation to complex scenarios.

[0289] The generalization results on the VisDrone2019 dataset are shown in Table 3. The proposed EDA-YOLO model demonstrates a significant performance improvement compared to other detection models. The YOLOv11 model achieved a precision of 43.9%, a recall of 32.6%, and a mAP of 32.6%, while the EDA-YOLO model, under the same experimental conditions, achieved a precision of 46.9%, a recall of 36.6%, and an mAP of 37.1%, representing improvements of 3.0%, 4.0%, and 4.5%, respectively. This indicates that the present invention effectively enhances the detection capability for multi-scale and complex background targets while balancing detection accuracy and efficiency.

[0290] Table 3

[0291]

[0292] The generalization results on the BePLi v2 dataset are shown in Table 4. Due to the complex scenes in this dataset, including uneven lighting, cluttered backgrounds, and small targets, the detection performance of all models decreased. The YOLOv11 model achieved a precision of 20.5%, a recall of 20.1%, and an mAP of 13.0%, while the EDA-YOLO model achieved precision of 20.5%, recall of 21.7%, and mAP of 14.2%, respectively, representing a 1.6% improvement in recall and a 1.2% improvement in mAP. The proposed EDA-YOLO model achieves stable detection performance, especially maintaining a high detection recall under conditions of low contrast, varying lighting, and target occlusion.

[0293] Table 4

[0294]

[0295] Through the above testing and evaluation process, it can be fully verified that the present invention has significant advantages in detecting beach litter (especially small targets) in complex backgrounds and in terms of robustness, providing a reliable basis for its use in actual coastal environments for litter monitoring, sorting and recycling.

[0296] This embodiment also provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described thereon.

[0297] This embodiment also provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the method described thereon.

[0298] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A multi-scale beach litter detection method based on an improved YOLOv11 algorithm, characterized in that, The method comprises the following steps: Collecting beach garbage image to construct a beach garbage detection dataset, wherein the beach garbage detection dataset comprises a training set, a validation set and a test set; Constructing an improved YOLOv11 network model, wherein the improvement process of the improved YOLOv11 network model comprises: adopting an ECASPDConv module in the down-sampling layer of the backbone network and the neck network of the improved YOLOv11 network model, adopting a C3k2DualAFE module at a preset C3k2 module position of the backbone network, adopting a C3k2Dual module at a preset C3k2 module position of the neck network, and adding a high-resolution detection head based on deep feature up-sampling and shallow feature splicing fusion at the head of the model; Training the improved YOLOv11 network model by using the training set, and performing performance evaluation by using the validation set to obtain a target detection model; Inputting the test set into the target detection model to obtain a beach garbage detection result; The improved YOLOv11 network model comprises a backbone network, a neck network and a head network; the backbone network comprises a general convolution layer, an ECASPDConv module, a C3k2DualAFE module and a spatial pyramid pooling fast layer; The process of feature extraction by adopting the C3k2DualAFE module at the preset C3k2 module position of the backbone network comprises: Performing convolution operation on the input feature map to obtain a first feature map; Segmenting the first feature map to obtain two second feature maps and third feature maps with half of the channel number; Passing the third feature map to an adaptive feature enhancement bottleneck module to sequentially perform double-branch convolution operation and general convolution operation to obtain a fourth feature map; Performing residual connection operation on the fourth feature map and the third feature map to obtain a fifth feature map; Splicing the fifth feature map and the second feature map in the channel dimension to obtain a sixth feature map; Performing convolution operation on the sixth feature map to obtain a multi-scale feature map; The process of double-branch convolution operation in the adaptive feature enhancement bottleneck module comprises: Performing parallel convolution on the third feature map by using parallel 3×3 grouped convolution and 1×1 convolution; Performing element-wise addition on the output feature map of the 3×3 grouped convolution and the output feature map of the 1×1 convolution to obtain the output of the double-branch convolution; The neck network comprises an up-sampling layer, a feature splicing layer, a C3k2Dual module and an ECASPDConv module; The process of cross-layer fusion of the multi-scale feature map output by the backbone network by adopting the C3k2Dual module at the preset C3k2 module position of the neck network comprises: Performing convolution operation on the multi-scale feature map output by the backbone network to obtain a seventh feature map; Segmenting the seventh feature map to obtain two eighth feature maps and ninth feature maps with half of the channel number; Passing the ninth feature map to a double-branch bottleneck module to sequentially perform double-branch convolution operation and general convolution operation to obtain a tenth feature map; Performing residual connection operation on the tenth feature map and the ninth feature map to obtain an eleventh feature map; The eleventh feature map is spliced with the eighth feature map in the channel dimension to obtain a twelfth feature map; The twelfth feature map is subjected to a convolution operation to obtain a final output feature map; The process of adopting the ECASPDConv module in the down-sampling layer of the backbone network and the neck network to perform feature hierarchical extraction includes: After the image in the beach garbage detection dataset is processed by a general convolution layer, the image is input into the ECASPDConv module to obtain a main branch feature map and a residual branch feature map; The main branch feature map is subjected to convolution processing by a double-branch convolution module and a spatial-to-channel convolution module in sequence to obtain a feature map output by spatial-to-channel convolution; The feature map output by spatial-to-channel convolution is weighted by using an efficient channel attention mechanism to obtain a final main branch output feature map; The residual branch feature map is subjected to an average pooling operation and a 1*1 convolution operation in sequence to obtain a final residual branch output feature map; The final main branch output feature map and the final residual branch output feature map are added element by element to obtain a final fusion feature map.

2. The multi-scale beach litter detection method based on improved YOLOv11 algorithm according to claim 1, characterized in that, The process of collecting beach garbage images to construct a beach garbage detection dataset includes: The collected beach garbage images are screened and labeled, wherein the labeled categories include plastic, foam, paper, metal, wood, fabric, glass, rubber, fishing net, cigarette butt, and biological debris; The labeled dataset is divided into a training set, a validation set, and a test set according to a ratio of 7:2:

1.

3. The multi-scale beach litter detection method based on improved YOLOv11 algorithm according to claim 1, characterized in that, The process of weighting the feature map output by spatial-to-channel convolution by using an efficient channel attention mechanism includes: The feature map output by spatial-to-channel convolution is subjected to global average pooling to obtain a channel descriptor; After the channel descriptor is processed by one-dimensional convolution, a channel attention weight vector is obtained by Sigmoid function activation; The channel attention weight vector and the feature map output by spatial-to-channel convolution are multiplied in the channel level to obtain the final main branch output feature map.

4. The multi-scale beach litter detection method based on improved YOLOv11 algorithm according to claim 1, characterized in that, The indicators for performance evaluation by using the validation set include precision, recall rate, and average precision mean.

5. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of claim 1.

6. A storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the method of claim 1.

Citation Information

Patent Citations

  • Marine litter detection method and device based on improved YOLOV8n

    CN117523360A

  • Underwater garbage detection method and system based on MSD-YOLO network

    CN120877076A