Search

CN-122023216-A - Underwater image enhancement method and related device

CN122023216ACN 122023216 ACN122023216 ACN 122023216ACN-122023216-A

Abstract

The invention discloses an underwater image enhancement method and a related device. The method comprises the steps of obtaining an underwater target image to be processed, constructing an SCCA-UNet model, comprising an encoder, jump connection and a decoder, wherein the encoder comprises a physical priori module and 4 encoding layers which are sequentially connected, the decoder comprises four decoding layers and an output layer which are sequentially connected, the physical priori module performs preliminary color reduction and feature extraction, the jump connection uses a cross attention mechanism at a non-bottleneck layer, the bottleneck layer uses a self attention mechanism, and the underwater target image to be processed is input into the SCCA-UNet model to obtain a generated underwater enhanced image. The invention can complete the cable image enhancement under the complex water condition in various environments.

Inventors

  • XIONG HUI
  • LI TIESHAN
  • WEI LI
  • YANG CHONG
  • FU LIRONG
  • LIU JINYI

Assignees

  • 海南大学

Dates

Publication Date
20260512
Application Date
20260112

Claims (10)

  1. 1. An underwater image enhancement method, comprising the steps of: Acquiring an underwater target image to be processed; The method comprises the steps of constructing an SCCA-UNet model, wherein the SCCA-UNet model comprises an encoder, a jump connection and a decoder, the encoder comprises a physical priori module, a first encoding layer, a second encoding layer, a third encoding layer and a fourth encoding layer which are sequentially connected, the decoder comprises a first decoding layer, a second decoding layer, a third decoding layer, a fourth decoding layer and an output layer which are sequentially connected, the output characteristic of the fourth encoding layer is processed by a self-attention mechanism and is input into the first decoding layer, the output characteristic of the third encoding layer is processed by a cross-attention mechanism and is spliced with the output characteristic of the first decoding layer by the jump connection and is input into the second decoding layer, the output characteristic of the second encoding layer is processed by the cross-attention mechanism and is spliced with the output characteristic of the second decoding layer by the jump connection and is input into the third decoding layer, and the output characteristic of the first encoding layer is processed by the cross-attention mechanism and is input into the fourth decoding layer; and inputting the underwater target image to be processed into an SCCA-UNet model to obtain a generated underwater enhanced image.
  2. 2. The underwater image enhancement method of claim 1, wherein the processing of the physical prior module comprises: Carrying out Fourier transform on the image characteristics to a frequency domain diagram, carrying out normalization processing, carrying out frequency domain convolution on a low-frequency part of the frequency domain diagram after normalization processing, and then carrying out inverse Fourier transform to obtain airspace characteristics; The airspace feature is subjected to residual connection with the airspace feature after being processed by three CBR modules, a conv layer and a Sigmoid nonlinear activation function in sequence, so as to obtain a low-frequency feature; And the low-frequency features are spliced with the image features after being processed by the CBR module, so that the output features of the physical prior module are obtained.
  3. 3. The underwater image enhancement method according to claim 1, wherein the first coding layer comprises an adaptive convolution layer and 3 space-frequency domain convolution layers which are sequentially connected, the space-frequency domain convolution layer comprises a bn layer, a ReLU nonlinear activation function and a space-frequency domain parallel link module which are sequentially connected, the space-frequency domain parallel link module comprises a parallel frequency domain convolution layer and a space domain convolution layer, the frequency domain convolution layer performs normalization processing after Fourier transformation on an input feature to a frequency domain image, performs frequency domain convolution on a low-frequency part of the frequency domain image after normalization processing to obtain a first feature, performs inverse Fourier transformation, 1×1 convolution and Fourier transformation on a high-frequency part of the frequency domain image after normalization processing to obtain a second feature, performs inverse Fourier transformation after splicing the first feature and the second feature to obtain a third feature, and the frequency domain convolution layer inputs the input feature into the adaptive convolution layer to obtain a fourth feature; the first coding layer and the second coding layer have the same structure, the third coding layer and the fourth coding layer have the same structure, and the third coding layer is different from the first coding layer in that a Conv2d convolution layer is used for replacing the adaptive convolution layer.
  4. 4. The underwater image enhancement method according to claim 1, wherein the training of the SCCA-UNet model comprises the steps of: acquiring an underwater target image, preprocessing the underwater target image, forming an image pair by the underwater target image and the preprocessed underwater target image, constructing a data set, and dividing the data set into a training set, a verification set and a test set according to a preset proportion; And (3) establishing a loss function, inputting a training set, a verification set and a test set into a preset model for training, and obtaining an SCCA-UNet model by adopting a training mode of intermediate supervision, periodic attenuation of learning rate and dynamic weight in the training process.
  5. 5. The method of claim 4, wherein the preprocessing includes adding noise and gaussian blur, reducing contrast, and color transformation.
  6. 6. The underwater image enhancement method of claim 4, wherein the loss function is a loss function based on LCH color space Perception loss function based on pretrained model VGG19 L1 pixel loss function SSIM structure similarity loss function Gradient transformation-based Smooth loss function Is a weighted sum of (c).
  7. 7. The underwater image enhancement method according to claim 6, wherein the gradient transform-based smooths loss function The acquisition process is as follows: Separately calculating horizontal gradients of images And vertical gradient And average gradient amplitude along the channel The formula is as follows: Wherein (i, j, c) represents the pixel point of the ith row and the jth column of the c-th channel, W is the width of the image, and H is the height of the image; Generating a smoothing mask: Wherein mask (i, j) represents a mask value of an ith row and a jth column, and threshold is a gradient threshold; Calculating a loss function The formula is as follows: , Wherein, the 、 、 The method comprises the steps of respectively representing the difference between an underwater enhanced image generated by a model and an original input image, the difference between a reference image and the original input image, the difference between the underwater enhanced image generated by the model and the reference image, wherein x is the original input image, G (x) is the underwater enhanced image generated by the model, and y is the reference image.
  8. 8. An underwater image enhancement device, comprising: The acquisition module is used for acquiring an underwater target image to be processed; The system comprises a construction module, a physical prior module, a first coding layer, a second coding layer, a third coding layer and a fourth coding layer, wherein the construction module is used for constructing an SCCA-UNet model, the SCCA-UNet model comprises an encoder, a jump connection and a decoder, the encoder comprises the physical prior module, the first coding layer, the second coding layer, the third coding layer and the fourth coding layer which are sequentially connected, the decoder comprises the first decoding layer, the second decoding layer, the third decoding layer, the fourth decoding layer and an output layer which are sequentially connected, the output characteristics of the fourth coding layer are processed by a self-attention mechanism and input into the first decoding layer, the output characteristics of the third coding layer are processed by a cross-attention mechanism and then are spliced with the output characteristics of the first decoding layer by the jump connection and input into the second decoding layer, the output characteristics of the second coding layer are processed by the cross-attention mechanism and then are spliced with the output characteristics of the second decoding layer by the jump connection and input into the third decoding layer, the output characteristics of the physical prior module and the output characteristics of the fourth decoding layer are processed by the cross-attention mechanism and input into the underwater image; And the processing module is used for inputting the underwater target image to be processed into an SCCA-UNet model to obtain a generated underwater enhanced image.
  9. 9. A computer device comprising a memory for storing a computer program, and a processor for implementing the method according to any one of claims 1 to 7 when the computer program is executed.
  10. 10. A readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the method according to any of claims 1 to 7.

