Improved yolo11n underwater target recognition detection method based on local and global perception

By improving the YOLO11n model and constructing the Local-Global Bottleneck Module (LGB), the problem of insufficient adaptive cascaded processing of local and global features in underwater target detection is solved, achieving high-precision, real-time underwater target recognition that can adapt to complex scenarios in different underwater environments.

CN121353874BActive Publication Date: 2026-03-27NORTHWESTERN POLYTECHNICAL UNIV
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing YOLO11n model lacks an adaptive cascaded processing scheme for local and global features in underwater visible light images, resulting in insufficient adaptability to multi-scale target detection, low-contrast feature extraction, and color distortion, making it difficult to meet the dual requirements of underwater platforms for accuracy and real-time performance.

Method used

By constructing a local bottleneck module (LB), a multi-scale large convolutional kernel module (MSLKC), a multi-branch channel attention module (MBCA), a spatial and channel combined group attention module (SCCG), and a cross-dimensional feature fusion module (CDFF), a local-global bottleneck module (LGB) is formed, which realizes the collaborative modeling of local details and global context, and improves the model's ability to identify and adapt to underwater targets.

Benefits of technology

It significantly improves the average accuracy of underwater target detection, reduces the false negative and false positive rates, and maintains stable high performance in underwater scenarios with different sea areas, seasons, and lighting conditions, demonstrating good generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121353874B_ABST
    Figure CN121353874B_ABST
Patent Text Reader

Abstract

The application relates to an improved YOLO11n underwater target recognition detection method based on local and global perception and belongs to the field of underwater intelligent recognition; the application extracts local fine-grained features by constructing a local bottleneck module, introduces a multi-scale large convolution kernel module to expand the receptive field, and combines a multi-branch channel attention, a spatial and channel combined grouping attention and a cross-dimension feature fusion module to adaptively enhance effective features and suppress environmental noise interference. A local-global bottleneck module is further constructed to realize local detail and global semantic collaborative modeling through a cascade structure. The Bottleneck module of the original YOLO11n is replaced by the module to form an improved model. After training, the improved model has higher detection precision and robustness on underwater data sets such as DUO and RUOD and is suitable for real-time target recognition tasks in complex underwater environments. The application solves the problems of color distortion, low contrast, fuzzy details and multi-scale target feature extraction difficulty of underwater images and realizes high-precision and real-time balanced detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of underwater intelligent recognition, and particularly relates to an improved YOLO11n underwater target recognition detection method based on local and global perception. BACKGROUND

[0002] With the in-depth development of marine environmental protection, resource exploration and underwater engineering operation, underwater target automatic detection technology based on vision becomes crucial. Underwater visible light imaging is widely used in marine scientific investigation, seabed resource exploration, underwater engineering operation and aquaculture due to its simple structure, low cost and rich information. However, the underwater optical imaging environment has high complexity: light is severely absorbed and scattered in water, resulting in color distortion, overall contrast reduction and non-uniform illumination of the image; at the same time, suspended particulate matter, microorganisms and dynamic water waves introduce significant noise and blur. These factors together make the characteristics of underwater targets, especially small-sized garbage, organisms or man-made objects, severely degraded, bringing great challenges to robust and accurate automatic detection.

[0003] In recent years, target detection algorithms based on deep learning, such as the YOLO series, have performed well in general scenarios, and YOLO11n, as a lightweight version, has the advantages of fast detection speed and low computational complexity. However, when directly applied to underwater visible light images, the lack of adaptive cascade processing scheme of local and global features makes it difficult to meet the dual demands of precision and real-time performance of underwater platforms in terms of multi-scale target detection, low-contrast feature extraction and color distortion adaptability.

[0004] Therefore, it is of important research and application value to improve the structure of YOLO11n to enhance the detection accuracy and robustness for the underwater image target detection problem. SUMMARY

[0005] The technical problem to be solved is:

[0006] In order to avoid the shortcomings of the prior art, the application provides an improved YOLO11n underwater target recognition detection method based on local and global perception. By optimizing the structure of the YOLO11n model, two clearly divided and collaborative perception branches, "local perception" and "global perception", are proposed to effectively integrate local details and global context. The application improves the recognition ability and adaptability of the model to underwater targets, while ensuring the lightweight and efficiency of the algorithm, and realizes high-precision and real-time detection of targets by underwater platforms, thereby meeting the needs of various underwater application scenarios.

[0007] The technical scheme of the present application is: an improved YOLO11n underwater target recognition detection method based on local and global perception, comprising the following steps:

[0008] Step 1. Data set acquisition and preprocessing: acquire underwater target image data set, perform pixel size standardization processing on all images, divide the data set into training set and test set, and provide standardized data for model training and performance testing;

[0009] Step 2. Improved YOLO11n model construction:

[0010] Step 2.1. Construct a local bottleneck module LB, extract local fine-grained features of underwater images through small receptive field convolution, batch normalization, activation function combination and residual jump connection, and suppress feature instability caused by background noise and illumination difference; the local fine-grained features include texture, contour and edge information;

[0011] Step 2.2. Construct a multi-scale large convolution kernel module MSLKC, adopt channel division, multi-scale parallel grouping large convolution kernel and cross-channel information interaction structure, expand receptive field, capture local fine information and global context information, and adapt to underwater multi-scale target detection;

[0012] Step 2.3. Construct a multi-branch channel attention module MBCA, calculate channel attention weights through branch-in average pooling, linear transformation and activation function, dynamically enhance useful feature channels and suppress background noise channels, and adapt to channel response difference caused by underwater spectral attenuation;

[0013] Step 2.4. Construct a spatial and channel combined grouping attention module SCCG, introduce spatial and channel independent gating mapping mechanism, respectively strengthen target position response and optimize spectral channel information, and relieve underwater feature fusion conflict;

[0014] Step 2.5. Construct a cross-dimensional feature fusion module CDFF, splice spatial modulation features and channel modulation features, then perform lightweight convolution, batch normalization and activation function processing, realize deep integration of spatial and spectral information, and eliminate information redundancy and fragmentation;

[0015] Step 2.6. Construct a global bottleneck module GB, take the multi-scale large convolution kernel module MSLKC as the core, embed the multi-branch channel attention module MBCA, the spatial and channel combined grouping attention module SCCG and the cross-dimensional feature fusion module CDFF, optimize through multi-dimensional attention information, and output features with global semantic consistency and local detail discriminability;

[0016] Step 2.7. Constructing a local-global bottleneck module LGB, cascading the local bottleneck module LB and the global bottleneck module GB, extracting local fine-grained features first, then integrating global context information, and realizing collaborative modeling of local details and global semantics;

[0017] Step 2.8. Replacing the Bottleneck module in the original YOLO11n network with the local-global bottleneck module LGB to obtain an improved YOLO11n model;

[0018] Step 3. Model training and optimal weight selection: training and verifying the improved YOLO11n model based on the training set, and selecting the optimal model weight through multiple rounds of training and verification with average precision as the index;

[0019] Step 4. Target detection: loading the optimal model weight into the improved YOLO11n model, inputting the to-be-detected images in the test set for inference, post-processing the detection results, and outputting visualized detection results with target labels.

[0020] Further technical solutions of the application are: in step 1, the underwater target image dataset includes the DetectingUnderwater Objects dataset and the Real-world Underwater Object Detection dataset; and the pixel size standardization processing is to uniformly scale all images to 640x640 pixels.

[0021] Further technical solutions of the application are: in step 2.1, the specific processing procedure of the local bottleneck module LB is:

[0022] Step 2.1.1. Receiving an upper layer feature map as an input feature;

[0023] Step 2.1.2. After 3x3 convolution, batch normalization and SiLU activation function processing, a first convolution feature is obtained;

