Underwater image enhancement method and system

By combining the underwater image enhancement method with the diffusion model and the Transformer model, the problem of poor image enhancement effect in complex underwater environments is solved, and high-quality and realistic image output is achieved, suitable for diverse underwater scenes.

CN119784627APending Publication Date: 2025-04-08INST OF AGRI QUALITY STANDARDS & TESTING TECH FUJIAN ACAD OF AGRI SCI +1
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202411717832.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing underwater image enhancement methods perform poorly in complex and changeable underwater environments, and there are problems of color distortion, image blur and unstable enhancement effects, especially in high noise and low light conditions, which are difficult to achieve ideal enhancement effects.

Method used

Using an underwater image enhancement method combining diffusion model and Transformer model, Gaussian noise is gradually added and removed through the forward diffusion and reverse denoising process, and a color correction module is introduced for multi-scale processing and color correction to build a Denoising Network based on Transformer to improve the clarity, contrast and color reduction of images.

Benefits of technology

It significantly improves the clarity, contrast and color reduction of underwater images, enhances the generalization ability and stability of the model, and is suitable for complex and changeable underwater environments, meeting the needs of high-precision image processing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784627A_ABST
    Figure CN119784627A_ABST
Patent Text Reader

Abstract

The invention relates to an underwater image enhancement method and system. The method comprises the following steps: acquiring a basic underwater image data set and a corresponding reference enhancement image set; forward diffusion and reverse denoising are carried out on the underwater images in the basic underwater image data set and the corresponding reference enhanced image set through a diffusion model; gaussian noise is gradually added to the underwater image in the forward diffusion process, and the degradation process of the underwater image is simulated; stepwise iterative denoising is carried out on the data added with the Gaussian noise in the reverse denoising process; a color correction module is introduced, and color correction and detail enhancement are carried out on the image in the reverse denoising processing process; and constructing a denoising network based on a Transform model, removing noise in the underwater image by combining forward diffusion and reverse denoising processes of the diffusion model, and outputting a high-quality enhanced underwater image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an underwater image enhancement method and system, belonging to the technical field of underwater image processing. Background Art

[0002] With the widespread application of underwater imaging technology in the fields of ocean exploration, underwater robots, and underwater archaeology, the complex and changeable underwater environment has brought great challenges to image quality. Factors such as light attenuation, scattering, and floating objects often cause underwater images to have problems such as color distortion, low contrast, and image blur. These problems have an adverse effect on the subsequent analysis and processing of images (such as target detection, recognition, and tracking). Therefore, how to effectively improve the clarity, contrast, and color reproduction of underwater images has become an important technical difficulty in the field of underwater imaging. To address this problem, it is urgent to develop an efficient underwater image enhancement method to improve image quality and optimize the accuracy and reliability of subsequent tasks.

[0003] Li et al. proposed a method to generate synthetic underwater images using aerial images and depth maps in "WaterGAN: Unsupervised generative network to enable real-time color correction of monocular underwater images", and applied it to color correction of monocular underwater images. Although this method achieved good results on synthetic datasets, the model trained in the actual underwater environment is not generalizable enough, especially in complex underwater environments, showing obvious deviations.

[0004] Subsequently, Li and Guo et al. proposed a Water CycleGAN method based on weakly supervised color transfer in "Emerging from water: Underwater image color correction based on weakly supervised color transfer" in 2018. This method reduces the dependence on paired underwater images and corrects the color distortion of underwater images. However, in some scenarios, the images generated by this method are prone to unrealistic colors and cannot meet the requirements of high-precision tasks.

[0005] Guo et al. proposed an underwater image enhancement method based on a multiscale dense generative adversarial network (GAN) in "Underwater image enhancement using a multiscale dense generative adversarial network". Although there was some improvement in image quality, the inherent uncertainty of the generative adversarial network made its generated results not stable enough in high-precision tasks.

[0006] In addition, Li et al. developed the Ucolor method in "Underwater image enhancement via medium transmission-guided multi-color space embedding", which combines the underwater physical imaging model and the medium transmission guidance model to enhance the image quality of severely degraded areas. Although this method performs well in specific degraded images, its performance is not stable enough in complex underwater environments, and it is difficult to maintain consistent enhancement effects in changing scenes.

