Foresight sonar image denoising method based on guiding attention

Through the forward-view sonar image denoising method based on guided attention, the denoising model is trained and a detailed noise map is generated using the guided attention module, which solves the problem of unsatisfactory denoising effect in the prior art, and achieves the effect of effectively removing noise and retaining target details.

CN120013801APending Publication Date: 2025-05-16HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510108471.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

When removing noise in sonar images, it is difficult to effectively preserve target details, and there is a difference between simulated noise and actual noise, resulting in unsatisfactory denoising effect.

Method used

The forward-looking sonar image denoising method based on guidance attention is adopted. By acquiring and constructing sonar image data sets, the denoising model is trained, so that the model can learn the mapping relationship between non-uniform noise blocks and uniform noise blocks. The noise map is generated using the guide attention module and the noise map is refined by the adjustment factor, and finally the denoising image is denoised by the difference between the sonar image and the fine noise map.

Benefits of technology

It realizes effective removal of noise in the image while retaining target details, improving the noise removal effect, and avoiding the problems caused by the difference between simulated noise and actual noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013801A_ABST
    Figure CN120013801A_ABST
Patent Text Reader

Abstract

The invention relates to a forward-looking sonar image denoising method based on guiding attention. The invention relates to the technical field of image processing, and the method comprises the steps: collecting a foresight sonar image, extracting uniform noise blocks and non-uniform noise blocks from the image, and constructing a sonar image data set; the uniform noise blocks and the non-uniform noise blocks are used for training a denoising model, so that the model learns a mapping relation from the non-uniform noise blocks to the uniform noise blocks; a sonar image is used as input, a denoising model is used for generating a coarse noise graph, the noise graph is refined through an adjustment factor to obtain a fine noise graph, and the sonar image and the fine noise graph are subtracted to obtain a denoised image. According to the invention, the sonar image is directly used to train the deep learning model, so that the denoising model can accurately learn the mapping relation between the sonar image and the clean image. The model is guided to estimate noise mapping by guiding attention, so that the model can keep target details in the image to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and is a forward-looking sonar image denoising method based on guided attention. Background Art

[0002] With the increasing demand for underwater resource exploration, forward-looking sonar is increasingly being used. More and more researchers are turning to sonar image processing tasks, such as underwater terrain reconstruction, underwater archaeology, underwater target detection, segmentation, and recognition. However, whether these tasks can be completed well depends on the quality of sonar images.

[0003] Sonar images are formed by coherent demodulation of reflected sound waves received by the sonar. Due to the coherent characteristics, sonar images are inevitably affected by noise. Denoising algorithms based on deep learning can learn the noise mapping relationship between noisy images and clean images. However, most denoising methods based on deep learning require clean images as references for supervised learning. Existing learning-based sonar image denoising algorithms can be divided into two types:

[0004] One method is to directly add specific noise, such as Gaussian noise, to the sonar image. Then the noisy sonar image and the original sonar image are combined into an image pair for training the denoising model. Finally, the original sonar image is used as input to remove the noise in the original sonar image. However, this method can only remove specific types of noise to a certain extent.

[0005] Another method is to add simulated underwater environmental noise to the clean optical image, form an image pair and train a denoising model to learn the mapping relationship between the noisy image and the clean image. Then the original sonar image is used as input to remove the noise in the sonar image. However, there is a difference between simulated noise and actual noise, so this method cannot completely remove noise.

[0006] Although the learning-based sonar image denoising algorithm can remove noise to a certain extent, the target in the image will also appear blurred to varying degrees. Therefore, removing noise from sonar images while retaining target details is an urgent problem to be solved in this field. Summary of the invention

[0007] In view of the shortcomings of the prior art, the present invention achieves the effect of effectively removing noise in an image and retaining target details, and provides a forward-looking sonar image denoising method based on guided attention.

[0008] The present invention provides the following technical solutions:

[0009] A forward-looking sonar image denoising method based on guided attention, the method comprising the following steps:

[0010] Step 1: Collect forward-looking sonar images, extract uniform noise blocks and non-uniform noise blocks from the images, and construct a sonar image dataset;

