Underwater image enhancement method based on contrast-aware loss

By constructing an end-to-end network based on contrast perception loss, combined with attenuation map guidance and feature attention, the problems of color cast and low contrast in underwater image enhancement are solved, achieving richer detail information and natural color representation, and improving the visibility of underwater images.

CN116402721BActive Publication Date: 2026-03-10DALIAN MARITIME UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-15
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing deep learning-based underwater image enhancement methods have limitations in addressing issues such as color cast, low contrast, and blurred details, failing to fully utilize negative information in degraded images and resulting in poor enhancement effects.

Method used

An underwater image enhancement method based on contrast perception loss is adopted. By constructing an end-to-end network, combining attenuation map-guided channel separation feature extraction and feature attention-based autoencoder module, the method utilizes attenuation map information and channel and pixel attention, combined with local color consistency loss and contrast perception loss for training, thereby improving the visibility and detail information of the image.

Benefits of technology

It effectively improves the visibility and detail of underwater images, enhances the natural color representation of images, overcomes the limitations of existing methods, and improves image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402721B_ABST
    Figure CN116402721B_ABST
Patent Text Reader

Abstract

This invention discloses an underwater image enhancement method based on contrast-aware loss, comprising the following steps: establishing an image training set and a test set; obtaining the underwater target image to be optimized and a reference image from the training set; constructing an end-to-end underwater image enhancement network for enhancing the target image to be optimized; training the end-to-end underwater image enhancement network based on a loss function to obtain a trained end-to-end underwater image enhancement network; inputting images from the test set into the trained end-to-end underwater image enhancement network to test the training results, thereby achieving underwater image enhancement. This invention can effectively improve the visibility of underwater images, giving them richer detail information and more natural color representation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underwater image processing, and more particularly to a contrast-aware method for underwater image enhancement processing. Background Technology

[0002] Underwater optical images often suffer from defects such as fogging, color aberration, low contrast, and blurred details. Low-quality underwater images are difficult to apply directly to underwater engineering. With the development and maturation of computer vision, researchers have proposed a series of enhancement methods specifically for underwater images. The main research objective is to improve the visual quality of underwater images, making the processed images more consistent with human visual perception and better meeting the needs of machine recognition. Existing underwater image enhancement methods can be divided into three main categories: physical model-based restoration methods, non-physical model-based enhancement methods, and data-driven learning methods.

[0003] Physically based algorithms primarily estimate parameters of underwater physical image models by introducing prior knowledge. Non-physically based methods improve image quality by adjusting pixel values. However, both the physical priors introduced by physically based algorithms and the pixel adjustment strategies employed by non-physically based algorithms have narrow applicability and are difficult to apply to a wide variety of underwater environments. With the rapid development of deep learning networks in image processing, existing deep learning-based underwater image enhancement methods have achieved considerable success, and many powerful models for underwater image enhancement have emerged, such as the Waternet and Ucolor models based on convolutional neural networks, and the UWGAN model based on generative adversarial networks. However, these methods only use reference images as positive samples to guide network training, failing to utilize the negative information contained in degraded images. Insufficient constraint information affects the enhancement effect.

[0004] To overcome the limitations of existing methods and solve problems such as color cast, low contrast, and blurred details in underwater images, this invention proposes an underwater image enhancement method based on contrast perception loss, which can effectively improve the visibility of underwater images, giving them richer detail information and more natural color representation. Summary of the Invention

[0005] To overcome the limitations of existing deep learning-based underwater image enhancement methods, such as color cast, low contrast, and blurred details in underwater images, this invention employs the following technical means:

[0006] An underwater image enhancement method based on contrast-aware loss includes the following steps:

[0007] Establish image training and testing sets; obtain underwater target images to be optimized and reference images from the training set;

[0008] Construct an end-to-end underwater image enhancement network for image enhancement of the target image to be optimized;

[0009] Based on the loss function, the end-to-end underwater image enhancement network is trained to obtain the trained end-to-end underwater image enhancement network.

[0010] The images in the test set are input into the trained end-to-end underwater image enhancement network to test the training results and achieve underwater image enhancement.

[0011] Furthermore, the end-to-end underwater image enhancement network comprises two parts: a channel-separated feature extraction module guided by attenuation map and an autoencoder module based on feature attention.

[0012] The attenuation map-guided channel separation feature extraction module employs a channel separation strategy during feature extraction and incorporates attenuation map information.

[0013] The feature-attention-based autoencoder module constructs a network based on channel attention and pixel attention mechanisms;