[0007] The U-shape Transformer proposed by Peng, Zhu and Bian in "U-shape transformer for underwater image enhancement" integrates a multi-scale feature fusion module to enhance the network's attention to severely attenuated areas. However, this method still has a large distortion problem in color restoration, especially in underwater scenes with complex lighting.

[0008] To address these issues, Ho et al. proposed a denoising diffusion probability model (DDPM) in Denoising Diffusion Probabilistic Models, which gradually removes noise through forward diffusion and reverse denoising processes to generate high-quality images. Although DDPM has shown excellent performance in image generation, its effect is still limited when it is directly applied to underwater image enhancement, especially under extreme conditions, it is difficult to achieve the ideal enhancement effect.

[0009] At present, many existing underwater image enhancement methods perform well in specific scenarios, but they still face problems such as color distortion, image blur, and unstable enhancement effects when facing complex and changeable underwater environments, especially poor performance under high noise and low light conditions. Therefore, how to design a method that can generate high-quality and realistic image enhancement in complex and changeable underwater environments is still an important technical difficulty that needs to be solved urgently. Future research should focus on improving the generalization ability of the model to ensure its application performance in different underwater scenarios, while enhancing the stability and accuracy of the model to meet the needs of high-precision image processing tasks. Summary of the invention

[0010] In order to solve the above problems existing in the prior art, the present invention proposes an underwater image enhancement method and system.

[0011] The technical solution of the present invention is as follows:

[0012] In one aspect, the present invention provides an underwater image enhancement method, comprising the following steps:

[0013] Obtain a basic underwater image dataset and a corresponding reference enhanced image set;

[0014] The diffusion model is used to perform forward diffusion and reverse denoising on the underwater images in the basic underwater image dataset and the corresponding reference enhanced image set; in the forward diffusion process, Gaussian noise is gradually added to the underwater images to simulate the degradation process of the underwater images; in the reverse denoising process, the data with Gaussian noise is gradually iteratively denoised;

[0015] A color correction module is introduced to perform color correction and detail enhancement on the image during the inverse denoising process;

[0016] A denoising network based on the Transformer model is constructed, which combines the forward diffusion and inverse denoising processes of the diffusion model to remove noise from underwater images and output high-quality enhanced underwater images.

[0017] As a preferred implementation, the diffusion model gradually transforms the input original underwater image data from the original distribution into an isotropic Gaussian distribution during the forward diffusion process, and gradually adds Gaussian noise to the original distribution within T consecutive moments to generate a series of continuous noise samples; and the generation of the noise sample at each moment depends on the noise sample generated at the previous moment and follows the Markov chain relationship.

[0018] As a preferred implementation, the color correction module introduces a multi-scale processing mechanism, specifically:

[0019] The input original underwater image data is subjected to Gaussian blur processing to obtain a low-frequency component, and a high-frequency component is obtained through the original underwater image data and the low-frequency component. This process is repeated recursively until multiple high-frequency components and low-frequency components of different scales are generated;

[0020] For the decomposed low-frequency components, color channel compensation is used for global color correction; for the decomposed high-frequency components, a sharpening algorithm is used for detail enhancement;

[0021] The low-frequency components after global color correction and the high-frequency components after detail enhancement are recombined to generate an optimized image.

[0022] As a preferred embodiment, in the reverse denoising process, the diffusion model uses the optimized image generated by the color correction module as a conditional input to construct a Markov chain based on conditional denoising to restore the noise samples generated by the forward diffusion process to the original underwater image data.

[0023] As a preferred implementation, the denoising network based on the Transformer model introduces a multi-scale feature extraction mechanism, a dynamic attention mechanism and a hybrid channel attention mechanism;

[0024] The multi-scale feature extraction mechanism performs convolution processing on noise samples generated at different times by the diffusion model and the corresponding optimized images to obtain feature maps of different scales, and splices the feature maps of different scales based on the time step to form a multi-scale feature map;

[0025] The dynamic attention mechanism adaptively adjusts the attention weight according to the complexity of the multi-scale feature map;

[0026] The hybrid channel attention mechanism is used to capture the global context information of multi-scale feature maps.

[0027] On the other hand, the present invention also provides an underwater image enhancement system, comprising:

[0028] A data acquisition module, used to acquire a basic underwater image data set and a corresponding reference enhanced image set;

