Sonar image underwater detection method and system based on multi-scale feature fusion and college up-sampling algorithm

By adopting multi-scale feature fusion and college upsampling algorithms in underwater object detection technology, combined with the YOLOv11 network, problems such as noise sensitivity, limited resolution, and imaging instability in the existing technology are solved, and higher detection accuracy and robustness are achieved.

CN119832406AActive Publication Date: 2025-04-15NANJING UNIV OF SCI & TECH

Patent Information

Application Number
CN202411892309.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The existing underwater target detection technology has defects in noise sensitivity, limited resolution, imaging instability, etc., resulting in poor detection and tracking of underwater targets.

Method used

The sonar image underwater detection method based on multi-scale feature fusion and college upsampling algorithm is adopted. By building an efficient upsampling module and a multi-scale feature fusion module, combined with the YOLOv11 network, the object detection algorithm model is improved and the detection ability of small targets is enhanced.

Benefits of technology

It improves the accuracy and robustness of underwater target detection, effectively overcomes the problems of target scale transformation, too small target, and low resolution, and improves the detection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832406A_ABST
    Figure CN119832406A_ABST
Patent Text Reader

Abstract

The invention discloses a sonar image underwater detection method and system based on multi-scale feature fusion and a college up-sampling algorithm, and the method comprises the steps: collecting the foresight sonar data of an underwater typical target, and making a detection training and testing data set of a sonar image; the method comprises the following steps: constructing a feature fusion network comprising an efficient upsampling module, a multi-scale feature fusion module and a small target detection branch, constructing a target detection algorithm model based on YOLOv11, taking the feature fusion network as a neck network of YOLOv11, and removing a deep feature map detection branch of YOLOv11; and training a target detection algorithm model by using the manufactured data set, and inputting a foresight sonar image into the trained model for reasoning to obtain a detection result of the underwater typical target. According to the invention, the accuracy and robustness of an underwater target detection algorithm are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of underwater target detection of sonar images, and in particular to a sonar image underwater detection method and system based on multi-scale feature fusion and high-quality upsampling algorithm. Background Art

[0002] Underwater target detection methods are not only important tools for monitoring and tracking submarines and underwater unmanned systems, but also effective ways to detect aquatic organisms and submarine pipelines. Due to the limitations of the underwater environment and the physical characteristics of acoustic detection, sonar imaging has shortcomings such as sensitivity to noise, limited resolution, and imaging instability, resulting in poor detection and tracking of targets. Therefore, underwater target detection technology is becoming an important research direction at present. This technology is of great significance for strengthening marine defense and marine resource management.

[0003] In recent years, the research on underwater target detection technology has basically focused on deep learning, and the exploration and research on convolutional neural networks has developed rapidly, among which the application and improvement research of the YOLO network has gradually deepened. Although the underwater target detection task has some special challenges, such as light attenuation and water flow interference, the characteristics of the YOLO network make it potentially an effective tool to solve these problems. However, the YOLO network detection head has a single scale and can only input static feature maps. The prediction results cannot be corrected in time when performing underwater target detection. A large amount of small target feature information is easily lost during the upsampling process of the YOLO network. In this context, it is very necessary to carry out research on underwater detection methods based on the YOLO network. Summary of the invention

[0004] The purpose of the present invention is to propose a sonar image underwater detection method and system based on multi-scale feature fusion and high-quality upsampling algorithm, so as to overcome the problems of scale transformation of targets to be detected in the underwater environment, too small targets, low resolution, etc.

[0005] The technical solution to achieve the purpose of the present invention is:

[0006] A sonar image underwater detection method based on multi-scale feature fusion and high-quality upsampling algorithm comprises the following steps:

[0007] S1. Collect forward-looking sonar data of typical underwater targets, extract sonar metadata and convert coordinate axes, obtain sonar images frame by frame, organize and annotate data sets, and produce sonar image detection training and test data sets;

[0008] S2, build an efficient upsampling module to improve the upsampling process through a compensation-based mechanism;

[0009] S3, build a multi-scale feature fusion module to strengthen the fusion of multi-scale feature information;

[0010] S4, construct a feature fusion network including an efficient upsampling module, a multi-scale feature fusion module and a small target detection branch;

[0011] S5. Build a target detection algorithm model based on YOLOv11, use the feature fusion network as the neck network of YOLOv11, and remove the deep feature map detection branch of YOLOv11; when the target detection algorithm model performs image processing, input the feature map into the backbone network of the target detection algorithm model for feature extraction and input it into the feature fusion network; downsample the shallow feature maps of the backbone network and the feature fusion network one by one through downsampling, and the feature fusion network simultaneously upsamples the deep feature map using the university upsampling module, and uses the multi-scale feature fusion module to perform bidirectional feature fusion with the next layer of the same-scale feature map, and uses the small target detection branch to enhance the detection effect of small targets;