[0014] The attenuation map-guided channel-separated feature extraction module and the feature attention-based autoencoder module are connected sequentially.

[0015] Furthermore, the image training and test sets are selected from real underwater datasets, UIEB and RUIE, which have different scattering intensities and color attenuation levels and cover a large number of different underwater scenes.

[0016] Furthermore: the channel-separated feature extraction module comprises two parts: a channel-separated three-branch structure guided by the attenuation map and a fusion module;

[0017] The branches of the channel-separated three-branch structure correspond to the R, G, and B color channels of the input original image, with each channel image and its corresponding attenuation map as input.

[0018] Each branch consists of a convolution-activation structure containing a 3×3 convolution and a PReLU() activation function. The feature maps obtained from the three branches are then concatenated and input into a feature fusion module consisting of two concatenated convolution-activation structures.

[0019] The attenuation diagram is obtained using the following formula:

[0020] AM c =1-(I c ) γ (1)

[0021] Where I is the original input image, c∈{R,G,B} represents the color channels of the image, and γ is an adjustable parameter, which is set to 1.2;

[0022] The entire channel-separated feature extraction module is represented as follows:

[0023]

[0024] Where f represents the feature map during the forward propagation of the network, the superscript c∈{R,G,B} indicates the branch it belongs to, and the subscript number indicates the different stages of forward propagation; C(·) represents the feature map concatenation operation in the channel dimension; P(·) represents the PReLU activation function; Conv 3×3 (·) indicates a convolutional layer with a kernel size of 3×3; I cc This is the initial color-corrected image.

[0025] Furthermore, the autoencoder module consists of a downsampling layer submodule, six FA modules, and an upsampling layer cascaded together, and outputs an enhanced result image.

[0026] The downsampling layer first performs a symmetrical filling operation on the input color-corrected image, and then performs preliminary information integration on it through a 7×7 convolution.

[0027] Next, two convolutional layers with a stride of 2 (3×3) are used to compress the spatial size of the input features while doubling the channel dimension. After two convolutions, the size of the input feature map changes from C×H×W to...

[0028] The calculation process of the entire downsampling module is expressed as follows:

[0029]

[0030] Among them, I cc This represents the input of the module, Pad(·) represents the symmetric padding operation, R(·) represents the ReLU activation function, the meaning of the symbol Conv is consistent with the previous text, and X3 is the feature obtained after the downsampling layer;

[0031] The FA module is divided into three parts. The first part consists of two 3×3 convolutional layers and a ReLU() activation function to extract basic feature information Y1. The second part is a channel attention module, and the third part is a pixel attention module.

[0032] The channel attention module first calculates the weights of each channel using a global average pooling layer, two 3×3 convolutional layers, a ReLU activation function, and a Sigmoid activation function.

[0033] Finally, the channel weights are multiplied pixel-by-pixel with the original base features to obtain the key feature Y3:

[0034]

[0035] Y2 represents the channel weights obtained after global average pooling, H and W represent the height and width of the input feature Y1, and i and j represent the position coordinates. CA is the output of the channel attention module, and S(·) represents the sigmoid function.

[0036] The pixel attention module calculates pixel attention weights using two 3×3 convolutional layers and ReLU() and Sigmoid activation functions. Finally, the pixel attention weights PA are multiplied pixel by pixel by the feature map Y3 to obtain the feature output Z1 of the entire FA module.

[0037] PA = S(Conv) 3×3 (R(Conv 3×3 (Y3))))

[0038]

[0039] Network propagation is achieved between the six FA modules via skip connections, as shown below:

[0040]

[0041] Z6 = FA(Z3 + Z5) where FA(·) is the operation process of the feature attention module, X3 is the output of the downsampling module described above, and Z1 to Z6 are the feature maps output by the six FA modules respectively.

[0042] Finally, deconvolution is used to upsample the feature map, gradually restoring the feature map in the low-resolution space to the original size of the image. This process is the inverse of the downsampling module.

[0043]

[0044] Where Dconv(·) is the deconvolution operation, Tanh(·) is the hyperbolic tangent activation function, U1 and U2 are the intermediate features of the upsampling process, and Output is the final output of the entire end-to-end underwater image enhancement network model.

[0045] Furthermore: the loss function consists of local color consistency loss. Classic L1 loss and contrast-perceptual loss function It is composed of linear combinations, as follows:

[0046]

[0047] Furthermore, the contrastive perception loss function The mathematical expression is:

[0048]