[0029] The diffusion module performs forward diffusion and reverse denoising on the underwater images in the basic underwater image dataset and the corresponding reference enhanced image set through a diffusion model; in the forward diffusion process, Gaussian noise is gradually added to the underwater images to simulate the degradation process of the underwater images; in the reverse denoising process, the data with Gaussian noise is gradually iterated to denoise;

[0030] A color correction module, used to perform color correction and detail enhancement on images during the inverse denoising process;

[0031] The denoising module is used to build a denoising network based on the Transformer model, combining the forward diffusion and reverse denoising processes of the diffusion model to remove noise from underwater images and output high-quality enhanced underwater images.

[0032] As a preferred implementation, the diffusion model gradually transforms the input original underwater image data from the original distribution into an isotropic Gaussian distribution during the forward diffusion process, and gradually adds Gaussian noise to the original distribution within T consecutive moments to generate a series of continuous noise samples; and the generation of the noise sample at each moment depends on the noise sample generated at the previous moment and follows the Markov chain relationship.

[0033] As a preferred implementation, the color correction module introduces a multi-scale processing mechanism, specifically:

[0034] The input original underwater image data is subjected to Gaussian blur processing to obtain a low-frequency component, and a high-frequency component is obtained through the original underwater image data and the low-frequency component. This process is repeated recursively until multiple high-frequency components and low-frequency components of different scales are generated;

[0035] For the decomposed low-frequency components, color channel compensation is used for global color correction; for the decomposed high-frequency components, a sharpening algorithm is used for detail enhancement;

[0036] The low-frequency components after global color correction and the high-frequency components after detail enhancement are recombined to generate an optimized image.

[0037] As a preferred embodiment, in the reverse denoising process, the diffusion model uses the optimized image generated by the color correction module as a conditional input to construct a Markov chain based on conditional denoising to restore the noise samples generated by the forward diffusion process to the original underwater image data.

[0038] As a preferred implementation, the denoising network based on the Transformer model introduces a multi-scale feature extraction mechanism, a dynamic attention mechanism and a hybrid channel attention mechanism;

[0039] The multi-scale feature extraction mechanism performs convolution processing on noise samples generated at different times by the diffusion model and the corresponding optimized images to obtain feature maps of different scales, and splices the feature maps of different scales based on the time step to form a multi-scale feature map;

[0040] The dynamic attention mechanism adaptively adjusts the attention weight according to the complexity of the multi-scale feature map;

[0041] The hybrid channel attention mechanism is used to capture the global context information of multi-scale feature maps.

[0042] The present invention has the following beneficial effects:

[0043] 1. The present invention provides an underwater image enhancement method and system, which can significantly improve the clarity, contrast and color reproduction of underwater images by combining a Transformer-based denoising network with a diffusion model. By gradually adding Gaussian noise through a diffusion model and removing the noise in the reverse process, the details and true texture of the image can be effectively restored, and the interference of noise on the image can be reduced, which has a significant effect, especially in complex and changeable underwater environments.

[0044] 2. The present invention provides an underwater image enhancement method and system, which introduces a color correction module. Through a multi-scale processing mechanism, combined with Laplace pyramid decomposition and color channel compensation technology, it can ensure that the color restoration of the image is more accurate, especially in the deep sea and under different lighting conditions, and effectively correct color distortion.

[0045] 3. The present invention provides an underwater image enhancement method and system, which adopts a lightweight Transformer network structure, so that the network can efficiently process underwater images, reduce computational complexity, and is suitable for real-time image enhancement tasks. In addition, the combination of multi-scale feature extraction and dynamic attention mechanism is added to the network structure to ensure that the network captures image information at global and local scales, further improving the image detail performance and contrast. Compared with traditional image enhancement methods, the diffusion model of the present invention has stronger generalization ability, can adapt to a variety of underwater scenes, and ensure the generation of high-quality image output in different underwater environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a schematic diagram of a method flow chart of Embodiment 1 of the present invention;

[0047] Figure 2 is a schematic diagram of a color correction process in an embodiment of the present invention;

[0048] Figure 3 This is a comparison chart of the effects of the embodiment of the present invention and the existing method on the UIEB dataset;

[0049] Figure 4 This is a comparison chart of the effects of the embodiment of the present invention and the existing method on the LSUI dataset;

