An underwater image enhancement method based on semi-supervised learning

Through semi-supervised learning and aggregation attention mechanism, the generation and integration of pseudo-label images are solved, the problem of insufficient underwater image quality is achieved, and more efficient image enhancement effect is achieved, and clarity and quality are improved.

CN118351283BActive Publication Date: 2024-12-06BEIJING UNION UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410446969.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2024-12-06
Estimated Expiration
2044-04-15

AI Technical Summary

Technical Problem

Underwater images have poor quality due to factors such as light attenuation and suspended particles, and there are problems of blur, color deviation and insufficient contrast. It is difficult for the existing technology to effectively improve image clarity and quality.

Method used

The semi-supervised learning method is used to generate pseudo-label images, integrate global and local features through the aggregate attention mechanism, combine pseudo-label images for color correction and image enhancement, and output high-quality underwater images.

Benefits of technology

It effectively improves the clarity and quality of underwater images, simulates the global information extraction capability of Vision Transformer, and retains the local feature extraction capability of the convolutional network, reduces the demand for model parameters and computing resources, and significantly improves the enhancement effect of underwater images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118351283B_ABST
    Figure CN118351283B_ABST
Patent Text Reader

Abstract

The present invention discloses an underwater image enhancement method based on semi-supervised learning, the method comprising: based on the use of semi-supervised learning to evaluate the quality of unlabeled underwater images, generate pseudo-label images; color correct the pseudo-label images to obtain pre-processed images; input the pre-processed images into a converged attention mechanism to extract global features and local features of the underwater images; input the global features and the local features into an attention fusion mechanism for integration to obtain an integrated image, thereby achieving an image enhancement image of the underwater image. The present invention can effectively simulate the advantages of Vision Transformer in extracting global information, while retaining the ability of convolution in extracting local features. While reducing the model parameters and computing resource requirements, it retains the ability to comprehensively capture global and local features, and can improve the underwater image enhancement effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of semi-supervised learning, and in particular to an underwater image enhancement method based on semi-supervised learning. Background Art

[0002] As a huge treasure trove of resources on the earth, the potential of the ocean has not been fully tapped. Compared with land resources, the development and research of marine resources are still in the initial stage. The ocean contains resources that are extremely critical to the progress of human civilization, including oil, natural gas, and rich fishery resources. However, the complexity and constant changes in the marine environment have brought major challenges to the exploration and utilization of resources. At this time, underwater image enhancement technology is particularly important. It can more accurately depict the distribution of marine resources, evaluate the possibility and difficulty of their development, and provide a scientific basis for formulating development plans and determining the scope of operations. However, due to factors such as light attenuation and suspended particles in the underwater environment, the underwater images collected are often of poor quality, with problems such as blur, color deviation and insufficient contrast, which require the use of advanced technology to solve.

[0003] Underwater image enhancement technology mainly improves image quality by improving image clarity, reducing color distortion and enhancing image contrast, which helps to better observe and analyze underwater scenes and improve the execution efficiency of computer vision tasks. Traditional image enhancement technology often uses methods such as convolutional neural networks (CNN) and generative adversarial networks (GAN), which mainly focus on extracting local features of images. Some recent studies have begun to explore the introduction of visual attention mechanisms to capture the global information of images in order to obtain better enhancement results. The present invention uses a semi-supervised learning method to train the model, and proposes an improved Unet architecture that integrates an aggregate attention mechanism (AGG Attention) to effectively extract global and local features of underwater images, improve clarity and quality, thereby achieving better and effective underwater image enhancement effects. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides an underwater image enhancement method based on semi-supervised learning, the method comprising:

[0005] Generate pseudo-labeled images based on quality assessment of unlabeled underwater images using semi-supervised learning;

[0006] Performing color correction on the pseudo-label image to obtain a preprocessed image;

[0007] The preprocessed image is input into the aggregation attention mechanism to extract the global and local features of the underwater image;

[0008] The global features and the local features are input into an attention fusion mechanism for integration to obtain an integrated image, thereby achieving an image enhancement image of the underwater image.