[0024] Step 2.1.3. Repeating the 3x3 convolution, batch normalization and SiLU activation function processing on the first convolution feature to obtain a second convolution feature;

[0025] Step 2.1.4. When the channel number of the second convolution feature is consistent with that of the input feature, the input feature and the second convolution feature are added through residual jump connection to output local fine-grained features; when the channel numbers are inconsistent, the second convolution feature is directly output as the local fine-grained features.

[0026] Further technical solutions of the application are: in step 2.2, the specific processing procedure of the multi-scale large convolution kernel module MSLKC is:

[0027] Step 2.2.1. receiving local bottleneck module LB output local fine-grained features as input;

[0028] Step 2.2.2. dividing the input features into branches in the channel dimension, which is a positive integer greater than 1;

[0029] Step 2.2.3. dividing each branch into g groups in the channel dimension, g being equal to the number of feature channels of the corresponding branch, performing a convolution with a size of on each group of features, wherein, is the convolution kernel size of different branches, and concatenating each group of output in the channel dimension to obtain grouped concatenation features;

[0030] Step 2.2.4. performing a 1x1 convolution on the grouped concatenation features to establish a cross-channel dependency relationship to obtain cross-channel information interaction features;

[0031] Step 2.2.5. concatenating the cross-channel information interaction features of all branches to form a multi-scale context feature set.

[0032] A further technical solution of the present application is that in step 2.3, the specific processing procedure of the multi-branch channel attention module MBCA is:

[0033] Step 2.3.1. receiving the cross-channel information interaction features output by the multi-scale large convolution kernel module MSLKC as input;

[0034] Step 2.3.2. performing intra-branch average pooling on the input features to compress spatial information to the channel dimension to obtain branch channel global description values;

[0035] Step 2.3.3. performing dimension reduction processing on each branch channel global description value through a linear transformation layer Linear1, and obtaining intermediate weights through a ReLU activation function, and then performing dimension increase processing through a linear transformation layer Linear2, and outputting channel attention weights in the interval [0, 1] through a Sigmoid activation function;

[0036] Step 2.3.4. concatenating the channel attention weights of all branches in the channel dimension to form a multi-branch channel weight feature set.

[0037] A further technical solution of the present application is that in step 2.4, the specific processing procedure of the spatial and channel combined group attention module SCCG is:

[0038] Step 2.4.1. receiving the multi-scale context feature set output by the multi-scale large convolution kernel module MSLKC and the multi-branch channel weight feature set output by the multi-branch channel attention module MBCA, and concatenating the fusion features in the channel dimension;

[0039] Step 2.4.2. Perform 1x1 convolution and Sigmoid activation function on the multi-scale context feature in the fusion feature to obtain a spatial gating coefficient for mapping the spatial position importance distribution;

[0040] Step 2.4.3. Perform 1x1 convolution and Sigmoid activation function on the multi-branch channel weight feature in the fusion feature to obtain a channel gating coefficient for mapping the spectral channel importance distribution;

[0041] Step 2.4.4. Perform element-wise multiplication operation on the spatial gating coefficient, the channel gating coefficient and the input feature of the global bottleneck module GB respectively to obtain the spatial modulation feature and the channel modulation feature.

[0042] A further technical solution of the present application is that in step 2.5, the specific processing procedure of the cross-dimension feature fusion module CDFF is:

[0043] Step 2.5.1. Receive the spatial modulation feature and the channel modulation feature output by the spatial and channel combined grouping attention module SCCG as input;

[0044] Step 2.5.2. Concatenate the two features by channel dimension to obtain a concatenated feature;

[0045] Step 2.5.3. Perform 1x1 convolution, batch normalization and SiLU activation function processing on the concatenated feature in turn to complete feature linear combination and reconstruction, and output cross-dimension fusion feature.

[0046] A further technical solution of the present application is that in step 2.6, the specific processing procedure of the global bottleneck module GB is:

[0047] Step 2.6.1. Receive the local fine-grained feature output by the local bottleneck module LB as input;

[0048] Step 2.6.2. Obtain a multi-scale context feature set through the multi-scale large kernel module MSLKC;

[0049] Step 2.6.3. Obtain a multi-branch channel weight feature set through the multi-branch channel attention module MBCA;

[0050] Step 2.6.4. Obtain a spatial modulation feature and a channel modulation feature through the spatial and channel combined grouping attention module SCCG;

[0051] Step 2.6.5. Obtain a cross-dimension fusion feature through the cross-dimension feature fusion module CDFF;

[0052] Step 2.6.6. When the cross-dimension fusion feature is consistent with the input feature channel number, the input feature of the global bottleneck module GB is added to the cross-dimension fusion feature through a residual connection, and an enhanced feature is output; when the channel numbers are inconsistent, the cross-dimension fusion feature is directly output.

[0053] A further technical solution of the present application is that in step 2.7, the feature processing logic of the local-global bottleneck module LGB is that the input feature is first sharpened and local fine-grained information is extracted by the local bottleneck module LB, and then the enhanced local bottleneck module LB output feature is sent to the global bottleneck module GB, the global context information is integrated based on the local feature guidance and the underwater environment interference is suppressed, and finally the fusion feature with local fine structure and global semantic coordination is output, and the data flow expression is:

[0054]

[0055] wherein, is the input feature, is the local-global bottleneck module LGB output feature.

[0056] A further technical solution of the present application is that in step 3, the total number of rounds of training of the improved YOLO11n model is 300 rounds, and after each round of training is completed, the current weight file is saved, and the average accuracy is compared with the current optimal weight file, if the average accuracy of the current training weight is higher, the optimal weight is replaced, otherwise the current training weight is deleted.

[0057] In step 4, the detection result post-processing includes labeling the position of the detection frame, the target class and the prediction confidence, and generating a visual detection result image.

[0058] Beneficial effects

[0059] The beneficial effects of the present application are that by constructing a local perception branch, the model can enhance the extraction ability of target edges, textures and other subtle features, effectively alleviating the problem of small target feature disappearance caused by underwater blur and occlusion; at the same time, the global perception branch captures long-distance context dependence, helping the model to accurately distinguish semantic information in turbid background or target group. The cooperative work of the two makes the average precision of the model significantly improved when facing low contrast, deformation or underwater targets similar to the background, greatly reducing the missed detection and false detection.

[0060] The dynamic feature fusion mechanism can adaptively adjust the contribution proportion of local details and global semantics according to the specific content (such as turbidity, illumination, target scale) of the input image. When the water quality is clear and the details are visible, the weight of the local feature is enhanced to accurately locate; when the water quality is turbid and the details are lost, the global context is relied on for reasoning and judgment. This adaptability enables the model to maintain stable high performance in different sea areas, different seasons and different lighting conditions of underwater scenes, and the generalization ability is far superior to the static fusion model.

[0061] The application adopts a unique "local first and then global" cascade architecture design. This sequence is not randomly combined, but is based on the deep optimization of the underwater imaging degradation mechanism. First, there is serious suspended particle noise and edge blur in underwater images. If the global bottleneck module GB is used directly, the environmental noise and target features are easily confused, leading to excessive amplification of background noise, and the weak features of small targets are easily smoothed or submerged in the global context aggregation process. Therefore, the application first performs feature cleaning and sharpening through the local bottleneck module LB, which uses a small convolution kernel to extract and lock the edge, texture and other high-frequency fine-grained information of the target in a local range with high intensity; then, these features that have been enhanced and have clear outlines are sent to the global bottleneck module GB, which performs long-distance context association and semantic inference on this basis. This "progressive feature remodeling mechanism" ensures that the global attention is focused on the effective target rather than noise, effectively solving the problems of small target feature loss and background misjudgment in traditional parallel structures or reverse structures.

[0062] The application is improved on the basis of the latest and efficient YOLO11n architecture. The local perception branch adopts a lightweight design, and the global perception branch is also realized through efficient large receptive field operations, ensuring that the increased computational overhead is controllable.