[0050] Figure 5 This is an example diagram of a denoising network based on a Transformer model in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

[0053] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0054] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0055] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0056] Embodiment 1:

[0057] See also Figure 1 This embodiment provides an underwater image enhancement method, which specifically includes the following steps:

[0058] S100, obtaining a basic underwater image data set and a corresponding reference enhanced image set to provide basic data support for network denoising and enhancement.

[0059] S200, forward diffusion and reverse denoising are performed on the basic underwater image data set and the underwater images in the corresponding reference enhanced image set through a diffusion model; Gaussian noise is gradually added to the underwater images during the forward diffusion process to simulate the degradation process of the underwater images; in the reverse denoising process, the data with added Gaussian noise is gradually iteratively denoised, and parameters in the diffusion model are set to achieve the gradual addition of noise to the data.

[0060] S300, introducing a color correction module to perform color correction and detail enhancement on the image during the inverse denoising process to ensure accurate restoration of the image color.

[0061] S400, build a denoising network based on the Transformer model, combine the forward diffusion and inverse denoising processes of the diffusion model to remove noise from underwater images, and output high-quality enhanced underwater images.

[0062] After completing the training of the denoising network, the UIEB dataset and the LSUI dataset were used to verify the denoising network, and compared with other existing methods to ensure the effectiveness of the method.

[0063] As a preferred implementation of this embodiment, in step S100, the basic underwater image dataset and the corresponding reference enhanced image set are derived from the UIEB dataset, and the UIEB dataset contains 890 pairs of underwater images and their reference enhanced images. The underwater images are derived from the Internet, and the reference enhanced images are generated by existing enhancement methods and manual selection. Specifically, after collecting underwater images, this embodiment uses a variety of enhancement methods to generate corresponding enhancement results, and selects 90 images as a test set to evaluate our method based on the standards proposed in "An underwater image enhancement benchmark dataset and beyond". This embodiment uses 3800 pairs of images in the LSUI dataset as training data for the diffusion model, and the remaining 479 images are used to verify the effectiveness of the method of this embodiment.

[0064] As a preferred implementation of this embodiment, in step S200, the diffusion model in the forward diffusion process is a process of gradually transforming the original underwater image data from the original distribution into an isotropic Gaussian distribution by gradually adding Gaussian noise.

[0065] Specifically, given an original underwater image data and its original distribution x0~q(x), we gradually add a small amount of Gaussian noise to the data sample x0 in T steps to generate a series of noise samples x1,x2,...,x T The addition of noise is determined by the variance schedule control.

[0066] In each forward process, x t The generation of depends on the previous moment x t-1 The data follows the Markov chain relationship. The specific formula is:

[0067]

[0068] The entire forward process can be expressed as:

[0069]

[0070] As the time step t increases, the original distribution x0 will gradually lose its original discriminative features, and the noise will gradually cover the structure of the original data. Finally, when T→∞, the data distribution x T Converges to an isotropic Gaussian distribution.

[0071] Introducing variable α t =1-β t and The formula can be further simplified. Through the recursive relationship, the following expression can be obtained:

[0072]

[0073] Through multiple iterations, it can be deduced that:

[0074]

[0075] Continue the recursion and finally get:

[0076]

[0077] in That is, the noise at each step follows a standard normal distribution.

[0078] Therefore, given the original distribution x0, x t The distribution of can be expressed as:

[0079]

[0080] This shows that as the time step t increases, the data samples gradually approach Gaussian noise and eventually become pure noise. This process provides a basis for the reverse denoising of the diffusion model.

[0081] See Figure 2 As a preferred implementation of this embodiment, in step S300, the color correction module introduces a multi-scale processing mechanism, specifically:

[0082] First, the input image is decomposed into frequency components of different scales using the Laplacian pyramid decomposition technique.

[0083] The decomposition process first performs Gaussian blur processing on image I to obtain the low-frequency component:

[0084] I low =G(I)

[0085] Where G(I) represents the Gaussian blur operation on image I. Then the low-frequency components are downsampled:

[0086] I low,down =Downsample(I low )

[0087] When extracting the high-frequency component, the high-frequency component I is obtained by subtracting the downsampled low-frequency component from the original image I. high :

[0088] I high =I-Upsample(I low,down )