[0011] Step 2: Use uniform noise blocks and non-uniform noise blocks to train the denoising model so that the model learns the mapping relationship from non-uniform noise blocks to uniform noise blocks;

[0012] Step 3: Take the sonar image as input, use the denoising model to generate a coarse noise map, refine the noise map by adjusting the factor to obtain a fine noise map, and subtract the sonar image from the fine noise map to obtain the denoised image.

[0013] Preferably, the step 1 is specifically:

[0014] Divide the non-target area of ​​the sonar image into at least 30 sub-image blocks, calculate the variance of the sub-image blocks, select 10 image blocks with small variance, calculate the mean and median of the 10 image blocks with small variance, and select 4 images with the closest mean and median as uniform noise blocks;

[0015] The pre-trained VGG model is used to extract features from the four uniform noise blocks and other image blocks, and MSE is used to calculate the feature similarity between the uniform noise blocks and other image blocks. Among the other image blocks, half of the image blocks with the largest difference in feature similarity are selected as non-uniform noise. The uniform noise and non-uniform noise form a training set, and the complete sonar images form a test set, thus completing the construction of the sonar image dataset.

[0016] Preferably, the step 2 is specifically:

[0017] The denoising model includes a feature extraction module, a guided attention module and an adjustment factor. The feature extraction module consists of three interval feature extraction (IFE) units, which are used to extract noise features in the image. The features extracted by each IFE unit are spliced ​​to improve the richness of the noise features, and the noise features are sent to the guided attention module to generate a noise map. The guided attention module includes a channel attention (CA) unit, a compressed pixel attention (CPA) unit and a global pixel attention (GPA) unit.

[0018] Preferably, the channel attention CA unit is used to assign different weights to the noise distributed on different channels. After global average pooling and maximum pooling, a one-dimensional feature is generated through convolution operation and ReLU activation function. The calculation formula is:

[0019]

[0020] This process changes the shape of the feature map from H×W×C to 1×1×C. The features are concatenated along the channel dimension to obtain a new mapping with a shape of 1×1×2C. The new mapping is expressed as:

[0021] P cat =P ac ΘP mc (3)

[0022] The mapping is done through convolutional layers and sigmoid functions to obtain weights. The shape of the feature map changes from 1×1×2C to 1×1×C. The weight calculation formula is:

[0023] CA=σ(Conv(P cat ))(4)

[0024] The channel attention map is obtained by element-wise multiplication of the weights and the input feature map. The shape of the final feature map changes from 1×1×C back to H×W×C. The calculation formula of the channel attention map is:

[0025]

[0026] Preferably, the compressed pixel attention CPA unit is used to assign different weights to the noise features distributed in the space. The two branches of CPA compress the channel attention map generated by CA to one channel through convolution and average pooling operations along the channel direction, respectively. The calculation formula is:

[0027] F com_conv =δ(Conv(F CA )) (6)

[0028]

[0029] The shape of the feature map is converted from H×W×C to H×W×1, and the compressed features are sent to two convolutional layers with ReLU and sigmoid activation functions to obtain pixel weights, calculated as:

[0030]

[0031] The compressed features are element-wise multiplied with the pixel weights to obtain the compressed pixel attention map, which is calculated as:

[0032]

[0033] Preferably, the global pixel attention GPA unit is used to supplement the global noise features lost in the processing of the CA unit and the CPA unit. The input image is subjected to a convolution to form a global noise feature, and then two convolution layers and ReLU and Sigmoid activation functions are used to generate a global pixel weight. The global noise feature is multiplied by the global pixel weight to obtain a global pixel attention map, which is expressed by the following formula:

[0034]

[0035] The attention maps generated by the CA unit, CPA unit, and GPA unit are concatenated to form a noise attention map. The noise attention image is processed by a convolution to obtain a noise map, which is expressed by the following formula:

[0036]

[0037] During the training process, the non-uniform noise block is used as input and the uniform noise block is used as output to train the denoising model. The noise map F is obtained through the above process. n , the input non-uniform noise block f minus the noise map F n Get a uniform noise block.

[0038] Preferably, the step 3 is specifically:

[0039] The noise map is refined using the adjustment factor α, the value of α is related to the mean and variance of the sonar image and the noise map, and is expressed by the following formula:

[0040]

[0041] The refined feature map is expressed as follows:

[0042] F r =α·F n (15)

[0043] In the denoising process, the sonar image F is taken as input, and the noise image obtained after the above process is called the rough noise image F n , the refined noise map is called the fine feature map F r , the final input sonar image F minus the fine feature map F r , and get the denoised image.

[0044] A forward-looking sonar image denoising system based on directed attention, the system comprising:

[0045] A data acquisition module, wherein the data acquisition module acquires forward-looking sonar images, extracts uniform noise blocks and non-uniform noise blocks from the images, and constructs a sonar image data set;

[0046] A model training module, wherein the model training module uses a uniform noise block and a non-uniform noise block to train a denoising model so that the model learns a mapping relationship from a non-uniform noise block to a uniform noise block;

[0047] The image denoising module takes the sonar image as input, generates a coarse noise map using a denoising model, refines the noise map by adjusting factors to obtain a fine noise map, and subtracts the sonar image from the fine noise map to obtain a denoised image.

[0048] A computer-readable storage medium stores a computer program, which is executed by a processor to implement a forward-looking sonar image denoising method based on guided attention.

[0049] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a forward-looking sonar image denoising method based on guided attention is implemented.

[0050] The present invention has the following beneficial effects:

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

[0052] The present invention collects forward-looking sonar images, extracts uniform noise blocks and non-uniform noise blocks from the images, and constructs a sonar image data set. The uniform noise block-non-uniform noise block is used to train a denoising model, so that the model learns the mapping relationship from the non-uniform noise block to the uniform noise block. The sonar image is used as input, and the denoising model is used to first generate a coarse noise map, and then the noise map is refined by adjusting the factor to obtain a fine noise map. Finally, the sonar image and the fine noise map are subtracted to obtain a denoised image.

[0053] The present invention directly uses sonar images to train deep learning models, so that the denoising model can accurately learn the mapping relationship between sonar images and clean images. By directing attention to guide the model to estimate the noise mapping, the model can maximize the retention of target details in the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 Shown is a flow chart of the forward-looking sonar image denoising method based on guided attention of the present invention;

[0056] Figure 2 Shown is a structural diagram of the denoising model of the present invention;

[0057] Figure 3 Shown is a structural diagram of the IFE unit of the present invention;

[0058] Figure 4 Shown is a structural diagram of the CA unit of the present invention;

[0059] Figure 5 Shown is a structural diagram of the electric CPA unit of the present invention;

[0060] Figure 6 Shown is a diagram of the GPA unit structure of the present invention. DETAILED DESCRIPTION

[0061] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] The present invention is described in detail below in conjunction with specific embodiments. Specific embodiment one:

[0064] according to Figures 1 to 6 As shown, the specific optimization technical solution adopted by the present invention to solve the above technical problems is: the present invention relates to a forward-looking sonar image denoising method based on guided attention.

[0065] A forward-looking sonar image denoising method based on guided attention, the method comprising the following steps:

[0066] Step 1: Collect forward-looking sonar images, extract uniform noise blocks and non-uniform noise blocks from the images, and construct a sonar image dataset;

[0067] Step 2: Use uniform noise blocks and non-uniform noise blocks to train the denoising model so that the model learns the mapping relationship from non-uniform noise blocks to uniform noise blocks;

[0068] Step 3: Take the sonar image as input, use the denoising model to generate a coarse noise map, refine the noise map by adjusting the factor to obtain a fine noise map, and subtract the sonar image from the fine noise map to obtain the denoised image.

[0069] Compared with existing methods, the present invention directly uses sonar images to train deep learning models, so that the denoising model can accurately learn the mapping relationship between sonar images and clean images. By directing attention to guide the model to estimate the noise mapping, the model can maximize the retention of target details in the image. Specific embodiment 2:

[0071] The difference between the second embodiment of the present application and the first embodiment is that:

[0072] The step 1 is specifically as follows:

[0073] Divide the non-target area of ​​the sonar image into at least 30 sub-image blocks, calculate the variance of the sub-image blocks, select 10 image blocks with small variance, calculate the mean and median of the 10 image blocks with small variance, and select 4 images with the closest mean and median as uniform noise blocks;