[0063] The application goes beyond the simple replacement or stacking of existing modules, and innovatively proposes an explicit division of labor, dynamic coordination and cascade perception model from the network architecture level. This not only provides an efficient solution for underwater target detection, but also provides a new idea and technical path for dealing with similar "detail and context" conflict problems in more extensive computer vision tasks. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 The figure is the overall flowchart of the improved YOLO11n underwater target recognition and detection method based on local and global perception in the embodiment of the application;

[0065] Figure 2 The figure is the structure diagram of the local bottleneck module LB in the embodiment of the application;

[0066] Figure 3This is a structural diagram of the multi-scale large convolutional kernel module MSLKC in an embodiment of the present invention;

[0067] Figure 4 This is a structural diagram of the Multi-Branch Channel Attention Module (MBCA) in an embodiment of the present invention;

[0068] Figure 5 This is a structural diagram of the Spatial and Channel Combined Grouped Attention Module (SCCG) in an embodiment of the present invention;

[0069] Figure 6 This is a structural diagram of the cross-dimensional feature fusion module CDFF in an embodiment of the present invention;

[0070] Figure 7 This is a structural diagram of the global bottleneck module (GB) in an embodiment of the present invention;

[0071] Figure 8 This is a structural diagram of the Local-Global Bottleneck Module (LGB) in an embodiment of the present invention;

[0072] Figure 9 This is a structural diagram of the LGB-C3k and LGB-C3k2 modules in an embodiment of the present invention;

[0073] Figure 10 This is a schematic diagram of the improved YOLO11n network structure in an embodiment of the present invention;

[0074] Figure 11 This is a comparison chart of detection results before and after the improvement of the YOLO11n network structure in this embodiment of the invention. Detailed Implementation

[0075] The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the invention, and should not be construed as limiting the invention.

[0076] In recent years, deep learning-based target detection models, especially the YOLO series, have been widely used in underwater scenarios due to their good balance between accuracy and speed. To adapt to the unique characteristics of the underwater environment, researchers have mainly improved the YOLO model through the following three technical approaches:

[0077] (1) Enhance feature extraction capability: By designing lightweight multi-scale convolutional modules (such as the C3k2-MSCB module in CN120877076A) or introducing channel and spatial attention mechanisms (such as the C2PSA-SCSA module in CN120877076A and the Shuffle Attention in CN120411616A), the network's ability to distinguish between blurred targets and complex backgrounds can be improved.

[0078] (2) Optimize multi-scale feature fusion: Improve the feature pyramid network structure or upsampling method (such as the MHP module in CN117115632A and the CARAFE_Enhanced module in CN120088629A) to better fuse deep semantic information and shallow detail information.

[0079] (3) Improve the detection head and loss function: Add a special small target detection head (as described in CN120356084B and CN120411616A) or design a dynamic adaptive detection head (such as DynamicDCMv3Head in CN120877076A) to improve the recall rate and positioning accuracy of small size targets.

[0080] However, the inventors of the present application have found through in-depth research that although the above improvements have achieved certain results, the performance of the prior art still has bottlenecks when facing extremely harsh underwater conditions (such as high turbidity, strong scattering, and high similarity between targets and backgrounds). The fundamental reason is that the prior art has not systematically solved a fundamental contradiction in underwater target detection: the high sensitivity to local fine features required for accurate positioning of small targets and the strong perception of global context required for correct target recognition are difficult to obtain and effectively cooperate simultaneously in underwater degraded images. Specifically:

[0081] 1. Methods focusing on local details are susceptible to noise interference: Methods that focus on enhancing local feature extraction (such as using denser convolutions or shallow detection heads) can capture edge textures, but are also prone to amplifying noise and optical distortion that is prevalent in underwater images, leading to increased false detection rates. For example, a local feature prominent sand or bubble may be misjudged as a target.

[0082] 2. Methods focusing on global context are prone to losing positioning information: Methods that rely on large receptive fields or global attention mechanisms are good at integrating scene semantics to filter out background, but in the process, the precise spatial location information of small targets is often diluted or smoothed out due to the downsampling of feature maps, leading to inaccurate positioning or missed detection of small targets.

[0083] 3. Existing coordination methods are relatively extensive: Most existing technologies use feature pyramids for top-down or bottom-up feature transmission and splicing to achieve multi-scale fusion. This approach is "passive" and "static" when fusing local and global information, and fails to dynamically and selectively enhance the most beneficial local information and fuse the most relevant global context according to the specific content of the input image (such as target size, background complexity, and turbidity), resulting in insufficient generalization ability in complex and variable underwater scenes.

[0084] To sum up, how to build a new network architecture that can adaptively cooperate with "local fine perception" and "global semantic perception", so that the model can resist local noise interference to realize accurate positioning, and can use global context for reliable identification, has become the key to improve the robustness and accuracy of underwater target detection, and is also a deep technical problem urgently to be solved in the field. Therefore, the present application proposes an improved YOLO11n underwater target recognition detection method based on local and global perception, wherein YOLO11n refers to a lightweight version based on the YOLO11 architecture released by Ultralytics, and the core includes C3k, C3k2 modules and the like; comprising the following steps:

[0085] Step 1. Data set acquisition and preprocessing: acquiring underwater target image data set, performing pixel size standardization processing on all images, dividing the data set into training set and test set, and providing standardized data for model training and performance test;

[0086] Step 2. Improved YOLO11n model construction:

[0087] Step 2.1. Constructing a local bottleneck module LB, extracting local fine-grained features of underwater images through small receptive field convolution, batch normalization, activation function combination and residual jump connection, and suppressing feature instability caused by background noise and illumination difference; the local fine-grained features include texture, contour and edge information;

[0088] Step 2.2. Constructing a multi-scale large convolution kernel module MSLKC, adopting channel division, multi-scale parallel grouping large convolution kernel and cross-channel information interaction structure, expanding receptive field, capturing local fine information and global context information, and adapting to underwater multi-scale target detection;

[0089] Step 2.3. Constructing a multi-branch channel attention module MBCA, calculating channel attention weights through branch-in average pooling, linear transformation and activation function, dynamically enhancing useful feature channels and suppressing background noise channels, and adapting to channel response difference caused by underwater spectral attenuation;

[0090] Step 2.4. Constructing a spatial and channel combined grouping attention module SCCG, introducing spatial and channel independent gating mapping mechanism, respectively strengthening target position response and optimizing spectral channel information, and relieving underwater feature fusion conflict;

[0091] Step 2.5. Constructing a cross-dimension feature fusion module CDFF, splicing spatial modulation features and channel modulation features, and then processing through lightweight convolution, batch normalization and activation function, realizing deep integration of spatial and spectral information, and eliminating information redundancy and fragmentation;

[0092] Step 2.6. Construct a global bottleneck module GB, taking the multi-scale large kernel module MSLKC as the core, embedding the multi-branch channel attention module MBCA, the spatial and channel combined grouping attention module SCCG, and the cross-dimensional feature fusion module CDFF, and outputting features with global semantic consistency and local detail discriminability through multi-dimensional attention information joint optimization.

[0093] Step 2.7. Construct a local-global bottleneck module LGB by cascading the local bottleneck module LB and the global bottleneck module GB, first extracting local fine-grained features, then integrating global context information, and realizing collaborative modeling of local details and global semantics.

[0094] Step 2.8. Replace the Bottleneck module in the original YOLO11n network with the local-global bottleneck module LGB to obtain the improved YOLO11n model.

[0095] Step 3. Model training and optimal weight selection: train and verify the improved YOLO11n model based on the training set, and select the optimal model weight through multiple rounds of training and verification using average precision as the indicator.