[0089] This process is performed recursively until multiple high-frequency components and low-frequency components of different scales are generated.

[0090] Next, for the low-frequency component I low Apply color channel compensation technology to perform global color correction. The correction formula is as follows:

[0091]

[0092] where μ c and σ c They represent the mean and standard deviation of the color channel c respectively. The overall color deviation of the image is corrected through normalization to ensure color accuracy and consistency.

[0093] At the same time, for the high frequency component I high , use the sharpening algorithm to enhance its details, the formula is as follows:

[0094] I high′ =I high +λ·Laplacian(I high )

[0095] Among them, λ is the weight factor that controls the degree of sharpening, Laplacian (I high ) is the Laplacian operator used to enhance the details.

[0096] After the processing is completed, the enhanced high-frequency component I high′ and the corrected low-frequency component Recombined to generate enhanced image I corrected :

[0097]

[0098] Enhanced image I corrected The inverse denoising process for the diffusion model is used as a conditional input to guide noise removal and image restoration.

[0099] As a preferred implementation of this embodiment, in step S200, the diffusion model is used in the reverse denoising process to obtain a pure Gaussian noise sample x TAt the beginning, the target image x0 is generated by step-by-step iterative denoising. The inverse process of the diffusion model is defined as a conditional denoising Markov chain. Each denoising step can be expressed as:

[0100]

[0101] Among them, x T is the initial Gaussian noise image, x0 is the final restored high-quality image, I corrected represents the conditional input. The model needs to estimate p at each time step t θ (x t-1 |x t ,I corrected ), which can be approximated by the following Gaussian distribution:

[0102]

[0103] In practice, the model estimates μ θ (x t ,I corrected ,t) and Σ θ (x t ,I corrected ,t), where μ θ The calculation of is as follows:

[0104]

[0105] ∈ in the formula θ (x t ,I corrected ,t) is the noise image predicted by the model, β t and α t is the noise scheduling parameter corresponding to time step t. At this time, the image restoration process can be obtained by the following formula:

[0106] x t-1 =μ θ (x t ,I corrected ,t)+σ t z

[0107] in represents the noise sampled from a standard normal distribution, σ t is the noise variance associated with t.

[0108] In this reverse diffusion process, the conditional input I corrected The context information guides the model to generate high-quality images, ensuring that the generated images have sufficient realism and detail restoration capabilities in complex underwater scenes.

[0109] During the entire diffusion model training process, in order to optimize the network, we use the L1 loss function to train the denoising network. The formula is:

[0110] L S =‖∈ t -∈ θ (x t ,I corrected ,t)‖

[0111] Among them, ∈ t is the real noise at time step t, ∈ θ (x t ,I corrected ,t) is the noise predicted by the model.

[0112] With the above loss function, we are able to effectively optimize the model to generate high-quality and realistic image outputs in complex underwater environments.

[0113] See Figure 5 As a preferred implementation of this embodiment, in step S400, a multi-scale input mechanism is introduced into the denoising network based on the Transformer model, so that the network can capture global and local image information at different spatial scales, thereby improving the effect of image detail restoration and color restoration. Specifically, for a given noisy image x t and optimize image I corrected , and time step t, we first perform multi-scale feature extraction on the noisy image and conditional input.

[0114] First, the noisy image x t and optimize image I corrected The multi-scale feature maps are generated by processing through convolutional layers of different resolutions. The formula is as follows:

[0115]

[0116] Among them, Conv (l) Represents the convolution operation of the lth layer, where l corresponds to different resolution levels. and Respectively represent the features of the noise image and the optimized image extracted at the lth scale. Next, these feature maps of different scales are spliced ​​to form a multi-scale feature map:

[0117]

[0118] The spliced ​​multi-scale feature map contains local and global image information at different resolutions. Next, it is combined with the time step feature E t Fusion is performed to generate a new feature map F. The formula for this process is as follows:

[0119] F=F multi +E t

[0120] Among them, F multi represents the feature map extracted and concatenated by multi-scale convolution, E t It is the time step feature generated by the fully connected layer. The fused feature map F contains multi-scale context information and time step information.

[0121] On this basis, the denoising network introduces a dynamic attention mechanism. The dynamic attention mechanism adaptively adjusts the attention weight according to the complexity of the feature map, adapting it to the different complexity areas in the image, reducing the computational overhead while maintaining accuracy. The formula for this process is:

[0122]

[0123] Among them, Att d is a dynamic self-attention module, and Ln(F) is a layer normalization operation on the feature map F. The dynamic attention mechanism can process complex areas in detail and reduce calculations in simple areas.

[0124] Subsequently, the denoising network also introduced a hybrid channel attention mechanism. This mechanism combines global channel attention and group channel attention, thereby reducing the computational complexity while effectively capturing the global information and local details of the image. Its formula is as follows:

[0125]

[0126] Among them, G(F) is the global average pooling operation, which extracts the global context information of the image, φ θ It is a one-dimensional convolution operation that processes the pooled features and calculates the channel attention weights through sigmoid activation. In this way, the network can process low-frequency global information and high-frequency local details at the same time.

[0127] The final output feature map F output is the result after processing by the above attention module, combined with the noise coefficient σ associated with time step t t and the noise z sampled from a normal distribution are used in the inverse generation process of the diffusion model. The formula is as follows:

[0128]

[0129] Among them, σ t is the noise coefficient associated with time step t, and z is the noise sampled from the standard normal distribution. Through this mechanism, the network can not only restore the details and color information of the image, but also generate high-quality images.

[0130] Finally, this example uses the PyTorch framework to implement the proposed method. During the network training process, the Adam optimizer is used to minimize the objective function, and the learning rate is set to 1.0×10 -4 To balance the batch size and image resolution, the batch size in the training phase is set to 8, and the size of the input image is 256×256 pixels. The time step of the diffusion model is 2000, and the noise scheduling parameter β is linearly sampled in the range of [10 -6 ,10 -2 ]. During the testing phase, the image input size is also 256×256.

[0131] In order to evaluate the effect of this embodiment, we compared it with eight other advanced technologies. Two complete reference evaluation indicators are mainly used: Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM). PSNR is mainly used to measure the restoration accuracy of image content. The higher the value, the higher the similarity between the enhanced image and the reference image at the pixel level; SSIM focuses on the fidelity of the structure, texture and color information of the image. The higher the value, the closer the enhanced image is to the original image in visual quality.

[0132] The experimental comparison results are shown in Table 1 and Figure 3 , 4 As shown in the figure, the results show that compared with other technologies, this embodiment achieves higher PSNR and SSIM values ​​on both UIEB and LSUI datasets. The PSNR value reflects the similarity between the enhanced image and the reference image in terms of content, while the SSIM value reflects the fidelity of the image in terms of structure, texture, and color. The higher the PSNR, the better the image content restoration; the higher the SSIM, the closer the overall visual effect of the image is to reality.

[0133] Table 1: PSNR and SSIM indicators of different methods on UIEB and LSUI datasets

[0134]

[0135]

[0136] Note: Bold indicates the optimal value of each column indicator, and italic indicates the suboptimal value of each column indicator

[0137] The table shows the PSNR and SSIM indicators of different methods on the UIEB and LSUI datasets, among which this method achieved the best results on both datasets. Specifically, in the UIEB dataset, the PSNR of this method reached 24.05 and the SSIM was 0.9233; in the LSUI dataset, the PSNR was 27.69 and the SSIM was 0.9533. Compared with other methods, such as Ucolor and WaterNet, this method has significantly improved the clarity, contrast and structure restoration capabilities of the image.

[0138] The proposed method has shown excellent enhancement effects on multiple data sets, especially in the restoration of image content and structural information, which is significantly better than other comparative methods. This shows that the present invention has strong generalization ability and stable performance in image enhancement tasks in complex underwater environments.

[0139] Embodiment 2:

[0140] This embodiment provides an underwater image enhancement system, including:

[0141] A data acquisition module, used to acquire a basic underwater image data set and a corresponding reference enhanced image set; this module is used to implement the function of step S100 in the first embodiment, and will not be described in detail here;

[0142] A diffusion module performs forward diffusion and reverse denoising on the underwater images in the basic underwater image data set and the corresponding reference enhanced image set through a diffusion model; in the forward diffusion process, Gaussian noise is gradually added to the underwater image to simulate the degradation process of the underwater image; in the reverse denoising process, the data to which the Gaussian noise is added is gradually iterated to denoise; this module is used to implement the function of step S200 in the first embodiment, and will not be described in detail here;

