A lightweight GAN underwater image enhancement model fused with attention mechanism

By using a lightweight GAN model in the underwater image enhancement model, combined with MobileNet and attention mechanism, the problems of image quality and inference speed in the prior art are solved, and more efficient underwater image enhancement effect is achieved.

CN115861094BActive Publication Date: 2025-08-29DALIAN UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202211465305.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-08-29
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

When dealing with different water bodies, existing underwater image enhancement models cannot improve image quality and reasoning speed at the same time, and there are problems of color distortion and blurred details.

Method used

A lightweight GAN model with a fusion attention mechanism is adopted, a VGG16 model is replaced by MobileNet as a feature extraction network, and a deep separable convolution and attention module is combined with PatchGAN discriminant network, and a combination of adversarial losses, global similarity losses and content losses are trained.

Benefits of technology

It improves the clarity and contrast of underwater images, reduces color distortion, enhances image detail information, and improves the model's inference speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861094B_ABST
    Figure CN115861094B_ABST
Patent Text Reader

Abstract

The present invention discloses a lightweight GAN underwater image enhancement model integrating an attention mechanism, comprising a generator network and a discriminator network; the generator network comprises an encoder and a decoder, the encoder comprises a depthwise separable convolution module and an attention module, and the decoder comprises multiple upsampling convolution modules; the discriminator network acquires images through a Markov discriminator PatchGAN. The model has excellent effects in processing synthetic underwater images and real underwater images, and can better correct color cast and contrast to ensure that detail information is not lost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater image enhancement, and in particular to a lightweight GAN underwater image enhancement model integrating an attention mechanism. Background Art

[0002] The ocean contains a wealth of valuable information resources, and securely and reliably acquiring them is essential, as they are crucial for studying marine life and exploring for resources. However, unlike on land, the underwater environment is complex, and visible light can experience absorption and scattering underwater. This can cause color casts and blurred details in captured underwater information, such as videos and images. These issues can severely impact subsequent underwater target tracking and detection. Therefore, improving underwater image quality and eliminating blurred details are crucial.

[0003] Commonly used image enhancement methods can be divided into physical and non-physical methods based on the imaging model. For underwater image enhancement, physical models are based on optical principles and are primarily used for denoising and color correction, such as dark channel priors (DCPs) and underwater DCPs. Accurate restoration of underwater images depends on the model's prior knowledge, but this prior knowledge is often less robust across different underwater scenes, leading to severe estimation biases. Furthermore, basic parameters such as underwater depth and light propagation coefficients are difficult to obtain. Non-physical models do not consider the physical degradation mechanisms of underwater images; instead, they enhance the image by modifying specific pixel values ​​in the degraded image. Specific enhancement methods include histogram sliding stretching and multi-scale fusion. These methods do not rely on physical imaging models, and therefore are often insufficient to restore original scene features, especially color features.

[0004] Because deep learning can achieve end-to-end modeling of complex nonlinear systems, it can improve perceived image quality and achieve compelling results in low-level vision tasks such as denoising, deblurring, perceptual enhancement, and contrast adjustment. Consequently, a growing number of researchers are applying deep learning to underwater image enhancement methods. In particular, with the rapid development of generative adversarial networks (GANs) in recent years, a growing number of non-physical models have been applied to underwater image enhancement. Jie Li et al. proposed an unsupervised generative adversarial network (Water-GAN) that can correct underwater color casts in monocular images while maintaining real-time performance. Fabbri et al. proposed the UGAN (underwater GAN) algorithm based on the GAN model, suitable for underwater scenes. Addressing the lack of underwater image datasets, they used CycleGAN to augment the dataset, effectively improving the contrast and clarity of underwater images. Islam et al. proposed the FUnIE-GAN model, a real-time underwater image enhancement model that uses a loss function to evaluate image quality based on overall image content, detailed style, style, and local texture information. Zhang et al. improved on the original generative adversarial network by introducing a gradient loss to sharpen image edges to avoid blurring image details. While this model improved image clarity, it also suffered from color distortion when dealing with color casts. Hambarde et al. proposed an end-to-end underwater generative adversarial network (UW-GAN), which can perform clear depth prediction for a single underwater image and a method for generating synthetic underwater images for large-scale databases.