[0096] Step 4. Target detection: load the optimal model weight into the improved YOLO11n model, input the image to be detected for inference, post-process the detection results, and output the visualized detection results with target labels.

[0097] The advantages of the present application are as follows:

[0098] First, the model significantly improves the detection accuracy while maintaining a lightweight structure. By introducing the local-global bottleneck module LGB, the network establishes a closer connection between high-frequency details and global semantics, making the recognition of different size targets and complex underwater scenes more accurate.

[0099] Second, the multi-scale large kernel module MSLKC has stronger multi-scale feature extraction and fusion capability, which can effectively improve the detection recall rate of small targets while maintaining the stability of large target detection. Furthermore, the combined effect of the multi-branch channel attention module MBCA, the spatial and channel combined grouping attention module SCCG, and the cross-dimensional feature fusion module CDFF enhances the network's robustness to typical underwater interference factors such as light changes, color distortion, suspended particles, and local occlusion, significantly reducing the probability of false positives and missed detections.

[0100] In addition, the algorithm complexity and real-time performance of the application are optimized. The model still maintains a low parameter amount and computational load after introducing the improved module, and is suitable for deployment of embedded or edge computing devices. Overall, the application has high precision and strong robustness, and the comprehensive performance is obviously better than that of existing lightweight detection networks. The application has outstanding technical progress and wide application value, and can be applied to the fields of ocean exploration, underwater robot vision system, aquaculture monitoring, underwater security and the like.

[0101] The above technical solutions will be further described below in combination with the accompanying drawings:

[0102] In one embodiment, referring to Figure 1 , the embodiment is an improved YOLO11n underwater target recognition and detection method based on local and global perception, which is specifically described in the following four parts: data set acquisition and processing, improved YOLO11n model construction, model training and optimal weight selection, and target detection.

[0103] Step 1. Data set acquisition and processing:

[0104] Two underwater data sets, Detecting Underwater Objects (DUO) and Real-world Underwater Object Detection (RUOD), are acquired respectively. All images of the two data sets are preprocessed and scaled to 640x640. The data sets are divided into training set and test set to provide standardized data for model training and performance testing.

[0105] Step 2. Improved YOLO11n model construction:

[0106] 2.1. Construct a local bottleneck module (Local Bottleneck, LB);

[0107] Referring to Figure 2 , the data flow processing process of the local bottleneck module LB is as follows:

[0108] (1) Input: the feature map from the upper layer is taken as the input of the local bottleneck module LB, which is .

[0109] (2) First convolution. A 3x3 convolution kernel is used to extract spatial features from the underwater image. The 3x3 small receptive field convolution kernel captures texture, contour, and edge information within a small neighborhood, highlighting the target contour structure, solving the problem of weak edge details and suspended particle noise interference in underwater images, and preventing high-frequency information from being diluted by the background. Then, the 3x3 convolution output is processed by batch normalization (BN), which normalizes the feature mean and variance, and then outputs through a learnable parameter scaling and offset, so that the network maintains stable feature response in different environments, and can solve the problem of unstable feature distribution caused by underwater light difference and color offset. Finally, the SiLU activation function is used to retain the negative domain information of the activation function, so that the model can still respond in dark areas, low contrast, and fine texture regions, effectively improving the performance of small target detection and solving the problem of weak texture loss in low contrast regions due to traditional activation function truncation. The first convolution feature is obtained after the first convolution :

[0110]

[0111] wherein, is a 3x3 convolution.

[0112] (3) Second convolution. The second convolution still consists of Conv 3×3 , BN, and SiLU, The second convolution feature is obtained after the second convolution Through the combination of secondary local convolution and normalization and activation, the background noise of the underwater image is further suppressed, and the target edge and texture details are strengthened, making the local high-frequency information more abundant, to solve the problem of insufficient detail extraction and easy omission of weak features in single convolution.

[0113]

[0114] (4) Residual skip connection.

[0115] When the number of channels of is consistent with , the local bottleneck module LB outputs the local fine-grained feature :

[0116]

[0117] Otherwise:

[0118]

[0119] At the same time of feature enhancement, the original input is directly superimposed to ensure that the key information is not destroyed and the gradient stability of the training process is maintained, which can alleviate the problem of gradient attenuation and original feature loss caused by deep convolution.

[0120] (5) Local fine-grained features of the output of the local bottleneck module LB This serves as the input for the next module.

[0121] Design purpose: The Local Bottleneck Module (LB) aims to efficiently extract high-frequency local features from underwater visible light images, such as edges, fine textures, and minute contours, within a lightweight network framework. These features are often easily lost under underwater imaging conditions such as color distortion, low contrast, and interference from suspended particles. By refining the modeling within the local receptive field, the LB module provides high-fidelity local information to subsequent modules, thus avoiding the attenuation of details in long-range context modeling.

[0122] 2.2. Construct a multi-scale large kernel convolution module (MSLKC).

[0123] Reference Figure 3 As shown, the data flow processing of the multi-scale large convolutional kernel module MSLKC is as follows:

[0124] (1) Input feature reception:

[0125] Output characteristics from the upper-level local bottleneck module (LB) As input to the multi-scale large convolutional kernel module MSLKC.

[0126] (2) Channel division:

[0127] Will Divided into equal parts according to channel dimension The approach of using multiple branches to implement a "divide and conquer" strategy avoids the high computational complexity and excessive memory consumption associated with directly extracting global information from the full-channel feature map using large convolutional kernels. This reduces the computational cost of a single branch, making it easier to use different large convolutional kernel sizes in subsequent branches. Branch Features :

[0128]

[0129] in, For the number of branches, Branch number, For the first Branch features; .

[0130] (3) Feature extraction from grouped large-kernel convolutional kernels:

[0131] For branch features Divide it into g groups according to the channel dimension to obtain the intra-branch grouping features. Then for each Perform convolution kernels with sizes of 1000 and 1000 respectively Convolution is used to obtain the features of each group. :

[0132]

[0133] Use between branches Different kernel sizes are used to adapt to detailed textures such as fish scales and coral surfaces, as well as large-scale lighting variations or background structures, balancing the features of both small and large targets, thus preserving both local fine information and global contextual information. Channel grouping reduces the number of parameters and computational cost of a single convolution, making more efficient use of computational resources compared to direct full-channel convolution, especially suitable for deployment on devices with limited computing power in underwater missions. Each output is grouped along the channel dimension. Grouping and splicing features are obtained by splicing. :

[0134]

[0135] The operation involves concatenating features along the channel dimension; It splices branch features, that is, features processed by convolutional kernels of different scales, to obtain short-range and long-range dependency features, thus solving the defect that a single convolutional kernel cannot simultaneously take into account details and background.

[0136] (4) Cross-channel information exchange:

[0137] right Using 1×1 convolutions to establish cross-channel dependencies enables channel blending and feature recombination, improving the integration and expressive power of branch features. This solves the problem of limited feature expression caused by the lack of information interaction between different channel groups within the same branch due to grouped convolutions. Perform 1×1 convolution to obtain cross-channel information interaction features. :

[0138]

[0139] (5) Multi-scale feature stitching:

[0140] right The process involves concatenating all branches into a multi-scale feature representation, forming a multi-scale contextual feature set. This approach balances fine-grained local features with global semantic information, improving the model's discriminative ability and robustness in complex underwater scenarios. Multi-scale contextual feature set :

[0141]

[0142] The information of different receptive fields is integrated to form a more rich feature expression ability, avoid the limitation of single scale feature, enhance the diversity and robustness of the feature, especially improve the adaptability to color shift and blur in underwater vision.