[0049] Where A, P, and N represent the network output image, reference image, and original image, respectively, and Triplet is the triplet distance metric function in the feature space, whose expression is as follows:

[0050]

[0051] Where m represents the total number of elements in the feature map, and α and β are hyperparameters used to balance the contributions of the two distance metrics. The final contrastive perceptual loss is obtained by weighted summing of Triplet(A,P,N) at five different model depths, with ω1 to ω5 taking values ​​of 1 / 32, 1 / 16, 1 / 8, 1 / 4, and 1, respectively.

[0052] An underwater image enhancement device based on contrast perception loss includes:

[0053] Establishment module: used to establish image training and testing sets, and to obtain underwater target images to be optimized and reference images from the training set;

[0054] Building blocks: Used to build an end-to-end underwater image enhancement network for enhancing the target image to be optimized;

[0055] Training module: Used to train the end-to-end underwater image enhancement network based on the loss function, so as to obtain the trained end-to-end underwater image enhancement network;

[0056] Implementation module: Used to input images from the test set into the trained end-to-end underwater image enhancement network, test the training results, and achieve underwater image enhancement.

[0057] Compared with existing underwater image enhancement methods, this invention proposes an underwater image enhancement method based on contrast perception loss, which can effectively improve the visibility of underwater images, giving them richer detail information and more natural color representation. It also utilizes the negative information contained in degraded images, adds constraint information, and overcomes the limitations of existing methods. Attached Figure Description

[0058] 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.

[0059] Figure 1 This is a flowchart of the present invention;

[0060] Figure 2 This is a structural diagram of a channel-separated feature extraction module guided by attenuation map;

[0061] Figure 3 It is a feature fusion module structure diagram consisting of two concatenated convolutional-activation structures;

[0062] Figure 4 This is a block diagram of an autoencoder module based on feature attention;

[0063] Figure 5 This is the FA module structure diagram;

[0064] Figure 6 This is a diagram illustrating the loss of contrast perception;

[0065] Figure 7 (a) is a comparison chart of the present invention with other model-based methods on the RUIE dataset; (b) is a comparison chart of the present invention with deep learning-based methods on the RUIE dataset. Detailed Implementation

[0066] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0067] This invention can effectively improve the visibility of underwater images, giving them richer detail and more natural color representation.

[0068] An underwater image enhancement method based on contrast-aware loss includes the following steps:

[0069] S1 establishes image training and testing sets; obtains underwater target images to be optimized and reference images from the training set;

[0070] S2: Construct an end-to-end underwater image enhancement network for image enhancement of the target image to be optimized;

[0071] S3: Based on the loss function, train the end-to-end underwater image enhancement network to obtain the trained end-to-end underwater image enhancement network;

[0072] S4: Input the images from the test set into the trained end-to-end underwater image enhancement network, test the training results, and achieve underwater image enhancement.

[0073] Steps S1 / S2 / S3 / S4 are executed sequentially;

[0074] Furthermore, the establishment of the image training set and test set, and the selection of images from the image training set as target images to be optimized, are as follows:

[0075] Images were selected from the UIEB and RUIE datasets, which contain a wide variety of underwater scenes with different scattering intensities and color attenuation levels, to construct the training and testing sets for the proposed network model. The training set consists of 800 pairs of images randomly selected from 890 pairs of underwater images in the UIEB dataset; the testing set consists of the remaining 150 images in the UIEB dataset and 500 images randomly selected from the UCCS and UIQS subsets of the RUIE dataset.

[0076] like Figure 1 As shown, the end-to-end underwater image enhancement network includes:

[0077] To address the issues of color cast and low contrast in underwater images, a two-stage, end-to-end underwater image enhancement network model is proposed, which consists of two parts: a channel-separated feature extraction module guided by attenuation map and an autoencoder module based on feature attention.

[0078] The former employs a channel separation strategy during model feature extraction and introduces attenuation map information, enabling it to more accurately perceive light attenuation and thus improve the color correction effect of underwater images. The latter builds a network model based on channel attention and pixel attention mechanisms, which can effectively improve the model's feature mining ability and generalization performance.

[0079] The channel-separated feature extraction module and the autoencoder module are connected sequentially.

[0080] Images are selected from the underwater dataset to construct the training and testing sets for the network model proposed in this invention.

[0081] The channel-separated feature extraction module consists of two parts: a channel-separated three-branch structure guided by attenuation maps and a fusion module, such as... Figure 2 As shown.