[0012] S6, uses the prepared data set to train the target detection algorithm model, inputs the forward-looking sonar image into the trained model for inference, and obtains the detection results of typical underwater targets.

[0013] Furthermore, the step S1 specifically includes:

[0014] S1.1, collect underwater sonar data of typical targets using forward-looking sonar;

[0015] S1.2, extract sonar metadata and transform coordinate axes, obtain sonar images frame by frame, scale all sonar images to a resolution of 1280×720 pixels, and annotate them as required to create a dataset;

[0016] S1.3, mask extraction is performed on the sonar image to obtain a mask annotation set, which is used as the basis for learning mask refinement during the target detection algorithm model training process.

[0017] Furthermore, the typical targets include cone-shaped targets, mesh-shaped targets and irregular targets.

[0018] Furthermore, the process of image processing by the efficient upsampling module includes:

[0019] The input image is downsampled using multi-scale convolution as follows:

[0020]

[0021] Where: F down represents the feature map of the downsampled output, W i Represents the convolution kernel weights of different scales, F in,j is the input feature map, N is the number of different scales, and * represents the convolution operation;

[0022] The downsampled feature map is processed by the channel attention CAB and spatial attention SAB mechanisms as follows:

[0023] F CAB =σ(W2·ReLU(W1·GAP(X))

[0024] F SAB =σ(Conv 7×7 (X)

[0025] Where: F CAB represents the weight of channel attention, GAP represents global average pooling for each channel, W1 and W2 are the weight matrices of the two fully connected layers, X is the input feature map, ReLU represents the activation function ReLU, σ represents the Sigmoid function, which is used to map the channel weight to the (0, 1) interval; F SAB represents the weight of spatial attention, X is the input feature map, σ represents the Sigmoid function, Conv 7×7 Represents a large kernel convolution;

[0026] Through the upsampling operation, the image enhanced by the channel attention CAB and spatial attention SAB mechanisms is restored to a higher resolution and fused with the feature map from the jump connection by element-by-element addition, as follows:

[0027] X'=X+CompKernel(X)

[0028] Y upsample =Upsample(X)

[0029] Where: X is the input downsampled feature map, CompKernel(X) represents the correction of the compensation kernel feature map, and Y upsample Represents the output image after upsampling, Upsample(X) represents the upsampling operation on the input X;

[0030] When the skip connection is combined with the large convolution kernel group attention gate module, the feature map after upsampling and the feature map after skip connection feature fusion is passed to the large convolution kernel group attention gate module, and the output feature map is finally obtained as follows:

[0031] F EUCB =F fused ×F CAB ×F SAB

[0032] Where: F fused is the feature map after skip connection and upsampling fusion, F EUCB is the output feature.

[0033] Furthermore, the feature map is input into the backbone network of the target detection algorithm model for feature extraction, which specifically includes:

[0034] The feature map is downsampled four times in the backbone network. After the first downsampling, it is downsampled again through a convolution with a step size of 2 and a channel number of 256 and connected to the feature fusion network. The other downsampled feature maps are connected to the feature fusion network through a convolution with a step size of 1 and a channel number of 256. The number of channels of each layer of feature maps is fixed to 256, and the input image is adjusted to a fixed size and normalized to:

[0035]

[0036] Where: I is the original input image, normalized to the interval [0, 1];

[0037] Then, the feature extraction backbone network Backbone of YOLOv11 is used. The feature extraction backbone network Backbone consists of a convolution with a step size of 2, C3K2, a fast spatial pyramid pooling module, and a point aggregation attention module. First, the image is segmented:

[0038] F1, F2 = Split (F)

[0039] Where: F1, F2 are different input feature maps, Split(F) means feature segmentation of feature maps;

[0040] Then apply two Bottleneck blocks to F2, as follows:

[0041] F2′=Bottleneck2(Bottleneck1(F2))

[0042] Where: Bottleneck means feature extraction and stacking of feature maps;

[0043] Then perform feature concatenation and concatenate F1 and F2' in the channel dimension:

[0044] F cat =Concat(F1,F2′)

[0045] Finally, the features are fused and the channel features are fused using 1×1 convolution to obtain the final output. The calculation formula is as follows:

[0046] F out =Conv 1x1 (F1,F′2)

[0047] The fast spatial pyramid pooling module uses the maximum pooling operation of different scales to extract multi-scale features, and fuses these features through splicing and convolution to obtain:

[0048] F1=MaxPool(F,k=5,s=1,padding=2)

[0049] F2=MaxPool(F1,k=5,s=1,padding=2)

[0050] F3=MaxPool(F2,k=5,s=1,padding=2)

[0051] Where: the fast spatial pyramid pooling module uses 3 maximum pooling operations, k = 5 means the pooling kernel size is 5, s = 1 means the step size is 1, and padding = 2 means the convolution edge padding factor is 2;

[0052] Concatenate the pooled feature maps F1, F2, and F3 according to the channel dimension:

[0053] F cat =Concat(F,F1,F2,F3)

[0054] Finally, a 1×1 convolutional layer is used to reduce the number of channels and fuse the concatenated features:

[0055] F out =Conv 1x1 (F cat )

[0056] The point aggregation attention module of YOLOv11 is used to perform feature segmentation through the C2 feature module, and the point aggregation parallel spatial attention module is inserted in the middle. The input feature F is divided into two parts, F1 and F2, according to the channel dimension. F1 is convolved to extract local features; F2 is passed through a parallel spatial attention module to generate a set of attention weights, and the input features are re-weighted, and the parallel channel attention and spatial attention are multiplied. The relevant calculation formula is as follows:

[0057] F1, F2 = Split (F)

[0058] F′1=Conv 3×3 (F1)

[0059] F ca =σ(MLP(GAP(F2)))

[0060] F sa =σ(Conv k×k (Concat(AvgPool(F2),MaxPool(F2))))

[0061] F psa =F2·F ca ·F sa

[0062] Where: MLP is a multi-layer perceptron network, σ represents the Sigmoid function, GAP represents global average pooling, AvgPool represents average pooling, MaxPool represents maximum pooling, and F ca represents channel attention, F sa Represents spatial attention.

[0063] Furthermore, the process of the multi-scale feature fusion module strengthening the fusion of multi-scale feature information is as follows:

[0064] The weights of multiple input feature maps are initialized and weighted, activated using the ReLU function, and then weighted normalized. Finally, the weights are weighted summed to obtain the final fused feature map. The weighted summation formula is:

[0065]

[0066] Where: P fused is the output weight after fusion, is the normalized weight,

[0067]

[0068] Where: ReLU is the activation function and ε is a constant.

[0069] Furthermore, the image processing process of the feature fusion network specifically includes: downsampling through a convolution with a step size of 2 and fusing features with adjacent deep feature maps through a multi-scale feature fusion module, and the deep feature map is upsampled through a high-level upsampling module and connected to the multi-scale feature fusion module to perform feature fusion with the adjacent upper shallow feature map, and the result is:

[0070] P i =P fused (Conv(P i-1 ))+P fused (F EUCB (P i+1 ))

[0071] Among them, P i Represents the current layer feature map, P i-1 represents the adjacent shallow feature map, P i+1 represents the adjacent deep feature map; P fused (Conv(P i-1 )) represents downsampling the feature map of the previous layer and connecting it to the multi-scale feature fusion module, P fused (F EUCB (P i+1)) indicates that the feature map of the next layer is efficiently upsampled and connected to the multi-scale feature fusion module.

[0072] Furthermore, the detection algorithm model uses a dynamic detection head to output image recognition results.

[0073] Furthermore, the image recognition results outputted by the dynamic detection head specifically include:

[0074] The dynamic detection head includes three dimensions: scale perception, spatial perception, and task perception. All three dimensions are based on the two modules of channel attention and spatial attention, which generate feature weights through channel and spatial dimensions respectively. The calculation formula is:

[0075]

[0076]

[0077] Where: GAP(F l ) represents global average pooling, W ca and b ca Represents the weight and bias of channel attention;

[0078] Then, the task attention module is used to focus on the dynamic features The classification task and regression task are dynamically modeled as follows:

[0079]

[0080] Where: W cls , b cls Represents the weight and bias of the classification task, W reg , b reg Represents the weights and biases of the regression task;

[0081] Then we get the output of the classification task and regression task branches:

[0082]

[0083] Where: W cls_out , b cls_out represents the linear transformation parameter of the classification branch, W reg_out , b reg_out Represents the linear transformation parameters of the regression branch.

[0084] A sonar image underwater detection system based on multi-scale feature fusion and high-quality upsampling algorithm, comprising:

[0085] The data set generation unit collects forward-looking sonar data of typical underwater targets, extracts sonar metadata and performs coordinate axis conversion, obtains sonar images frame by frame, organizes and annotates data sets, and produces detection training and test data sets for sonar images;

[0086] The target detection algorithm model construction unit constructs a feature fusion network including an efficient upsampling module, a multi-scale feature fusion module and a small target detection branch, constructs a target detection algorithm model based on YOLOv11, uses the feature fusion network as the neck network of YOLOv11, and removes the deep feature map detection branch of YOLOv11; when the target detection algorithm model performs image processing, the feature map is input into the backbone network of the target detection algorithm model for feature extraction and input into the feature fusion network; the shallow feature maps of the backbone network and the feature fusion network are downsampled one by one through downsampling, and the feature fusion network simultaneously upsamples the deep feature map using the university upsampling module, uses the multi-scale feature fusion module to perform bidirectional feature fusion with the next layer of the same-scale feature map, and uses the small target detection branch to enhance the detection effect of small targets;

[0087] The target detection unit uses the prepared data set to train the target detection algorithm model, inputs the forward-looking sonar image into the trained model for inference, and obtains the detection results of typical underwater targets.

[0088] Compared with the prior art, the present invention has the following significant advantages:

[0089] 1. The present invention adopts the YOLOv11 network as the basic framework of the underwater target detection method. The network combines image enhancement and real-time detection technology to effectively reduce the error caused by the rotation of underwater targets.

[0090] 2. A large amount of small target feature information is easily lost during the upsampling process of the original YOLO network. The present invention constructs an efficient upsampling module, which improves the accuracy and efficiency of image reconstruction input through a compensation-based mechanism to enhance the detection of small targets.

[0091] 3. Taking into account the impact of scale transformation of underwater targets, the present invention downsamples the shallow feature maps of the backbone network and the feature fusion network one by one, and upsamples the deep feature maps using a university upsampling module, and uses a multi-scale feature fusion module to perform bidirectional feature fusion with the feature maps of the same scale in the next layer, adds a small target detection branch and removes the deep feature map detection branch; the entire feature fusion network structure fuses the feature information of the deep feature map with the shallow feature map, thereby effectively improving the detection accuracy.

[0092] 4. The original YOLO network detection head has a single scale and can only input static feature maps. The prediction results cannot be corrected in time when underwater target detection is performed. The present invention adopts a dynamic detection head to fuse feature information from three dimensions: scale, space, and task, and introduces a dynamic weighting mechanism, so that the feature representation of each position can be adaptively adjusted according to the context information, thereby enhancing the detection effect; BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 The figure is a flow chart of the algorithm of the present invention.

[0094] Figure 2 This is the algorithm structure diagram of the present invention.

[0095] Figure 3 This is a diagram of the upsampling structure of the present invention.

[0096] Figure 4 This is the multi-scale feature fusion structure diagram of the present invention

[0097] Figure 5 This is a flow structure diagram of the feature fusion network feature graph of the present invention.

[0098] Figure 6 This is a structural diagram of the dynamic detection head of the present invention.

[0099] Figure 7 This is a sonar detection image of an underwater fishing net target according to an embodiment of the present invention.

[0100] Figure 8 This is a diagram of underwater fishing net target detection results according to an embodiment of the present invention.

[0101] Fig. 9 This is a sonar detection map of an unmanned underwater vehicle according to an embodiment of the present invention.

[0102] Fig.10 This is a diagram of the tracking results of the unmanned underwater vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION

[0103] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0104] YOLOv11 is the latest version of the YOLO series network, with higher detection accuracy and faster reasoning speed. This embodiment uses it as a benchmark model and improves and updates it on its basis. In order to overcome the problems of scale transformation of the target to be detected in the underwater environment, too small targets, low resolution, etc., this invention proposes a sonar image underwater detection method based on multi-scale feature fusion and high-quality upsampling algorithm. Figure 1 As shown, the implementation process of the method includes the following steps:

[0105] S1. Collect forward-looking sonar data of typical underwater targets, extract sonar metadata and convert coordinate axes, obtain sonar images frame by frame, organize and annotate data sets, and produce tracking training and test data sets for sonar images;

[0106] S1.1 Use forward-looking sonar to collect underwater sonar data of typical targets, including cone-shaped targets, mesh targets, irregular targets, etc.;

[0107] S1.2 extracting sonar metadata and converting coordinate axes, acquiring sonar images frame by frame, scaling all sonar images to a resolution of 1280×720 pixels, and annotating them as required to produce a data set dedicated to the present invention;

[0108] S1.3 performs mask extraction on the sonar image to obtain a mask annotation set, which is used as a basis for learning mask refinement during network training.

[0109] S2. Build a target detection model framework based on YOLOv11, such as Figure 2 , the feature map is input into its backbone network for feature extraction and then input into the feature fusion network;

[0110] S3, build an efficient upsampling module to improve the traditional upsampling process through a compensation-based mechanism;

[0111] In this step, an efficient upsampling module is proposed, such as Figure 3 , starting from a low-resolution image as input, the goal is to increase its resolution, and then downsample the input image using the multi-scale convolution (DWC) calculation formula:

[0112]

[0113] Where: F down represents the feature map of the downsampled output, W i Represents the convolution kernel weights of different scales, F in,j is the input feature map, N is the number of different scales, and * represents the convolution operation. In order to extract important features in the image and prepare for subsequent enhancement processing.

[0114] Then, the feature map is refined through the channel attention block (CAB) and spatial attention block (SAB) mechanisms to better focus on key information. The CAB calculation formula is:

[0115] F CAB =σ(W2·ReLU(W1·GAP(X))

[0116] Where: FCAB Represents the weight of channel attention, GAP (Global Average Pooling) represents global average pooling for each channel, W1 and W2 are the weight matrices of the two fully connected layers, X is the input feature map, ReLU represents the activation function ReLU, and σ represents the Sigmoid function, which is used to map the channel weight to the (0, 1) interval.

[0117] The SAB calculation formula is as follows:

[0118] F SAB =σ(Conv 7×7 (X)

[0119] Where: F SAB represents the weight of spatial attention, X is the input feature map, σ represents the Sigmoid function, Conv 7×7 Represents a large kernel convolution.

[0120] In this process, the compensation kernel estimation mechanism is involved to correct the information loss during the downsampling process. Then, the enhanced image is restored to a higher resolution through upsampling and fused with the feature map from the skip connection to enhance the feature details. Using element-by-element addition, the calculation formula is as follows:

[0121] X'=X+CompKernel(X)

[0122] Y upsample =Upsample(X)

[0123] Where: X is the input downsampled feature map, CompKernel(X) represents the correction of the compensation kernel feature map, and Y upsample Represents the output image after upsampling, and Upsample(X) represents the upsampling operation on the input X.

[0124] The efficient upsampling module combines the upsampled feature map with the output of the large convolution kernel grouping attention gate module to further improve the segmentation accuracy. When the skip connection is combined with the large convolution kernel grouping attention gate module, the feature map after upsampling and the feature map after skip connection feature fusion is passed to the large convolution kernel grouping attention gate module. After the fine-grained enhancement of the attention mechanism mentioned above, the output feature map is finally obtained. The calculation formula is as follows:

[0125] F EUCB =F fused ×F CAB ×F SAB

[0126] Where: F fusedis the feature map after skip connection and upsampling fusion, F EUCB is the output feature.

[0127] The whole process improves the accuracy of features by estimating the compensation kernel, ensuring that image details are fully restored during the upsampling stage.

[0128] S4. A new multi-scale feature fusion module is proposed to strengthen the fusion of multi-scale feature information;

[0129] In this step, a multi-scale feature fusion module is proposed, such as Figure 4 , by initializing the weights of multiple input feature maps and performing weight fusion, using the ReLU function for activation, and then performing weight normalization, and finally performing weighted summation to obtain the final fused feature map. The weighted summation formula is:

[0130]

[0131] Where: P fused is the output weight after fusion, is the normalized weight, and its specific expression is as follows:

[0132]

[0133] Where: ReLU is the activation function, ε is a small constant used to prevent division by zero errors.

[0134] S5. Build a new feature fusion network, such as Figure 5 , downsample the shallow feature maps of the backbone network and feature fusion network one by one, and upsample the deep feature maps using the university upsampling module, use the multi-scale feature fusion module to perform bidirectional feature fusion with the feature map of the same scale in the next layer, add a small target detection branch and remove the deep feature map detection branch;

[0135] The constructed feature fusion network calculation formula is as follows:

[0136] P i =P fused (Conv(P i-1 ))+P fused (F EUCB (P i+1 ))

[0137] Among them, P i Represents the current layer feature map, P i-1 represents the adjacent shallow feature map, P i+1 Represents the adjacent deep feature map. fused (Conv(P i-1)) represents downsampling the feature map of the previous layer and connecting it to the multi-scale feature fusion module, P fused (F EUCB (P i+1 )) indicates that the feature map of the next layer is efficiently upsampled and connected to the multi-scale feature fusion module.

[0138] S6, build a dynamic detection head, add a small target detection head, remove the large-scale feature map detection head, and enhance the detection effect;

[0139] like Figure 6 The core of the dynamic detection head is the dynamic attention mechanism, which includes three dimensions: scale perception, spatial perception, and task perception. All three dimensions are based on the two modules of channel attention and spatial attention, which generate feature weights through channel and spatial dimensions respectively. The relevant calculation formula is as follows:

[0140]

[0141] Where: GAP(F l ) represents global average pooling, W ca and b ca Represents the weight and bias of channel attention.

[0142] Then the task attention module focuses on the dynamic features Dynamic modeling is performed for classification tasks and regression tasks respectively, and the relevant calculation formulas are as follows:

[0143]

[0144] Where: W cls , b cls W represents the weight and bias of the classification task. reg , b reg Represents the weights and biases for the regression task.

[0145] Then we get the output of the classification and regression branches:

[0146]

[0147] Where: W cls_out , b cls_out Represents the linear transformation parameter of the classification branch. W reg_out , b reg_out Represents the linear transformation parameters of the regression branch.

[0148] S7. Use the prepared data set to train an improved target detection model, apply the trained model to typical target detection in sonar images, input the forward-looking sonar images into the trained model for inference, and obtain the detection results of typical underwater targets.

[0149] This embodiment also provides a sonar image underwater detection system based on multi-scale feature fusion and high-quality upsampling algorithm, including:

[0150] The data set generation unit collects forward-looking sonar data of typical underwater targets, extracts sonar metadata and performs coordinate axis conversion, obtains sonar images frame by frame, organizes and annotates data sets, and produces detection training and test data sets for sonar images;

[0151] The target detection algorithm model construction unit constructs a feature fusion network including an efficient upsampling module, a multi-scale feature fusion module and a small target detection branch, constructs a target detection algorithm model based on YOLOv11, uses the feature fusion network as the neck network of YOLOv11, and removes the deep feature map detection branch of YOLOv11; when the target detection algorithm model performs image processing, the feature map is input into the backbone network of the target detection algorithm model for feature extraction and input into the feature fusion network; the shallow feature maps of the backbone network and the feature fusion network are downsampled one by one through downsampling, and the feature fusion network simultaneously upsamples the deep feature map using the university upsampling module, uses the multi-scale feature fusion module to perform bidirectional feature fusion with the next layer of the same-scale feature map, and uses the small target detection branch to enhance the detection effect of small targets;

[0152] The target detection unit uses the prepared data set to train the target detection algorithm model, inputs the forward-looking sonar image into the trained model for inference, and obtains the detection results of typical underwater targets.

[0153] Taking the underwater unmanned submersible long-distance detection in the self-made sonar data set as an example, the original picture obtained by the M750d model forward-looking active sonar detection is as follows Figure 7 and Fig. 9 As shown in the figure, the combined images are the 1st, 66th, 134th frames and the 3rd, 27th, and 53rd frames, respectively. In the picture, the unmanned underwater vehicle moves in the water at a relatively fast speed and is far away from the sonar, resulting in a small imaging target. The detection result of the embodiment of the present invention using the unmanned underwater vehicle for long-distance detection is as follows Figure 8 and Fig.10 As shown, it can be seen that the present invention has a good detection effect on fast-moving and small targets.

[0154] The present invention designs a new feature fusion network and a multi-scale feature fusion module, and designs an efficient upsampling module and a dynamic detection head to improve the YOLO network, thereby solving the problems that the original network template has poor effect on target scale changes, the target is too small, and the resolution is low, thereby improving the accuracy and robustness of the underwater target detection algorithm.

[0155] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A sonar image underwater detection method based on multi-scale feature fusion and high-quality upsampling algorithm, characterized in that: Includes steps: S1. Collect forward-looking sonar data of typical underwater targets, extract sonar metadata and convert coordinate axes, obtain sonar images frame by frame, organize and annotate data sets, and produce sonar image detection training and test data sets; S2, build an efficient upsampling module to improve the upsampling process through a compensation-based mechanism; S3, build a multi-scale feature fusion module to strengthen the fusion of multi-scale feature information; S4, construct a feature fusion network including an efficient upsampling module, a multi-scale feature fusion module and a small target detection branch; S5. Build a target detection algorithm model based on YOLOv11, use the feature fusion network as the neck network of YOLOv11, and remove the deep feature map detection branch of YOLOv11; when the target detection algorithm model performs image processing, input the feature map into the backbone network of the target detection algorithm model for feature extraction and input it into the feature fusion network; downsample the shallow feature maps of the backbone network and the feature fusion network one by one through downsampling, and the feature fusion network simultaneously upsamples the deep feature map using the university upsampling module, and uses the multi-scale feature fusion module to perform bidirectional feature fusion with the next layer of the same-scale feature map, and uses the small target detection branch to enhance the detection effect of small targets; S6, uses the prepared data set to train the target detection algorithm model, inputs the forward-looking sonar image into the trained model for inference, and obtains the detection results of typical underwater targets.

2. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The step S1 specifically includes: S1.1, collect underwater sonar data of typical targets using forward-looking sonar; S1.2, extract sonar metadata and transform coordinate axes, obtain sonar images frame by frame, scale all sonar images to a resolution of 1280×720 pixels, and annotate them as required to create a dataset; S1.3, mask extraction is performed on the sonar image to obtain a mask annotation set, which is used as the basis for learning mask refinement during the target detection algorithm model training process.

3. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The typical targets include cone-shaped targets, mesh-shaped targets and irregular targets.

4. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The process of image processing by the efficient upsampling module includes: The input image is downsampled using multi-scale convolution: Where: F down represents the feature map of the downsampled output, W i Represents the convolution kernel weights of different scales, F in,j is the input feature map, N is the number of different scales, and * represents the convolution operation; The downsampled feature map is processed by the channel attention CAB and spatial attention SAB mechanisms as follows: F CAB =σ(W2·ReLU(W1·GAP(X)) F SAB =σ(Conv 7×7 (X)) Where: F CAB represents the weight of channel attention, GAP represents global average pooling for each channel, W1 and W2 are the weight matrices of the two fully connected layers, X is the input feature map, ReLU represents the activation function ReLU, σ represents the Sigmoid function, which is used to map the channel weight to the (0, 1) interval; F SAB represents the weight of spatial attention, X is the input feature map, σ represents the Sigmoid function, Conv 7×7 Represents a large kernel convolution; Through the upsampling operation, the image enhanced by the channel attention CAB and spatial attention SAB mechanisms is restored to a higher resolution and fused with the feature map from the jump connection by element-by-element addition, as follows: X'=X+CompKernel(X) AND upsample =Upsample(X) Where: X is the input downsampled feature map, CompKernel(X) represents the correction of the compensation kernel feature map, and Y upsample Represents the output image after upsampling, Upsample(X) represents the upsampling operation on the input X; When the skip connection is combined with the large convolution kernel group attention gate module, the feature map after upsampling and the feature map after skip connection feature fusion is passed to the large convolution kernel group attention gate module, and the output feature map is finally obtained as follows: F EUCB =F fused ×F CAB ×F SAB Where: F fused is the feature map after skip connection and upsampling fusion, F EUCB is the output feature.

5. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The feature map is input into the backbone network of the target detection algorithm model for feature extraction, including: The feature map is downsampled four times in the backbone network. After the first downsampling, it is downsampled again through a convolution with a step size of 2 and a channel number of 256 and connected to the feature fusion network. The other downsampled feature maps are connected to the feature fusion network through a convolution with a step size of 1 and a channel number of 256. The number of channels of each layer of feature maps is fixed to 256, and the input image is adjusted to a fixed size and normalized to: Where: I is the original input image, normalized to the interval [0, 1]; Then, the feature extraction backbone network Backbone of YOLOv11 is used. The feature extraction backbone network Backbone consists of a convolution with a step size of 2, C3K2, a fast spatial pyramid pooling module, and a point aggregation attention module. First, the image is segmented: F1, F2 = Split (F) Where: F1, F2 are different input feature maps, Split(F) means feature segmentation of feature maps; Then apply two Bottleneck blocks to F2, as follows: F2′=Bottleneck2(Botytleneck1(F2)) Where: Bottleneck means feature extraction and stacking of feature maps; Then perform feature concatenation and concatenate F1 and F2' in the channel dimension: F cat =Concat(F1,F2′) Finally, the features are fused and the channel features are fused using 1×1 convolution to obtain the final output. The calculation formula is as follows: F out =Conv 1x1 (F1,F′2) The fast spatial pyramid pooling module uses the maximum pooling operation of different scales to extract multi-scale features, and fuses these features through splicing and convolution to obtain: F1=MaxPool(F,k=5,s=1,padding=2) F2=MaxPool(F1,k=5,s=1,padding=2) F3=MaxPool(F2,k=5,s=1,padding=2) Where: the fast spatial pyramid pooling module uses 3 maximum pooling operations, k = 5 means the pooling kernel size is 5, s = 1 means the step size is 1, and padding = 2 means the convolution edge padding factor is 2; Concatenate the pooled feature maps F1, F2, and F3 according to the channel dimension: F cat =Concat(F,F1,F2,F3) Finally, a 1×1 convolutional layer is used to reduce the number of channels and fuse the concatenated features: F out =Conv 1x1 (F cat ) The point aggregation attention module of YOLOv11 is used to perform feature segmentation through the C2 feature module, and the point aggregation parallel spatial attention module is inserted in the middle. The input feature F is divided into two parts, F1 and F2, according to the channel dimension. F1 is convolved to extract local features; F2 is passed through a parallel spatial attention module to generate a set of attention weights, and the input features are re-weighted, and the parallel channel attention and spatial attention are multiplied. The relevant calculation formula is as follows: F1, F2 = Split (F) F’1=Conv 3×3 (F1) F ca =σ(MLP(GAP(F2))) F sa =σ(Conv k×k (Concat(AvgPool(F2),MaxPool(F2)))) F psa =F2·F ca ·F sa Where: MLP is a multi-layer perceptron network, σ represents the Sigmoid function, GAP represents global average pooling, AvgPool represents average pooling, MaxPool represents maximum pooling, and F ca represents channel attention, F sa Represents spatial attention.

6. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The process of enhancing the fusion of multi-scale feature information by the multi-scale feature fusion module is as follows: The weights of multiple input feature maps are initialized and weighted, activated using the ReLU function, and then weighted normalized. Finally, the weights are weighted summed to obtain the final fused feature map. The weighted summation formula is: Where: P fused is the output weight after fusion, is the normalized weight, Where: ReLU is the activation function and ε is a constant.

7. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The processing process of the feature fusion network on the image specifically includes: downsampling through a convolution with a step size of 2 and feature fusion with the adjacent deep feature map through a multi-scale feature fusion module, the deep feature map is upsampled through a high-level upsampling module and connected to the multi-scale feature fusion module to perform feature fusion with the adjacent upper shallow feature map, and the result is: P i =P fused (Conv(P i-1 ))+P fused (F EUCB (P i+1 )) Among them, P i Represents the current layer feature map, P i-1 represents the adjacent shallow feature map, P i+1 represents the adjacent deep feature map; P fused (Conv(P i-1 )) represents downsampling the feature map of the previous layer and connecting it to the multi-scale feature fusion module, P fused (F EUCB (P i+1 )) indicates that the feature map of the next layer is efficiently upsampled and connected to the multi-scale feature fusion module.

8. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 1 is characterized in that: The detection algorithm model uses a dynamic detection head to output image recognition results.

9. The method for underwater detection of sonar images based on multi-scale feature fusion and high-quality upsampling algorithm according to claim 8 is characterized in that: The image recognition results output by the dynamic detection head include: The dynamic detection head includes three dimensions: scale perception, spatial perception, and task perception. All three dimensions are based on the two modules of channel attention and spatial attention, which generate feature weights through channel and spatial dimensions respectively. The calculation formula is: Where: GAP(F l ) represents global average pooling, W ca and b ca Represents the weight and bias of channel attention; Then, the task attention module is used to focus on the dynamic features The classification task and regression task are dynamically modeled as follows: Where: W cls , b cls Represents the weight and bias of the classification task, W reg , b reg Represents the weights and biases of the regression task; Then we get the output of the classification task and regression task branches: Where: W cls_out , b cls_out represents the linear transformation parameter of the classification branch, W reg_out , b reg_out Represents the linear transformation parameters of the regression branch.

10. A sonar image underwater detection system for implementing any of the methods described in claims 1-9, characterized in that: include: The data set generation unit collects forward-looking sonar data of typical underwater targets, extracts sonar metadata and performs coordinate axis conversion, obtains sonar images frame by frame, organizes and annotates data sets, and produces detection training and test data sets for sonar images; The target detection algorithm model construction unit constructs a feature fusion network including an efficient upsampling module, a multi-scale feature fusion module and a small target detection branch, constructs a target detection algorithm model based on YOLOv11, uses the feature fusion network as the neck network of YOLOv11, and removes the deep feature map detection branch of YOLOv11; when the target detection algorithm model performs image processing, the feature map is input into the backbone network of the target detection algorithm model for feature extraction and input into the feature fusion network; the shallow feature maps of the backbone network and the feature fusion network are downsampled one by one through downsampling, and the feature fusion network simultaneously upsamples the deep feature map using the university upsampling module, uses the multi-scale feature fusion module to perform bidirectional feature fusion with the next layer of the same-scale feature map, and uses the small target detection branch to enhance the detection effect of small targets; The target detection unit uses the prepared data set to train the target detection algorithm model, inputs the forward-looking sonar image into the trained model for inference, and obtains the detection results of typical underwater targets.

Citation Information

Patent Citations

  • Robust sonar target detection method based on dual-path feature fusion network

    CN110163108A

  • Multi-scale feature enhancement and training method and device for underwater sonar small target detection

    CN116091908A

  • Sonar target detection method based on underwater prior information perception

    CN117274787A

  • Twin network sonar image tracking method based on attention and template updating

    CN117745762A

  • Underwater sonar image target detection method and system based on neural network

    CN118628898A

Cited By

  • Pedestrian detection method and system for coping with automatic driving under complex background influence

    CN120032429A

  • Pedestrian detection method and system for autonomous driving under complex background

    CN120032429B

  • Concrete building peeling defect detection method, device and system and storage medium

    CN120235885A

  • SAR image-based wounded person detection method and electronic equipment

    CN120260081A

  • Building damage identification and marking method based on unmanned aerial vehicle image

    CN120472356A