Underwater image progressive generative adversarial enhancement module based on channel-space attention

CN117788330BActive Publication Date: 2026-09-22DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311838687.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2026-09-22
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

[0011]为了解决如下问题复杂多域场景下水下图像增强技术主要存在如下缺陷:(1)通过直接调整像素值实现水下图像增强的方式并不能应对所有水下退化场景,通过基于水下成像模型实现图像增强的方式存在物理模型描述不准确、传输图获取难度大、先验信息难以准确估计等;(2)在暗光场景下,水下低光照图像存在混合噪声,在图像增强时可能会放大噪声,从而导致难以产生符合人类视觉感知的图像;(3)单一网络解决多个退化问题时,网络计算量大,不能针对性解决某个特定退化问题,极易导致生成器产生过增强或欠增强,

Benefits of technology

[0061]1.通过设计水下背景光估计模块,利用水下成像原理更好地描述水下图像的退化过程,相比于传统的物理模型,采用卷积实现了动态估计先验信息。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117788330B_ABST
    Figure CN117788330B_ABST
Patent Text Reader

Abstract

The application discloses an underwater image progressive generation adversarial enhancement module based on channel-space attention, and comprises the following steps: obtaining an underwater image to be processed; obtaining a background light parameter of the underwater image to be processed based on an underwater degraded image background light estimation module; inputting the background light parameter into an underwater imaging model to obtain a pre-enhanced underwater image; inputting the pre-enhanced underwater image into an underwater degraded image enhancement network to obtain an enhanced underwater image; inputting the enhanced underwater image and a true value underwater image into a discriminator to obtain a difference value of the enhanced underwater image and the true value underwater image; inputting the difference value of the enhanced underwater image and the true value underwater image into the underwater degraded image enhancement network again through a total loss function, so as to realize enhancement of the underwater image to be processed; and introducing an underwater double attention module in a skip connection operation of a codec, so as to realize adaptive selection and emphasis on key information in the image and avoid amplification of noise in the underwater image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of underwater visual intelligent perception and relates to an underwater image progressive generation adversarial enhancement module based on channel-spatial attention. Background Technology

[0002] Optical imaging serves as a crucial means for humans to perceive and acquire information about the ocean. Compared to other sensors, optical imaging offers numerous advantages, including high information carrying capacity, high observability, rapid sensing feedback, convenient application, and low cost. Therefore, optical sensing systems have been widely applied in various aquatic applications, such as aquaculture and monitoring, underwater visual navigation, oil resource exploration, shipwreck salvage, fish tracking, and underwater archaeology. However, due to the characteristics of underwater light propagation, acquired images often suffer from inherent degradation problems such as color deviation, low contrast, blurred details, texture distortion, and limited visibility. These issues severely restrict the direct application of underwater imagery in various fields.

[0003] Currently, to address the problems of low contrast, blurred details, and excessive noise in underwater images, scholars have developed a large number of advanced frameworks. Based on the enhancement mechanism, these frameworks can be broadly categorized into non-physical model-based enhancement, physical model restoration, and data-driven enhancement methods.

[0004] (1) Traditional underwater image enhancement methods based on non-physical models

[0005] Image enhancement methods can be implemented by directly adjusting pixels without considering underwater imaging models. For example, histogram equalization (HE) and contrast-limited adaptive histogram equalization (CLAHE) expand the contrast range by redistributing pixel grayscale values, thereby improving image sharpness. Furthermore, addressing the issue of blue-green hues and severe red channel attenuation in underwater images, Iqbal et al. developed an unsupervised color correction algorithm (UCM) that effectively enhances target saliency features and improves image quality by analyzing common saliency targets in the hue, saturation, and luminance (HSV) and red-green-blue (RGB) color spaces. Simultaneously, to address insufficient contrast and brightness in images, global histogram stretching and recursive processing are used, effectively improving image contrast and brightness compared to the global histogram stretching algorithm (RGHS). Considering the complex degradation characteristics of underwater images, fusion methods are gaining increasing attention in image enhancement. Among them, pixel-level fusion methods (Fusion) apply white balance and local adaptive histogram equalization techniques to fuse the corrected color image and the enhanced image. In the fusion process, four weight matrices are introduced, corresponding to Laplacian contrast, local contrast, saliency, and exposure, respectively. This ensures that pixels with higher weights are more prominent in the final enhanced image. Furthermore, an improved white balance method is proposed to correct color deviations caused by underwater lighting. Comprehensive experimental results show that the above method can simultaneously improve exposure in darker areas, global contrast, and image edge details. Unfortunately, model-free image enhancement algorithms perform poorly when dealing with complex problems, often requiring manual parameter adjustment, exhibiting poor robustness and adaptability, and being highly dependent on specific scenes.

[0006] (2) Underwater Image Restoration Method Based on Physical Model

[0007] Compared to the previously mentioned model-free image enhancement methods, physical model-based underwater image enhancement algorithms fully utilize the physical principles of underwater imaging, better addressing challenges such as color distortion, illumination issues, and scattering in underwater images, thus providing higher-quality enhancement results. Image restoration essentially involves inversely transforming the imaging model to restore or recover the potentially sharp image from the original scene. Addressing the unreliable red channel information in underwater images, the Underwater Dark Channel Prior (UDCP) method is unique in that it performs dark channel prior operations only on the green and blue channels. These channels are typically less affected by underwater absorption and scattering effects, thus enabling better extraction of dark channel information. Similarly, underwater light attenuation prior methods demonstrate that different colors of light exhibit different characteristics in terms of depth variation in underwater environments, allowing the estimation of scene depth information using the relationships between these color channels. However, applying color channel-based priors in underwater image enhancement under varying illumination and attenuation conditions may lead to enhancement ineffectiveness because the optical properties of the underwater environment introduce various complex coupling factors. To address this issue, researchers have thoroughly explored and utilized a variety of different prior information. Among these methods, the Maximum Intensity Prior (MIP) is used to estimate the transmission map. It identifies severely attenuated channels by comparing the maximum intensity differences between the red, green, and blue channels. By detecting these maximum intensity differences, MIP provides clues about illumination and attenuation, thus helping to estimate the transmission map more accurately and improve the quality of underwater images. The IBLA algorithm, based on the strong correlation between scene depth and the blurriness of degraded underwater images, aims to improve the sharpness and contrast of underwater images by comprehensively considering image blur and light absorption characteristics, thereby providing higher-quality underwater image enhancement. However, traditional physical model-based underwater image enhancement (UIE) frameworks still have the following drawbacks: 1) they require the estimation of a large number of parameters; 2) parameter estimation is often ill-posed; and 3) it is difficult to ensure the universal validity of predefined underwater imaging models.