[0143] Design function: The multi-scale large kernel module MSLKC aims to solve the problems of insufficient long-range dependence perception, weak global context capture ability and easy loss of global semantic information of traditional small convolution kernel in underwater images. Under the condition of underwater optical imaging, due to the scattering and attenuation of light and the influence of suspended particles, the image often shows low contrast and blurred details, making it difficult to obtain rich global information and clear local features at the same time. Therefore, the multi-scale large kernel module MSLKC adopts the architecture design of "channel division + multi-scale parallel grouping large kernel + cross-channel mixing", which explicitly expands the receptive field to enhance the global perception ability of background and target while retaining the edge, texture and other fine-grained local information under the premise of controllable computational overhead. Through multi-branch large kernel convolution, multi-scale features are extracted, and the module effectively fuses global context information and local details, reduces the damage of uneven illumination, water color shift and local noise to feature expression, so as to provide a multi-dimensional information feature space with accuracy and lightness for the subsequent attention mechanism, significantly improving the stability and accuracy of multi-scale target detection in underwater complex scenes.

[0144] 2.3. Constructing multi-branch channel attention module (Multi-Branch Channel Attention, MBCA);

[0145] Referring to Figure 4 , the data flow processing process of the multi-branch channel attention module MBCA is as follows:

[0146] (1) Input feature receiving:

[0147] accepting the from the multi-scale large kernel module MSLKC.

[0148] (2) Branch internal average pooling:

[0149] The average pooling (Average Pooling) operation is performed on to obtain the global description value of the branch channel:

[0150]

[0151] H, W are the cross-channel information interaction features height and width. By compressing spatial information into channel dimension, the interference of spatial dimension can be reduced, and the attention calculation can focus on the overall intensity distribution of the channel. The physical characteristics of underwater imaging lead to significant differences in the responses of different channels. For example, the red channel is often weak overall due to absorption, while the background light spot may be too bright, which is easy to become a noise source. This process can explicitly reflect the overall energy level of the channel, thereby identifying low-response channels caused by color attenuation and high-brightness noise channels caused by uneven illumination, providing reliable data support for subsequent weight allocation.

[0152] (3) Branch internal attention weight calculation:

[0153] Linear transformation Linear 1 and linear transformation Linear 2 are used to process in turn. Linear transformation Linear 1 is composed of a dimension reduction matrix and a ReLU activation function. After Linear 1 processing, the intermediate weight m j is obtained. Linear transformation Linear 2 is composed of a dimension increase matrix and a Sigmoid activation function. After Linear 2 processing, the final output is compressed to the interval [0, 1] to obtain the channel attention weight of this branch, and the expression formula is:

[0154]

[0155] This step can learn and model the importance relationship of each channel, detect which channels carry more target texture and contour information in the underwater environment, and which channels are more composed of background noise such as suspended particles and scattered light. The weight calculation stage can dynamically enhance the channels that are helpful to target recognition, such as improving the effective signal of the red channel in a weak red light environment, while suppressing the over-strong blue-green background noise, thereby optimizing the feature distribution.

[0156] (4) Multi-branch weight splicing:

[0157] The channel attention weights of all branches are spliced by channel to form a multi-branch channel weight feature set :

[0158]

[0159] The fusion of the weight results of different branches can comprehensively evaluate the channel importance of global statistics and local features, so that the optimal weight can adapt more stably to the variable lighting conditions, different degrees of color deviation and complex background structure in the underwater environment. In this way, both local high-value details and global lighting and color distribution trends can be preserved, and the robustness under different water conditions can be improved.

[0160] Design function: The multi-branch channel attention module MBCA first performs multi-branch processing on the input features, analyzes the importance of the channels from different information dimensions such as spatial global and local regions, and calculates attention weights, finally enhances useful features and suppresses irrelevant backgrounds. In the underwater image task, in the face of complex environments such as background clutter, uneven lighting, and color distortion, the multi-branch channel attention module MBCA can dynamically evaluate the importance of each channel through multi-branch feature extraction and branch internal channel attention mechanism: while capturing high details and global patterns, it can effectively suppress interference such as blue-green water body floodlight, suspended particles, and light spots by using weight control, improve the response of target channels such as red light related to spectral attenuation, and thus maintain the discriminability and robustness of features in the presence of multiple noises, providing high-quality feature input for the subsequent detection network.

[0161] 2.4. Spatial and Channel Combined Grouping Attention Module (SCCG);

[0162] Referring to Figure 5 , the data flow processing process of the spatial and channel combined grouping attention module SCCG is as follows:

[0163] (1) Input feature reception:

[0164] Receiving the splicing results of the multi-scale large kernel convolution module MSLKC in step 2.3 and the multi-branch channel attention module MBCA in step 2.4 、 . Combined with information of different receptive fields, it contains both global structure patterns and local detail textures; Reflects the weighting preferences of each branch to the channel, but there is a risk of scale heterogeneity and weight conflict. In underwater tasks, these features and weights may have cross-scale heterogeneity and weight preference conflicts, causing significant differences in distribution characteristics and large differences or even contradictions in the weighting values of the same channel, so a unified fusion modulation mechanism is needed.

[0165] (2) Spatial mapping convolution calculation:

[0166] On the spliced features Spatial dimension mapping: First, a lightweight convolution with a kernel size of 1x1 is used to model the dependency between different scale spatial features. Then, a Sigmoid activation function is used to compress the response to [0, 1] to obtain the spatial gating coefficient :

[0167]

[0168] wherein, is a 1x1 convolution. This step maps the importance distribution of spatial positions. In underwater scenes, it can improve the response of fish, coral, and other regions where the target is located, and reduce the response of suspended particles, water color, and other regions in the background, thereby reducing the interference of low-value spatial information.

[0169] (3) Channel mapping convolution calculation:

[0170] The concatenated features Spatial dimension mapping: First, a lightweight convolution with a kernel size of 1x1 is used to model the dependency between different scale spatial features. Then, a Sigmoid activation function is used to compress the response to [0, 1] to obtain the spatial gating coefficient :

[0171]

[0172] wherein, is a 1x1 convolution. This step maps the importance distribution of spectral channels. In underwater scenes, weak channels may have very low values due to attenuation, but still have discriminative value; strong channels may be enhanced due to background water, but have redundant information. Through this operation, useful weak channels can be enhanced, and useless strong channels can be suppressed.

[0173] (4) Feature modulation and output:

[0174] The spatial gating and channel gating are applied to the global bottleneck module GB input features :

[0175]

[0176] wherein, is an element-wise multiplication operation, and respectively. This separate modulation ensures the independent optimization of the two dimensions of space and channel: shielding the local highlight area caused by light spots and suspended particles, focusing on the real target position; channel modulation can highlight the useful channels that are weak due to underwater spectral attenuation, and compress the redundant water color channel. By independently modulating the two, the module maintains a balance between the global and the details, and significantly improves the detectability of underwater targets under the interference of complex background.

[0177] Design function: The spatial and channel combined group attention module SCCG receives the output features from the multi-scale large kernel module MSLKC and the multi-branch channel attention module MBCA, and after direct splicing, introduces independent gating mapping mechanisms for space and channel, which show the importance of different location regions and spectral channels. The spatial gating focuses on suppressing irrelevant regions such as suspended particles and light spots, and strengthening the response of the target location; the channel gating enhances the effective waveband that is weakened due to spectral attenuation in underwater imaging, while compressing the redundant channel information in the blue-green water background, achieving efficient filtering in the spectral dimension. Through this independent spatial-channel modulation, the module balances between global structure perception and fine-grained feature preservation, effectively alleviates the feature fusion conflict in underwater multi-scale scenes, and makes the final output features more compact and discriminative, providing robust and targeted feature support for the subsequent detection network.

[0178] 2.5. Constructing a cross-dimension feature fusion module (Cross-Dimension Feature Fusion, CDFF);

[0179] Referring to Figure 6 , the data flow processing process of the cross-dimension feature fusion module CDFF is as follows:

[0180] (1) Input feature reception:

[0181] Receive and two features as input. These two features respectively solve the spatial interference (suspended particles, light spots) and spectral distortion (red light attenuation, blue-green background redundancy) in underwater environments, but when used independently, they are prone to information fragmentation and lack of complementarity.

[0182] (2) Feature splicing:

[0183] Splice the two features by channel dimension to obtain spliced features :

[0184]

[0185] The explicit alignment of spatial features and spectral features is realized, the position and channel information are combined under the same spatial reference, the position and spectral information are one-to-one corresponding at the pixel level, the edges and color information of the target can complement each other during fusion, thereby avoiding information loss caused by dimensional fragmentation, and providing an aligned basis for subsequent fusion.

[0186] (3) Feature fusion:

[0187] The features after splicing 1x1 convolution, BN and SiLU activation function are applied:

[0188]

[0189] wherein, 1x1 convolution is completed, linear combination and feature reconstruction are completed, the number of channels is halved, and redundancy is removed. At the image level, it is equivalent to a “global integrator”, which mixes the spatial profile and color band information of the target into a consistent feature space, reduces noise interference by dimensionality reduction, avoids amplification of repeated or conflicting information in the fusion process, further improves the response of fine-grained edges, weak target texture and local contrast, and makes the target in the low-visibility underwater environment more clear and identifiable, thereby improving the stability in low-contrast and multi-interference scenes.

[0190] (4) Output fusion features:

[0191] The cross-dimensional fusion features containing spatial position advantages and channel spectral advantages are generated and output to the subsequent detection network. In terms of visual performance, the contrast of the underwater image is improved, the edge is sharpened, and the separation degree of the target and the background is enhanced, providing a more compact, lower noise and more discriminative feature input for multi-scale target detection in complex underwater scenes.

[0192] Design function: The cross-dimensional feature fusion module CDFF in the underwater target detection network undertakes the function of deep integration of spatial and channel dual-path information. It fuses the two modulated features by splicing and light 1x1 convolution fusion at each spatial position, explicitly eliminates the redundancy and conflict of dual-path features, aligns the scale and dynamic range, and compresses invalid information. The cross-dimensional feature fusion module CDFF is equivalent to a “locally calibrated global integrator”, which generates more noise-robust and discriminative fusion features, effectively suppresses information interference caused by suspended particles, floating light and fluctuations in underwater scenes, and generates fusion features with improved contrast, sharpened edges, and enhanced target-background separation. It provides a high-quality feature representation with global and detailed advantages for the detection network.

[0193] 2.6. Construct a global bottleneck module (Global Bottleneck, GB);

[0194] Referring to Figure 7 The data flow processing process of the global bottleneck module GB is as follows: the features As input features, first enter the multi-scale large convolution kernel module MSLKC to construct long-range dependencies and overall semantic layout of different scales in the spatial domain, which can still maintain global structural consistency under the conditions of uneven underwater illumination, low visibility and color shift, and obtain features Secondly, the multi-scale convolution features are adaptively weighted at the channel level to enhance the response of channels (such as red light) that are more affected by water spectral attenuation and suppress useless blue-green background high-intensity signals, and obtain features , and the other branch directly retains the original multi-scale features Then, the two features respectively enter the SCCG to dynamically balance the feature distribution in the spatial and channel domains, alleviate the characteristic differences and attention competition conflicts in the multi-scale feature fusion process, and suppress local brightness abnormalities caused by suspended particles and scattering, and obtain double-path modulated features and Subsequently, the cross-dimensional feature fusion module CDFF jointly optimizes the channel attention information from the multi-branch channel attention module MBCA and the original spatial information of the multi-scale large convolution kernel module MSLKC in cross-dimensions, so that the fusion result retains both global consistency and accurate depiction of local details, and generates fusion features Finally, the fusion features are added to the module input , and the enhanced features with both global consistency and local fine details are output.

[0195] The global bottleneck module GB takes the multi-scale large convolution kernel module MSLKC as the core computing unit, embeds the branch channel attention module MBCA, the spatial and channel combined grouping attention module SCCG, and the cross-dimensional feature fusion module CDFF, realizes joint optimization of multi-dimensional attention information, and finally outputs enhanced features that take into account both global semantic consistency and local detail discriminability, and the function expression is as follows:

[0196] When the number of channels of and is consistent:

[0197]

[0198] When the number of channels of and is inconsistent:

[0199]

[0200] In underwater visible light image target recognition tasks, the Global Bottleneck Module (GB) can effectively improve the detail separation capability under low contrast and high noise conditions while maintaining global semantic coherence, providing clear and robust high-quality features for subsequent detection.

[0201] 2.7. Construct the Local-Global Bottleneck (LGB) module;

[0202] Reference Figure 8 As shown, the Local-Global Bottleneck Module (LGB) consists of a cascaded Local Bottleneck Module (LB) and a Global Bottleneck Module (GB), aiming to collaboratively model local detailed features and global semantic information, thereby improving the overall discriminative ability of the features. First, the input features... The lightweight Bottleneck design is continued through the local bottleneck module (LB), which utilizes small convolutional units to efficiently capture fine-grained information such as edges, textures, and microstructures of underwater targets, thereby enhancing the ability to depict local contours against interference from underwater suspended particles and scattering blur. Subsequently, the output of the local bottleneck module (LB)... The input is fed into the Global Bottleneck Module (GB). The GB integrates local features with global contextual information and utilizes dynamic balance between spatial and channel domains to suppress feature biases caused by uneven underwater illumination, color distortion, and random noise. Through cross-dimensional fusion, it achieves joint optimization of global semantic consistency and local details, resulting in the desired features. The final result is a fusion feature that retains both local fine structure and global semantic consistency. This provides a high-quality characterization for subsequent detection.

[0203] The unique Local-Global Bottleneck Module (LGB) of this invention employs a cascaded structure where the Local Bottleneck Module (LB) focuses on detailed information beforehand, and the Global Bottleneck Module (GB) focuses on global information afterward. Its core principle is to adhere to the design principles of "feature restoration first" and "local guidance for global understanding." Addressing the characteristics of weak details and high noise in underwater images, the Local Bottleneck Module (LB) first acts as a "feature preprocessor" to strengthen the geometric edges of faint targets, preventing them from disappearing due to smoothing during the large receptive field processing of the Global Bottleneck Module (GB). This prior local contour information then serves as high-quality input, guiding the attention mechanism in the Global Bottleneck Module (GB) to more accurately focus on salient targets rather than background noise. This avoids the attention divergence problem that may occur with parallel structures. Furthermore, the residual connections of the Local Bottleneck Module (LB) optimize the gradient flow stability during backpropagation, ultimately achieving collaborative modeling of local details and global semantics.

[0204] The local-global bottleneck module LGB data flow can be represented as:

[0205]

[0206] 2.8. Constructing the improved YOLO11n model;

[0207] Referring to FIG. 1, Figure 9 10 As shown in FIG. 1, an improved YOLO11n network structure is constructed based on the YOLO11n algorithm, that is, the proposed local-global bottleneck module LGB replaces the Bottleneck module C3k in the original YOLO11n network to obtain LGB-C3k, and then the LGB-C3k2 module is constructed, and then the improved YOLO11n model is constructed.

[0208] Step 3. Model training and optimal weight selection:

[0209] On the basis of the improved YOLO11n model, the training set is divided into a sub-training set and a sub-validation set, and the model is trained and validated respectively to ensure the generalization ability of the model under different scenarios. The training process is as follows:

[0210] First, the sub-training set is used for model training for parameter updating, and the sub-validation set is used for model validation for performance evaluation. In the training process, a fixed total training round of 300 is set, and the weight file obtained by training is saved after each round of training is completed.