[0143] A color correction module, used to perform color correction and detail enhancement on the image during the inverse denoising process; this module is used to implement the function of step S300 in the first embodiment, which will not be described in detail here;

[0144] The denoising module is used to construct a denoising network based on the Transformer model, combine the forward diffusion and reverse denoising processes of the diffusion model, remove the noise in the underwater image, and output a high-quality enhanced underwater image; this module is used to implement the function of step S400 in Example 1, which will not be repeated here.

[0145] As a preferred implementation of this embodiment, the diffusion model gradually transforms the input original underwater image data from the original distribution into an isotropic Gaussian distribution during the forward diffusion process, and gradually adds Gaussian noise to the original distribution within T consecutive moments to generate a series of continuous noise samples; and the generation of the noise sample at each moment depends on the noise sample generated at the previous moment and follows the Markov chain relationship.

[0146] As a preferred implementation of this embodiment, the color correction module introduces a multi-scale processing mechanism, specifically:

[0147] The input original underwater image data is subjected to Gaussian blur processing to obtain a low-frequency component, and a high-frequency component is obtained through the original underwater image data and the low-frequency component. This process is repeated recursively until multiple high-frequency components and low-frequency components of different scales are generated;

[0148] For the decomposed low-frequency components, color channel compensation is used for global color correction; for the decomposed high-frequency components, a sharpening algorithm is used for detail enhancement;

[0149] The low-frequency components after global color correction and the high-frequency components after detail enhancement are recombined to generate an optimized image.

[0150] As a preferred implementation of this embodiment, in the reverse denoising process, the diffusion model uses the optimized image generated by the color correction module as a conditional input to construct a Markov chain based on conditional denoising to restore the noise samples generated by the forward diffusion process to the original underwater image data.

[0151] As a preferred implementation of this embodiment, a multi-scale feature extraction mechanism, a dynamic attention mechanism and a hybrid channel attention mechanism are introduced into the denoising network based on the Transformer model;

[0152] The multi-scale feature extraction mechanism performs convolution processing on noise samples generated at different times by the diffusion model and the corresponding optimized images to obtain feature maps of different scales, and splices the feature maps of different scales based on the time step to form a multi-scale feature map;

[0153] The dynamic attention mechanism adaptively adjusts the attention weight according to the complexity of the multi-scale feature map;

[0154] The hybrid channel attention mechanism is used to capture the global context information of multi-scale feature maps.

[0155] Embodiment three:

[0156] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present invention when executing the program.

[0157] Embodiment 4:

[0158] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any embodiment of the present invention is implemented.

[0159] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0160] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0162] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk and other media that can store program codes.

[0163] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for underwater image enhancement, characterized in that: The following steps are involved: Obtain a basic underwater image dataset and a corresponding reference enhanced image set; The underwater images in the basic underwater image dataset and the corresponding reference enhanced image set are forward diffused and reversely denoised by the diffusion model; In the forward diffusion process, Gaussian noise is gradually added to the underwater image to simulate the degradation process of the underwater image; in the reverse denoising process, the data with Gaussian noise is denoised step by step and iteratively; A color correction module is introduced to perform color correction and detail enhancement on the image during the inverse denoising process; A denoising network based on the Transformer model is constructed, which combines the forward diffusion and inverse denoising processes of the diffusion model to remove noise from underwater images and output high-quality enhanced underwater images.

2. The underwater image enhancement method according to claim 1, characterized in that: In the forward diffusion process, the diffusion model gradually transforms the input original underwater image data from the original distribution into an isotropic Gaussian distribution, and gradually adds Gaussian noise to the original distribution in T consecutive moments to generate a series of continuous noise samples; and the generation of the noise sample at each moment depends on the noise sample generated at the previous moment and follows the Markov chain relationship.

3. The underwater image enhancement method according to claim 2, characterized in that: The color correction module introduces a multi-scale processing mechanism, specifically: The input original underwater image data is subjected to Gaussian blur processing to obtain a low-frequency component, and a high-frequency component is obtained through the original underwater image data and the low-frequency component. This process is repeated recursively until multiple high-frequency components and low-frequency components of different scales are generated; For the decomposed low-frequency components, color channel compensation is used for global color correction; for the decomposed high-frequency components, a sharpening algorithm is used for detail enhancement; The low-frequency components after global color correction and the high-frequency components after detail enhancement are recombined to generate an optimized image.

