Sonar image classification method based on high and low frequency combined features
Through the sonar image classification method of high- and low-frequency joint features, using technologies such as wavelet transform and residual neural network, the problem of noise interference in underwater target recognition is solved, and high-precision sonar image classification is achieved.
Patent Information
- Application Number
- CN202510741950.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-12
AI Technical Summary
In existing technologies, underwater target recognition methods cannot effectively cope with noise interference in complex underwater environments, resulting in a decrease in sonar image quality, blurred edges of target objects and loss of detail information, making accurate recognition difficult.
A sonar image classification method based on the combined high- and low-frequency features is adopted. The high-frequency and low-frequency features are separated through the wavelet transform module. Combined with the residual neural network, the bidirectional cross-attention mechanism and the adaptive fusion module, multi-stage feature extraction and fusion are performed to improve the image recognition accuracy.
It significantly improves the recognition accuracy and robustness of sonar images in complex underwater environments, can effectively suppress noise interference, and maintain clear classification of target objects.
Smart Images

Figure CN120635563A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of underwater image classification and deep learning technology, and in particular to a sonar image classification method based on high- and low-frequency combined features. Background Art
[0002] The identification and monitoring of underwater targets is an important measure to achieve marine safety. In existing technologies, sonar, unmanned underwater vehicles, etc. are generally used to detect and identify underwater targets. However, since some underwater targets use stealth technologies such as low magnetic and low acoustic characteristics and non-metallic materials, they are more difficult to be detected by detection equipment in complex underwater environments. Traditional identification methods cannot meet the requirements of modern underwater targets.
[0003] Accurately identifying underwater targets typically requires extensive, high-quality sonar image data for model training and algorithm optimization. However, the current challenge lies in the complex underwater noise environment, which makes effective data acquisition difficult. Sonar imaging is subject to multiple interference sources, including ocean dynamic noise, bioacoustic interference, and ship radiated noise. This creates random bright and dark spots in the sonar echo image, affecting image contrast and clarity, blurring the edges of the target object, and even completely obscuring important details. Summary of the Invention
[0004] The purpose of the present invention is to provide a sonar image classification method based on high- and low-frequency joint features to improve the recognition accuracy of sonar images under the background of underwater speckle noise.
[0005] In order to achieve the above tasks, the present invention adopts the following technical solutions:
[0006] A sonar image classification method based on high- and low-frequency joint features, comprising:
[0007] Obtain the sonar image to be identified and input it into a trained image classification network, and output the target classification result in the sonar image; the image classification network includes a wavelet transform module, a residual neural network, a bidirectional cross attention mechanism module, an adaptive fusion module and an output module, wherein:
[0008] The wavelet transform module is used to transform the input sonar image into high-frequency sonar images and low-frequency sonar images; the residual neural network has two parallel branches, high-frequency and low-frequency, which use a series of residual network blocks to extract high-frequency features and low-frequency features of high-frequency sonar images and low-frequency sonar images respectively; the bidirectional cross-attention mechanism module is set between the high-frequency branch and the low-frequency branch of the residual neural network to interact and complement the high-frequency features and low-frequency features; the adaptive fusion module is used to deeply fuse the high-frequency feature maps and low-frequency feature maps output by the high-frequency branch and the low-frequency branch; the output module is used to classify the fused image features and output the classification results of the target.
[0009] Furthermore, when the image classification network is trained, the sonar image is first obtained and preprocessed by random cropping, random rotation and random mirroring to construct a training set.
[0010] Furthermore, the wavelet transform module is used to transform the input sonar image into a high-frequency sonar image and a low-frequency sonar image, including:
[0011] First, the sonar image I is subjected to a two-dimensional discrete wavelet transform through row-column separation filtering. Each level of decomposition yields one low-frequency subband LL and three high-frequency subbands LH, HL, and HH. The first level of decomposition is:
[0012]
[0013] In the above formula, * represents convolution operation, ↓2 represents 2 times downsampling operation, L x Represents a low-pass filter in the horizontal direction, L y Represents a low-pass filter in the vertical direction, H x Represents a high-pass filter in the horizontal direction, H y Represents a low-pass filter in the vertical direction;
[0014] The result of decomposing the sonar image I is a high-frequency sonar image L and a low-frequency sonar image H, which are expressed as follows:
[0015]
[0016] Furthermore, the specific processing process of the bidirectional cross attention mechanism module is as follows:
[0017] First, the high-frequency feature maps output by the residual network blocks of the high-frequency branch and the low-frequency branch, and the high-frequency features and low-frequency features contained in the low-frequency feature maps are mapped to the query Q, key K and value V space through linear transformation;
[0018] Secondly, the low-frequency features are used as query vector Q L , high-frequency features are decomposed into key and value pairs K through convolution projection H ,VH ; Calculate cross-band feature correlation through the first multi-head attention mechanism; The first multi-head attention mechanism is as follows:
[0019]
[0020] Among them, d k is the feature dimension, the superscript T represents the transposition operation, and Softmax(·) is the normalized exponential function;
[0021] Again, the high-frequency features are used as the query vector Q H , low-frequency features are decomposed into key and value pairs K through convolution projection L ,V L , the cross-band feature correlation is calculated through the second multi-head attention mechanism; the second multi-head attention mechanism is as follows:
[0022]
[0023] Finally, the attention feature Attention output by the first multi-head attention mechanism L→H With Q H Add element by element to get high-frequency output Output H ; The attention feature output by the second multi-head attention mechanism Attention H→L With Q L Add element by element to get low-frequency output Output L .
[0024] Furthermore, high-frequency output H , low frequency output L The high-frequency feature map and low-frequency feature map output by the residual network blocks of the high-frequency branch and low-frequency branch are added element by element and used as the input of the next residual network block of the corresponding branch.
[0025] Furthermore, the processing process of the adaptive fusion module is:
[0026] The outputs of the high-frequency branch and the low-frequency branch are high-frequency feature map A and low-frequency feature map B, respectively. First, global average pooling is performed on the high-frequency feature map A to obtain the global statistics of each channel:
[0027]
[0028] Among them, A c (i, j) represents the feature of the cth channel of the high-frequency feature map A, (i, j) represents the feature index in the height H and width W directions respectively, z c represents the global statistics of the c-th channel, c = 1, 2, ..., C, C is the number of channels;
[0029] Then, the global statistics z of all C channels are passed through a bottleneck structure consisting of two 1×1 convolutional layers to generate the channel attention weight α∈[0,1], as follows:
[0030] α=σ(W2δ(W1z));
[0031] Where W1 and W2 are learnable parameters, δ is the ReLU activation function, and σ is the Sigmoid activation function; finally, the fused features are obtained by weighted summation:
[0032] F = α·A+(1-α)·B.
[0033] Furthermore, the fusion features output by the adaptive fusion module are sequentially passed through the convolution layer and global average pooling layer in the output module for feature dimensionality reduction, and the Dropout method is added to prevent overfitting, and finally the classification results of the targets in the sonar image are output.
[0034] Furthermore, the loss function expression FL(p c )as follows:
[0035] FL(p t )=-α t (1-p t ) γ log(p t );
[0036] Among them, p t is the predicted probability of the image classification network for the t-th category, α t is the balance factor, γ is the focusing parameter;
[0037]
[0038] Among them, n t 、n k represents the number of sonar images of the t, kth category in the training set, and C represents the number of categories.
[0039] A terminal device includes a processor, a memory, and a computer program stored in the memory; when the processor executes the computer program, the sonar image classification method based on the high- and low-frequency combined features is implemented.
[0040] A computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the sonar image classification method based on the high- and low-frequency combined features is implemented.
[0041] Compared with the prior art, the present invention has the following technical features:
[0042] This paper addresses the severe noise interference and difficulty in feature extraction in underwater sonar images by proposing a multi-stage feature extraction and fusion method. First, the high-frequency and low-frequency features of the sonar image are separated through wavelet transform, effectively decomposing the local detail information and overall structural information in the image. This process significantly reduces the impact of dynamic noise, bioacoustic interference, and reverberation effects common in underwater environments on image quality, providing clearer, cleaner, and physically interpretable input data for subsequent feature extraction. It also achieves feature complementation from a multi-resolution perspective, laying the foundation for improving classification accuracy.
[0043] Subsequently, a residual neural network architecture was introduced for feature extraction of the separated high-frequency and low-frequency images. This residual architecture not only effectively alleviates the vanishing gradient problem in deep networks, ensuring the stability and convergence speed of model training, but also enhances the ability to represent complex feature patterns, enabling the model to fully capture subtle yet critical feature changes in sonar images.
[0044] Building on the feature extraction phase, this paper introduces a bidirectional cross-attention mechanism, allowing high-frequency and low-frequency branches to dynamically interact and complement each other during the feature extraction process. This mechanism adaptively establishes connections between features at different scales, strengthening the information synergy between local details and global structure, significantly improving the network's ability to discern complex background interference and enhancing classification accuracy.
[0045] Finally, an adaptive feature fusion module was designed to deeply fuse the features extracted from high-frequency and low-frequency images. This module automatically adjusts the fusion strategy based on feature importance, effectively suppressing redundant information and highlighting key features. This ensures that the fused features have greater information integrity and consistency, enabling the final classifier to maintain high recognition accuracy and stability even in complex underwater environments.
[0046] The method of the present invention systematically improves the robustness and accuracy of the sonar image classification system under high noise and complex background conditions through the design of multi-stage feature separation, extraction, interaction and fusion, and has important engineering application value and promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is the overall architecture diagram of the classification network constructed in the method of the present invention;
[0048] Figure 2 It is a schematic diagram of the wavelet transform module;
[0049] Figure 3 This is a schematic diagram of the Cross-attention module;
[0050] Figure 4It is a schematic diagram of the feature fusion module;
[0051] Figure 5 is the confusion matrix of the comparative methods ResNet, MetaModelNet, and NAS-MFF of the present invention;
[0052] Figure 6 It is the confusion matrix of the UHL-Net method of the present invention. DETAILED DESCRIPTION
[0053] Existing sonar image classification has low accuracy, primarily due to signal distortion caused by ocean dynamic noise and bioacoustic interference, as well as low image resolution, weak target features, and insufficient sample size. This makes feature extraction difficult and limits classification performance. The specific implementation process of the method of the present invention is described in detail below.
[0054] See also Figure 1 The present invention provides a sonar image classification method based on high- and low-frequency combined features, comprising:
[0055] Obtain the sonar image to be identified and input it into a trained image classification network, and output the target classification result in the sonar image; the image classification network includes a wavelet transform module, a residual neural network, a bidirectional cross attention mechanism module, an adaptive fusion module and an output module, wherein:
[0056] The wavelet transform module is used to transform the input sonar image into high-frequency sonar images and low-frequency sonar images; the residual neural network has two parallel branches, high-frequency and low-frequency, which use a series of residual network blocks to extract high-frequency features and low-frequency features of high-frequency sonar images and low-frequency sonar images respectively; the bidirectional cross-attention mechanism module is set between the high-frequency branch and the low-frequency branch of the residual neural network to interact and complement the high-frequency features and low-frequency features; the adaptive fusion module is used to deeply fuse the high-frequency feature maps and low-frequency feature maps output by the high-frequency branch and the low-frequency branch; the output module is used to classify the fused image features and output the classification results of the target.
[0057] 1. Construction of sonar image dataset.
[0058] In this embodiment of the present invention, the publicly available SCTD and KLSG datasets are merged into a unified dataset. Subsequently, the sonar images in these two datasets are preprocessed using random cropping, random rotation, and random mirroring methods to enhance the diversity of the datasets. Finally, the dataset is divided into training, validation, and test sets in a ratio of 7:1:2.
[0059] The present invention divides the existing dataset and collects sonar image data from the SCTD and KLSG datasets, totaling 1193 sonar images, including 583 floor images, 123 plane images, and 487 ship images. The training set, validation set, and test set are divided in a ratio of 7:1:2. The number of each category in the divided dataset is shown in the following table:
[0060]
[0061] 2. UHL-Net (United HF-LF Network), an image classification network that focuses on high-frequency features (HF) and low-frequency features (LF) of images.
[0062] 2.1 Wavelet transform module.
[0063] When training the image classification network, the sonar images in the training set are first input into the wavelet transform module to obtain high-frequency feature maps and low-frequency feature maps, such as Figure 2 The specific processing is as follows:
[0064] First, the sonar image I is subjected to a two-dimensional discrete wavelet transform through row-column separation filtering. Each level of decomposition yields one low-frequency subband LL and three high-frequency subbands LH, HL, and HH. The first level of decomposition is:
[0065]
[0066] In the above formula, * represents convolution operation, ↓2 represents 2 times downsampling operation, L x Represents a low-pass filter in the horizontal direction, L y Represents a low-pass filter in the vertical direction, H x Represents a high-pass filter in the horizontal direction, H y Represents a low-pass filter in the vertical direction; LL, LH, HL, and HH represent four output subbands, LL contains the overall approximation of the sonar image, LH contains the horizontal edge and vertical smoothing of the sonar image, HL contains the vertical edge and horizontal smoothing, and HH contains the corner texture details in the diagonal direction; common wavelet transform filters include Daubechies, Haar, Biorthogonal, Coiflet, and Discrete Meyer; in this scheme, the Daubechies filter is selected as the low-pass filter.
[0067] The result of decomposing the sonar image I is a high-frequency sonar image L and a low-frequency sonar image H, which are expressed as follows:
[0068]
[0069] 2.2 Residual Neural Network.
[0070] In this scheme, the residual neural network adopts two parallel high-frequency branches and low-frequency branches to extract high-frequency features and low-frequency features of the high-frequency sonar image L and the low-frequency sonar image H, respectively.
[0071] See also Figure 1 , the high-frequency branch and low-frequency branch of the residual neural network are composed of a series of residual network blocks set in series, Figure 1 In the example, six residual network blocks are set in both branches. After the input sonar image is decomposed into high-frequency sonar image L and low-frequency sonar image H, taking the high-frequency branch as an example, the 3*224*224 high-frequency sonar image L is extracted from the residual network block of this branch for high-frequency features. The sizes of the high-frequency feature maps output by the first five residual network blocks are 64*56*56, 64*28*28, 128*14*14, 256*7*7, and 512*4*4 respectively; the high-frequency feature map output by the last residual network block enters the feature fusion module and is fused with the low-frequency feature map finally output by the low-frequency branch.
[0072] The structure and processing of the low-frequency branch are the same as those of the high-frequency branch, and will not be described in detail here. The residual neural network can adopt an existing network, such as ResNet; the residual network block can be, for example, ResidualBlock.
[0073] 2.3 Bidirectional Cross Attention Mechanism Module.
[0074] In this scheme, two bidirectional cross-attention mechanism modules are introduced between the high-frequency branch and the low-frequency branch of the residual neural network to realize the interaction and complementarity of high-frequency features and low-frequency features; among them, each bidirectional cross-attention mechanism module is set between the high-frequency feature map and the low-frequency feature map output by the residual network block corresponding to the high-frequency branch and the low-frequency branch.
[0075] Figure 1 In the example, two bidirectional cross attention mechanism modules are introduced in the deep layer of the residual neural network; the first bidirectional cross attention mechanism module is set between the high-frequency feature map and the low-frequency feature map output by the third residual network block of the high-frequency branch and the low-frequency branch, and the second bidirectional cross attention mechanism module is set between the high-frequency feature map and the low-frequency feature map output by the fourth residual network block of the high-frequency branch and the low-frequency branch; the processing process of the two bidirectional cross attention mechanism modules is the same. The processing process of the first bidirectional cross attention mechanism module is taken as an example to illustrate, as shown in FIG. Figure 3 As shown:
[0076] First, the high-frequency feature maps output by the residual network blocks of the high-frequency branch and the low-frequency branch (the third one in this case) and the high-frequency features and low-frequency features contained in the low-frequency feature maps are mapped to the query (Q), key (K) and value (V) spaces through linear transformation.
[0077] Secondly, the low-frequency features are used as query vector Q L , high-frequency features are decomposed into key and value pairs K through convolution projection H ,V H ; Calculate cross-band feature correlation through the first multi-head attention mechanism; First multi-head attention mechanism Attention L→H as follows:
[0078]
[0079] Among them, d k is the feature dimension, and the superscript T represents the transposition operation; for any input vector z=[z1,z2,...,z C ] T ; Softmax(·) is a normalized exponential function, expressed as follows:
[0080]
[0081] Where e is a natural constant, i, j = 1, 2, ..., C, z i ,z k is the i,jth component in the input vector z.
[0082] Again, the high-frequency features are used as the query vector Q H , low-frequency features are decomposed into key and value pairs K through convolution projection L ,V L , calculate the cross-band feature correlation through the second multi-head attention mechanism; the second multi-head attention mechanism Attention H→L as follows:
[0083]
[0084] Finally, the attention features output by the first multi-head attention mechanism are combined with the original high-frequency features, i.e., Q H Add element by element to get high-frequency output Output H ; The attention features output by the second multi-head attention mechanism are combined with the original low-frequency features, namely Q L Add element by element to get low-frequency output Output L , which is expressed as follows:
[0085] Output H =Q H+Attention L→H ;
[0086] Output L =Q L +Attention H→L ;
[0087] See also Figure 1 , high frequency output H The original high-frequency feature map output by the third residual network block of the high-frequency branch is added element by element and used as the input of the next residual network block of the branch; similarly, the low-frequency output Output L After adding the original low-frequency feature map output by the third residual network block of the low-frequency branch element by element, it serves as the input of the next residual network block of this branch.
[0088] Apply a bidirectional cross attention mechanism module to the high-frequency feature map and low-frequency feature map output by the fourth residual network block of the high-frequency branch and the low-frequency branch, see Figure 1 .
[0089] 2.4 Adaptive Fusion Module
[0090] The adaptive fusion module uses a dual-path structure to process the input high-frequency feature map A and low-frequency feature map B (i.e., the output of the last residual network block of the high-frequency branch and the low-frequency branch), and realizes dynamic fusion through learnable channel attention weights; Figure 4 As shown, the details are as follows:
[0091] First, perform global average pooling on the high-frequency feature map A, and obtain the global statistics of each channel as follows:
[0092]
[0093] Among them, A c (i, j) represents the feature of the cth channel of the high-frequency feature map A, (i, j) represents the feature index in the height H and width W directions respectively, z c represents the global statistics of the c-th channel, c = 1, 2, ..., C, where C is the number of channels.
[0094] Then, the global statistics z of all C channels are passed through a bottleneck structure consisting of two 1×1 convolutional layers to generate the channel attention weight α∈[0,1], as follows:
[0095] α=σ(W2δ(W1z));
[0096] Where W1 and W2 are learnable parameters, δ is the ReLU activation function, and σ is the Sigmoid activation function; finally, the fused features are obtained by weighted summation:
[0097] F = α·A+(1-α)·B;
[0098] This method achieves weighted fusion of high-frequency and low-frequency features.
[0099] 2.5 Output module.
[0100] The output module includes a convolutional layer and a global average pooling layer. The fusion feature F output by the adaptive fusion module is sequentially passed through the convolutional layer and the global average pooling layer for feature dimensionality reduction, and the Dropout method is added to prevent overfitting, and finally the classification result of the target in the sonar image is output.
[0101] 3. Training of the image classification network UHL-Net.
[0102] After constructing the image classification network, in one embodiment of the present invention, a series of preliminary hyperparameters are first set, and these hyperparameters are continuously adjusted and optimized during the network training process; through refined hyperparameter design and adjustment, the optimal parameter configuration is explored, thereby improving the classification accuracy and performance of the image classification network.
[0103] The values of the hyperparameters are shown in the following table:
[0104]
[0105] In order to alleviate the long-tail distribution problem, the present invention adopts the Focal Loss loss function. Focal Loss is modified based on the cross entropy loss. The Focal Loss expression FL(p c )as follows:
[0106] FL(p t )=-α t (1-p t ) γ log(p t );
[0107] Among them, p t is the predicted probability of the image classification network for the t-th category, α t is a balancing factor, and γ is a focusing parameter used to adjust the relative importance of different categories and control the weight attenuation of sonar image samples. The larger γ is, the greater the focus on the tail samples. Conversely, when γ = 0, FocalLoss degenerates into a cross-entropy loss function. In the embodiment of the present invention, the focusing parameter is γ = 4.
[0108] For α t For , its value is calculated by the number of sonar image samples in the training set, and the calculation formula is as follows:
[0109]
[0110] Among them, n t 、n k represents the number of sonar images of the t, kth category in the training set, and C represents the number of categories.
[0111] Substituting the data in one embodiment of the present invention into the formula, the following can be calculated:
[0112] α t =[0.1442,0.6827,0.1732].
[0113] See also Figure 5 and Figure 6 In one embodiment of the present invention, a test set is used to evaluate the trained image classification network to verify its generalization performance in the sonar image classification task; the experimental results are shown in the following table:
[0114]
[0115] Experiments achieved a classification accuracy of 87.18%, far exceeding traditional ResNet and MetaModelNet methods, as well as the latest NAS-MFF method, demonstrating its significant advantages in underwater image classification. This method not only provides a new theoretical solution to the underwater image classification problem but also has broad potential in practical applications. It can better address the complex challenges of the marine environment and provide technical and data support for fields such as marine monitoring and detection. By accurately classifying underwater sonar images, it can effectively improve the recognition and tracking capabilities of underwater targets.
[0116] In summary, the present invention provides a sonar image classification method based on high-frequency and low-frequency joint features. In this method, an image classification network UHL-Net (United HF-LF In the image classification network training phase, this method first preprocesses the original sonar image. The number of sonar image samples is expanded by random cropping and rotation, which enhances the robustness of the image classification network to position changes and local perturbations, thereby improving the generalization ability of the model in complex environments and constructing a more diverse and robust dataset. Then, a wavelet transform module is used to decompose the sonar image into two branches, high-frequency and low-frequency. The high-frequency branch retains detail features, while the low-frequency branch retains structural features. This enables the image classification network to extract important features of the target in different frequency bands, effectively alleviating the problem of feature loss caused by noise. Thirdly, a bidirectional cross-attention mechanism is introduced into the residual neural network to enable dynamic interaction between high-frequency and low-frequency features during the extraction process, further strengthening the complementary expression of local detail information and global structural information, thereby improving the model's resistance to noise interference and complex background changes. Then, an adaptive feature fusion module is used to deeply fuse high-frequency and low-frequency features. By adaptively adjusting the weights of different feature branches, invalid information is suppressed, key features are highlighted, and the overall feature representation ability is effectively improved. Finally, the classification results are output through a fully connected layer, achieving high-precision recognition of sonar images in a multi-noise interference environment.
[0117] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A sonar image classification method based on high- and low-frequency joint features, characterized in that: include: Obtain the sonar image to be identified and input it into the trained image classification network, outputting the target classification results in the sonar image; The image classification network includes a wavelet transform module, a residual neural network, a bidirectional cross attention mechanism module, an adaptive fusion module and an output module, wherein: The wavelet transform module is used to transform the input sonar image into high-frequency sonar images and low-frequency sonar images; the residual neural network has two parallel branches, high-frequency and low-frequency, which use a series of residual network blocks to extract high-frequency features and low-frequency features of high-frequency sonar images and low-frequency sonar images respectively; the bidirectional cross-attention mechanism module is set between the high-frequency branch and the low-frequency branch of the residual neural network to interact and complement the high-frequency features and low-frequency features; the adaptive fusion module is used to deeply fuse the high-frequency feature maps and low-frequency feature maps output by the high-frequency branch and the low-frequency branch; the output module is used to classify the fused image features and output the classification results of the target.
2. The sonar image classification method based on high- and low-frequency joint features according to claim 1, characterized in that: When the image classification network is trained, the sonar image is first obtained and preprocessed by random cropping, random rotation and random mirroring to construct a training set.
3. The sonar image classification method based on high- and low-frequency combined features according to claim 1, characterized in that: The wavelet transform module is used to transform the input sonar image into high-frequency sonar images and low-frequency sonar images, including: First, the sonar image I is subjected to a two-dimensional discrete wavelet transform through row-column separation filtering. Each level of decomposition yields one low-frequency subband LL and three high-frequency subbands LH, HL, and HH. The first level of decomposition is: In the above formula, * represents convolution operation, ↓2 represents 2 times downsampling operation, L x Represents a low-pass filter in the horizontal direction, L y Represents a low-pass filter in the vertical direction, H x Represents a high-pass filter in the horizontal direction, H y Represents a low-pass filter in the vertical direction; The result of decomposing the sonar image I is a high-frequency sonar image L and a low-frequency sonar image H, which are expressed as follows:
4. The sonar image classification method based on high- and low-frequency combined features according to claim 1, characterized in that: The specific processing process of the bidirectional cross attention mechanism module is as follows: First, the high-frequency feature maps output by the residual network blocks of the high-frequency branch and the low-frequency branch, and the high-frequency features and low-frequency features contained in the low-frequency feature maps are mapped to the query Q, key K and value V space through linear transformation; Secondly, the low-frequency features are used as query vector Q L , high-frequency features are decomposed into key and value pairs K through convolution projection H ,V H ; Calculate cross-band feature correlation through the first multi-head attention mechanism; The first multi-head attention mechanism is as follows: Among them, d k is the feature dimension, the superscript T represents the transposition operation, and Softmax(·) is the normalized exponential function; Again, the high-frequency features are used as the query vector Q H , low-frequency features are decomposed into key and value pairs K through convolution projection L ,V L , the cross-band feature correlation is calculated through the second multi-head attention mechanism; the second multi-head attention mechanism is as follows: Finally, the attention feature Attention output by the first multi-head attention mechanism L→H With Q H Add element by element to get high-frequency output Output H ; The attention feature output by the second multi-head attention mechanism Attention H→L With Q L Add element by element to get low-frequency output Output L .
5. The sonar image classification method based on high- and low-frequency combined features according to claim 1, characterized in that: High frequency output H , low frequency output L The high-frequency feature map and low-frequency feature map output by the residual network blocks of the high-frequency branch and low-frequency branch are added element by element and used as the input of the next residual network block of the corresponding branch.
6. The sonar image classification method based on high- and low-frequency combined features according to claim 1, characterized in that: The processing process of the adaptive fusion module is: The outputs of the high-frequency branch and the low-frequency branch are high-frequency feature map A and low-frequency feature map B, respectively. First, global average pooling is performed on the high-frequency feature map A to obtain the global statistics of each channel: Among them, A c (i, j) represents the feature of the cth channel of the high-frequency feature map A, (i, j) represents the feature index in the height H and width W directions respectively, z c represents the global statistics of the c-th channel, c = 1, 2, ..., C, C is the number of channels; Then, the global statistics z of all C channels are passed through a bottleneck structure consisting of two 1×1 convolutional layers to generate the channel attention weight α∈[0,1], as follows: α=σ(W2δ(W1z)); Where W1 and W2 are learnable parameters, δ is the ReLU activation function, and σ is the Sigmoid activation function; finally, the fused features are obtained by weighted summation: F = α·A+(1-α)·B.
7. The sonar image classification method based on high- and low-frequency combined features according to claim 1, characterized in that: The fusion features output by the adaptive fusion module are sequentially passed through the convolution layer and global average pooling layer in the output module for feature dimensionality reduction, and the Dropout method is added to prevent overfitting, and finally the classification results of the targets in the sonar image are output.
8. The sonar image classification method based on high- and low-frequency combined features according to claim 1, characterized in that: The loss function expression FL(p c )as follows: FL(p t )=-a t (1-p t ) γ log(p t ); Among them, p t is the predicted probability of the image classification network for the t-th category, α t is the balance factor, γ is the focusing parameter; Among them, n t 、n k represents the number of sonar images of the t, kth category in the training set, and C represents the number of categories.
9. A terminal device comprising a processor, a memory, and a computer program stored in the memory; characterized in that: When the processor executes the computer program, it implements the sonar image classification method based on the high- and low-frequency joint features according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program; wherein: When the computer program is executed by a processor, the sonar image classification method based on the high- and low-frequency joint features according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Low illumination perception method and system based on space-frequency fusion
CN121213913A
Marine radar target detection method, system and equipment based on space-frequency feature fusion
CN121432381A