[0211] If the training round has not reached 300 rounds, the weight file obtained by training in each round is saved, and the performance is compared with the currently saved optimal weight. The comparison index is the average precision (mAP). When the training round reaches the preset 300 rounds, the training process is ended, and the model weight at this time is determined as the optimal weight for subsequent detection tasks.

[0212] When the optimal weight is compared in performance, if the mAP of the current training is better than the mAP of the current optimal weight, the new optimal weight is replaced and saved; otherwise, if the mAP is not better than the mAP of the optimal weight, the weight file of this round is deleted to save storage space. Such a cycle is performed until the training is completed, and the model weight with the best performance is ensured.

[0213] Step 4. Target detection:

[0214] After the training is completed and the optimal weight is determined, the weight is loaded into the improved YOLO11n model for target detection tasks. The specific process is as follows:

[0215] First, the image to be detected in the test set is input into the optimal weight model for inference. The model outputs the prediction results according to the input image, including the detection frame position, target category and prediction confidence, etc.

[0216] ​Secondly, the original detection results output by the model are post-processed to generate visual detection result images with labeled boxes and class labels, so as to intuitively view the recognition results.

[0217] Finally, the detection results containing target recognition and position marking are obtained for actual application deployment or subsequent performance analysis.

[0218] In one embodiment, an improved underwater visible light image target detection method based on YOLO11n includes the following steps:

[0219] S1: DUO and RUOD image datasets are obtained respectively, and the datasets are divided into training sets and test sets. All dataset images are scaled to 640x640 pixel size.

[0220] S2: An improved YOLO11n network structure is constructed based on the YOLO11n algorithm to obtain an improved YOLO11n model. Specifically, the following steps are included:

[0221] 1. A local bottleneck module LB is constructed;

[0222] 2. A multi-scale large convolution kernel module MSLKC is constructed;

[0223] 3. A multi-branch channel attention module MBCA is constructed and applied based on the multi-scale large convolution kernel module MSLKC;

[0224] 4. A spatial and channel combined grouping attention module SCCG is constructed and applied after the multi-scale large convolution kernel module MSLKC and the multi-branch channel attention module MBCA;

[0225] 5. A CFDD is constructed and applied after the spatial and channel combined grouping attention module SCCG;

[0226] 6. Based on the modules constructed in steps 2-5, a global bottleneck module GB is constructed;

[0227] 7. The local bottleneck module LB and the global bottleneck module GB are cascaded to construct a local-global bottleneck module LGB;

[0228] 8. The Bottleneck module of YOLO11n is replaced by the local-global bottleneck module LGB to obtain the improved YOLO11n model.

[0229] S3: Parameters are set and g, =4, the channel number of g is equal to .

[0230] S4: Train and validate using the DUO image training set, train and validate using the RUOD image training set, the number of training and validation rounds is 300, and the optimal weight is saved each time.

[0231] S5: Test the test set image using the optimal weight to obtain a detection result.

[0232] The experimental verification of the embodiment is as follows:

[0233] In order to better show the effectiveness of the present application, the improved YOLO11n is compared with other eight kinds of lightweight target detection networks (YOLOv3-Tiny, YOLOv4-Tiny, YOLOv5n, YOLOv6n, YOLOv7-Tiny, YOLOv8n, YOLOv10n, YOLO11n) on two data sets of DUO and RUOD. In this experiment, the local-global bottleneck module LGB has four parallel branches (k=4), and the convolution kernel sizes of the four branches are 13, 27, 31 and 51 respectively, and the group number is set to be consistent with the channel number of each branch feature.

[0234] The experimental results show that the improved model proposed in the present application has significant advantages in detection accuracy, feature representation ability and robustness, which are embodied in the following aspects:

[0235] 1. The overall detection accuracy is significantly improved. The improved model improves the average precision (AP 0.5 ) on the DUO data set by 1.81% compared with the original YOLO11n, and the improvement is greater than that of other lightweight models; on the RUOD data set, it also improves by 1.02%. The results show that the multi-scale feature extraction and attention fusion mechanism of the local-global bottleneck module LGB effectively enhances the target recognition ability of the network in the underwater environment with insufficient light, color shift and complex background, as shown in the following figure. Figure 11

[0236] 2. Small target detection performance is outstanding. The improved YOLO11n improves the small-scale target detection index (APs) by 1.3%-2.0% compared with YOLOv5n, YOLOv8n and other models. Due to the problem of blurred small target and low contrast at a distance in underwater visible light imaging, the local-global collaborative structure in the local-global bottleneck module LGB can capture edge and contour information more finely.

[0237] 3. Large target and complex scene detection is more stable. The comparison results show that on the DUO data set, the large target detection index (AP l ​​​​) 4.38% (from 62.14% to 66.52%); on the RUOD dataset, AP l The index is 0.76% higher than the original YOLO11n (from 75.01% to 75.77%), and the index is better than other comparative models, which shows that the combination of the multi-scale large convolution kernel module MSLKC and the multi-branch channel attention module MBCA can fully integrate multi-scale context information and maintain feature consistency between different scales. This feature is particularly important in underwater scenes with high background interference and large target morphology differences.

[0238] 4. The algorithm is lightweight and efficient, and maintains real-time performance. Although multiple improvement modules are introduced, the parameter quantity (Params) of the improved YOLO11n is only 3.62M, and the computational complexity (GFLOPs) is 10.8, which has a small increase compared to the original model and still maintains in the lightweight model category. Although the amount of calculation increases, the average frame rate still meets the requirements of real-time detection of underwater devices, achieving a good balance between high precision and high efficiency.

[0239] 5. Robustness and generalization ability are improved. The detection results of the method under low contrast, strong noise, local occlusion and motion blur conditions are more stable. Through the dynamic gating and feature fusion mechanism of the spatial and channel combined grouping attention module SCCG and the cross-dimensional feature fusion module CDFF, the false detection and missed detection rates are effectively reduced, and the generalization adaptability of the model is enhanced.

[0240] 6. The comprehensive performance is better than other lightweight networks. Through comprehensive comparison on two types of data sets, the improved YOLO11n model of the present application is optimal in multiple indicators; while maintaining the characteristics of lightweight structure, it shows broad application potential in marine exploration, unmanned underwater vehicle monitoring, aquaculture visual monitoring and underwater robot navigation scenes.

[0241] Table 1: Comparison results on the precision level

[0242]

[0243] Table 2: Comparison results on the efficiency level

[0244]

[0245] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments without departing from the principles and purposes of the present application within the scope of the present application.

Claims

1. An improved YOLO11n underwater target recognition detection method based on local and global perception, characterized in that, Comprising the following steps: Step 1. Data set acquisition and preprocessing: acquire underwater target image data set, standardize the pixel size of all images, divide the data set into training set and test set, and provide standardized data for model training and performance testing; Step 2. Improved YOLO11n model construction: Step 2.

1. Construct a local bottleneck module LB, extract local fine-grained features of underwater images through small receptive field convolution, batch normalization, activation function combination and residual jump connection, and suppress feature instability caused by background noise and illumination difference; the local fine-grained features include texture, contour and edge information; Step 2.

2. Construct a multi-scale large kernel module MSLKC, use channel division, multi-scale parallel grouping large kernel and cross-channel information interaction structure to expand the receptive field, capture local fine information and global context information, and adapt to underwater multi-scale target detection; Step 2.

3. Construct a multi-branch channel attention module MBCA, calculate channel attention weights through branch internal average pooling, linear transformation and activation function, dynamically enhance useful feature channels and suppress background noise channels, and adapt to channel response difference caused by underwater spectral attenuation; Step 2.

4. Construct a spatial and channel combined grouping attention module SCCG, introduce spatial and channel independent gating mapping mechanism, respectively strengthen target position response and optimize spectral channel information, and relieve underwater feature fusion conflict; Step 2.