[0008] (3) Data-driven image-to-image conversion method

[0009] With the continuous advancement of underwater imaging technology and the emergence of abundant underwater image data, deep learning-based methods have demonstrated tremendous potential in the field of underwater image processing. These methods are expected to overcome the inherent limitations of traditional physics-based methods, providing more efficient and accurate solutions for underwater image enhancement and restoration. Inspired by the classic Retinex image enhancement algorithm, Retinex-Net uses convolutional neural networks (CNNs) to learn global and local illumination information of images to improve the visibility of underwater images. Generative Adversarial Networks (GANs) have also been widely applied in underwater image enhancement. Various GAN-based methods, such as CycleGAN and UGAN (Underwater GAN), generate clearer and more realistic underwater images through adversarial training. To extract and fully utilize more discriminative features, the MDGAN (Multiscale Dense GAN) framework introduces a novel multi-scale dense block generator, organically cascaded dense connections, residual learning, and multi-scale network modules. Keypoint matching and edge detection experiments have fully demonstrated its effectiveness and superiority in underwater image enhancement tasks. By training on a dataset of simulated underwater scenes fused with aerial imagery and corresponding depth information, Li et al. successfully developed a two-stage Water-GAN framework, an algorithm designed to improve the quality and visibility of underwater images. Based on conditional generative adversarial networks, researchers constructed a fast underwater image augmentation method (FUnIEGAN) to improve visual perception in real time. However, existing underwater image augmentation algorithms, and their reliance on the quality and diversity of training data, struggle to provide interpretable physical augmentation mechanisms.

[0010] The underwater image enhancement technology in complex multi-domain scenarios has the following main defects: (1) The underwater image enhancement method by directly adjusting the pixel value cannot cope with all underwater degradation scenarios. The image enhancement method based on the underwater imaging model has problems such as inaccurate physical model description, difficulty in obtaining the transmission map, and difficulty in accurately estimating prior information; (2) In low light scenarios, underwater low-light images have mixed noise, which may amplify the noise during image enhancement, making it difficult to produce images that conform to human visual perception; (3) When a single network solves multiple degradation problems, the network has a large amount of computation and cannot specifically solve a certain degradation problem, which can easily lead to over-enhancement or under-enhancement of the generator. Summary of the Invention

[0011] To address the following issues, underwater image enhancement techniques in complex multi-domain scenarios suffer from the following main drawbacks: (1) Directly adjusting pixel values ​​to enhance underwater images cannot handle all underwater degradation scenarios. Image enhancement based on underwater imaging models suffers from inaccurate physical model descriptions, difficulty in obtaining transmission maps, and difficulty in accurately estimating prior information; (2) In low-light scenarios, underwater low-light images contain mixed noise, which may amplify the noise during image enhancement, making it difficult to generate images that conform to human visual perception; (3) When a single network solves multiple degradation problems, the network computation is large, and it cannot specifically address a particular degradation problem, which can easily lead to over-enhancement or under-enhancement by the generator.

[0012] The technical solution adopted in this invention is:

[0013] An underwater image progressive generative adversarial enhancement module based on channel-spatial attention includes the following steps:

[0014] Acquire underwater images to be processed;

[0015] The background light parameters of the underwater image to be processed are obtained based on the underwater degradation image background light estimation module;

[0016] The background light parameters are input into the underwater imaging model to obtain a pre-enhanced underwater image;

[0017] The pre-enhanced underwater image is input into the underwater degraded image enhancement network to obtain the enhanced underwater image;

[0018] The enhanced underwater image and the ground truth underwater image are input into the discriminator to obtain the difference between the enhanced underwater image and the ground truth underwater image;

[0019] The difference between the enhanced underwater image and the ground truth underwater image is used to optimize the discriminator through the total loss function, thereby narrowing the gap between the enhanced underwater degraded image and the ground truth underwater image. The result is then input into the underwater degraded image enhancement network to achieve the enhancement of the underwater image to be processed.

[0020] Furthermore: the underwater degraded image background light estimation module designs an imaging curve model suitable for underwater degraded images based on a haze formation model; the specific process is as follows:

[0021] Classic underwater imaging model I λ (x) is modeled as follows:

[0022] I λ (x)=J λ (x)·t λ (x)+B λ ·(1-t λ (x)),λ∈{R,G,B} (1)

[0023] Captured underwater images I λ (x) represents the weighted sum of the directly attenuated light and the scattered background light, where J λ (x) is the non-degraded image unaffected by underwater scattered light, B λ It is a uniform underwater background light, t λ (x)=e -βd(x) denoted by β, where β is the scattering coefficient, d(x) is the scene depth map, and λ is the red, green, and blue channels of the underwater image.

[0024] Underwater image restoration process J λ (x) is represented as:

[0025]

[0026] In other words, the key to underwater image restoration is estimating parameter B. λ and t λ (x), underwater curve model based on the principle of haze formation:

[0027]

[0028] Define αI λ (x)=(t λ (x)-1) / t λ (x), substituting into equation (3) yields formula (4).

[0029] UIE(x,λ)=I λ (x)+αI λ (x)(B λ -I λ (x)) (4)

[0030] Furthermore, the underwater degradation image background light estimation module is constructed by concatenating seven convolutional layers. Each convolutional layer contains 32 convolutional kernels of size 1 with a stride of 1. The first six convolutional layers are followed by a ReLU activation function, and the seventh convolutional layer is followed by a Tanh activation function. At the same time, the first, second, and third layers are skipped to the fourth, fifth, and sixth layers respectively. Each iteration generates two parameter mappings, and each iteration is performed on three channels separately.

[0031] Furthermore, the underwater degraded image enhancement network includes a generator network that follows the principles of U-Net and consists of an encoder-decoder network. The mirror convolutional layers of the encoder and decoder are connected by skip connections, and an underwater dual attention module is connected in series in each skip connection. The underwater dual attention module connects the channel attention module and the spatial attention module. In each layer, a 4×4 filter is used for 2D convolution, followed by a Leaky-ReLU nonlinear function and batch normalization.

