A method and system for underwater target detection based on multi-beam forward-looking sonar images
By combining an improved convolutional neural network with a dynamic perception patch attention mechanism and a feature pyramid network, the problem of small target detection in multibeam forward-looking sonar images is solved, achieving efficient and accurate underwater target detection, which is suitable for embedding in microprocessor devices.
Patent Information
- Application Number
- CN202411897893.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Existing deep learning methods struggle to effectively detect small targets in multibeam forward-looking sonar images, and the lack of high-quality training datasets results in unsatisfactory detection performance.
An improved convolutional neural network is adopted, which introduces a dynamic perceptual patch attention mechanism and a multi-branch feature extraction strategy. It combines a feature pyramid network and a depthwise separable convolution, optimizes the model structure, embeds a microprocessor, and designs a dedicated detection head to capture small targets.
It significantly improves the accuracy of small target recognition, enables portable real-time detection, enhances ease of operation and flexibility, and is suitable for embedding in microprocessor devices.
Smart Images

Figure CN119888463B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of underwater sonar image processing technology, specifically to an underwater target detection method and system based on multibeam forward-looking sonar images. Background Technology
[0002] With the rapid development of the global economy and technology, the development and utilization of marine resources has become increasingly important. The ocean not only contains abundant natural resources but also plays a crucial role in military strategy, scientific research, and environmental protection. To better explore and utilize the ocean, countries have increased their investment in marine exploration technology research. Among numerous marine exploration technologies, multibeam forward-looking sonar (MFLS), due to its high resolution and real-time imaging capabilities, can provide detailed information on seabed topography and underwater targets, and is widely used in underwater navigation, target detection, and seabed mapping.
[0003] In recent years, deep learning technology has made groundbreaking progress in the field of computer vision, especially in object detection. Deep learning-based methods, through end-to-end learning mechanisms, can automatically extract image features and perform classification, overcoming the limitations of traditional methods that rely on manually designed feature extractors and classifiers. However, deep learning methods also face challenges when applied to multibeam forward-looking sonar images. On the one hand, training deep learning models requires a large amount of labeled data, while high-quality underwater sonar image datasets are relatively scarce. On the other hand, sonar images have unique characteristics, such as low signal-to-noise ratio, low resolution, and target sparsity, making it difficult to achieve ideal detection results when directly applying existing deep learning models. Therefore, how to combine the characteristics of multibeam forward-looking sonar to design efficient and accurate object detection methods has become an urgent problem to be solved. Summary of the Invention
[0004] To address the technical problems existing in the background art, the present invention aims to provide an underwater target detection method and system based on multibeam forward-looking sonar images. Based on a convolutional neural network, the detection network is improved by introducing an attention mechanism, and the detection head of the backbone network is optimized. A new detection head is introduced specifically for small target detection to improve detection accuracy and efficiency. Simultaneously, by simplifying and optimizing the model structure and parameter count, the system is embedded into a microprocessor device to achieve real-time detection, improving portability and practicality.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] On one hand, the present invention provides an underwater target detection system based on multi-beam forward-looking sonar images, including a power supply module.
[0007] A multibeam forward-looking sonar device is used to image target waters and acquire raw seabed sonar images;
[0008] A microprocessor is used to run an improved convolutional neural network-based detection model to obtain target detection results and control other modules. The target detection results include the target's location, size, and classification information. The improved convolutional neural network-based detection model introduces a dynamic perceptual patch attention mechanism into the backbone network of the convolutional neural network to replace the convolutional operations in the original encoder and decoder; it captures multi-scale features through a multi-branch feature extraction strategy and enhances the extracted multi-scale features through dynamic feature fusion and attention mechanisms; and it adopts a neck network structure based on a feature pyramid network and depthwise separable convolution.
[0009] The data storage module is used to store the original seabed sonar images, preprocessed data, trained network parameters, and intermediate result information;
[0010] A communication module is used to transmit the target detection results to a remote monitoring center and receive instructions from a remote location;
[0011] The display and control module is used to display the test results and send control commands.
[0012] The multibeam forward-looking sonar device, data storage module, communication module, display and control module, and power supply module are all connected to the microprocessor.
[0013] Preferably, the display and control module is specifically used for,
[0014] The system receives user commands in real time and sends control signals to the microprocessor via a communication interface; the user commands include adjusting the attitude of the multibeam forward-looking sonar device and selecting a specific target for continuous tracking.
[0015] Preferably, the microprocessor and the multibeam forward-looking sonar device use a drag-and-drop wired communication method.
[0016] Preferably, the improved detection model based on convolutional neural networks is obtained in the following way:
[0017] An improved convolutional neural network is constructed. The improved convolutional neural network is characterized by introducing a dynamic perceptual patch attention mechanism into the backbone network of the convolutional neural network to replace the convolutional operations in the original encoder and decoder; capturing multi-scale features through a multi-branch feature extraction strategy; enhancing the extracted multi-scale features through dynamic feature fusion and attention mechanism; and adopting a neck network structure based on feature pyramid network and depthwise separable convolution.
[0018] Collect multibeam forward-looking sonar images and label the target locations and categories to form a training dataset;
[0019] The training dataset is input into the improved convolutional neural network for training, and cross-validation is used to avoid overfitting. At the same time, the network hyperparameters are continuously optimized by performance feedback on the validation set, and the network hyperparameters with the best performance are retained to obtain an improved detection model based on the convolutional neural network.
[0020] Preferably, the dynamic perception patch attention mechanism captures multi-scale features of the input image through a multi-branch feature extraction strategy, including:
[0021] Dynamic local branching is used to extract local features from the input image;
[0022] Dynamic global branching is used to extract global features from the input image;
[0023] Dynamic serial convolution branches are used to extract features from the input image sequence;
[0024] The dynamic local branch data processing procedure is as follows:
[0025] Preprocessed input sonar image The number of channels is adjusted using 1×1 convolution to generate a new feature tensor. ;
[0026] Adaptive patch size feature tensor Divided into a set of spatially contiguous patches ;
[0027] Perform channel averaging on each patch to obtain And using a feedforward neural network for linear computation, we obtain... ;
[0028] An activation function is used to obtain the probability distribution of the spatial dimension of linearly computed features, and feature selection is performed on each patch based on the probability distribution to obtain features. ;
[0029] Features Perform reshape and interpolation operations to generate local features. ;
[0030] The dynamic global branch data processing procedure is as follows:
[0031] For feature tensors Perform global average pooling to obtain a vector. ;
[0032] Transform the vector using a linear transformation Dimensionality reduction is performed, followed by the introduction of non-linearity through the sigmoid activation function, and finally dimensionality increase back to the original number of channels to obtain a vector. ;
[0033] For vectors Normalization is performed using the Softmax activation function to obtain the channel weights. ;
[0034] Multiply the weight of each channel by The feature maps of the corresponding channels are then summed element by element to obtain the adaptively aggregated global features. ;
[0035] global features Perform dynamic attention calculations to obtain the dynamic attention matrix. ;
[0036] Dynamic attention matrix and feature tensor Multiplying them yields the final global features. ;
[0037] The dynamic serial convolution branch data processing procedure is as follows:
[0038] Based on the feature tensor Perform global average pooling to obtain ;
[0039] Will Inputting a multilayer perceptron (MLP) yields a selection vector indicating the size and number of convolutional kernels. ;
[0040] Three convolution kernel templates are generated randomly during initialization. , , Based on selection vector By combining convolution kernel templates of different sizes using a weighted summation method, convolution kernels are obtained. , , ;
[0041] Three output features are generated through a 3×3 convolutional layer. , and , represented as: , , ,
[0042] The three output features are combined using an adaptive fusion mechanism. , and Dynamic fusion is performed to generate sequential convolutional features. ;
[0043] Local features Global features and serial convolution features Add them together to obtain the output features. .
[0044] Preferably, the dynamic perception patch attention mechanism enhances the extracted multi-scale features through dynamic feature fusion and attention mechanisms. The data processing procedure is as follows:
[0045] Output features are processed through a one-dimensional dynamic channel attention mechanism. Processing is performed to generate channel attention features. ;
[0046] Channel attention features through a two-dimensional dynamic spatial attention mechanism Processing is performed to generate spatial attention features. ;
[0047] Spatial attention features After ReLU activation and batch normalization, the final output features are... .
[0048] Preferably, the data processing procedure for the neck network structure based on feature pyramid network and depthwise separable convolution is as follows:
[0049] Extracting multi-scale feature maps from the backbone network: , , , These correspond to feature maps at different levels.
[0050] By fusing feature maps from different levels through a feature pyramid network, it can be represented as follows:
[0051] ;
[0052] in, Indicates an upsampling operation;
[0053] Will Perform depthwise separable convolution to obtain the output. The depthwise separable convolution includes depthwise convolution and pointwise convolution.
[0054] Introducing the squeeze excitation module from SENet Process to obtain output .
[0055] Preferably, the improved detection head operates as follows:
[0056] ,
[0057] in, and These represent classification and regression convolutional layers, respectively.
[0058] Secondly, the present invention provides an underwater target detection method based on multibeam forward-looking sonar images, implemented using the aforementioned underwater target detection system based on multibeam forward-looking sonar images, the method comprising:
[0059] Sonar images of the target water area were acquired using a multibeam forward-looking sonar device;
[0060] Preprocess the acquired sonar images;
[0061] The preprocessed sonar image is input into the improved detection model based on convolutional neural network. Multi-scale feature map extraction is performed on the input sonar image, as well as bounding box prediction and classification. The output includes the location coordinates and category probability information of each detected target.
[0062] Valid target bounding boxes are filtered to obtain the valid target detection results, which are then transmitted to the display and control module for display.
[0063] Preferably, the preprocessing of the acquired sonar images includes:
[0064] The sonar image of the target water area is denoised based on wavelet transform;
[0065] Standardize the image after denoising;
[0066] The selected valid target boxes include:
[0067] Valid targets are selected based on the confidence threshold in the output results, and redundant boxes are removed using a non-maximum suppression algorithm.
[0068] The beneficial effects of this invention are:
[0069] This invention provides an underwater target detection method and system based on multi-beam forward-looking sonar images. By combining convolutional neural networks with a dynamic perceptual patch attention mechanism, it significantly improves the accuracy of small target recognition. Simultaneously, a dedicated small-sized target detection head is designed to capture details while maintaining high computational efficiency, and the model structure is optimized for embedding in microprocessor devices, enabling portable real-time detection. The system supports human-computer interaction via a communication interface, enhancing operational convenience and flexibility, and providing an efficient solution for underwater detection. Attached Figure Description
[0070] Figure 1This is a schematic diagram of the underwater target detection system architecture based on multibeam forward-looking sonar images provided in an embodiment of the present invention;
[0071] Figure 2 This is a schematic flowchart of an underwater target detection method based on multibeam forward-looking sonar images provided in an embodiment of the present invention;
[0072] Figure 3 This is a schematic diagram of the network structure of the dynamic perception patch attention mechanism provided in this embodiment of the invention;
[0073] Figure 4 This is a schematic diagram of a neck network structure based on multi-scale receptive fields provided in an embodiment of the present invention;
[0074] Figure 5 This is an example diagram of the detection results provided in an embodiment of the present invention. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0076] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0077] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0078] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0079] It should be emphasized here that the step markers mentioned below are not a limitation on the order of the steps, but should be understood as meaning that the steps can be executed in the order mentioned in the embodiments, or in a different order than in the embodiments, or several steps can be executed simultaneously.
[0080] This invention provides an underwater target detection system based on multibeam forward-looking sonar (MFLS) images. The system improves the detection accuracy of small targets by optimizing the convolutional neural network (CNN) model and introducing a specific mechanism, while ensuring the portability and real-time performance of the system.
[0081] Based on this, the underwater target detection system based on multibeam forward-looking sonar (MFLS) images provided by the present invention, see [link to relevant documentation]. Figure 1 This includes the following required hardware devices:
[0082] Multibeam forward-looking sonar data acquisition: A multibeam forward-looking sonar device is used to image the target water area and acquire high-resolution seabed sonar images.
[0083] Microprocessor: The microprocessor, which adopts the ARM architecture, is used to run the improved detection model based on the convolutional neural network (CNN) to obtain the target detection results and control other components. The target detection results include the target's location, size, and classification information.
[0084] Data storage module: Used to store raw seabed sonar data, preprocessed data, trained model parameters, and intermediate results.
[0085] Power module: Provides a stable power supply for the entire system, ensuring long-term operation.
[0086] Communication module: transmits detected data to the remote monitoring center via a wired connection and receives instructions from the remote location.
[0087] Display and control module: Used to display the test results and provide a user interface for interaction, allowing operators to view detailed information and send control commands.
[0088] In this invention, the multibeam forward-looking sonar device includes multiple transmitting and receiving units, capable of generating high-resolution seabed sonar images. Furthermore, considering underwater noise and sound wave propagation characteristics, the raw seabed sonar image data needs to be preprocessed for noise reduction to improve data quality. In addition, image standardization processing ensures the consistency of the model input data.
[0089] Furthermore, the embedded computing platform also includes a dedicated hardware accelerator for real-time processing and analysis of sonar images.
[0090] Furthermore, the display and control module can receive user commands in real time and send control signals to the underwater microprocessor through the communication interface to adjust the attitude of the multibeam forward-looking sonar device equipped with the microprocessor or to perform specific functions.
[0091] The improved convolutional neural network (CNN) structure in this invention is as follows:
[0092] I. Introducing a Dynamic Perception Patch Attention Mechanism
[0093] A dynamic perceptual patch attention mechanism is integrated into the CNN backbone network, enabling the model to automatically optimize its internal weights to enhance sensitivity to small targets and overall recognition accuracy.
[0094] In sonar target detection tasks, multiple downsampling operations may cause the loss of key information of small targets. Therefore, the dynamic sense patch attention mechanism is designed to replace the convolution operation in the traditional encoder and decoder. It adopts a multi-branch feature extraction strategy, which can capture target features from different scales and levels, thereby improving the detection accuracy of small targets.
[0095] like Figure 3 As shown, in this invention, a dynamic perceptual patch attention mechanism (DPA) is adopted, which captures multi-scale features through a multi-branch feature extraction strategy and fuses multi-scale features through dynamic feature fusion and attention mechanism to enhance the sensitivity to key information.
[0096] Specifically, multi-branch feature extraction includes: dynamic local branch, dynamic global branch, and dynamic sequential convolution branch. The data processing procedure for each branch is as follows:
[0097] (1) Dynamic local branching
[0098] Input adjustment: Preprocessed sonar image given input First, the number of channels is adjusted using 1×1 convolution to generate a new feature tensor. , represented as:
[0099] (4)
[0100] Adaptive Patch Splitting: Using Adaptive Patch Size Will Divided into a set of spatially contiguous patches , represented as:
[0101] (5)
[0102] Channel averaging and linear calculation: Perform channel averaging on each patch to obtain... , represented as:
[0103] (6)
[0104] Linear computation using a feedforward neural network (FFN) is represented as follows:
[0105] (7)
[0106] Dynamic feature selection: An activation function is used to obtain the probability distribution of the spatial dimension of linearly computed features, and the weights are adjusted accordingly. The weights are expressed as:
[0107] (8)
[0108] Feature selection is performed on each patch, and the output is: ,in It is the sigmoid function.
[0109] (9)
[0110] Finally, local features are generated through reshape and interpolation operations: , is represented as:
[0111] (10)
[0112] (2) Dynamic global branch
[0113] Adaptive global feature aggregation: By introducing an adaptive aggregation mechanism, the aggregation method is dynamically adjusted according to the importance of global features to generate global features.
[0114] (11)
[0115] The Adaptive Aggregation mechanism (AdaptiveAgg) operates as follows:
[0116] ① Apply Global Average Pooling (GAP) to F′ to compress the spatial information of each channel into a scalar value, resulting in a vector G of shape (C′) that represents the global features of each channel.
[0117] in, ;
[0118] ② Calculate channel attention, assign weights to each channel, first by dimensionality reduction, then by introducing non-linearity through the sigmoid activation function, and finally by increasing the dimensionality back to the original number of channels. The specific steps are as follows:
[0119] Global features are transformed through linear transformation Mapped to a lower dimensional space , where r is the dimension of the middle part, with a value of C′ / 16. This step compresses the feature space so that the model can better focus on the important features.
[0120] ,
[0121] in, It is the weight matrix of the first layer. It is the bias vector of the first layer. It is the feature representation after dimensionality reduction.
[0122] The ReLU activation function is applied to introduce nonlinearity, enabling the model to handle nonlinear relationships.
[0123] ,
[0124] in, It is the feature representation after ReLU activation.
[0125] Again, the features are transformed from low-dimensional areas using linear transformation. Mapping back to high latitudes .
[0126] ,
[0127] in, It is the weight matrix of the second layer. It is the bias vector of the second layer. It is a feature representation after dimensionality upgrade.
[0128] The weights are normalized using the Softmax activation function so that they lie in the interval [0,1] and the sum of all weights is 1.
[0129] ,
[0130] in, ,and ,
[0131] This ensures that the output weights are a normalized probability distribution, so that they can serve as importance weights for each channel.
[0132] ③ Weighted summation: Multiply the weight of each channel by the corresponding feature map, and then sum them element by element. This can highlight important feature maps while suppressing unimportant feature maps.
[0133] ,
[0134] in, This is the feature map of the c-th channel. yes The feature map of the c-th channel;
[0135] The final generated global features These are global features after adaptive aggregation.
[0136] Dynamic attention computation: Calculating the dynamic attention matrix A dynamic weight adjustment mechanism is introduced, as follows:
[0137] (12)
[0138] The dynamic weight adjustment mechanism (DynamicAttention) here refers to the construction of a dynamic attention matrix. The process, based on the calculations above. , build a with Tensors of the same size The weight of each position comes from the corresponding That is, ;
[0139] Finally, global features are generated: , is represented as:
[0140] (13)
[0141] (3) Dynamic serial convolution branch
[0142] Adaptive convolution kernel: Dynamically selects the size and number of convolution kernels based on the characteristics of the input feature map to generate adaptive convolution kernels. , is represented as:
[0143] (14)
[0144] The specific steps are as follows:
[0145] ① Global average pooling (GAP) is performed on the feature map F′ to capture important information in both spatial and channel dimensions, and the average value for each channel is calculated to reflect the performance of each channel across the entire image:
[0146] ,
[0147] in and These are the height and width of the feature map, respectively. The vector representing all channels at position (i, j).
[0148] ② Determine the kernel size and number using a multilayer perceptron (MLP). The MLP receives the above analysis results as input and outputs a selection vector S indicating the kernel size and number:
[0149] ,
[0150] vector Each element corresponds to a weight for a specific convolutional kernel configuration.
[0151] ③ Dynamically select convolution kernel parameters and generate three convolution kernel templates using random initialization. , , Based on selection vector The final convolutional kernel is generated by combining convolutional kernel templates of different sizes through a weighted summation method. , , , means as follows:
[0152] ,
[0153] It comes from the selection vector The weight, and It is an additional weight term used to adjust the influence of convolution kernel templates of other sizes.
[0154] Convolution operation: Three different outputs are generated through a 3×3 convolutional layer. , , , represented as:
[0155] (15)
[0156] (16)
[0157] (17)
[0158] The three output features are dynamically fused using an adaptive fusion mechanism to ultimately generate serial convolutional features: , represented as:
[0159] (18)
[0160] Finally, by adding the local features, global features, and sequential convolutional features, we obtain:
[0161] .
[0162] In this invention, the data processing procedure for dynamic feature fusion and attention mechanism is as follows:
[0163] Through a one-dimensional dynamic channel attention map right Processing is performed to generate channel attention features. , represented as:
[0164] (19)
[0165] (20)
[0166] By capturing the dependencies between different channels, the model can better focus on the more important feature channels. The specific operation is as follows:
[0167] ① Global pooling, applied to the input feature maps respectively Global average pooling (GAP) and global max pooling (GMP) are performed to obtain statistics for each channel.
[0168] ,
[0169] ,
[0170] ② The results of GAP and GMP are fed into a shared multilayer perceptron (MLP), which contains two fully connected layers for compressing and restoring the channel count.
[0171] in ,
[0172] σ is the activation function ReLU. and These are the weight matrices for the first and second layers, respectively. It is another activation function, sigmoid.
[0173] ③ Concatenate the outputs of GAP and GMP, and then generate a channel attention map using the sigmoid function. This image is used to adjust the importance of each channel in the original feature map.
[0174] in ,
[0175] ④ Channel attention map Applied to the original feature map To obtain channel attention features ,
[0176] .
[0177] Through two-dimensional dynamic spatial attention map Channel attention features Processing is performed to generate spatial attention features. , represented as:
[0178] (twenty one)
[0179] (twenty two)
[0180] Focusing on spatial information helps the model identify key regions in the image. The specific steps are as follows:
[0181] ① Feature map transformation: First, the input feature map is transformed... The channel dimension is compressed to a single channel, which is achieved through average pooling, where ,
[0182] ② A 7×7 convolution kernel is used to perform a convolution operation on the compressed feature map in order to capture a wider range of spatial context information. ,
[0183] ③ Generate a spatial attention map using the sigmoid function. This image is used to adjust the original feature map. The importance of each position. ,
[0184] ④ Spatial attention map Applied to channel attention features The final spatial attention features are obtained. .
[0185] After ReLU activation and batch normalization, the final output is: ,
[0186] (twenty three)
[0187] In the task of small target detection in forward-looking multibeam sonar images, the Dynamic Perceptive Patch Attention (DPA) mechanism is suitable for handling the problem of low resolution and high noise in sonar images. DPA effectively captures multi-scale features through a multi-branch feature extraction strategy, employing dynamic local and global branches to enhance the detection capability of small targets. The application of dynamic feature fusion and the attention mechanism further improves the model's sensitivity to key information, making small target detection more accurate. A detailed structure diagram is shown below. Figure 3 As shown.
[0188] II. Design of a neck network structure based on multi-scale receptive fields
[0189] In this invention, a detection head module for small targets is designed in the neck network structure of a CNN, which accurately captures small targets through multi-scale receptive fields. At the same time, the model structure is simplified and the number of parameters is reduced, improving the computational efficiency of the model and making it more suitable for running on embedded platforms.
[0190] Neck network structures based on multi-scale receptive fields, such as Figure 4 As shown, the data processing procedure is as follows:
[0191] (1) Feature extraction: Multi-scale feature maps are extracted from the backbone network (ResNet) as follows: , , , These correspond to feature maps at different levels;
[0192] (2) Feature Pyramid Network (FPN): FPN fuses feature maps from different levels through top-down paths and lateral connections, represented as:
[0193] (twenty four)
[0194] in, This indicates an upsampling operation using bilinear interpolation;
[0195] The feature map P4 of the highest layer is obtained directly from the feature map C4 of the last layer of the backbone network;
[0196] Based on the above processing methods, the complete FPN feature fusion formula is as follows:
[0197] ;
[0198] (3) Depthwise separable convolution: Depthwise separable convolution consists of depthwise convolution and pointwise convolution, which reduces the number of parameters and computation, and the input feature map The specific operation of depthwise separable convolution is as follows:
[0199] ,
[0200] in, This represents depthwise convolution, which performs convolution on each channel of the input separately, instead of combining all channels together as in standard convolution. This generates a new set of feature maps. Its number is the same as the number of channels, but the number of parameters is greatly reduced.
[0201] ,
[0202] in, This represents pointwise convolution. When processing the large number of feature maps generated by multibeam forward-looking sonar, pointwise convolution is used to adjust the number of channels to ensure that the output feature maps can meet the needs of subsequent tasks.
[0203] (4) Attention Mechanism: The squeeze excitation module from SENet is introduced to enhance attention to small targets. The squeeze excitation module can dynamically adjust the importance of each channel, helping the model to better focus on key regions such as small targets, thereby improving detection accuracy. The operation of the input feature map Y squeeze excitation module is as follows:
[0204] (26)
[0205] in, Indicates global average pooling. and These represent fully connected layers. This represents the activation function. This indicates element-wise multiplication.
[0206] The specific function of the extrusion excitation module:
[0207] Squeeze: First, the spatial information of each channel is compressed into a scalar value through Global Average Pooling (GAP), thereby reducing computational complexity and preserving the overall feature representation of each channel.
[0208] Excitation: Two fully connected layers (FC1 and FC2) with a ReLU activation function in between are used to learn the importance weights of each channel. Finally, the Sigmoid activation function σ is used to normalize these weights to the [0, 1] interval.
[0209] Adjustment: These weights are adjusted by element-wise multiplication. The feature map Y is applied back to enhance important features and suppress irrelevant features.
[0210] Third, design a specialized detection head that uses smaller anchor boxes to match small targets and analyzes the input feature map. The detection head operation is as follows:
[0211] (27)
[0212] in, and These represent classification and regression convolutional layers, respectively.
[0213] Based on the improved convolutional neural network described above, a large number of representative forward-looking multibeam sonar images were collected and labeled to form a training dataset containing diverse underwater scenes and targets.
[0214] The training dataset is input into the improved convolutional neural network described above for training. Cross-validation is used to avoid overfitting. At the same time, the model hyperparameters are continuously optimized by the performance feedback on the validation set to obtain the optimal performance, and finally the improved detection model based on the convolutional neural network is obtained.
[0215] It should be further noted that after the above model training is completed, the trained detection model is converted into a format suitable for microprocessor operation and loaded into the microprocessor.
[0216] A dedicated interface is configured between the microprocessor and the sonar sensor to ensure efficient data transmission. Due to the special nature of the underwater environment, a drag-and-drop wired communication method is adopted, connecting the microprocessor and the sonar sensor through a dedicated cable to ensure stable data transmission and low latency.
[0217] The microprocessor transmits the detected target location coordinates and category information to the user interface in real time through the output interface.
[0218] By clicking on the target icon on the interface, the microprocessor receives the user's request, extracts the target's size, shape, and confidence level from the stored details, and displays this information through the user interface.
[0219] Users send control commands to the underwater device through the interface. The microprocessor receives and processes these commands, including:
[0220] When a specific target is selected for continuous tracking, the microprocessor generates corresponding control signals based on the target's position coordinates and sends them to the sonar device through a drag-and-drop wired communication interface to adjust its direction and focus, keeping the target always in the center of the field of view.
[0221] When a user manually adjusts the direction of the sonar device, the microprocessor generates corresponding control signals based on the user's instructions and sends them to the sonar device via a drag-and-drop wired communication interface to adjust its angle and obtain a better field of view coverage.
[0222] Based on the aforementioned underwater target detection system, this invention provides an underwater target detection method based on multibeam forward-looking sonar images. (See [link]). Figure 2 The method includes:
[0223] Sonar images of the target water area were acquired using a multibeam forward-looking sonar device;
[0224] Preprocess the acquired sonar images;
[0225] The preprocessed sonar image is input into the improved detection model based on convolutional neural network. Multi-scale feature map extraction is performed on the input sonar image, as well as bounding box prediction and classification. The output contains information such as the location coordinates and class probability of each detected target.
[0226] Valid targets are selected based on the confidence threshold in the output results, and redundant boxes are removed.
[0227] The target detection results are transmitted to the display and control module for display via the communication interface.
[0228] It should be noted that in this invention, the improved convolutional neural network is trained in advance using a large dataset of sonar images labeled with target locations and categories to obtain a detection model based on the convolutional neural network.
[0229] It should be noted that the improved convolutional neural network structure and the process of training the detection model are as described above, and will not be repeated here.
[0230] It should be noted that in this invention, valid targets are selected based on the confidence threshold in the output results, and a non-maximum suppression algorithm is used to remove redundant boxes, ensuring that only the best-matching bounding box is retained for each type of target.
[0231] It should be noted that in this invention, after receiving the data, the display and control module presents a clear target detection result on the screen, including but not limited to the target's position, size, and classification information.
[0232] In one embodiment of the present invention, the acquired sonar image is preprocessed, including denoising and normalization, wherein,
[0233] Denoising of multibeam forward-looking sonar images based on wavelet transform includes:
[0234] Given a size of The two-dimensional discrete wavelet transform of the image f(x,y) is defined as follows:
[0235] (1)
[0236] in, Indicates the first Layer each position Wavelet coefficients in (horizontal, vertical, or diagonal) directions; These are the corresponding wavelet basis functions.
[0237] Wavelet decomposition of the image: Perform a three-level wavelet decomposition on the original image, and each level of decomposition will yield an approximate image. and three detailed images , , (Representing details in the horizontal, vertical and diagonal directions respectively).
[0238] Thresholding: This involves estimating the noise standard deviation over a flat region to obtain... Determine the threshold based on the noise standard deviation. ,in The expression is:
[0239] (2)
[0240] Use soft thresholding to handle detail coefficients:
[0241] (3)
[0242] For each detailed image , , All coefficients are treated with soft thresholding.
[0243] Image reconstruction: The denoised image is reconstructed by performing inverse wavelet transform on the wavelet coefficients after thresholding.
[0244] Figure 5 As a specific implementation example of the above-mentioned method of the present invention, the left image is the original image, i.e., the forward-looking multibeam sonar image, and the right image is the image obtained after detection by the method. It shows good results in the identification of the three targets in the image: square cage, cube, and tire, and successfully achieves the expected goal.
[0245] The specific embodiments described above are only used to illustrate the technical solutions and implementation details of the present invention in detail, and should not be construed as limiting the scope of the present invention. Without departing from the basic principles and core ideas of the present invention, those skilled in the art can make appropriate adjustments, modifications, or substitutions to the technical features in the above embodiments according to actual needs. All such changes or improvements based on the spirit of the present invention should be considered to fall within the protection scope of the present invention.
Claims
1. An underwater target detection system based on multibeam forward-looking sonar images, characterized in that, Including power modules, A multibeam forward-looking sonar device is used to image target waters and acquire raw seabed sonar images; A microprocessor is used to run an improved detection model based on a convolutional neural network, obtain target detection results, and control other modules. The target detection results include the target's position, size, and classification information. The improved detection model based on a convolutional neural network introduces a dynamic perceptual patch attention mechanism into the backbone network of the convolutional neural network to replace the convolutional operations in the original encoder and decoder. It captures multi-scale features through a multi-branch feature extraction strategy and enhances the extracted multi-scale features through dynamic feature fusion and attention mechanisms. It adopts a neck network structure based on a feature pyramid network and depthwise separable convolution. The dynamic perception patch attention mechanism includes: Dynamic local branching is used to extract local features from the input image; Dynamic global branching is used to extract global features from the input image; Dynamic serial convolution branches are used to extract features from the input image sequence; The dynamic local branch data processing procedure is as follows: Preprocessed input sonar image The number of channels is adjusted using 1×1 convolution to generate a new feature tensor. ; Adaptive patch size feature tensor Divided into a set of spatially contiguous patches ; Perform channel averaging on each patch to obtain And using a feedforward neural network for linear computation, we obtain... ; An activation function is used to obtain the probability distribution of the spatial dimension of linearly computed features, and feature selection is performed on each patch based on the probability distribution to obtain features. ; Features Perform reshape and interpolation operations to generate local features. ; The dynamic global branch data processing procedure is as follows: For feature tensors Perform global average pooling to obtain a vector. ; Transform the vector using a linear transformation Dimensionality reduction is performed, followed by the introduction of non-linearity through the sigmoid activation function, and finally dimensionality increase back to the original number of channels to obtain a vector. ; For vectors Normalization is performed using the Softmax activation function to obtain the channel weights. ; Multiply the weight of each channel by The feature maps of the corresponding channels are then summed element by element to obtain the adaptively aggregated global features. ; global features Perform dynamic attention calculations to obtain the dynamic attention matrix. ; Dynamic attention matrix and feature tensor Multiplying them yields the final global features. ; The dynamic serial convolution branch data processing procedure is as follows: Based on the feature tensor Perform global average pooling to obtain ; Will Inputting a multilayer perceptron (MLP) yields a selection vector indicating the size and number of convolutional kernels. ; Three convolution kernel templates are generated randomly during initialization. , , Based on selection vector By combining convolution kernel templates of different sizes using a weighted summation method, convolution kernels are obtained. , , ; Three output features are generated through a 3×3 convolutional layer. , and , represented as: , , , The three output features are combined using an adaptive fusion mechanism. , and Dynamic fusion is performed to generate sequential convolutional features. ; Local features Global features and serial convolution features Add them together to obtain the output features. ; The data storage module is used to store the original seabed sonar images, preprocessed data, trained network parameters, and intermediate result information; A communication module is used to transmit the target detection results to a remote monitoring center and receive instructions from a remote location; The display and control module is used to display the test results and send control commands. The multibeam forward-looking sonar device, data storage module, communication module, display and control module, and power supply module are all connected to the microprocessor.
2. The underwater target detection system based on multibeam forward-looking sonar images according to claim 1, characterized in that, The display and control module is specifically used for, The system receives user commands in real time and sends control signals to the microprocessor via a communication interface; the user commands include adjusting the attitude of the multibeam forward-looking sonar device and selecting a specific target for continuous tracking.
3. The underwater target detection system based on multibeam forward-looking sonar images according to claim 1, characterized in that, The microprocessor and the multibeam forward-looking sonar device communicate via a drag-and-drop wired method.
4. The underwater target detection system based on multibeam forward-looking sonar images according to claim 1, characterized in that, The improved detection model based on convolutional neural networks is obtained in the following way: An improved convolutional neural network is constructed. The improved convolutional neural network is characterized by introducing a dynamic perceptual patch attention mechanism into the backbone network of the convolutional neural network to replace the convolutional operations in the original encoder and decoder; capturing multi-scale features through a multi-branch feature extraction strategy; enhancing the extracted multi-scale features through dynamic feature fusion and attention mechanism; and adopting a neck network structure based on feature pyramid network and depthwise separable convolution. Collect multibeam forward-looking sonar images and label the target locations and categories to form a training dataset; The training dataset is input into the improved convolutional neural network for training, and cross-validation is used to avoid overfitting. At the same time, the network hyperparameters are continuously optimized by performance feedback on the validation set, and the network hyperparameters with the best performance are retained to obtain an improved detection model based on the convolutional neural network.
5. The underwater target detection system based on multibeam forward-looking sonar images according to claim 4, characterized in that, The dynamic perception patch attention mechanism enhances the extracted multi-scale features through dynamic feature fusion and attention mechanisms. The data processing procedure is as follows: Output features are processed through a one-dimensional dynamic channel attention mechanism. Processing is performed to generate channel attention features. ; Channel attention features through a two-dimensional dynamic spatial attention mechanism Processing is performed to generate spatial attention features. ; Spatial attention features After ReLU activation and batch normalization, the final output features are... .
6. The underwater target detection system based on multibeam forward-looking sonar images according to claim 5, characterized in that, The data processing procedure for the neck network structure based on feature pyramid network and depthwise separable convolution is as follows: Extracting multi-scale feature maps from the backbone network: , , , These correspond to feature maps at different levels. By fusing feature maps from different levels through a feature pyramid network, it can be represented as follows: ; in, Indicates an upsampling operation; Will Perform depthwise separable convolution to obtain the output. The depthwise separable convolution includes depthwise convolution and pointwise convolution. Introducing the squeeze excitation module from SENet Process to obtain output .
7. The underwater target detection system based on multibeam forward-looking sonar images according to claim 6, characterized in that, The improved detection head operation is as follows: , in, and These represent classification and regression convolutional layers, respectively.
8. A method for underwater target detection based on multibeam forward-looking sonar images, characterized in that, The underwater target detection system based on multi-beam forward-looking sonar images, as described in any one of claims 1 to 7, is used to implement this method, which includes: Sonar images of the target water area were acquired using a multibeam forward-looking sonar device; Preprocess the acquired sonar images; The preprocessed sonar image is input into the improved detection model based on convolutional neural network. Multi-scale feature map extraction is performed on the input sonar image, as well as bounding box prediction and classification. The output includes the location coordinates and category probability information of each detected target. Valid target bounding boxes are filtered to obtain the valid target detection results, which are then transmitted to the display and control module for display.
9. The underwater target detection method based on multibeam forward-looking sonar images according to claim 8, characterized in that, The preprocessing of the acquired sonar images includes: The sonar image of the target water area is denoised based on wavelet transform; Standardize the image after denoising; The selected valid target boxes include: Valid targets are selected based on the confidence threshold in the output results, and redundant boxes are removed using a non-maximum suppression algorithm.
Citation Information
Patent Citations
Underwater whale target detection method based on lightweight YOLOv4
CN114418930A
Infrared ship detection method based on improved RT-DETR algorithm
CN119169453A