[0082] The three-branch structure's branches correspond to the R, G, and B color channels of the original input image, respectively, using each channel's image and its corresponding attenuation map as input. Each branch consists of a convolutional-activation structure containing a 3×3 convolution and a PReLU() activation function. The feature maps obtained from the three branches are then concatenated and input into a feature fusion module composed of two cascaded convolutional-activation structures, such as... Figure 3 As shown, the output of the first part of the network model is obtained.

[0083] The attenuation diagram is obtained using the following formula:

[0084] AM c =1-(I c ) γ (1)

[0085] Where I is the original input image, c∈{R,G,B} represents the color channels of the image, and γ is an adjustable parameter, which is set to 1.2.

[0086] The entire channel-separated feature extraction module is represented as follows:

[0087]

[0088]

[0089] Where f represents the feature map during the forward propagation of the network, the superscript c∈{R,G,B} indicates the branch it belongs to, and the subscript number indicates the different stages of forward propagation; C(·) represents the feature map concatenation operation in the channel dimension; P(·) represents the PReLU activation function; Conv 3×3 (·) indicates a convolutional layer with a kernel size of 3×3; I cc This is the initial color-corrected image.

[0090] The feature attention-based autoencoder module consists of a cascaded downsampling layer, six feature-addressing (FA) modules, and an upsampling layer, and outputs an enhanced image, such as... Figure 4 As shown.

[0091] The downsampling layer first performs symmetrical padding on the input color-corrected image, then performs preliminary information integration using a 7×7 convolution. Next, two convolutional layers with strides of 2 (3×3) are used to compress the spatial size of the input features while doubling the channel dimension. After these two convolutions, the size of the input feature map changes from C×H×W to... The calculation process of the entire downsampling module is expressed as follows:

[0092]

[0093] Among them, Icc This represents the input of the module. Pad(·) represents the symmetric padding operation, R(·) represents the ReLU activation function, the meaning of the symbol Conv is consistent with the previous text, and X3 is the feature obtained after the downsampling layer.

[0094] The FA module is divided into three parts. The first part consists of two 3×3 convolutional layers and a ReLU() activation function to extract basic feature information Y1. The second part is a channel attention module, and the third part is a pixel attention module.

[0095] The second part is a channel attention module. First, it calculates the weights of each channel using a global average pooling layer, two 3×3 convolutional layers, a ReLU activation function, and a Sigmoid activation function. Finally, it multiplies the obtained channel weights pixel-by-pixel with the original base features, such as... Figure 5 As shown, the key feature Y3 is obtained:

[0096]

[0097] Y2 represents the channel weights obtained after global average pooling, H and W represent the height and width of the input feature Y1, and i and j represent the position coordinates. CA is the output of the channel attention module, and S(·) represents the sigmoid function.

[0098] The pixel attention module calculates pixel attention weights using two FA 3×3 convolutional layers and ReLU() and Sigmoid activation functions. Finally, the pixel attention weights PA are multiplied pixel by pixel with the feature map Y3 to obtain the feature output Z1 of the entire FA module.

[0099] PA = S(Conv) 3×3 (R(Conv 3×3 (Y3)))) (5)

[0100]

[0101] Network propagation is achieved between the six FA modules via skip connections, as shown below:

[0102]

[0103] Z6 = FA(Z3 + Z5), where FA(·) represents the operation process of the feature attention module. X3 is the output of the downsampling module described above, and Z1 to Z6 are the feature maps output by the six FA modules, respectively.

[0104] Finally, deconvolution is used to upsample the feature map, gradually restoring the feature map in the low-resolution space to the original size of the image. This process is the inverse of the downsampling module.

[0105]

[0106] Where Dconv(·) is the deconvolution operation, Tanh(·) is the hyperbolic tangent activation function, U1 and U2 are the intermediate features of the upsampling process, and Output is the final output of the entire network model.

[0107] The loss function consists of local color consistency loss. Classic L1 loss and contrast-perceptual loss function It is composed of linear combinations.

[0108]

[0109] In this method, the contrastive perceptual loss treats the original degraded image as a negative sample, the reference image as a positive sample, and the network output as an anchor point. The original image, reference image, and network output are all used as inputs to the loss function. An abstract feature extraction process is performed on the three images using a VGG-19 pre-trained model. The L1 distance D(A,N) between the network output and the original image, and the L1 distance D(A,P) between the network output and the reference image are calculated within feature spaces at different levels of abstraction. The contrastive perceptual loss aims to achieve a smaller D(A,P) while simultaneously achieving a larger D(A,N), thereby simulating the "pull" behavior of positive samples and the "push" behavior of negative samples within the feature space. Its specific mathematical expression is as follows:

[0110]

[0111] Where A, P, and N represent the network output image, reference image, and original image, respectively, and Triplet is the triplet distance metric function in the feature space, whose expression is as follows:

[0112]

[0113] Where m represents the total number of elements in the feature map, and α and β are hyperparameters used to balance the contributions of the two distance metrics. Finally, the Triplet(A,P,N) at five different model depths are weighted and summed to obtain the final contrastive perceptual loss, with ω1 to ω5 taking values ​​of 1 / 32, 1 / 16, 1 / 8, 1 / 4, and 1, respectively.

[0114] Compared with existing underwater image enhancement methods, this invention proposes an underwater image enhancement method based on contrast perception loss, which can effectively improve the visibility of underwater images, giving them richer detail information and more natural color representation. It also utilizes the negative information contained in degraded images, adds constraint information, and overcomes the limitations of existing methods.

[0115] An underwater image enhancement device based on contrast perception loss, comprising:

[0116] Establishment module: used to establish image training and testing sets, and to obtain underwater target images to be optimized and reference images from the training set;

[0117] Building blocks: Used to build an end-to-end underwater image enhancement network for enhancing the target image to be optimized;

[0118] Training module: Used to train the end-to-end underwater image enhancement network based on the loss function, so as to obtain the trained end-to-end underwater image enhancement network;

[0119] Implementation module: Used to input images from the test set into the trained end-to-end underwater image enhancement network, test the training results, and achieve underwater image enhancement.

[0120] All experiments in this invention were performed on the same device, which used an Intel Core i5-10400F CPU@2.90GHz and an Nvidia GTX 2060 GPU. The network model encoding was based on the PyTorch framework. During training, the input image size was adjusted to 256×256×3, while the image size remained unchanged during testing. The batch size during training was 8, the learning rate was 0.0001, the training epochs were 200, the loss function was the sum of the three factors mentioned above, and the Adam optimizer was used for training.

[0121] Nine underwater image enhancement methods were selected as comparison methods for comparative experiments. The comparison methods included traditional enhancement methods (UDCP, GDCP, ULAP, Retinex-based, HLRP) and learning-based methods (FUnIE, UGAN, UWCNN, Ucolor).

[0122] Figure 6 The diagram shows the enhancement results of our invention compared to nine other methods on the RUIE dataset. In comparison, our method outperforms the other methods in both contrast enhancement and color correction.

[0123] 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. An underwater image enhancement method based on contrast perception loss, characterized in that: The method comprises the following steps: An image training set and a test set are established; an underwater target image to be optimized and a reference image are obtained from the training set; An end-to-end underwater image enhancement network for image enhancement of the underwater target image to be optimized is constructed; The end-to-end underwater image enhancement network is trained based on a loss function, and a trained end-to-end underwater image enhancement network is obtained; The images in the test set are input into the trained end-to-end underwater image enhancement network, the training result is tested, and the underwater image is enhanced. The loss function is composed of a local color consistency loss , a classical LI loss , and a contrastive perceptual loss function , specifically as follows: (8) Further, the contrastive perceptual loss function is mathematically expressed as: (9) Wherein A, P, N represent the network output image, the reference image and the original image respectively, and Triplet is a three-tuple distance measurement function in a feature space, and its expression is as follows: (10) wherein: m represents the total number of elements contained in the feature map, and is a hyperparameter used to balance the contribution of the two distance measures; The Triplet (A, P, N) under five different model depths are weighted and added to obtain a final contrast perception loss, The values of the five different model depths are 1 / 32, 1 / 16, 1 / 8, 1 / 4 and 1 respectively.

2. The underwater image enhancement method based on contrast perception loss according to claim 1, characterized in that: The end-to-end underwater image enhancement network comprises a channel separation feature extraction module guided by an attenuation map and an automatic encoder module based on feature attention; The channel separation feature extraction module guided by the attenuation map adopts a channel separation strategy in the feature extraction process and introduces attenuation map information; The automatic encoder module based on feature attention constructs a network based on channel attention and pixel attention mechanisms; The channel separation feature extraction module guided by the attenuation map and the automatic encoder module based on feature attention are sequentially connected.

3. The underwater image enhancement method based on contrast perception loss of claim 1, wherein, The image training set and the test set are established by selecting images from two real underwater data sets, UIEB and RUIE, which have different scattering intensities, color attenuation levels and cover a large number of different underwater scenes.