[0074] The pre-trained VGG model is used to extract features from the four uniform noise blocks and other image blocks, and MSE is used to calculate the feature similarity between the uniform noise blocks and other image blocks. Among the other image blocks, half of the image blocks with the largest difference in feature similarity are selected as non-uniform noise. The uniform noise and non-uniform noise form a training set, and the complete sonar images form a test set, thus completing the construction of the sonar image dataset. Specific embodiment three:

[0076] The difference between the third embodiment of the present application and the second embodiment is that:

[0077] The step 2 is specifically as follows:

[0078] The denoising model includes a feature extraction module, a guided attention module and an adjustment factor. The feature extraction module consists of three interval feature extraction (IFE) units, which are used to extract noise features in the image. The features extracted by each IFE unit are spliced ​​to improve the richness of the noise features, and the noise features are sent to the guided attention module to generate a noise map. The guided attention module includes a channel attention (CA) unit, a compressed pixel attention (CPA) unit and a global pixel attention (GPA) unit. Specific embodiment four:

[0080] The difference between the fourth embodiment of the present application and the third embodiment is that:

[0081] The channel attention CA unit is used to assign different weights to the noise distributed on different channels. After global average pooling and maximum pooling, a one-dimensional feature is generated through convolution operation and ReLU activation function. The calculation formula is:

[0082]

[0083] This process changes the shape of the feature map from H×W×C to 1×1×C. The features are concatenated along the channel dimension to obtain a new mapping with a shape of 1×1×2C. The new mapping is expressed as:

[0084] P cat =P ac ΘP mc (3)

[0085] The mapping is done through convolutional layers and sigmoid functions to obtain weights. The shape of the feature map changes from 1×1×2C to 1×1×C. The weight calculation formula is:

[0086] CA=σ(Conv(P cat ))(4)

[0087] The channel attention map is obtained by element-wise multiplication of the weights and the input feature map. The shape of the final feature map changes from 1×1×C back to H×W×C. The calculation formula of the channel attention map is:

[0088] Specific embodiment five:

[0090] The difference between the fifth embodiment of the present invention and the fourth embodiment is that:

[0091] The compressed pixel attention CPA unit is used to assign different weights to the noise features distributed in space. The two branches of CPA compress the channel attention map generated by CA into one channel through convolution and average pooling operations along the channel direction respectively. The calculation formula is:

[0092] F com_conv =δ(Conv(F CA )) (6)

[0093]

[0094] The shape of the feature map is converted from H×W×C to H×W×1, and the compressed features are sent to two convolutional layers with ReLU and sigmoid activation functions to obtain pixel weights, calculated as:

[0095]

[0096] The compressed features are element-wise multiplied with the pixel weights to obtain the compressed pixel attention map, which is calculated as:

[0097] Specific embodiment six:

[0099] The difference between the sixth embodiment of the present invention and the fifth embodiment is that:

[0100] The global pixel attention GPA unit is used to supplement the global noise features lost during the processing of the CA unit and the CPA unit. The input image is convolved to form a global noise feature, and then two convolutional layers and ReLU and Sigmoid activation functions are used to generate global pixel weights. The global noise feature is multiplied by the global pixel weight to obtain a global pixel attention map, which is expressed as follows:

[0101]

[0102] The attention maps generated by the CA unit, CPA unit, and GPA unit are concatenated to form a noise attention map. The noise attention image is processed by a convolution to obtain a noise map, which is expressed by the following formula:

[0103]

[0104] During the training process, the non-uniform noise block is used as input and the uniform noise block is used as output to train the denoising model. The noise map F is obtained through the above process. n , the input non-uniform noise block f minus the noise map F n Get a uniform noise block. Specific embodiment seven:

[0106] The difference between the seventh embodiment of the present invention and the sixth embodiment is that:

[0107] The step 3 is specifically as follows:

[0108] The noise map is refined using the adjustment factor α, the value of α is related to the mean and variance of the sonar image and the noise map, and is expressed by the following formula:

[0109]

[0110] The refined feature map is expressed as follows:

[0111] F r =α·F n (15)