[0032] Furthermore: the underwater dual attention module introduces channel attention and spatial attention into the convolutional neural network;

[0033] The underwater dual attention module includes a channel attention module and a spatial attention module;

[0034] The channel attention module is used to model the relationship between different channels of the input feature map. It learns the correlation between channels through global average pooling and fully connected layers, and generates a channel attention map. The channel attention map is applied to the input feature map to weight the features of different channels.

[0035] Channel attention formula C(X):

[0036] C(X)=σ{m[p avg (X)]+m[p max (X)]} (5)

[0037] Where: X is the input feature map, p avg and p max This represents average pooling and max pooling. m represents a shared fully connected layer, and σ is the sigmoid activation function.

[0038] The spatial attention module models the relationships between different spatial locations of the input feature map. It learns the spatial dependencies of the feature map using convolutional kernels and pooling operations of different scales, generating a spatial attention map. This spatial attention map is then applied to the input feature map to weight features at different locations. The spatial attention formula S(X) is:

[0039] S(X)=σ{ε 3×3 [m[p avg (X)];m[p max (X)]} (6)

[0040] Where: X is the input feature map, p avg and p max This represents average pooling and max pooling. m represents the shared fully connected layer, and ε... 3×3This represents a 3x3 convolution operation, where σ is the sigmoid activation function.

[0041] By combining the channel attention module and the spatial attention module, the formula F” of the underwater dual attention module is expressed as shown in equation (7).

[0042]

[0043] Furthermore, the construction process of the total loss function is as follows:

[0044] Total loss L total The total loss function is expressed as:

[0045] L total =W exp L exp +W spa L spa +W color L color +W crd L crd (8)

[0046] Among them: W exp W represents the weight of the underwater exposure control loss. spa The weights W representing the spatial consistency loss color W represents the weight of underwater color constancy loss. crd L represents the weight of the relative dispersion loss of underwater color. exp Indicates underwater exposure control loss, L color Indicates constant loss of color underwater, L crd L represents the relative dispersion loss of underwater color. spa This represents the spatial consistency loss;

[0047] Spatial consistency loss L spa By comparing the differences between the input image and the generated image, the generated image is made to maintain consistency and structural stability in its spatial structure.

[0048]

[0049] Where: M represents the number of local regions, σ(p) represents the four adjacent regions centered on region p, J and I represent the average intensity values ​​of local regions in the enhanced version and the input image, respectively, and (p,j) represents a pair of underwater image channels;

[0050] Underwater Exposure Control Loss L spa By calculating the difference between the brightness of local regions in an image and the ideal exposure level, exposure control loss is minimized, improving the exposure quality of the image and bringing local regions in the image closer to the ideal exposure level Y. iY i Set to grayscale level in RGB color space, loss L spa It is represented as:

[0051]

[0052] Where K represents the number of non-overlapping local regions of size 16×16, and J is the average intensity value of local regions in the enhanced image;

[0053] underwater color constant loss L color First, calculate the average color of the entire image, typically expressed as the average value in the RGB color space. Then, determine the color shift between the average color and neutral gray. Finally, apply the color shift to each pixel in the image to adjust the color so that the average color becomes neutral gray. Underwater color constancy loss L color Represented as:

[0054]

[0055] Where, μ i μ represents the average intensity value of channel i of the enhanced image, where (i,j) represents a pair of channels; R μ represents the average intensity value of the red channel in the enhanced image. G The average intensity value, μ, represents the green channel of the enhanced image. B This represents the average intensity value of the blue channel in the enhanced image;

[0056] underwater color relative dispersion loss L crd :

[0057] Calculate the standard deviation of the RGB channels, and express it as the standard deviation σ of the R channel. R The standard deviation σ of the G channel G The standard deviation σ of channel B B The definition of the relative dispersion of underwater color is as follows.

[0058]

[0059] This invention provides a progressive generative adversarial enhancement module for underwater images based on channel-spatial attention. Considering the complexity of underwater imaging modeling and the difficulty in accurately obtaining global atmospheric light values, transmission maps, and absorption and scattering coefficients, this invention proposes an underwater image enhancement framework based on generative adversarial networks, effectively avoiding the aforementioned problems. In real marine environments, the presence of a large amount of suspended matter and organic matter (including plankton, impurities, mineral particles, etc.) inevitably causes mixed noise. This invention designs an underwater background light estimation module, utilizing underwater imaging principles to better describe the degradation process of underwater images. Compared to traditional physical models, convolution is used to dynamically estimate prior information. An underwater dual attention module (UDAM) is introduced into the skip connection operation of the encoder and decoder to adaptively select and enhance key information in the image, avoiding amplification of underwater image noise. A loss function more suitable for underwater scenarios is designed for implicitly evaluating image quality. Underwater background light estimation and image enhancement are separated into two progressive tasks, allowing each module to focus more on a specific task and reducing the learning burden of complex tasks in a single network.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] 1. By designing an underwater background light estimation module, the degradation process of underwater images can be better described using the underwater imaging principle. Compared with the traditional physical model, convolution is used to achieve dynamic estimation of prior information.

[0062] 2. An underwater dual attention module (UDAM) is introduced into the skip connection operation of the codec to adaptively select and emphasize key information in the image, avoiding amplification of noise in the underwater image. 3. A loss function more suitable for underwater scenes is designed for implicitly evaluating image quality.

[0063] By separating underwater background light estimation and image enhancement into two progressive tasks, each module can focus more on a specific task, reducing the learning burden of complex tasks on a single network. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0065] Figure 1 A diagram of a deep learning-based underwater image enhancement network framework.

[0066] Figure 2 Underwater dual attention module diagram;

[0067] Figure 3 (a) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image I; (b) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image II; (c) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image III; (d) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image IV; (e) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image V.

[0068] Figure 4 (a) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image VI; (b) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image VII; (c) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image VIII; (d) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image IX; (e) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image X.

[0069] Figure 5 SIFT key point extraction qualitative comparison chart;

[0070] Figure 6 Harris corner detection qualitative comparison chart;

[0071] Figure 7 Qualitative comparison of Canny edge detection. Detailed Implementation

[0072] It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0073] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the present invention or its application or use. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0074] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0075] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following figures denote similar items; therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0076] In the description of this invention, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is generally based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this invention and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this invention. The directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.