[0009] Optionally, based on the quality assessment of the unlabeled underwater image using semi-supervised learning, the process of generating the pseudo-labeled image specifically includes:

[0010] Training a semi-supervised underwater image restoration model based on labeled underwater images;

[0011] The unlabeled underwater images are input into the trained semi-supervised underwater image restoration model to generate pseudo-labeled images.

[0012] Optionally, inputting the unlabeled underwater image into the trained semi-supervised underwater image restoration model to generate a pseudo-labeled image further includes:

[0013] Using URanker as a pseudo benchmark truth value, evaluating the pseudo-labeled image;

[0014] According to the evaluation results, pseudo-label images are selected and stored in the Reliable Bank.

[0015] Optionally, the process of performing color correction on the pseudo-label image to obtain a preprocessed image specifically includes:

[0016] The pseudo-label image stored in the reliable bank is corrected for blue and green hue deviations through local adaptive color correction.

[0017] Optionally, the correction of blue and green hue deviations by local adaptive color correction specifically includes:

[0018] Generate a color transfer map from the pseudo-label image based on the principle of minimum color loss;

[0019] The maximum attenuation map guided fusion technology is used in combination with the color transfer map to adjust the local color and details of the pseudo-label image, so as to generate a color corrected image that takes into account the edge information loss caused by light absorption and forward scattering, that is, the preprocessed image.

[0020] Optionally, the preprocessed image is input into the aggregation attention mechanism to extract the global features and local features of the underwater image, specifically including:

[0021] The preprocessed image is used as the feature map L1, and the feature information is extracted using convolution kernels of sizes 1, 3, and 5 and a mean pooling layer, and the four feature maps are concatenated;

[0022] The concatenated feature map is used with a 1×1 convolution kernel to change the number of channels and added to the input feature map L1 to obtain L2:

[0023] L2 = conv1 (concat (conv1 (pool (L1), conv1 (L1), conv3 (L1), conv5 (L1))) + L1 copy L2, the first copy is activated using the symmetric sigmoid function, the result of the activation is used as the weight, and the other copy of L2 is multiplied to obtain L3:

[0024] L3=sigmoid +0.5 (L2)×L2

[0025] Normalize L3 layer by layer, and then calculate the residual to get L4:

[0026] L4=LayerNorm(L3)+L3

[0027] L4 is input into the multi-layer perception mechanism for layer normalization, and the residual is calculated with L4 to obtain L5:

[0028] L5 = LayerNorm (MLP (L4)) + L4;

[0029] Based on L1, L2, L3, L4 and L5, an attention fusion mechanism is used to extract global and local information.

[0030] Optionally, based on L1, L2, L3, L4 and L5, an attention fusion mechanism is used to extract global information and local information, specifically including:

[0031] Based on L1, L2, L3, L4 and L5, we get the high-level feature map M S , low-level feature map M J and the prior feature map M P ;

[0032] The high-level feature map M S , low-level feature map M J and the prior feature map M P After concatenation, a 1×1 convolution is used to adjust the number of channels to obtain M1:

[0033] M1=Conv1(Concat(M S , M J , M P ))

[0034] M1 is extracted through the global attention mechanism and the local attention mechanism respectively to extract global information and local information, and the global information and local information are fused to obtain M2:

[0035] M2=Attention global (M1)+Attentionlocal (M1)

[0036] Activate M2 using the sigmoid function, multiply the activation result by M2 as the weight, and then multiply it by M S Calculate the residual and get M3:

[0037] M3=sigmoid(M2)×M2+M2.

[0038] Optionally, the global feature and the local feature are input into an attention fusion mechanism for integration to obtain an integrated image, and the image enhancement of the underwater image is realized. Specifically, the content of the image includes:

[0039] The illumination prior feature map LA, the gradient prior feature map Grad, and the backbone feature map Bone generated based on L1 are concatenated in the channel dimension, and then a 1×1 convolution is used to adjust the number of channels of the feature map. The obtained feature map is input into the aggregation attention mechanism to output the integrated image M. P :

[0040] M P =AggTransformer(Conv1(Concat(LA,Grad,bone))).

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

[0042] The present invention discloses an underwater image enhancement method based on semi-supervised learning, the method comprising: based on the use of semi-supervised learning to evaluate the quality of unlabeled underwater images, generate pseudo-label images; perform color correction on the pseudo-label images to obtain pre-processed images; input the pre-processed images into a converged attention mechanism to extract global features and local features of the underwater images; input the global features and the local features into an attention fusion mechanism for integration to obtain an integrated image, and output an image-enhanced underwater image based on the integrated image. The present invention can effectively simulate the advantages of Vision Transformer in extracting global information, while retaining the ability of convolution in extracting local features. While reducing the model parameters and computing resource requirements, the ability to comprehensively capture global and local features is retained, and the underwater image enhancement effect can be improved. The underwater image enhancement technology proposed by the present invention shows great application potential, and it can restore the true color of underwater images. In the field of marine scientific research and resource exploration, this technology can assist scientists and engineers to gain a deeper insight into marine organisms and geological structures, thereby promoting the rational development and utilization of marine resources. In underwater safety monitoring and rescue operations, this technology can assist law enforcement agencies and rescue teams to quickly and accurately identify accident scenes, track missing persons or locate submersibles. In addition, in the protection and archaeological research of underwater cultural relics, this technology can help cultural relics protection experts and archaeologists to have a more comprehensive understanding of the history and status of underwater cultural relics, and provide support for the protection and development of these precious cultural heritages. The method of the present invention adopts an end-to-end processing method, and the final output of the model is an enhanced image. The input image is located in the upper half, and the enhanced image is located in the lower half. It can be seen intuitively that after removing the underwater light absorption and the influence of suspended matter, the image restores its true color, which not only helps the further analysis and feature extraction of the image, but also enhances its practical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 A method step diagram of an underwater image enhancement method based on semi-supervised learning according to an embodiment of the present invention;

[0045] Figure 2 A diagram of a semi-supervised learning training process of an underwater image enhancement method based on semi-supervised learning according to an embodiment of the present invention;

[0046] Figure 3A flowchart of an aggregated attention mechanism of an underwater image enhancement method based on semi-supervised learning according to an embodiment of the present invention;

[0047] Figure 4 A flowchart of an attention mechanism and prior utilization of an underwater image enhancement method based on semi-supervised learning in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] An underwater image enhancement method based on semi-supervised learning, such as Figure 1 As shown, the method includes:

[0050] Based on using semi-supervised learning to evaluate the quality of unlabeled underwater images, pseudo-label images are generated; based on using semi-supervised learning to evaluate the quality of unlabeled underwater images, the process of generating pseudo-label images specifically includes: training a semi-supervised underwater image restoration model based on labeled underwater images; inputting the unlabeled underwater images into the trained semi-supervised underwater image restoration model to generate pseudo-label images.

[0051] Inputting the unlabeled underwater image into the trained semi-supervised underwater image restoration model to generate a pseudo-labeled image also includes: using URanker as a pseudo-reference true value to evaluate the pseudo-labeled image; and selecting the pseudo-labeled image and storing it in a Reliable Bank based on the evaluation result.

[0052] like Figure 2 As shown, in this embodiment, the semi-supervised underwater image restoration (Semi-UIR) framework proposed by Huang et al. is adopted. This framework can use unlabeled data to train the network and use the "Reliable Bank" to store the "best" output as the pseudo-reference true value. However, unlike the traditional semi-supervised underwater image restoration, in this embodiment, the MUSIQ evaluation method used in the original Semi-UIR framework is replaced with URanker. URanker, as an evaluation indicator of the pseudo-reference true value, has more advantages in underwater image quality assessment. According to the judgment result of URanker, it is decided whether to enter the "Reliable Bank", which can better improve the image enhancement effect.

[0053] Underwater images are often affected by the absorption and scattering of light by the water medium, resulting in a general blue or green hue deviation in the image, as well as color distortion and reduced contrast. These characteristics not only affect the intuitive quality of the image, but may also interfere with subsequent image processing and analysis. Therefore, in order to obtain clear and visible underwater images, the first step is to effectively correct these color distortions, especially the blue-green hue problem unique to the underwater environment.