[0005] However, the aforementioned GAN-based model, which directly learns the mapping from degraded images to clear images, is unable to simultaneously enhance underwater image quality and improve the network model's inference speed for different water conditions. The aforementioned UW-GAN network model uses the VGG16 model as an encoder within the U-Net framework's generated network. While this yields good image enhancement results, the model has a large number of parameters and a slow inference speed. The FUnIE-GAN network model can enhance underwater images in real time and has a fast inference speed, but its performance in different water conditions is poor. For example, complex color casts can result in over- or under-enhancement, reducing the model's robustness. Summary of the Invention

[0006] To address the problems of underwater images such as low contrast resulting in blurred image details, color distortion resulting in blue or green images, and slow inference speed of existing network models, the present invention provides a lightweight GAN underwater image enhancement model that integrates an attention mechanism.

[0007] To achieve the above objectives, this application proposes a lightweight GAN underwater image enhancement model that integrates an attention mechanism, including a generation network and a discriminant network; the generation network includes an encoder and a decoder, the encoder includes a depth-separable convolution module and an attention module, and the decoder includes multiple upsampling convolution modules; the discriminant network obtains images through a Markov discriminator PatchGAN.

[0008] Furthermore, the depthwise separable convolution module is composed of depthwise convolution (DW) and pointwise convolution (PW).

[0009] Furthermore, the encoder includes 5 depth-wise separable convolution modules, in each of which the image features are first extracted using a depth-wise convolution with a convolution kernel size of 3×3 and a stride of 2, and then the number of channels is adjusted using a convolution with a convolution kernel size of 1×1.

[0010] Furthermore, the depthwise convolution with a convolution kernel size of 3×3 and the convolution with a convolution kernel size of 1×1 are both connected to normalized BN and ReLU activation functions.

[0011] Furthermore, the depthwise separable convolution module is connected to an attention module CBAM, and the attention module CBAM includes a channel attention module CAM and a spatial attention module SAM.

[0012] Furthermore, the input image is first subjected to feature extraction by a depthwise separable convolution module, and then input into a channel attention module CAM to obtain a weight distribution map of the input features, which displays the important features in the input image; finally, it is input into a spatial attention module SAM to obtain the positions of important features.

[0013] Furthermore, the decoder includes 5 upsampling convolution modules, the first 4 of which use 3×3 filters and a convolution layer with a step size of 2; each convolution layer is followed by a normalized BN and ReLU activation function; the fifth upsampling convolution module converts the feature map into a 256×256×3 image output.

[0014] Furthermore, the first four layers of the discriminant network use 3×3 convolution layers and perform a 2x downsampling operation. A BN layer and a Leaky ReLU activation layer are added after each convolution layer. The fifth layer adds a Tanh activation layer after the convolution layer. The five convolution layers are used to convert the input image of 256×256×6 (real image and generated image) into an output image of 16×16×1, and finally a matrix of size 16×16 is obtained. Each element in the matrix represents a receptive field in the input image, which can better capture the local features of the image, such as local texture and detailed form.

[0015] As a further step, the three loss functions of adversarial loss, global similarity loss, and content loss are combined to train the model. The loss function used is defined as follows:

[0016]

[0017] Among them, L WGAN To counter the loss function; is the global similarity loss function; L con is the content loss function; λ1 and λ2 are weight factors used to balance various loss functions.

[0018] As a further step, the adversarial loss function is expressed as:

[0019]

[0020] in, To generate samples on the straight line between the corresponding points of the image and the target image, is the weight of the gradient penalty, λ GP is 10;

[0021] The global similarity loss function is:

[0022]

[0023] The content loss function is:

[0024]

[0025] in, Represents the extracted high-level features; x, y represent the input original underwater image and the training set target image respectively; G, D represent the generation network and the adversarial network respectively.

[0026] The above technical solutions adopted by the present invention offer the following advantages over existing technologies: The underwater image enhancement model of the present invention uses PatchGAN as the discriminant network. The generative network, based on the FUnIE-GAN model, uses MobileNet to replace the VGG16 model, which has a large number of parameters, in the original U-Net feature extraction network to extract underwater degraded image features. This reduces the number of network model parameters and improves the network model's inference speed. An attention mechanism is also incorporated into the feature extraction module to enhance underwater images. This model is highly effective in processing both synthetic and real underwater images. It can also better correct color casts and contrast, ensuring that detailed information is not lost. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 Schematic diagram of the image enhancement model structure, a is the generation network, b is the discrimination network;

[0028] Figure 2 It is a depth-separable convolution structure diagram;

[0029] Figure 3 This is the structure diagram of the attention module CBAM;

[0030] Figure 4 Comparison chart of the loss function training process;

[0031] Figure 5 A comparison chart of the processing results of different methods;