[0112] In the denoising process, the sonar image F is taken as input, and the noise image obtained after the above process is called the rough noise image F n , the refined noise map is called the fine feature map F r , the final input sonar image F minus the fine feature map F r , and get the denoised image. Specific embodiment eight:

[0114] The difference between the eighth embodiment of the present invention and the seventh embodiment is that:

[0115] The present invention provides a forward-looking sonar image denoising system based on directed attention, the system comprising:

[0116] A data acquisition module, wherein the data acquisition module acquires forward-looking sonar images, extracts uniform noise blocks and non-uniform noise blocks from the images, and constructs a sonar image data set;

[0117] A model training module, wherein the model training module uses a uniform noise block and a non-uniform noise block to train a denoising model so that the model learns a mapping relationship from a non-uniform noise block to a uniform noise block;

[0118] The image denoising module takes the sonar image as input, generates a coarse noise map using a denoising model, refines the noise map by adjusting factors to obtain a fine noise map, and subtracts the sonar image from the fine noise map to obtain a denoised image. Specific embodiment nine:

[0120] The difference between the ninth embodiment of the present invention and the eighth embodiment is that:

[0121] The present invention provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement a forward-looking sonar image denoising method based on guided attention. Specific embodiment ten:

[0123] The difference between the tenth embodiment of the present invention and the ninth embodiment is that:

[0124] The present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a forward-looking sonar image denoising method based on guided attention is implemented. Specific embodiment eleven:

[0126] The difference between the eleventh embodiment of the present invention and the tenth embodiment is that:

[0127] The object of the present invention is achieved in that:

[0128] A forward-looking sonar image denoising method based on guided attention, comprising:

[0129] Construct a denoising model including a feature extraction module, a guided attention module and an adjustment factor. Collect forward-looking sonar images, extract uniform noise blocks and non-uniform noise blocks from the images, and construct a sonar image dataset. Use uniform noise blocks-non-uniform noise blocks to train the denoising model so that the model learns the mapping relationship from non-uniform noise blocks to uniform noise blocks. Take the sonar image as input, use the denoising model to first generate a coarse noise map, and then refine the noise map through the adjustment factor to obtain a fine noise map. Finally, the sonar image is subtracted from the fine noise map to obtain a denoised image.

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

[0131] Collect sonar images and make a data set. When making a training set, it is necessary to screen uniform noise blocks and non-uniform noise blocks in the sonar image. First, divide the non-target area of ​​the sonar image into at least 30 sub-image blocks. Then calculate the variance of these sub-image blocks and select 10 image blocks with small variance. Then calculate the mean and median of these 10 image blocks and finally select the 4 images with the closest mean and median as uniform noise blocks.

[0132] The pre-trained VGG model is used to extract features from the four uniform noise blocks and other image blocks, and the MSE is used to calculate the feature similarity between the uniform noise blocks and other image blocks. Half of the image blocks with the largest feature similarity difference are selected from other image blocks as non-uniform noise. The uniform noise and non-uniform noise form the training set, and the complete sonar image forms the test set, thus completing the dataset.

[0133] Construct a denoising algorithm model, Figure 1 As shown in Figure 1, the model of the forward-looking sonar image denoising method based on guided attention includes a feature extraction module, a guided attention module and an adjustment factor. The feature extraction module consists of three interval feature extraction (IFE) units, which are used to extract noise features in the image. The IFE unit structure is shown in Figure 1. Figure 2 As shown in Figure 1. The features extracted by each IFE unit are concatenated to improve the richness of the noise features. The noise features are fed into the guided attention module to generate the noise map. The guided attention module consists of channel attention (CA), compressed pixel attention (CPA) and global pixel attention (GPA) units. The structures of CA, CPA and GPA units are shown in Figure 1. Figure 3 , 4 , as shown in Figure 5.

[0134] The CA unit is used to assign different weights to the noise distributed on different channels. After global average pooling and maximum pooling, a one-dimensional feature is generated through convolution operation and ReLU activation function. The calculation formula is:

[0135]

[0136] This process changes the shape of the feature map from H×W×C to 1×1×C. Next, these features are concatenated along the channel dimension to obtain a new map with a shape of 1×1×2C. The new map can be expressed as:

[0137] P cat =P ac ΘP mc (3)

[0138] The mapping is then passed through a convolutional layer and a sigmoid function to obtain weights, at which point the shape of the feature map changes from 1×1×2C to 1×1×C. The weight calculation formula is:

[0139] CA=σ(Conv(P cat )) (4)

[0140] Finally, the channel attention map is obtained by element-wise multiplication of the weights and the input feature map, and the shape of the final feature map changes from 1×1×C back to H×W×C. The calculation formula of the channel attention map is:

[0141]

[0142] The CPA unit is used to assign different weights to noise features distributed in space. The two branches of CPA compress the channel attention map generated by CA to one channel through convolution and average pooling operations along the channel direction, respectively. The calculation formula is:

[0143] F com_conv =δ(Conv(F CA )) (6)

[0144]

[0145] This process converts the shape of the feature map from H×W×C to H×W×1. These compressed features are then sent to two convolutional layers with ReLU and sigmoid activation functions to derive pixel weights. The calculation formula is:

[0146]

[0147] Finally, the compressed features are element-wise multiplied with the pixel weights to obtain the compressed pixel attention map. The calculation formula is:

[0148]

[0149] The GPA unit is used to supplement the global noise features lost during the processing of the CA unit and the CPA unit. The input image first undergoes a convolution to form a global noise feature, then passes through two convolution layers and ReLU and Sigmoid activation functions to generate global pixel weights, and finally multiplies the global noise feature with the global pixel weight to obtain a global pixel attention map. The calculation formula for this series of processes is:

[0150]

[0151] The attention maps generated by the CA unit, CPA unit, and GPA unit are concatenated to form a noise attention map. The noise attention image is processed by a convolution to obtain a noise map. The calculation formula is:

[0152]

[0153] During the training process, the non-uniform noise block is used as input and the uniform noise block is used as output to train the denoising model. The noise map F is obtained through the above process. n , the input non-uniform noise block f minus the noise map F n Get a uniform noise block.

[0154] During the training process, the denoising model learns the mapping relationship between non-uniform noise blocks and uniform noise blocks, which is different from the mapping relationship between sonar images and clean images. Therefore, it is necessary to use the adjustment factor α to refine the noise map. The value of α is related to the mean and variance of the sonar image and the noise map, and its calculation formula is:

[0155]

[0156] The refined feature map can be expressed as:

[0157] F r =α·F n (15)

[0158] In the denoising process, the sonar image F is taken as input, and the noise image obtained after the above process is called the rough noise image F n , the refined noise map is called the fine feature map F r The final input sonar image F minus the fine feature map F r , and get the denoised image.

[0159] The above is only a preferred implementation of a forward-looking sonar image denoising method based on guided attention. The protection scope of a forward-looking sonar image denoising method based on guided attention is not limited to the above embodiment. All technical solutions under this idea belong to the protection scope of the present invention. It should be pointed out that for those skilled in the art, several improvements and changes without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A forward-looking sonar image denoising method based on guided attention, characterized in that: The method comprises the following steps: Step 1: Collect forward-looking sonar images, extract uniform noise blocks and non-uniform noise blocks from the images, and construct a sonar image dataset; Step 2: Use uniform noise blocks and non-uniform noise blocks to train the denoising model so that the model learns the mapping relationship from non-uniform noise blocks to uniform noise blocks; Step 3: Take the sonar image as input, use the denoising model to generate a coarse noise map, refine the noise map by adjusting the factor to obtain a fine noise map, and subtract the sonar image from the fine noise map to obtain the denoised image.

2. The method according to claim 1, characterized in that: The step 1 is specifically as follows: Divide the non-target area of ​​the sonar image into at least 30 sub-image blocks, calculate the variance of the sub-image blocks, select 10 image blocks with small variance, calculate the mean and median of the 10 image blocks with small variance, and select 4 images with the closest mean and median as uniform noise blocks; The pre-trained VGG model is used to extract features from the four uniform noise blocks and other image blocks, and MSE is used to calculate the feature similarity between the uniform noise blocks and other image blocks. Among the other image blocks, half of the image blocks with the largest difference in feature similarity are selected as non-uniform noise. The uniform noise and non-uniform noise form a training set, and the complete sonar images form a test set, thus completing the construction of the sonar image dataset.