5. Construct a cross-dimensional feature fusion module CDFF, concatenate spatial modulation features and channel modulation features, then process them through lightweight convolution, batch normalization and activation function, realize deep integration of spatial and spectral information, and eliminate information redundancy and fragmentation; Step 2.

6. Construct a global bottleneck module GB, take the multi-scale large kernel module MSLKC as the core, embed the multi-branch channel attention module MBCA, the spatial and channel combined grouping attention module SCCG and the cross-dimensional feature fusion module CDFF, optimize the multi-dimensional attention information jointly, and output features with global semantic consistency and local detail discriminability; Step 2.

7. Construct a local-global bottleneck module LGB, cascade the local bottleneck module LB and the global bottleneck module GB, first extract local fine-grained features, then integrate global context information, and realize collaborative modeling of local details and global semantics; Step 2.

8. Replace the Bottleneck module in the original YOLO11n network with the local-global bottleneck module LGB to obtain the improved YOLO11n model; Step 3. Model training and optimal weight selection: train and verify the improved YOLO11n model based on the training set, select the optimal model weight through multiple rounds of training and verification, and take the average precision as the index; Step 4. Target detection: load the optimal model weight into the improved YOLO11n model, input the images to be detected in the test set for inference, post-process the detection results, and output visual detection results with target labels.

2. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 1, characterized in that: In the step 1, the underwater target image dataset includes a Detecting Underwater Objects dataset and a Real-world Underwater Object Detection dataset. In the step 1, the pixel size normalization processing is to uniformly scale all images to 640*640 pixels.

3. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 1, characterized in that: In the step 2.1, the specific processing flow of the local bottleneck module LB is as follows: Step 2.1.

1. receiving the upper layer feature map as the input feature; Step 2.1.

2. performing 3*3 convolution, batch normalization and SiLU activation function processing to obtain the first convolution feature; Step 2.1.

3. repeatedly performing 3*3 convolution, batch normalization and SiLU activation function processing on the first convolution feature to obtain the second convolution feature; Step 2.1.

4. when the channel number of the second convolution feature is consistent with that of the input feature, adding the input feature and the second convolution feature through residual jump connection to output the local fine-grained feature; when the channel numbers are inconsistent, directly outputting the second convolution feature as the local fine-grained feature.

4. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 3, characterized in that: In the step 2.2, the specific processing flow of the multi-scale large kernel module MSLKC is as follows: Step 2.2.

1. receiving the local fine-grained feature output by the local bottleneck module LB as the input; Step 2.2.

2. Evenly split the input features by channel dimension into branches, is a positive integer greater than 1 ; Step 2.2.

3. Divide each branch into g groups in the channel dimension, g is equal to the number of corresponding branch feature channels, and perform convolution with a size of on each group of features, where, is the convolution kernel size of different branches, and concatenate each group of outputs in the channel dimension to obtain grouped concatenated features; Step 2.2.

4. performing 1*1 convolution on the grouped splicing feature to establish a cross-channel dependency relationship to obtain a cross-channel information interaction feature; Step 2.2.

5. splicing the cross-channel information interaction features of all branches to form a multi-scale context feature set.

5. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 4, characterized in that: In the step 2.3, the specific processing flow of the multi-branch channel attention module MBCA is as follows: Step 2.3.

1. receiving the cross-channel information interaction feature output by the multi-scale large kernel module MSLKC as the input; Step 2.3.

2. performing intra-branch average pooling on the input feature to compress the spatial information to the channel dimension to obtain a branch channel global description value; Step 2.3.

3. for each branch channel global description value, performing dimension reduction processing through the linear transformation layer Linear1 and obtaining an intermediate weight through the ReLU activation function, and then performing dimension increasing processing through the linear transformation layer Linear2 and outputting a channel attention weight in the interval [0, 1] through the Sigmoid activation function; Step 2.3.

4. splicing the channel attention weights of all branches according to the channel to form a multi-branch channel weight feature set.

6. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 5, characterized in that: In the step 2.4, the specific processing flow of the spatial and channel combined group attention module SCCG is as follows: Step 2.4.

1. receiving the multi-scale context feature set output by the multi-scale large kernel module MSLKC and the multi-branch channel weight feature set output by the multi-branch channel attention module MBCA, splicing them according to the channel to obtain a fusion feature; Step 2.4.

2. performing 1*1 convolution and Sigmoid activation function on the multi-scale context feature in the fusion feature to obtain a spatial gating coefficient for mapping the spatial position importance distribution; Step 2.4.

3. Perform 1x1 convolution and Sigmoid activation function on the multi-branch channel weight feature in the fusion feature to obtain the channel gating coefficient for mapping the spectral channel importance distribution; Step 2.4.

4. Perform element-wise multiplication operation on the spatial gating coefficient and the channel gating coefficient with the input feature of the global bottleneck module GB to obtain the spatial modulation feature and the channel modulation feature.

7. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 6, characterized in that: In the step 2.5, the specific processing procedure of the cross-dimension feature fusion module CDFF is as follows: Step 2.5.

1. Receive the spatial modulation feature and the channel modulation feature output by the spatial and channel combined grouping attention module SCCG as input; Step 2.5.

2. Concatenate the two features by channel dimension to obtain the concatenated feature; Step 2.5.

3. Perform 1x1 convolution, batch normalization and SiLU activation function processing on the concatenated feature in turn to complete feature linear combination and reconstruction, and output the cross-dimension fusion feature.

8. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 7, characterized in that: In the step 2.6, the specific processing procedure of the global bottleneck module GB is as follows: Step 2.6.

1. Receive the local fine-grained feature output by the local bottleneck module LB as input; Step 2.6.

2. Obtain a set of multi-scale context features through the multi-scale large kernel convolution module MSLKC; Step 2.6.

3. Obtain a set of multi-branch channel weight features through the multi-branch channel attention module MBCA; Step 2.6.

4. Obtain the spatial modulation feature and the channel modulation feature through the spatial and channel combined grouping attention module SCCG processing on the set of multi-scale context features and the set of multi-branch channel weight features; Step 2.6.

5. Obtain the cross-dimension fusion feature through the cross-dimension feature fusion module CDFF processing on the spatial modulation feature and the channel modulation feature; Step 2.6.

6. When the number of channels of the cross-dimension fusion feature and the input feature is consistent, add the input feature of the global bottleneck module GB and the cross-dimension fusion feature through residual connection, and output the enhanced feature; When the number of channels is inconsistent, directly output the cross-dimension fusion feature.

9. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 8, characterized in that: In the step 2.7, the feature processing logic of the local-global bottleneck module LGB is that the input feature is first sharpened and local fine-grained information is extracted through the local bottleneck module LB, and then the enhanced local bottleneck module LB output feature is sent to the global bottleneck module GB to guide the integration of global context information and suppress underwater environmental interference, and finally the fusion feature with local fine structure and global semantic coordination is output, and its data flow expression is as follows: wherein, is an input feature, is a local-global bottleneck module LGB output feature.

10. The improved YOLO11n underwater target recognition detection method based on local and global perception according to claim 9, characterized in that: In the step 3, the total number of rounds of training of the improved YOLO11n model is 300 rounds, and after each round of training, the current weight file is saved, and the average precision is compared with the current optimal weight file, if the average precision of the current training weight is higher, the optimal weight is replaced, otherwise the current training weight is deleted; In the step 4, the detection result post-processing includes labeling the position of the detection frame, the target class and the predicted confidence, and generating a visual detection result image.

Citation Information

Patent Citations

  • Underwater target detection method, device, equipment and medium

    CN117115632A

  • Underwater small target detection method based on YOLOv8

    CN120088629A

  • Underwater target recognition method based on improved YOLOv8 algorithm

    CN120356084B

  • TSAS-YOLOv8 small target detection method based on multi-module collaboration

    CN120411616A

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

    CN120877076A