4. The underwater image enhancement method based on contrast perception loss of claim 2, wherein, The channel separation feature extraction module comprises a channel separation three-branch structure guided by an attenuation map and a fusion module; The branches of the channel separation three-branch structure correspond to the R, G and B color channels of the input original image respectively, and each channel image and its corresponding attenuation map are input; Each branch is composed of a convolutional layer convolution, a convolution-activation structure of an activation function, and then the feature maps obtained by the three branches are spliced and input into a feature fusion module composed of two convolution-activation structures in cascade. Wherein the attenuation map is obtained according to the following formula: (1) wherein, is the original input image, denotes the color channels of the image, is an adjustable parameter, which is set to 1.2; The entire channel separation feature extraction module is expressed as follows: (2) wherein, denotes the feature map in the network forward propagation process, the upper subscript denotes the branch to which it belongs, and the lower subscript number denotes different stages of forward propagation; denotes the feature map splicing operation in the channel dimension; denotes an activation function; denotes a convolutional layer with a convolution kernel size of ; is a color corrected image obtained initially.

5. The underwater image enhancement method based on contrast perception loss of claim 2, wherein, The automatic encoder module is composed of a down-sampling layer sub-module, six FA modules and an up-sampling layer, and outputs an enhanced result image; Wherein: the down-sampling layer firstly performs symmetric padding operation on the input color correction image, and then performs preliminary information integration on it through the convolution of ​ Next, we will use two steps with a step size of 2. Convolutional layers achieve spatial compression of the input features while expanding them to twice their original size in the channel dimension; after two convolutions, the size of the input feature map is reduced from... Change to ; The calculation process of the entire down-sampling module is expressed as follows: (3) wherein, denotes an input to the module, denotes a symmetric padding operation, denotes an activation function, the notation has the same meaning as before, is a feature obtained after a down-sampling layer; The The module is divided into three parts, the first part is composed of two Convolutional layers, Activation functions, which extract basic feature information ; The second part is a channel attention module, and the third part is a pixel attention module; The channel attention module first calculates the weight of each channel through a global average pooling layer, two convolution layers, activation functions and activation functions. Finally, the channel weight is pixel-wise multiplied with the original base feature to obtain the key feature : (4) for using the channel weights obtained after global average pooling, and denotes the input feature of height and width, and denotes the position coordinate, is the output of the channel attention module, denotes the function, The pixel attention module calculates pixel attention weights through two convolutional layers and , an activation function. Finally, the pixel attention weights are multiplied pixel by pixel with the feature map to obtain the feature output of the entire module : (5) In 6 Network propagation between modules occurs through a hopping connection, the specific connection is shown as follows: (6) wherein, is the operation process of the characteristic attention module, is the output of the downsampling module described above, are respectively 6 feature maps output by the module Finally, the feature map is up-sampled by deconvolution to gradually restore the feature map in the low-resolution space to the original size of the image, which is the inverse process of the down-sampling module: (7) wherein, is a deconvolution operation, is a hyperbolic tangent activation function, and is an intermediate feature of the up-sampling process, is the final output result of the entire end-to-end underwater image enhancement network model.

6. An underwater image enhancement device based on contrast perception loss, characterized in that: It comprises: The establishment module is used to establish an image training set and a test set, and to obtain an underwater target image to be optimized and a reference image from the training set; The construction module is used to construct an end-to-end underwater image enhancement network for image enhancement of the underwater target image to be optimized; The training module is used to train the end-to-end underwater image enhancement network based on a loss function, and obtain a trained end-to-end underwater image enhancement network; The loss function is composed of a local color consistency loss , a classical LI loss , and a contrastive perceptual loss function in a linear combination, specifically as follows: (8) Further, the contrastive perceptual loss function is mathematically expressed as: (9) Wherein A, P, N represent the network output image, the reference image and the original image respectively, and Triplet is a three-tuple distance measurement function in a feature space, and its expression is as follows: (10) wherein: m represents the total number of elements contained in the feature map, and is a hyperparameter used to balance the contribution of the two distance measures; The Triplet (A, P, N) under five different model depths are weighted and added to obtain a final contrast perception loss, The values of the five different model depths are 1 / 32, 1 / 16, 1 / 8, 1 / 4 and 1, respectively. The implementation module is used to input the images in the test set into the trained end-to-end underwater image enhancement network, test the training result, and enhance the underwater image.

Citation Information

Patent Citations

  • Screening system based on mobile equipment

    CN111652850A

  • No-reference low-illumination image enhancement method based on local scene perception

    CN115205160A