3. The method according to claim 2, characterized in that: The step 2 is specifically as follows: The denoising model includes a feature extraction module, a guided attention module and a regulation factor. The feature extraction module consists of three interval feature extraction (IFE) units, which are used to extract noise features in the image. The features extracted by each IFE unit are spliced ​​to improve the richness of the noise features, and the noise features are sent to the guided attention module to generate the noise map. The guided attention module includes the channel attention CA unit, the compressed pixel attention CPA unit and the global pixel attention GPA unit.

4. The method according to claim 1, characterized in that: The channel attention CA unit is used to assign different weights to the noise distributed on different channels. After global average pooling and maximum pooling, a one-dimensional feature is generated through convolution operation and ReLU activation function. The calculation formula is: This process changes the shape of the feature map from H×W×C to 1×1×C. The features are concatenated along the channel dimension to obtain a new mapping with a shape of 1×1×2C. The new mapping is expressed as: P cat =P ac ΘP mc (3) The mapping is done through convolutional layers and sigmoid functions to obtain weights. The shape of the feature map changes from 1×1×2C to 1×1×C. The weight calculation formula is: CA=σ(Conv(P cat ))(4) The channel attention map is obtained by element-wise multiplication of the weights and the input feature map. The shape of the final feature map changes from 1×1×C back to H×W×C. The calculation formula of the channel attention map is:

5. The method according to claim 4, characterized in that: The compressed pixel attention CPA unit is used to assign different weights to the noise features distributed in space. The two branches of CPA compress the channel attention map generated by CA into one channel through convolution and average pooling operations along the channel direction respectively. The calculation formula is: F com_conv =δ(Conv(F CA )) (6) The shape of the feature map is converted from H×W×C to H×W×1, and the compressed features are sent to two convolutional layers with ReLU and sigmoid activation functions to obtain pixel weights, calculated as: The compressed features are element-wise multiplied with the pixel weights to obtain the compressed pixel attention map, which is calculated as:

6. The method according to claim 5, characterized in that: The global pixel attention GPA unit is used to supplement the global noise features lost during the processing of the CA unit and the CPA unit. The input image is convolved to form a global noise feature, and then two convolutional layers and ReLU and Sigmoid activation functions are used to generate global pixel weights. The global noise feature is multiplied by the global pixel weight to obtain a global pixel attention map, which is expressed as follows: The attention maps generated by the CA unit, CPA unit, and GPA unit are concatenated to form a noise attention map. The noise attention image is processed by a convolution to obtain a noise map, which is expressed by the following formula: During the training process, the non-uniform noise block is used as input and the uniform noise block is used as output to train the denoising model. The noise map F is obtained through the above process. n , the input non-uniform noise block f minus the noise map F n Get a uniform noise block.

7. The method according to claim 6, characterized in that: The step 3 is specifically as follows: The noise map is refined using the adjustment factor α, the value of α is related to the mean and variance of the sonar image and the noise map, and is expressed by the following formula: The refined feature map is expressed as follows: F r =α·F n (15) In the denoising process, the sonar image F is taken as input, and the noise image obtained after the above process is called the rough noise image F n , the refined noise map is called the fine feature map F r , the final input sonar image F minus the fine feature map F r , and get the denoised image.

8. A forward-looking sonar image denoising system based on guided attention, characterized in that: The system comprises: A data acquisition module, wherein the data acquisition module acquires forward-looking sonar images, extracts uniform noise blocks and non-uniform noise blocks from the images, and constructs a sonar image data set; A model training module, wherein the model training module uses a uniform noise block and a non-uniform noise block to train a denoising model so that the model learns a mapping relationship from a non-uniform noise block to a uniform noise block; The image denoising module takes the sonar image as input, generates a coarse noise map using a denoising model, refines the noise map by adjusting factors to obtain a fine noise map, and subtracts the sonar image from the fine noise map to obtain a denoised image.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method of claims 1-7.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method of claims 1-7 is implemented.