[0077] For ease of description, spatial relative terms such as "above," "over," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figures to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation besides the orientation of the device as described in the figures. For example, if the device in the figures is inverted, a device described as "above" or "above" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and the spatial relative descriptions used herein will be interpreted accordingly.

[0078] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components is merely for the purpose of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore should not be construed as limiting the scope of protection of this invention.

[0079] An underwater image progressive generative adversarial enhancement module based on channel-spatial attention includes the following steps:

[0080] S1: Acquire the underwater image to be processed;

[0081] S2: Obtain the background light parameters of the underwater image to be processed based on the underwater degraded image background light estimation module;

[0082] The underwater degradation image background light estimation module utilizes underwater imaging principles to better describe the degradation process of underwater images. Compared with traditional physical models, it uses convolution to achieve dynamic estimation of prior information.

[0083] S3: The background light parameters are input into the underwater imaging model to obtain a pre-enhanced underwater image;

[0084] S4: The pre-enhanced underwater image is input into the underwater degraded image enhancement network to obtain the enhanced underwater image;

[0085] S5: Input the enhanced underwater image and the ground truth underwater image into the discriminator to obtain the difference between the enhanced underwater image and the ground truth underwater image;

[0086] S6: The difference between the enhanced underwater image and the ground truth underwater image is used to optimize the discriminator through the total loss function, thereby reducing the gap between the enhanced underwater degraded image and the ground truth underwater image. This value is then input into the underwater degraded image enhancement network to achieve the enhancement of the underwater image to be processed.

[0087] The steps S1 / S2 / S3 / S4 / S5 / S6 are executed sequentially;

[0088] A progressive generative adversarial network framework based on underwater multi-attention (UAPGAN)

[0089] like Figure 1 As shown, this application utilizes a fully connected lightweight neural network to estimate prior information about background light in low-light underwater images. The background light parameters are then incorporated into the underwater imaging model to achieve low-light underwater image preprocessing. Finally, by introducing a plug-and-play Underwater Dual Attention Module (UDAM) into the skip connection operation of the generator, this patent achieves adaptive selection and emphasis of useful information in the image. Furthermore, this application designs a carefully crafted underwater reference loss function for this network, which can also be used to implicitly evaluate image quality.

[0090] The underwater degraded image background light estimation module is designed based on a haze formation model to create an imaging curve model suitable for underwater degraded images; the specific process is as follows:

[0091] Inspired by curve adjustment models in photo editing software, this patent attempts to design an imaging curve model suitable for underwater degraded images based on a haze formation model. Classic underwater imaging model I λ (x) can be modeled as:

[0092] I λ (x)=J λ (x)·t λ (x)+B λ ·(1-t λ (x)),λ∈{R,G,B} (1)

[0093] Underwater images captured by the camera I λ (x) can be expressed as a weighted sum of directly attenuated light and scattered background light, where J λ (x) is the non-degraded image unaffected by underwater scattered light, B λ It is a uniform underwater background light, t λ (x)=e -βd(x) denoted by β, represents the remaining energy of the beam after passing through the medium, where β is the scattering coefficient and d(x) is the scene depth map.

[0094] Underwater image restoration process J λ (x) can be represented as:

[0095]

[0096] In other words, the key to underwater image restoration is estimating parameter B. λand t λ (x), the underwater curve model based on the principle of haze formation can:

[0097]

[0098] Define αI λ (x)=(t λ (x)-1) / t λ (x), substituting into equation (3) yields:

[0099] UIE(x,λ)=I λ (x)+αI λ (x)(B λ -I λ (x)) (4)

[0100] Formula (4) is the expression for the underwater imaging model;

[0101] From equation (4), it can be concluded that this application has transformed the image restoration problem into estimating parameters α and B. λ Therefore, in order to learn the relationship between the input image and its best-fit curve parameter mapping, the input is an underwater degraded optical image, the output is its corresponding pixel-level curve parameter mapping, and the background light of the underwater image is estimated empirically.

[0102] The underwater degraded image background light estimation module of this application concatenates seven convolutional layers. Each convolutional layer contains 32 kernels of size 3×3 with a stride of 1. The first six convolutional layers are followed by a ReLU activation function, and the seventh convolutional layer is followed by a Tanh activation function. Furthermore, layers 1, 2, and 3 are skip-connected to layers 4, 5, and 6 to incorporate features from shallow convolutional layers and obtain rich low-level information. Each iteration generates two parameter maps, and each iteration is performed on three channels separately. Notably, this underwater degraded image background light estimation module is suitable for input images of size 256×256×3. By pre-enhancing the original underwater degraded image, the computational burden of subsequent image enhancement is reduced.

[0103] Furthermore, the construction of the Underwater Degraded Image Enhancement Network (UDIE);

[0104] To achieve the optimal mapping from degraded underwater images to enhanced images, this application employs a generative adversarial network model based on an underwater multi-attention mechanism. In this model, the generator and the adversarial discriminator engage in continuous competition during the iterative training process. This adversarial training enables the generator to produce more realistic images.

[0105] like Figure 1As shown, the generator network of this application follows the principle of U-Net and consists of an encoder-decoder network (e1-e5, d1-d5). The mirror convolutional layers of the encoder and decoder are connected by skip connections (e.g., between e1 and d5, between e2 and d4, between e3 and d2, and between e4 and d4). At the same time, an underwater multi-attention module is connected in series in each skip connection to achieve adaptive selection and emphasis of key information in the image and avoid amplifying the noise of the underwater image.

[0106] This underwater dual-attention module concatenates a channel attention module with a spatial attention module, allowing the network to selectively emphasize or suppress feature information in each channel and different locations in the image. This means the network can better focus on information useful for the feature task, thereby improving feature quality and relevance. The use of such skip connections in generator networks has proven highly effective in image-to-image transformation and image quality enhancement tasks.

[0107] Detailed information about the underwater dual attention module will be provided in the next section. In the generator, this application chooses a simplified model with fewer parameters to achieve faster inference speed. The network accepts a 256×256×3 input, and the encoder (e1-e5) learns only 256 feature maps of size 8×8. The decoder (d1-d5) utilizes these feature maps and combines them with input from skip connections to generate a 256×256×3 enhanced image as output. Notably, the network is fully convolutional, therefore this application avoids using fully connected layers. In each layer, this application uses 4×4 filters for 2D convolution, followed by a Leaky-ReLU nonlinear function and batch normalization.