[0032] Figure 6 The comparison chart of the results with and without the CBAM module;

[0033] Figure 7 The following is a comparison of the details with and without the CBAM module. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. That is, the embodiments described are only part of the embodiments of this application, not all of them.

[0035] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present application.

[0036] This application proposes a lightweight GAN model. Based on the FUnIE-GAN model, the generative network uses MobileNet to replace the original U-Net generative network's heavily parameterized VGG16 model, reducing the number of model parameters and addressing the issue of slow generative network inference speed. Compared to other models, the inference speed is 1.2 to 3 times faster. To ensure that the model network focuses more on spatial and channel information in areas with greater water influence, a channel and spatial attention mechanism is introduced into the feature extraction module, achieving the goal of removing color noise and enhancing image detail in underwater images.

[0037] like Figure 1 As shown in the figure, a lightweight GAN underwater image enhancement model that integrates an attention mechanism includes a generator network and a discriminator network. The generator network includes an encoder and a decoder. The encoder includes a depthwise separable convolution module and an attention module, and the decoder includes multiple upsampling convolution modules. The encoder output is used as the decoder input to enhance feature learning. This connection method can reduce information loss caused by the model during downsampling. The discriminator network acquires images through the Markov discriminator PatchGAN.

[0038] like Figure 1 As shown in the left diagram, the encoder uses depthwise separable convolution to replace the original convolution module as the feature extraction network in the generation network based on the characteristics of the lightweight MobileNet model with small size and high accuracy. The depthwise separable convolution module is composed of depthwise convolution (DW) and pointwise convolution (PW); as the basic component of MobileNet, its basic structure is as follows Figure 2 shown.

[0039] The encoder includes five depth-wise separable convolutional modules, such as Figure 2 As shown in Figure 1, each module first uses a depthwise convolution with a kernel size of 3×3 and a stride of 2 to extract image features, and then uses a convolution with a kernel size of 1×1 to adjust the number of channels. The depthwise convolution with a kernel size of 3×3 and the convolution with a kernel size of 1×1 are followed by normalized BN and ReLU activation functions. The depthwise separable convolution module is followed by an attention module CBAM, as shown in Figure 1. Figure 3As shown in Figure 1, the attention module (CBAM) consists of a channel attention module (CAM) and a spatial attention module (SAM). The input image is first subjected to feature extraction via a depthwise separable convolution module before being fed into the channel attention module (CAM). This generates a weight distribution map of the input features, which indicates which information in the input image is important. The spatial attention module (SAM) focuses on where information in the input features is more important. The combination of these two attention mechanisms enhances the network's learning capabilities.

[0040] The decoder includes five upsampling convolution modules. The first four upsampling convolution modules use 3×3 filters and convolution layers with a step size of 2. Normalized BN and ReLU activation functions are connected after each convolution layer. The fifth upsampling convolution module converts the feature map into a 256×256×3 image output.

[0041] like Figure 1 As shown in the right view, the discriminant network of the present invention uses a Markov discriminator (PatchGAN). Unlike conventional discriminators, its input is the ground truth and the generated image, and the output is a feature matrix of size 16×16 instead of numbers. This is equivalent to dividing the input image into different small blocks, thereby improving the discrimination accuracy. The operation of dividing the image into small blocks can also help the model obtain more detailed information during the training process. In the discriminant network, the first four layers use 3×3 convolution layers and perform 2x downsampling operations. A BN layer and a Leaky ReLU activation layer are added after each convolution layer. The fifth layer adds a Tanh activation layer after the convolution layer. The five convolution layers are used to convert the input image of 256×256×6 (real image and generated image) into an output image of 16×16×1, and finally a matrix of size 16×16 is obtained. Each element in the matrix represents a receptive field in the input image, which can better capture the local features of the image, such as local texture and detail form.

[0042] In order to better restore the visual effect of the image while preserving the detailed features as much as possible, the present invention combines three loss functions: adversarial loss, global similarity loss, and content loss to train the model. The loss function of the present invention is defined as follows:

[0043]

[0044] Among them, L WGAN To counter the loss function; is the global similarity loss function; L con is the content loss function; λ1 and λ2 are weight factors used to balance the various loss functions, where λ1 = 0.7 and λ2 = 0.3.

[0045] Traditional GANs are optimized based on JS (Jensen Shannon divergence) and KL (Kullback Leibler divergence). However, under this optimization, network loss training is very unstable, which can lead to problems such as gradient vanishing, which can cause model training to crash. Therefore, this paper uses WGAN with gradient penalty (WGAN-GP), and the adversarial loss function is expressed as:

[0046]

[0047] in, To generate samples on the straight line between the corresponding points of the image and the target image, is the weight of the gradient penalty, λ GP is 10.

[0048] Since L1 loss is not easy to introduce blur, the present invention uses the L1 distance between the output image of the generative network and the target image to optimize the generative network G, so that the output of G can maintain the consistency of image information with the training set reference data. It is defined as follows:

[0049] L L1 =E[||yG(x)||1]

[0050] To make the generated images more realistic and improve the visual quality of the enhanced images, we add content loss to the objective function and use perceptual distance as the form of content loss. We introduce the VGG19 pre-trained network and construct the content loss by extracting the high-level features of the output of the third convolutional layer before the fourth max pooling. The content loss is defined as follows:

[0051]

[0052] in, Represents the extracted high-level features; G, D represent the generative network and the adversarial network, respectively; x, y represent the input original underwater image and the training set target image, respectively.

[0053] This paper implements the proposed method based on the Pytorch deep learning framework. The experimental CPU is a 12th Gen Intel(R) Core(TM) i5-12500H 3.10GHz, and the GPU is an NVIDIA GeForce RTX3050Ti. The model is trained using the Adam optimizer, with a batch size of 8 and an initial learning rate of 0.01. A total of 150 epochs are used, with the learning rate multiplied by 0.5 every 30 epochs. The global similarity loss weight coefficient λ1 is 0.7, and the content loss weight coefficient λ2 is 0.3. The effectiveness of the proposed model is verified by using the EUVP underwater public dataset, which contains over 12,000 pairs of underwater images and their corresponding clear ground images. 7,000 of these pairs are selected as the training set, and the remaining images are used as test data. The proposed model is compared with traditional models and deep learning models in terms of subjective and objective aspects. The experimental results show that the proposed model is more effective in underwater image enhancement under complex conditions.

[0054] Based on the training process and results, this paper conducts combined training and testing of the CBAM module and the depthwise separable convolution module in the U-Net framework encoder. The underwater image quality metric (UIQM) and inference speed (average runtime per image on a single GPU) are selected. Table 1 shows various combinations of the CBAM module and the downsampling convolution module, where F1-F4 represent the first to fourth convolution modules, respectively. After training, the results are evaluated using the same test set on the EUVP dataset.

[0055] As can be seen from Table 1, adding a CBAM module after each convolution module is comparable to adding a CBAM module separately after each convolution module in terms of model inference speed, but the present invention is significantly better than other combinations in processing test images.

[0056] Table 1 Comparison of single-layer convolutional module and CBAM combination results

[0057]

[0058] Table 2 shows the test and evaluation results of the combination of a two-layer upsampling convolutional module and CBAM. As can be seen from Table 2, adding CBAM after two layers of convolutional modules performs significantly better than adding CBAM after only one layer of convolutional modules, but the model's inference speed is also relatively slower.

[0059] Table 2 Comparison of the results of the two-layer convolution module and CBAM combination

[0060]

[0061] Table 3 shows the test evaluation results of the combination of three-layer convolutional modules and CBAM. As can be seen from Table 3, the test results of the combination of three-layer convolutional modules and CBAM are getting better and better than the combination of two layers.

[0062] Table 3 Comparison of the results of the three-layer convolution module and CBAM combination

[0063]

[0064] In summary, adding CBAM after the first three convolutional layers yields a UIQM value close to that of adding CBAM to each convolutional layer, compared to adding CBAM to each layer. Furthermore, the inference speed is faster. Therefore, the present invention can also use the first three convolutional layers and the CBAM module as the encoder structure for the generative network.

[0065] The present invention performs combined training and analysis on the loss function based on the training process and results. Figure 4 It is a comparison chart of each loss function combination during the training process. Among them, L all is a combination of three loss functions, is a combination of adversarial loss function and global similarity loss function, L WGAN+C It is a combination of content loss and adversarial loss; n represents the number of training iterations, and loss is the value of the training loss function.

[0066] from Figure 4 As can be seen in (a), when training using only the adversarial loss function, the amplitude of the fluctuation is large, the convergence process is unstable, and many cycles are required. In contrast, the training process of the present invention using the three combined functions is more stable and the degree of discreteness is smaller. Figure 4 As can be seen from (b), L all curve, The curve performance is similar and the loss function value is significantly lower than L WGAN+C curve. However, as the number of iterations increases, After the curve converged, there was a small fluctuation. all The curve compared to The curve is more stable. In summary, the present invention uses a combination of three loss functions to achieve better and more stable performance. In addition, the evaluation indicators of the present invention are selected as peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). Table 4 shows the test evaluation results on the EUVP dataset after the model training is completed. It can be seen from Table 4 that the three loss function combinations are obviously better than other loss function combinations.