[0054] The pseudo-label image is color corrected to obtain a preprocessed image. The process of color correcting the pseudo-label image to obtain the preprocessed image specifically includes: correcting the blue and green hue deviations of the pseudo-label image stored in the reliable bank through local adaptive color correction.

[0055] The correction of blue and green hue deviations by Locally Adaptive Color Correction (LACC) specifically includes: generating a color transfer map from the pseudo-label image based on the principle of minimum color loss; using the fusion technology guided by the maximum attenuation map in combination with the color transfer map to adjust the local color and details of the pseudo-label image, and generating a color-corrected image that takes into account the edge information loss caused by light absorption and forward scattering, that is, the preprocessed image.

[0056] The preprocessed image is input into the aggregation attention mechanism to extract the global features and local features of the underwater image; The content of the preprocessed image is input into the aggregation attention mechanism to extract the global features and local features of the underwater image specifically includes: Figure 3 As shown in the figure, the aggregate attention mechanism can use the preprocessed image as the feature map L1, use convolution kernels of sizes 1, 3, and 5 and a mean pooling layer to extract feature information, and concatenate the obtained four feature maps; use a 1×1 convolution kernel to change the number of channels of the concatenated feature map and add it to the input feature map L1 to obtain L2:

[0057] L2=conv1(concat(conv1(pool(L1),conv1(L1),conv3(L1),conv5(L1)))+L1

[0058] Copy L2, activate the first copy using the symmetric sigmoid function, use the result of the activation as the weight, and multiply it with the other copy of L2 to get L3:

[0059] L3=sigmoid +0.5 (L2)×L2

[0060] Normalize L3 layer by layer, and then calculate the residual to get L4:

[0061] L4=LayerNorm(L3)+L3

[0062] L4 is input into the multi-layer perception mechanism for layer normalization, and the residual is calculated with L4 to obtain L5:

[0063] L5 = LayerNorm (MLP (L4)) + L4;

[0064] Based on L1, L2, L3, L4 and L5, an attention fusion mechanism is used to extract global and local information.

[0065] like Figure 4 As shown in the figure, the attention fusion block (AFF) can effectively fuse low-level and high-level semantic features and information maps containing prior knowledge to reduce information loss and produce more refined feature maps. In this way, the module can retain more image details and improve the ability to understand image semantics. The operation process of this module first concatenates the prior features, high-level semantic features and low-level semantic features. Through this process, the prior knowledge in the prior features, the rich semantic information of the high-level features and the rich information of the low-level features are fused. Next, the module extracts the local and global attention information of the concatenated feature maps respectively. Finally, the fused feature map is residually connected with the original high-level feature map, which not only retains the information of the original features, but also introduces the enhanced information. The main advantage of the AFF module is that it can efficiently combine local details and global semantic information, thereby reducing information loss during image enhancement. By integrating local and global attention mechanisms, the module not only enhances the processing efficiency of local areas of the image, but also enhances the ability to extract global image information. This method of considering local and global information at the same time has shown significant results in improving the clarity and overall visual quality of underwater images. Based on L1, L2, L3, L4 and L5, the attention fusion mechanism is used to extract global and local information, including:

[0066] Based on L1, L2, L3, L4 and L5, we get the high-level feature map M S , low-level feature map M J and the prior feature map M P ;

[0067] The high-level feature map M S , low-level feature map M J and the prior feature map M P After concatenation, a 1×1 convolution is used to adjust the number of channels to obtain M1:

[0068] M1=Conv1(Concat(M S , M J, M P ))

[0069] M1 is extracted through the global attention mechanism and the local attention mechanism respectively to extract global information and local information, and the global information and local information are fused to obtain M2:

[0070] M2=Attention global (M1)+Attention local (M1)

[0071] Activate M2 using the sigmoid function, multiply the activation result with M2 as the weight, and then calculate the residual with M2 to obtain M3:

[0072] M3=sigmoid(M2)×M2+M2.

[0073] The global features and the local features are input into an attention fusion mechanism for integration to obtain an integrated image, thereby achieving an image enhancement image of the underwater image.

[0074] The global features and the local features are input into the attention fusion mechanism for integration to obtain an integrated image, and the image enhancement of the underwater image is realized. Specifically, the image content includes:

[0075] Use the prior utilization module (Agg Prior Transformer) to splice the illumination prior feature map LA, the gradient prior feature map Grad, and the backbone feature map Bone generated based on L1 in the channel dimension, and then use a 1×1 convolution to adjust the number of channels of the feature map. The obtained feature map is input into the aggregation attention mechanism to output the integrated image M P :

[0076] M P =AggTransformer(Conv1(concat(LA,Grad,Bone))).

[0077] The prior utilization module is designed to efficiently utilize the prior information of underwater images to solve the problems of detail loss and insufficient or excessive color correction in the underwater image enhancement process. This module utilizes two key prior information: illumination prior and gradient prior, which are essential for accurately understanding and enhancing the quality of underwater images. The prior utilization module combines the low-level backbone feature map with the illumination prior and gradient prior, inputs them into the aggregate attention mechanism module, and then fuses them with the high-level feature map in the backbone network through the AFF module.

[0078] The specific implementation steps of the present invention are:

[0079] First, extract the prior feature information of the input image, such as the illumination prior feature map LA and the gradient prior feature map Grad, and then input the image into the preprocessing module to perform a round of image enhancement. The preprocessed feature map is concatenated with the original feature map in the channel dimension and then input into the aggregation attention mechanism to obtain the feature map F1, which is copied.

[0080] Backbone encoder part: downsample one of the copies of feature map F1 and input it into the next aggregation attention mechanism module to obtain F2, downsample F2 and input it into the aggregation attention mechanism to obtain F3, adjust the number of channels of F3 and input it into the aggregation attention mechanism to obtain F4, and then input F4 into the next aggregation attention mechanism module to obtain F5.

[0081] Prior encoder part: another copy of the feature map F1 is used as the backbone feature map Bone, and is input into the first prior utilization module together with the illumination prior feature map LA and the gradient prior feature map Grad to obtain a feature map B2 that is a preliminary mixture of illumination prior and gradient prior. B2, the illumination prior feature map LA and the gradient prior feature map Grad are downsampled and input into the second prior utilization module to obtain B3. B3, the illumination prior feature map LA and the gradient prior feature map Grad are downsampled and input into the third prior utilization module to obtain a feature map B4 that is a mixture of illumination prior and gradient prior.

[0082] Backbone decoder part: The high-level feature map F5, the prior feature map B4, and the low-level feature map F3 are input into the attention fusion module and then into the aggregation attention mechanism to obtain the high-level feature map F6. The high-level feature map F6 is upsampled once, and the prior feature map B3 and the low-level feature map F2 are input into the attention fusion module and then into the aggregation attention mechanism to obtain the high-level feature map F7. The high-level feature map F7 is upsampled once, and the prior feature map B2 and the low-level feature map F1 are input into the attention fusion module and then into the aggregation attention mechanism to obtain the high-level feature map F8. After a 3×3 convolution, the number of feature map channels is adjusted to obtain the final output.

[0083] In the model training implementation phase, 800 pairs of labeled data are used as supervised training data sets, and 700 unlabeled data are used as unlabeled training data sets. The unlabeled data uses the teacher network to generate pseudo labels, and is used in training with the original image as paired data. After each epoch of training, the teacher network weights are updated, and a new pseudo label map is generated and compared with the existing pseudo label map, and the better pseudo labels are retained as pseudo label data for the next round of training.

[0084] The loss functions of the present invention are divided into two categories: for the supervised part and the unsupervised part. The loss functions of the supervised part, including Charbonnier Loss, Color Loss and Perceptual Loss, mainly focus on pixel-level accuracy and perceptual improvement. The loss functions of the unsupervised part, such as L1 Loss, Contrast Regulation Loss and URanker Loss, use unlabeled data to further optimize the model.

[0085] Supervised loss function:

[0086] In the supervised learning part of underwater image enhancement, the present invention adopts a variety of loss functions to ensure that the model can effectively learn the mapping from the original underwater image to the clear image. The following are the selected supervised loss functions and their respective formulas, characteristics and functions:

[0087] Charbonnier Loss: Charbonnier Loss is a smoothed version of L1 loss. It provides a more stable training process through smooth gradient characteristics and is suitable for processing edges and details. Its formula is shown in Formula 1.

[0088]

[0089] in is the image predicted by the model, y is the real image, and ∈ is a small constant to ensure numerical stability.

[0090] Color Loss: Color Loss is specifically designed to ensure color fidelity, helping to maintain the natural colors of the enhanced image and reduce color deviation. Its formula is shown in Formula 2.

[0091]

[0092] in is the pixel value of the image predicted by the model on the R, G, and B channels, y c,i is the pixel value of the real image on the R, G, and B channels, and N is the total number of pixels in each channel.

[0093] Perceptual Loss: Perceptual Loss is based on the similarity evaluation of high-level features, which helps to improve the visual effect while preserving the image structure and texture. Its formula is shown in Formula 3.

[0094]

[0095] in, is the feature map of the image predicted by the model at a specific layer l of the deep network, φl (y) i is the feature map of the real image in a specific layer l of the deep network, and Nl is the number of feature elements in layer l.

[0096] Unsupervised loss function:

[0097] In the unsupervised learning part of underwater image enhancement, loss functions designed specifically for processing unlabeled data are used. These loss functions help the model learn effective image enhancement methods in the absence of explicit labels. The following are the selected unsupervised loss functions and their respective characteristics and functions:

[0098] L1 Loss: The L1 Loss here is used to compare the pixel-level difference between the output of the student network and the pseudo GT image of the Reliable Bank, which helps to improve the accuracy of image reconstruction, but is less sensitive to outliers. Its formula is shown in Formula 4:

[0099]

[0100] in is the pixel value predicted by the model, y i is the pixel value of the real image, and N is the total number of pixels in the sample.

[0101] CR Loss: Contrastive Regulation Loss (CR Loss) is a loss value construction method based on the idea of ​​contrastive learning for overall information comparison. Contrastive regularization loss optimizes the network by strengthening the distinction between image pairs, and is particularly suitable for dealing with low contrast and color distortion problems in underwater images. This loss function encourages the model to generate clearer, higher contrast images while maintaining color authenticity and consistency.

[0102] Two pairs of samples were constructed, one group was composed of reference images and generated images, and the other group was composed of distorted images and enhanced images. Then, the two groups of images were forward propagated in VGG-19 to obtain two sets of features. Then, the L1 loss of the two sets of features was calculated respectively, and then multiplied by the corresponding weights of each layer to finally obtain the contrast regularization loss CR Loss. When this loss function is used as an auxiliary loss function, it can make the generated image closer to the reference image and different from the distorted image. The calculation formula of the contrast regularization loss is shown in Formula 5.

[0103]

[0104] where w vis the weight of the hidden layer corresponding to VGG-19. In this experiment, the corresponding weights are [1 / 32, 1 / 16, 1 / 8, 1 / 4, 1].

[0105] URanker Loss: URanker is an innovative ranking-based underwater image quality assessment (UIQA) method that aims to rank different underwater images of the same scene according to their visual quality through ranking learning techniques. This approach avoids the interference caused by different degradations and scene characteristics in traditional methods. Compared with fitting visual scores, learning relative quality order is simpler for image quality assessment networks. URanker is built on the efficient convolution-attention image Transformer, especially considering the significant impact of color deviation of underwater images on visual quality, and introduces histogram prior to embed the color distribution of underwater images. These features make URanker excel in processing and evaluating the unique challenges and characteristics of underwater images.

[0106] The sum of the loss functions:

[0107] In this embodiment, a dynamic weight allocation strategy is used to balance the supervised and unsupervised loss functions, reflecting that as the training process progresses, the unsupervised loss gains greater weight due to its increasing importance in model training. The overall calculation formula of its loss function is shown in Formula 6:

[0108] L total =(1-α)×L sup +α×L unsup (6)

[0109] Where α is the weight related to the current epoch number, L sup The formula used is shown in Formula 7, L unsup As shown in Formula 8:

[0110] L sup =0.8×L charbonnier +0.2×L color +0.3×L perceptual (7)

[0111] L unsup =L1+L CRLoss +L Uranker (8)

[0112] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. An underwater image enhancement method based on semi-supervised learning, characterized in that: The method comprises: Based on the quality assessment of unlabeled underwater images using semi-supervised learning, pseudo-label images are generated, including: Training a semi-supervised underwater image restoration model based on labeled underwater images; The unlabeled underwater image is input into the trained semi-supervised underwater image restoration model to generate a pseudo-labeled image, including: Using URanker as a pseudo benchmark truth value, evaluating the pseudo-labeled image; According to the evaluation results, pseudo-label images are selected and stored in the Reliable Bank; Performing color correction on the pseudo-label image to obtain a preprocessed image; The preprocessed image is input into the aggregation attention mechanism to extract the global and local features of the underwater image, including: The preprocessed image is used as the feature map L1, and the feature information is extracted using convolution kernels of sizes 1, 3, and 5 and a mean pooling layer, and the four feature maps are concatenated; The concatenated feature map is used with a 1×1 convolution kernel to change the number of channels and added to the input feature map L1 to obtain L2: L2=conv1(concat(conv1(pool(L1),conv1(L1),conv3(L1),conv5(L1)))+L1 Copy L2, activate the first copy using the symmetric sigmoid function, use the result of the activation as the weight, and multiply it with the other copy of L2 to get L3: <h2 style=";text-align:left;direction:ltr">L3 = sigmoid<h2 style=";text-align:left;direction:ltr"> +0.5 <h2 style=";text-align:left;direction:ltr"> (L2)×L2 Normalize L3 layer by layer, and then calculate the residual to get L4: L4=LayerNorm(L3)+L3 L4 is input into the multi-layer perception mechanism for layer normalization, and the residual is calculated with L4 to obtain L5: L5 = LayerNorm (MLP (L4)) + L; 4 Based on L1, L2, L3, L4 and L5, the attention fusion mechanism is used to extract global and local information, including: Based on L1, L2, L3, L4 and L5, we get the high-level feature map M S , low-level feature map M J and the prior feature map M P ; The high-level feature map M S , low-level feature map M J and the prior feature map M P After concatenation, a 1×1 convolution is used to adjust the number of channels to obtain M1: M1=Conv1(Concat(M S ,M J ,M P )) M1 is extracted through the global attention mechanism and the local attention mechanism respectively to extract global information and local information, and the global information and local information are fused to obtain M2: M2=Attention global (M1)+Attention local (M1) Activate M2 using the sigmoid function, multiply the activation result with M2 as the weight, and then calculate the residual with M2 to obtain M3: M3 = sigmoid(M2) × M2 + M2; The global features and the local features are input into an attention fusion mechanism for integration to obtain an integrated image, thereby realizing an image enhancement image of the underwater image, specifically including: The illumination prior feature map LA, the gradient prior feature map Grad, and the backbone feature map Bone generated based on L1 are concatenated in the channel dimension, and then a 1×1 convolution is used to adjust the number of channels of the feature map. The obtained feature map is input into the aggregation attention mechanism to output the integrated image M. P : M P =AggTransformer(Conv1(Concat(LA,Grad,Bone)))。 2. The underwater image enhancement method based on semi-supervised learning according to claim 1, characterized in that: The process of color correcting the pseudo-label image to obtain a pre-processed image specifically includes: The pseudo-label image stored in the reliable bank is corrected for blue and green hue deviations through local adaptive color correction.

3. The underwater image enhancement method based on semi-supervised learning according to claim 2, characterized in that: Correction of blue and green hue deviations through local adaptive color correction specifically includes: Generate a color transfer map from the pseudo-label image based on the principle of minimum color loss; The maximum attenuation map guided fusion technology is used in combination with the color transfer map to adjust the local color and details of the pseudo-label image, so as to generate a color corrected image that takes into account the edge information loss caused by light absorption and forward scattering, that is, the preprocessed image.