[0108] The Underwater Dual Attention Module (UDAM) is a plug-and-play attention module, such as... Figure 2 As shown, it achieves an adaptive selection and emphasis of useful information in an image by introducing channel attention and spatial attention into a convolutional neural network (CNN). This module consists of two sub-modules: a channel attention module and a spatial attention module.

[0109] The channel attention module models the relationships between different channels of the input feature map. It learns the correlations between channels through global average pooling and fully connected layers, generating a channel attention map. This channel attention map is applied to the input feature map to weight the features of different channels, thereby enhancing important channel features and suppressing unimportant channel features. The channel attention formula is C(X):

[0110] C(X)=σ{m[p avg (X)]+m[p max (X)]} (5)

[0111] Where: X is the input feature map, p avg and p max This represents average pooling and max pooling. m represents a shared fully connected layer, and σ is the sigmoid activation function.

[0112] The spatial attention module models the relationships between different spatial locations in the input feature map. It learns the spatial dependencies of the feature map using convolutional kernels and pooling operations of different scales, generating a spatial attention map. This spatial attention map is applied to the input feature map to weight features at different locations, thus highlighting important spatial locations and ignoring less important ones. The spatial attention formula S(X) is:

[0113] S(X)=σ{ε 3×3 [m[p avg (X)];m[p max (X)]} (6)

[0114] Where: X is the input feature map, p avg and p max This represents average pooling and max pooling. m represents the shared fully connected layer, and ε... 3×3 This represents a 3x3 convolution operation, where σ is the sigmoid activation function.

[0115] By combining the channel attention module and the spatial attention module, the UDAM module can be expressed as Equation 7. This module can adaptively select and emphasize useful information in the input feature map, thereby improving image recognition performance. As a plug-and-play module, UDAM can be directly embedded into our proposed network framework without reconstructing the entire network. It helps the network better understand the semantic information of images, improves the model's ability to perceive key features, and thus enhances the model's accuracy and robustness.

[0116]

[0117] The process of constructing the total loss function is as follows:

[0118] Spatial consistency loss L spa By comparing the differences between the input and generated images, the goal is to ensure that the generated images maintain consistency and structural stability in their spatial structure.

[0119]

[0120] Here, M represents the number of local regions, and σ(p) represents the four neighboring regions (top, bottom, left, and right) centered on region p. We use J and I to represent the average intensity values ​​of local regions in the enhanced version and the input image, respectively. It is important to emphasize that this loss remains stable even when considering other region sizes.

[0121] Underwater Exposure Control Loss L spa By calculating the difference between the brightness of local regions in an image and the ideal exposure level, the exposure control loss is minimized, thereby improving the exposure quality of the image and making local regions in the image closer to the ideal exposure level Y. i We will follow existing practices and include Y i Set to grayscale level in the RGB color space. Loss L spa It can be represented as:

[0122]

[0123] Where K represents the number of non-overlapping local regions of size 16×16, and J is the average intensity value of the local regions in the enhanced image.

[0124] underwater color constant loss L color In underwater image processing, severe color cast is a common problem. To address this issue, we employ an underwater color constancy loss method based on the gray-world assumption. This assumption states that while changes in lighting can cause overall color shifts in natural scenes, the average color (grayscale) of the entire world remains relatively constant in most cases. First, we calculate the average color of the entire image, typically expressed as the average value in the RGB color space. Then, we determine the color shift between the average color and neutral gray (i.e., [128, 128, 128]). Finally, we apply the color shift to each pixel in the image to adjust its color to match the average color, which is now neutral gray. The underwater color constancy loss method is described by L. color It can be represented as:

[0125]

[0126] Where, μ iThis represents the average intensity value of the i-th channel of the enhanced image, where (i,j) represents a pair of channels. The smaller the underwater color constancy loss, the closer the average values ​​of the RGB components are, and the closer the output image is to the real world.

[0127] underwater color relative dispersion loss L crd When discussing color deviation in images, we typically focus on differences in average brightness and color distribution. That is, we can understand color differences not only by comparing the differences in average brightness between different images, but also by comparing the differences in the standard deviation of their color distributions. Standard deviation measures the dispersion of pixel values ​​in an image, which is the degree of color difference. Therefore, if two images have different standard deviations in their RGB channels, their color differences will also differ accordingly. This patent calculates the standard deviations of the RGB channels, denoted as σ. R σ G σ B The definition of the relative dispersion of underwater color is as follows:

[0128]

[0129] The smaller the relative color dispersion loss underwater, the closer the pixel dispersion of the RGB components, and the more accurately the generated image can reproduce the color representation of the real world. In this case, the color changes of the three channels are relatively small, which better reflects the color characteristics of the real world, making the image more realistic and accurate.

[0130] Total loss L total The total loss function can be expressed as:

[0131] L total =W exp L exp +W spa L spa +W color L color +W crd L crd (12)

[0132] Among them: W exp W represents the weight of the underwater exposure control loss. spa The weights W representing the spatial consistency loss color W represents the weight of underwater color constancy loss. crd L represents the weight of the relative dispersion loss of underwater color. exp Indicates underwater exposure control loss, L color Indicates constant loss of color underwater, L crd L represents the relative dispersion loss of underwater color. spa This represents the loss of spatial consistency.

[0133] The total loss function is more suitable for underwater scenes; the loss function is used to implicitly evaluate image quality. Specific implementation examples:

[0135] 1. Dataset and Training Details

[0136] The training datasets used in this application include UIEBD-60 and UIEBD-90. We divided the datasets into training and testing sets for model training. UIEBD-60 contains 890 underwater images of different scenes, with 60 images being a challenging dataset independent of the 890. UIEBD-90 required manually selecting 90 challenging images from the 890 images as the test set, taking into account variations in underwater scenes and conditions, including depth, lighting, and water quality. The Adam optimizer was used for training, with 500 iterations and a batch size of 8. The images have a resolution of 256×256 and are RGB color images.

[0137] 2. Evaluation Indicators

[0138] Full-reference evaluation metrics include the Structural Similarity Index (SSIM) and Peak Signal-to-Noise Ratio (PSNR), while no-reference image quality evaluation metrics include Underwater Color Image Quality Assessment (UCIQE) and Underwater Image Quality Metric (UIQM). UIQM comprises three underwater image attribute measurements: chroma, sharpness, and contrast (i.e., UICM, UISM, and UIConM). These metrics are used to evaluate image quality. It is important to note that higher PSNR or SSIM indicates a greater similarity in content between the enhanced underwater image and the reference image. Simultaneously, higher UCIQE or UIQM suggests a greater consistency between the enhanced underwater image and the human visual perception system.

[0139] 3. Visual comparison

[0140] To demonstrate the effectiveness and superiority of the proposed UAPGAN framework in subjective visual perception, we comprehensively considered model-free augmentation methods such as CLAHE, ICM, and GC, classic color restoration methods based on physical models including DCP, IBLA, and ULAP, and data-driven inpainting methods such as UGAN, WaterNet, FUnieGAN, and Zero-Reference on the UIEBD-60 and UIEBD-90 datasets, and conducted a comprehensive comparison. Augmentation results for the UIEBD-90 dataset are shown below. Figure 3(a) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image I; (b) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image II; (c) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image III; (d) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image IV; (e) is a qualitative comparison of the enhancement results on the UIEBD-90 dataset for image V.

[0141] In summary, neither model-free restoration methods nor physically-based augmentation algorithms produce images with satisfactory visual quality. Compared to deep learning-based methods, the proposed UAPGAN scheme achieves optimal augmentation results based on subjective visual perception. Furthermore, as... Figure 3 As shown in (c), we can clearly observe that the images enhanced by CLAHE and GC did not remove the green tones, and although GC increased the image brightness, it also reduced the image contrast. From the figure, we can clearly see that the ICM algorithm, which iteratively modifies image contrast, effectively improves image contrast while maintaining the natural appearance of the image and avoids over-enhancement. However, it cannot effectively recover image colors for images under low light or artificial light sources. At the same time, we can clearly see that DCP, using prior information from the dark channel, performs poorly in recovering the true color and contrast of the image, as does IBLA. Figure 3 As shown in columns (c) and (e). Furthermore, from... Figure 3 In (b) and (e), we can see that ULAP introduces additional red light, and its optimization ability for underwater images is far inferior to the proposed UAPGAN scheme, despite using local adaptive enhancement techniques and Pareto optimization to improve image sharpness, contrast, and color. This indicates that prior information is not always applicable to different underwater environments, and the intermediate parameters involved cannot be accurately estimated. Although it is clear that UGAN and WaterNet have significant improvements in contrast and color compared to other enhancement results, there is still a certain gap in visual performance compared to the UAPGAN algorithm, such as... Figure 3 As shown in columns (a) and (b), the FUNIE-GAN method can appropriately improve the detail representation of images; however, it cannot correct color cast issues during this process. Zero-Reference, as a referenceless image enhancement method, can improve the low-light effect of underwater images, but its performance may be limited by underwater conditions and it cannot correct image colors, such as... Figure 3 As shown. Therefore, it is clear that compared to other methods, the UAPGAN algorithm designed in this paper has stronger generalization ability and can effectively solve the degradation of underwater images. Especially for blue and green tone images, such as Figure 3In columns (c) and (d), although the enhancements from UGAN and WaterNet can alleviate color casts compared to the original image, UPAGAN can more thoroughly remove color casts while preserving the most detail information of the original image.

[0142] Figure 4 (a) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image VI; (b) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image VII; (c) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image VIII; (d) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image IX; (e) is a qualitative comparison of the enhancement results on the UIEBD-60 dataset for image X.

[0143] The comparison chart of the UIEBD-60 dataset is from... Figure 4 As can be seen, while the CLAHE algorithm can effectively improve the brightness of underwater images, it cannot effectively correct the color shift caused by underwater light attenuation. Furthermore, from... Figure 4 In (b), it is evident that ICM and GC introduce additional red light, and the images processed by the two algorithms exhibit underexposure and overexposure, respectively. Clearly, the three restoration methods based on the physical model struggle to achieve satisfactory enhancement results. This also indicates that prior information is not always applicable to different underwater scenes, and the intermediate parameters involved cannot be accurately estimated. Compared to data-driven methods, the UAPGAN proposed in this patent achieves better enhancement results in subjective visual perception. Furthermore, thanks to the designed underwater background light estimation module, our proposed framework exhibits stronger restoration effects in low-light scenes, and the enhanced images more closely resemble images taken under good natural light conditions.

[0144] 4. Quantitative comparison

[0145] To demonstrate the effectiveness and superiority of the proposed UAPGAN framework from a quantitative comparative perspective, we compared it with model-free augmentation methods such as CLAHE, ICM, and GC, as well as physical model-based restoration methods including DCP, IBLA, and ULAP, and data-driven image inpainting methods such as UGAN, WaterNet, FUnIEGAN, and Zero-Reference. The results were compared on the UIEB-60 and UIEB-90 datasets and are presented in Tables 1 and 2.

[0146] Table 1

[0147]

[0148]

[0149] Table 2

[0150]

[0151] Regarding the objective evaluation of the UIEB-60 dataset, since the images in the UIEB-60 dataset are unreferenced, the table does not provide comparison results for fully referenced metrics under the UIEB-60 dataset. From Table 1, we can clearly see that the proposed UAPGAN framework can achieve optimal or near-optimal results in most metrics (optimal results are marked in bold, and near-optimal results are marked in underline).

[0152] It is worth noting that although a generative adversarial strategy is employed, without guidance from the CAM and SAM modules of the UDAM module, UGAN and FUnIE-GAN struggle to outperform the UAPGAN framework in overall performance. Furthermore, according to non-reference metrics, the proposed UAPGAN algorithm can enhance images with colors and richer details closer to the real world. Simultaneously, the designed UAPGAN scheme achieves a higher score on the UCIQE metric, indicating that the enhanced underwater image conforms to the human eye's perception system. Finally, based on UIQM scoring, the created UAPGAN framework can maintain a balance between contrast, brightness, and color saturation in underwater images.

[0153] Furthermore, regarding the objective evaluation of the UIEB-90 dataset, Table 2 clearly shows that the proposed UAPGAN framework achieves best or near-best performance in most metrics. We can clearly see that, except for UISM and UCIQE, the proposed UAPGAN scheme outperforms the UGAN, WaterNet, FUnIE-GAN, and Zero-Reference frameworks. Based on SSIM and PSNR, it is evident that the proposed UAPGAN framework achieves a higher peak signal-to-noise ratio and better structural similarity between the enhanced image and the reference image. It is worth noting that the UGAN and IBLA methods achieve superior sharpness and color accuracy, respectively.

[0154] 5. Feature Expression

[0155] To demonstrate that our proposed UAPGAN framework performs better in basic feature representation, we use SIFT, Harris, and Canny to extract keypoints, corner points, and pixel-level edges, respectively. Figure 5As shown, we can observe from the SIFT keypoint matching results that the SIFT algorithm cannot extract and match any keypoints on the original degraded underwater image. The fundamental reason is that factors such as light scattering, absorption, and refraction in the underwater environment cause image degradation, distortion, and reduced contrast and sharpness. However, through enhancement algorithms, such as model-free enhancement methods including CLAHE, UCM, and HE; physically-based restoration methods including IBLA and UDCP; and data-driven end-to-end image transformation algorithms including UGAN and FUnIE-GAN, the performance of keypoint extraction and matching can be significantly improved. Generally, images enhanced by CLAHE, UCM, and HE methods achieve better keypoint extraction and matching than those enhanced by IBLA and UDCP. This is mainly because they can improve image contrast, reduce noise, and preserve details without relying on specific prior knowledge. This makes them more suitable for various underwater scenarios and helps improve keypoint extraction and matching performance. Meanwhile, deep learning models typically rely on large-scale datasets for training; however, acquiring high-quality data in underwater environments can be relatively difficult, potentially posing challenges and mismatch issues. Clearly, the UAPGAN framework developed in this patent achieves better keypoint extraction and matching on augmented images, indicating that augmented images can better represent fundamental features.

[0156] In addition, to demonstrate the outstanding performance of the designed UAPGAN scheme in Harris corner detection, corresponding experiments were conducted, and the results are as follows: Figure 6 As shown in the figure, Harris corners are indicated by red hollow dots. From the figure, we can observe that more Harris corners can be detected on images enhanced by CLAHE, UCM, and HE compared to IBLA and UDCP. Without the guidance of the Channel Attention Module (CAM) and Spatial Attention Module (SAM), the UGAN and FUnIE-GAN frameworks are slightly inferior to our developed UAPGAN in their ability to reconstruct important features and structures. UAPGAN is able to detect more Harris corners, indicating that the differences between feature points on the enhanced image are effectively reduced.

[0157] Finally, we also verified the superiority of the UAPGAN scheme in image enhancement from the perspective of Canny edge detection. Figure 7As we can clearly see, the edge information in the initial degraded underwater image is very limited. It is certain that edge information can be detected much better in the underwater restored image after any enhancement algorithm. Furthermore, physical model-based image enhancement methods, including IBLA and UDCP, do not recover basic features well and do not significantly improve Canny edge detection performance. On the positive side, the image enhanced by the proposed UAPGAN framework can more comprehensively depict the edge information of underwater targets, demonstrating that the designed UAPGAN algorithm can enhance the basic feature information of the image compared to other methods.

[0158] Furthermore, this patent conducted quantitative comparative experiments on feature representation on the UIEBD-90 dataset, and the corresponding comparison results are summarized in Table 3, where the best and second-best results are marked with bold and underline, respectively. From the table, we can observe that enhancement, transformation, or end-to-end image inpainting algorithms all have positive effects on feature representation. Due to the influence of the underwater environment, the original underwater degraded images are not ideal in terms of feature representation. Additionally, the table shows that compared to physically based methods, model-free restoration methods, which redistribute pixel values ​​in the image to make the histogram more uniform, can better help highlight image details and features. Besides Harris corner detection, our designed UAPGAN framework performs well in SIFT keypoint and Canny edge detection, demonstrating that our algorithm has a significant advantage in basic feature recovery.

[0159] Table 3

[0160]

[0161] 6. Ablation Research

[0162] To reveal the contributions of the underwater background light estimation preprocessing module, UDAM, and the designed loss function to the performance of UAPGAN, this section organizes three additional ablation experiments based on UAPGAN. Specifically, the underwater background light estimation preprocessing module and UDAM are removed from UAPGAN, and the designed loss function is combined to evaluate the contributions of each module and function. The ablation experiments were conducted on the UIEBD-90 and UIEBD-60 datasets.

[0163] Table 4 shows the objective evaluation metrics of the ablation experiments conducted on the UIEBD-90 dataset for the relevant modules. As can be seen from the table, the underwater images generated by the network with both underwater background light estimation preprocessing module and UDAM achieve optimal or near-optimal scores on most metrics. The combination of background light estimation and attention feature representation yields the best SSIM and PSNR, indicating a high structural similarity and peak signal-to-noise ratio between the enhanced and reference images. Furthermore, according to UIQM and UCIQE metrics, the combination of background light estimation and embedded UDAM module ranks first in enhancement performance, meaning that the enhanced underwater image is more consistent with the human visual perception system. Similarly, the underwater background light prior module helps improve the sharpness and contrast characteristics of the enhanced underwater image. However, considering both reference and non-reference metrics, it can be seen that our proposed algorithm achieves a perfect balance between color vibrancy, sharpness, and contrast.

[0164] Table 4

[0165]

[0166] Next, Table 5 presents the contributions of the four loss functions to the optimal image restoration, with experiments conducted on the UIEBD-90 dataset. Clearly, the combination of underwater color constancy loss and exposure control loss yields the best results for underwater image color restoration. Furthermore, adding spatial structure loss further minimizes the impact of scattering and blurring on underwater images, improving image sharpness and mitigating blur effects. It is evident that the combination of our four losses achieves the best scores on PSNR and SSIM evaluation metrics, indicating that the enhanced image has higher structural similarity to the reference image and better visual quality. Overall, the results demonstrate that the combination of the four losses effectively contributes to the proposed UAPGAN, achieving optimal results in PSNR, SSIM, UIconM, UIQM, and UCIQE metrics.

[0167] Table 5

[0168]

[0169] Furthermore, to further reveal the contributions of the four loss modules, corresponding ablation experiments were conducted on the UIEBD-60 dataset. As summarized in Table 6, the best UICM performance is achieved when only the exposure control loss is applied, meaning that the color correction effect of the image is optimal. Specifically, this indicates that exposure control is effectively used to mitigate color distortion in underwater images. The UISM score is highest when combining the exposure control loss and spatial consistency loss, indicating that the blurring effect of the enhanced image is reduced, and the image becomes clearer. In addition to the two metrics mentioned above, the application of all four losses achieves the best scores among the considered metrics, demonstrating their effectiveness, and the resulting enhanced image is more consistent with human visual perception.

[0170] Table 6

[0171]

[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A progressive generative adversarial enhancement module for underwater images based on channel-spatial attention, characterized in that: Includes the following steps: Acquire underwater images to be processed; The background light parameters of the underwater image to be processed are obtained based on the underwater degradation image background light estimation module; The background light parameters are input into the underwater imaging model to obtain a pre-enhanced underwater image; The pre-enhanced underwater image is input into the underwater degraded image enhancement network to obtain the enhanced underwater image; The enhanced underwater image and the ground truth underwater image are input into the discriminator to obtain the difference between the enhanced underwater image and the ground truth underwater image; The difference between the enhanced underwater image and the ground truth underwater image is used to optimize the discriminator through the total loss function, thereby narrowing the gap between the enhanced underwater degraded image and the ground truth underwater image. The result is then input into the underwater degraded image enhancement network to achieve the enhancement of the underwater image to be processed. The underwater degraded image enhancement network includes a generator network that follows the principles of U-Net and consists of an encoder-decoder network. Skip connections are used between the mirrored convolutional layers of the encoder and decoder. An underwater dual-attention module is cascaded in each skip connection, connecting a channel attention module and a spatial attention module. At each layer, a... The filter is subjected to 2D convolution, then connected to a Leaky-ReLU nonlinear function and batch normalized; The underwater dual attention module introduces channel attention and spatial attention into the convolutional neural network; The underwater dual attention module includes a channel attention module and a spatial attention module; The channel attention module is used to model the relationship between different channels of the input feature map. It learns the correlation between channels through global average pooling and fully connected layers, and generates a channel attention map. The channel attention map is applied to the input feature map to weight the features of different channels. Channel attention formula : (5) Where: X is the input feature map, and This represents average pooling and max pooling, where m represents the shared fully connected layer. It is the sigmoid activation function; The spatial attention module models the relationships between different spatial locations in the input feature map. It learns the spatial dependencies of the feature map using convolutional kernels and pooling operations of different scales, generating a spatial attention map. This spatial attention map is then applied to the input feature map to weight features at different locations. The spatial attention formula is... for: (6) Where: X is the input feature map, and This represents average pooling and max pooling, where m represents the shared fully connected layer. Indicates 3 3. Convolution operation, It is the sigmoid activation function; The formula for underwater dual-attention modules is derived by combining channel attention modules and spatial attention modules. It is represented as shown in equation (7): (7)。 2. The underwater image progressive generative adversarial enhancement module based on channel-spatial attention according to claim 1, characterized in that: The underwater degraded image background light estimation module is designed based on a haze formation model to create an imaging curve model suitable for underwater degraded images; the specific process is as follows: Classic underwater imaging model The model is as follows: (1) Captured underwater images It is expressed as a weighted sum of directly attenuated light and scattered background light, where This is a non-degraded image unaffected by underwater scattered light. It is a uniform underwater background light. This indicates the percentage of energy remaining after the light beam passes through the medium. It is the scattering coefficient. It is a scene depth map. These are the red, green, and blue channels of underwater images; Underwater image restoration process Represented as: (2) In other words, the key to underwater image restoration is estimating parameters. and Underwater curve model based on the principle of smog formation: (3) definition Substituting into equation (3) yields equation (4); (4)。 3. The underwater image progressive generative adversarial enhancement module based on channel-spatial attention according to claim 1, characterized in that: The underwater degradation image background light estimation module is constructed by concatenating seven convolutional layers. Each convolutional layer contains 32 convolutional kernels of size 1 with a stride of 1. The first six convolutional layers are followed by a ReLU activation function, and the seventh convolutional layer is followed by a Tanh activation function. At the same time, the first, second, and third layers are skipped to the fourth, fifth, and sixth layers respectively. Each iteration generates two parameter mappings, and each iteration is performed on three channels separately.

4. The underwater image progressive generative adversarial enhancement module based on channel-spatial attention according to claim 1, characterized in that: The process of constructing the total loss function is as follows: Total loss The total loss function is expressed as: (8) in: This indicates the weight of the loss control during underwater exposure. Weights representing spatial consistency loss The weights representing the constant loss of color underwater. The weight representing the relative dispersion loss of underwater color. This indicates that underwater exposure controls the loss. This indicates the constant loss of color underwater. This indicates the relative dispersion and loss of color underwater. This represents the spatial consistency loss; Spatial consistency loss By comparing the differences between the input image and the generated image, the generated image is made to maintain consistency and structural stability in its spatial structure. (9) in: Represents the number of local areas. Representative by region The four adjacent areas centered on the center are used and These represent the average intensity values ​​of local regions in the enhanced version and the input image, respectively. Represents a pair of underwater image channels; Underwater Exposure Control Loss By calculating the difference between the brightness of local areas in an image and the ideal exposure level, exposure control loss is minimized, improving the exposure quality of the image and bringing local areas in the image closer to the ideal exposure level. ,Will Set to grayscale level in RGB color space, loss It is represented as: (10) in, The representative size is The number of non-overlapping local regions, It enhances the average intensity value of local regions in the image; underwater color constant loss First, calculate the average color of the entire image, typically expressed as the average value in the RGB color space. Then, determine the color shift between the average color and neutral gray. Finally, apply the color shift to each pixel in the image to adjust the color so that the average color becomes neutral gray. (Underwater color constancy loss) Represented as: (11) in, Indicates enhanced image The average intensity value of the channel, Indicates a pair of channels; This represents the average intensity value of the red channel in the enhanced image. This represents the average intensity value of the green channel in the enhanced image. This represents the average intensity value of the blue channel in the enhanced image; underwater color dispersion loss : Calculate the standard deviation of the RGB channels, and express the standard deviation of the red channel separately. Standard deviation of green channel Standard deviation of the blue channel The definition of the relative dispersion of underwater color is as follows: (12)。