[0067] Table 4 Comparison of evaluation indicators of different loss function combinations

[0068]

[0069] In order to verify the effectiveness of the model of the present invention on real underwater images, the test data of the present invention is 150 underwater images. Figure 7 The figure shows the comparison of the effect pictures on different models. The traditional models for comparison include underwater dark channel prior (UDCP), underwater image restoration based on image blur (IBLA), and underwater image restoration based on fast scene depth estimation model (ULAP); the deep learning models for comparison include underwater image enhancement network based on adversarial network (UGAN), generative model based on residual network (Deep SESR), and fast underwater image enhancement based on GAN network (FUnIE-GAN). Figure 5 (a) is a real underwater image. Figure 5 (b)- Figure 5 (h) The processed results of UDCP, IBLA, ULAP, UGAN, Deep-SESR, FUnIE-GAN, and the proposed method. It can be seen that the processing results of the proposed model are closer to the real image than those of other models, eliminating the color cast caused by the water in underwater images. The processed images have higher contrast and clarity, and more vivid colors.

[0070] In order to more objectively analyze and evaluate the performance of the proposed model, the underwater image quality measurement UIQM and the natural image evaluation index NIQE are used as evaluation indicators. UIQM is composed of three evaluation indicators: underwater image color measurement UICM, underwater image clarity measurement UISM, and underwater image contrast measurement UIconM. The larger the value of UIQM, the higher the image quality. Its calculation formula is:

[0071] UIQM=c1×UICM+c2×UISM+c3×UIconM

[0072] Among them, set c1 = 0.0282, c2 = 0.2953, c3 = 3.5753.

[0073] NIQE does not need to be trained using distorted images scored subjectively by the human eye. Compared with traditional evaluation indicators PNSR and SSIM, NIQE can more effectively reflect the quality of image reconstruction. The smaller the value of the NIQE indicator, the higher the image quality. Its formula is:

[0074]

[0075] Among them, v1 and v2 represent the mean vectors of the natural multivariate Gaussian model and the multivariate Gaussian model of the distorted image, respectively; ∑1 and ∑2 represent the covariance matrices of the natural MVG model and the distorted image MVG model, respectively.

[0076] Table 5 shows the UIQM results for images processed in various ways. As can be seen, after enhancement using the invented model, most results achieve the best performance. Compared to the average of the six comparison models, UIQM is significantly improved, and compared to the FUnIE-GAN algorithm, UIQM is improved by approximately 0.21.

[0077] Table 5 Comparison of UIQM evaluation indicators of different methods

[0078]

[0079] Table 6 shows the results of the NIQE evaluation metric for images processed by various methods. It can be seen that compared with other methods, the average NIQE value is significantly lower than the NIQE values ​​of other models, and compared with the FUnIE-GAN algorithm, the NIQE is reduced by about 0.65.

[0080] Table 6 Comparison of NIQE evaluation indicators of different methods

[0081]

[0082]

[0083] In summary, based on the comparison of the results of various algorithms on the no-reference image quality evaluation indicators UIQM and NIQE, it is proved that the algorithm of the present invention can better restore underwater images and solve problems such as color cast.

[0084] In order to further verify the contribution of the improvements of the present invention to the algorithm performance, detailed ablation experiments were carried out to verify the effectiveness of the attention mechanism module (CBAM) and the lightweight feature extraction module. The results were analyzed through control experiments with and without the CBAM module and with and without the attention mechanism module. Figure 7 The comparison of underwater image processing results with and without the CBAM module is shown.

[0085] from Figure 6 It can be observed that the underwater images processed by the CBAM module have higher contrast and higher clarity than those processed without the CBAM module. As can be seen from the second figure, the CBAM module can better handle the green cast problem caused by the influence of water bodies. As can be seen from the first and fifth figures, the images processed without the CBAM module will produce color compensation oversaturation problems, and the images processed with the CBAM module are closer to the real images on the ground, and the processing effect is better. The present invention calculates the UIQM evaluation index of these 5 groups of test images, and the experimental results are shown in Table 7. The UIQM of the images processed with the CBAM attention module is significantly higher than that without the attention mechanism module.

[0086] Table 7 Comparison of UIQM / NIQE evaluation index results with and without CBAM module