Description

Underwater image enhancement method and related device Technical Field The invention relates to the technical field of image enhancement, in particular to an underwater image enhancement method and a related device. Background Submarine cable detection is subjected to extreme environmental challenges such as high voltage, strong corrosion, low visibility (often lower than 1 meter) and the like for a long time, particularly, regular monitoring maintenance is needed, wherein image monitoring is a main mode of fault identification, but the obtained cable images often have problems such as color distortion, blurring, noise concentration and the like, and the traditional image enhancement method is very limited in enhancing submarine cable images. Therefore, the deep learning-based method can better capture the characteristic information of the image and is more and more emphasized, and the image enhancement capability of the submarine cable is remarkably improved. The existing technology still faces challenges in landing, namely marked data is scarce, real seabed defect samples are scarce, the real seabed defect samples need to be expanded depending on synthetic data, real-time requirements are high, the reasoning time delay of an existing model at edge equipment exceeds 100ms, dynamic monitoring requirements are difficult to meet, generalization capability of the model is weak, and algorithm failure risks are caused by the difference of the environment across sea areas. Disclosure of Invention In order to solve the technical problems, the invention provides an underwater image enhancement method and a related device, which can complete cable image enhancement under complex water conditions in various environments. In order to achieve the above purpose, the technical scheme of the invention is as follows: An underwater image enhancement method, comprising the steps of: Acquiring an underwater target image to be processed; The method comprises the steps of constructing an SCCA-UNet model, wherein the SCCA-UNet model comprises an encoder, a jump connection and a decoder, the encoder comprises a physical priori module, a first encoding layer, a second encoding layer, a third encoding layer and a fourth encoding layer which are sequentially connected, the decoder comprises a first decoding layer, a second decoding layer, a third decoding layer, a fourth decoding layer and an output layer which are sequentially connected, the output characteristic of the fourth encoding layer is processed by a self-attention mechanism and is input into the first decoding layer, the output characteristic of the third encoding layer is processed by a cross-attention mechanism and is spliced with the output characteristic of the first decoding layer by the jump connection and is input into the second decoding layer, the output characteristic of the second encoding layer is processed by the cross-attention mechanism and is spliced with the output characteristic of the second decoding layer by the jump connection and is input into the third decoding layer, and the output characteristic of the first encoding layer is processed by the cross-attention mechanism and is input into the fourth decoding layer; and inputting the underwater target image to be processed into an SCCA-UNet model to obtain a generated underwater enhanced image. Preferably, the processing of the physical prior module includes: Carrying out Fourier transform on the image characteristics to a frequency domain diagram, carrying out normalization processing, carrying out frequency domain convolution on a low-frequency part of the frequency domain diagram after normalization processing, and then carrying out inverse Fourier transform to obtain airspace characteristics; The airspace feature is subjected to residual connection with the airspace feature after being processed by three CBR modules, a conv layer and a Sigmoid nonlinear activation function in sequence, so as to obtain a low-frequency feature; And the low-frequency features are spliced with the image features after being processed by the CBR module, so that the output features of the physical prior module are obtained. The first coding layer comprises an adaptive convolution layer and 3 space-frequency domain convolution layers which are sequentially connected, wherein the space-frequency domain convolution layer comprises a bn layer, a ReLU nonlinear activation function and a space-frequency domain parallel link module which are sequentially connected, the space-frequency domain parallel link module comprises a frequency domain convolution layer and a space-frequency domain convolution layer which are parallel, the frequency domain convolution layer carries out normalization processing after carrying out Fourier transform on an input feature to a frequency domain image, carries out frequency domain convolution on a low-frequency part of the frequency domain image after the normalization processing to obtain a firs