4. The underwater image enhancement method according to claim 3, characterized in that: In the reverse denoising process, the diffusion model uses the optimized image generated by the color correction module as a conditional input to construct a Markov chain based on conditional denoising, and restores the noise samples generated by the forward diffusion process to the original underwater image data.

5. The underwater image enhancement method according to claim 4, characterized in that: The denoising network based on the Transformer model introduces a multi-scale feature extraction mechanism, a dynamic attention mechanism, and a hybrid channel attention mechanism; The multi-scale feature extraction mechanism performs convolution processing on noise samples generated at different times by the diffusion model and the corresponding optimized images to obtain feature maps of different scales, and splices the feature maps of different scales based on the time step to form a multi-scale feature map; The dynamic attention mechanism adaptively adjusts the attention weight according to the complexity of the multi-scale feature map; The hybrid channel attention mechanism is used to capture the global context information of multi-scale feature maps.

6. An underwater image enhancement system, characterized in that: include: A data acquisition module, used to acquire a basic underwater image data set and a corresponding reference enhanced image set; The diffusion module performs forward diffusion and reverse denoising on the underwater images in the basic underwater image dataset and the corresponding reference enhanced image set through a diffusion model; Gaussian noise is gradually added to the underwater images during the forward diffusion process to simulate the degradation process of the underwater images; In the inverse denoising process, the data with added Gaussian noise is denoised step by step and iteratively; A color correction module, used to perform color correction and detail enhancement on images during the inverse denoising process; The denoising module is used to build a denoising network based on the Transformer model, combining the forward diffusion and reverse denoising processes of the diffusion model to remove noise from underwater images and output high-quality enhanced underwater images.

7. The underwater image enhancement system according to claim 5, characterized in that: In the forward diffusion process, the diffusion model gradually transforms the input original underwater image data from the original distribution into an isotropic Gaussian distribution, and gradually adds Gaussian noise to the original distribution in T consecutive moments to generate a series of continuous noise samples; and the generation of the noise sample at each moment depends on the noise sample generated at the previous moment and follows the Markov chain relationship.

8. An underwater image enhancement system according to claim 7, characterized in that: The color correction module introduces a multi-scale processing mechanism, specifically: The input original underwater image data is subjected to Gaussian blur processing to obtain a low-frequency component, and a high-frequency component is obtained through the original underwater image data and the low-frequency component. This process is repeated recursively until multiple high-frequency components and low-frequency components of different scales are generated; For the decomposed low-frequency components, color channel compensation is used for global color correction; for the decomposed high-frequency components, a sharpening algorithm is used for detail enhancement; The low-frequency components after global color correction and the high-frequency components after detail enhancement are recombined to generate an optimized image.

9. An underwater image enhancement system according to claim 8, characterized in that: In the reverse denoising process, the diffusion model uses the optimized image generated by the color correction module as a conditional input to construct a Markov chain based on conditional denoising, and restores the noise samples generated by the forward diffusion process to the original underwater image data.

10. An underwater image enhancement system according to claim 9, characterized in that: The denoising network based on the Transformer model introduces a multi-scale feature extraction mechanism, a dynamic attention mechanism, and a hybrid channel attention mechanism; The multi-scale feature extraction mechanism performs convolution processing on noise samples generated at different times by the diffusion model and the corresponding optimized images to obtain feature maps of different scales, and splices the feature maps of different scales based on the time step to form a multi-scale feature map; The dynamic attention mechanism adaptively adjusts the attention weight according to the complexity of the multi-scale feature map; The hybrid channel attention mechanism is used to capture the global context information of multi-scale feature maps.

Citation Information

Cited By

  • Underwater image enhancement method and device based on multi-resolution diffusion and color correction

    CN120107108A

  • Underwater Image Enhancement Method and Device Based on Multi-Resolution Diffusion and Color Correction

    CN120107108B

  • Crowd density identification method and system based on dynamic optimization diffusion model

    CN120356154A

  • A crowd density recognition method and system based on a dynamic optimization diffusion model

    CN120356154B

  • Unmanned ship dynamic illumination correction method and system based on residual diffusion model

    CN120612261A