[0087]

[0088] Figure 7 The results are a comparison of image details processed with and without the CBAM attention module. Figure 7 (a) is the result without CBAM module processing, Figure 7 (b) is the result of processing with the CBAM module. As can be seen from the figure, the image processed with the CBAM module is clearer in terms of details.

[0089] To verify the effectiveness of the lightweight feature extraction module, we estimated the runtime of each model. Deep-SESR, UGAN, and FUnIE-GAN are based on deep learning models. The results are shown in Table 8. These results show the time required to process a 256×256 image on a CPU. It can be seen that while our model is not the fastest, its processing time is comparable to that of FUnIE-GAN.

[0090] Table 8 Comparison of running time of different methods (s)

[0091]

[0092] The foregoing descriptions of specific exemplary embodiments of the present invention are for purposes of illustration and description. These descriptions are not intended to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been selected and described for the purpose of explaining the specific principles of the invention and their practical application, thereby enabling those skilled in the art to realize and utilize a variety of exemplary embodiments of the invention and various options and modifications. The scope of the invention is intended to be defined by the claims and their equivalents.

Claims

1. A lightweight GAN underwater image enhancement method integrating an attention mechanism, comprising a generator network and a discriminator network; the generator network comprises an encoder and a decoder, characterized in that: The encoder includes a depth-separable convolution module and an attention module, and the decoder includes multiple upsampling convolution modules; the discriminant network acquires images through the Markov discriminator PatchGAN; The encoder includes five depthwise separable convolution modules. In each module, a depthwise convolution with a kernel size of 3×3 and a stride of 2 is first used to extract image features, and then a convolution with a kernel size of 1×1 is used to adjust the number of channels. The depth-wise separable convolution module is followed by an attention module CBAM, which includes a channel attention module CAM and a spatial attention module SAM; The decoder includes five upsampling convolution modules. The first four upsampling convolution modules use 3×3 filters and a convolution layer with a stride of 2. Each convolution layer is followed by a normalized batch normalization and a ReLU activation function. The fifth upsampling convolution module converts the feature map into a 256×256×3 image output. The first four layers of the discriminant network use 3×3 convolutional layers and perform a 2x downsampling operation. A batch normalization layer and a leaky ReLU activation layer are added after each convolutional layer. The fifth layer adds a Tanh activation layer after the convolutional layer. The five convolutional layers are used to convert the 256×256×6 input image into a 16×16×1 output image, and finally a 16×16 matrix is ​​obtained. Each element in the matrix represents a receptive field in the input image. During training, the following loss functions are jointly optimized: WGAN adversarial loss based on gradient penalty, global similarity loss, and content loss with perceptual distance as the core.

2. The lightweight GAN underwater image enhancement method integrating the attention mechanism according to claim 1 is characterized in that: The depth-wise separable convolution module is composed of depth-wise convolution and point-wise convolution.

3. The lightweight GAN underwater image enhancement method integrating the attention mechanism according to claim 1 is characterized in that: The depth convolution with a convolution kernel size of 3×3 and the convolution with a convolution kernel size of 1×1 are both connected to the normalized BN and ReLU activation functions.

4. The lightweight GAN underwater image enhancement method integrating the attention mechanism according to claim 1 is characterized in that: The input image is first subjected to feature extraction by a depthwise separable convolution module, and then input into a channel attention module (CAM) to obtain a weight distribution map of the input features, which displays the important features in the input image; finally, it is input into a spatial attention module (SAM) to obtain the locations of important features.

5. The lightweight GAN underwater image enhancement method integrating attention mechanism according to claim 1 is characterized in that: The three loss functions of adversarial loss, global similarity loss, and content loss are combined to train the network. The loss function used is defined as follows: Among them, L WGAN To counter the loss function; is the global similarity loss function; L con is the content loss function; λ1 and λ2 are weight factors used to balance various loss functions.

6. The lightweight GAN underwater image enhancement method integrating the attention mechanism according to claim 5 is characterized in that: The adversarial loss function is expressed as: in, To generate samples on the straight line between the corresponding points of the image and the target image, is the weight of the gradient penalty, λ GP is 10; The global similarity loss function is: The content loss function is: in, Represents the extracted high-level features; x, y represent the input original underwater image and the training set target image respectively; G, D represent the generation network and the adversarial network respectively.

Citation Information

Cited By

  • Underwater image enhancement method based on improved ARLTGAN model

    CN121563777A

  • An underwater image enhancement method based on an improved ARLTGAN model

    CN121563777B