Semi-supervised underwater image enhancement system and method based on wavelet transform and diffusion model
By combining wavelet transform and diffusion model, a semi-supervised underwater image enhancement method is developed, which solves the problems of computational resource consumption and data size limitations, and achieves efficient and stable underwater image enhancement results, suitable for complex underwater environments.
Patent Information
- Application Number
- CN202510891017.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-11-18
AI Technical Summary
Existing underwater image enhancement methods have shortcomings in terms of computational resource consumption and inference time, and due to the limited data scale, they are difficult to generalize to diverse underwater environments.
By combining wavelet transform and diffusion model, and using a semi-supervised learning framework, the image is decomposed into low-frequency and high-frequency components using discrete wavelet transform. Then, a semi-supervised underwater enhancement model is used for denoising and restoration. Finally, the image is reconstructed by combining selected kernel feature fusion and inverse discrete wavelet transform.
It significantly improves the clarity and contrast of underwater images, enhances computational efficiency, adapts to complex underwater environments, avoids model overfitting, and is suitable for practical application scenarios where data acquisition is difficult.
Smart Images

Figure CN120976027A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and computer vision technology, specifically to a semi-supervised underwater image enhancement system and method based on wavelet transform and diffusion model. Background Technology
[0002] The ocean holds immense resources, and researchers can utilize remotely operated underwater vehicles (ROVs) and other equipment to capture underwater images and video data for environmental perception and resource exploration. However, complex underwater environments and lighting conditions can significantly degrade image quality, due to wavelength-dependent attenuation and light scattering phenomena. This makes extracting useful information directly from underwater visual data extremely challenging, severely hindering the advancement of ocean-related missions. Therefore, underwater image enhancement (UIE) technology has become a key research frontier with significant practical application value.
[0003] Traditional underwater image enhancement methods rely on the physical mechanisms of the underwater imaging process, such as color correction and scattering compensation. These methods improve visual quality by analyzing degradation mechanisms like color cast and light scattering and applying corrective transformations. However, models built on physical principles have inherent limitations in their representational capabilities, failing to fully encompass the unique optical and environmental complexities of the underwater environment, resulting in poor performance under highly diverse conditions. In recent years, learning-based methods have demonstrated superior performance, achieving enhancement through the nonlinear mapping and feature extraction capabilities of deep neural networks. These models learn the mapping relationship between degraded and sharp images using large-scale paired training datasets. However, existing methods primarily process the original pixel space, neglecting the frequency domain characteristics of underwater images. This deficiency limits the full potential of deep learning architectures in synthesizing high-fidelity outputs.
[0004] In recent years, diffusion-based generative models have demonstrated significant potential in image inpainting and enhancement, achieving enhancement through iterative denoising frameworks such as denoising diffusion probabilistic models (DDPMs). This method has achieved excellent performance in tasks such as image deblurring, image restoration, and image super-resolution reconstruction. Although diffusion models have achieved satisfactory results in visual quality, they often suffer from high computational resource consumption and time-consuming inference, hindering their deployment in practical scenarios. Furthermore, the difficulty in acquiring underwater data limits the scale of underwater image data, making models trained on limited data prone to overfitting and difficult to generalize to diverse underwater environments. Summary of the Invention
[0005] The purpose of this invention is to provide a semi-supervised underwater image enhancement system and method based on wavelet transform and diffusion model. This invention proposes to integrate wavelet transform into diffusion model and construct a semi-supervised underwater image enhancement model, which solves the problems of high computational resource consumption and long inference time in existing underwater enhancement models, as well as the problem of limited data scale of underwater images. This invention can effectively reduce spatial dimension in the feature encoding stage, which can not only improve computational efficiency, but also optimize the underwater image enhancement effect by preserving structural and texture details across scales. In addition, by constructing teacher and student networks with the same structure in the semi-supervised underwater image enhancement model, and training with limited labeled data and unlabeled data, the overfitting of the model due to limited data is effectively avoided, making it suitable for complex underwater environments.
[0006] To achieve this objective, the present invention provides a semi-supervised underwater image enhancement system based on wavelet transform and diffusion model, comprising: The image decomposition module is used to decompose the underwater image to be enhanced using discrete wavelet transform to obtain the low-frequency components of the image to be enhanced, as well as the high-frequency components of the image in the vertical, horizontal and diagonal directions. The low-frequency diffusion module is used to guide the process by using the low-frequency components of the image to be enhanced as conditions. It then uses a trained neural network model in a semi-supervised underwater image enhancement model to sequentially denoise randomly generated pure noise images, thereby obtaining the enhanced low-frequency components.
[0007] During the training phase, the low-frequency diffusion module sequentially adds Gaussian noise to the low-frequency components of the label image to train the model to predict the noise. During the prediction phase, it directly uses the trained neural network model in the semi-supervised underwater image enhancement model to predict the noise to be removed based on the low-frequency components of the Gaussian noise image and the corresponding image to be enhanced in the label image. The predicted noise to be removed is then used to perform step-by-step denoising on the low-frequency components of the image to be enhanced to obtain the enhanced low-frequency components.
[0008] The high-frequency repair module is used to fuse high-frequency components in the vertical, horizontal and diagonal directions using the selected kernel feature fusion method to obtain fused multi-scale high-frequency components. The multi-scale high-frequency components are compressed to obtain compressed high-frequency components. The enhanced low-frequency components are incorporated into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. The high-frequency features with enhanced low-frequency information are then used for local feature restoration to obtain optimized high-frequency components. The inverse discrete wavelet transform module is used to fuse the optimized high-frequency components and the enhanced low-frequency components through inverse discrete wavelet transform to obtain the reconstructed enhanced image.
[0009] This invention also includes a semi-supervised underwater image enhancement method based on wavelet transform and diffusion model, comprising the following steps: The underwater image to be enhanced is decomposed using discrete wavelet transform to obtain the low-frequency components of the image to be enhanced, as well as the high-frequency components in the vertical, horizontal, and diagonal directions of the image to be enhanced. Using the low-frequency component of the image to be enhanced as a conditional guide, the trained neural network model in the semi-supervised underwater image enhancement model is used to denoise the randomly generated pure noise image in turn, and the enhanced low-frequency component is obtained. The high-frequency components in the vertical, horizontal and diagonal directions are fused using the kernel selection feature fusion method to obtain the fused multi-scale high-frequency components. The multi-scale high-frequency components are compressed to obtain compressed high-frequency components. The enhanced low-frequency components are incorporated into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. The high-frequency features with enhanced low-frequency information are then restored locally to obtain optimized high-frequency components. The optimized high-frequency components and the enhanced low-frequency components are fused using inverse discrete wavelet transform to obtain the reconstructed enhanced image.
[0010] The beneficial effects of this invention are as follows: 1. This invention effectively removes noise, enhances image structure and details, significantly improves image clarity and contrast, and enhances underwater image enhancement by combining low-frequency diffusion with high-frequency repair.
[0011] 2. The image is decomposed into multiple levels of low-frequency and high-frequency components using Discrete Wavelet Transform (DWT) to achieve hierarchical optimization processing of image structural information and details such as edge texture.
[0012] 3. By combining inverse discrete wavelet transform (IDWT), the optimized low-frequency and high-frequency components are fused layer by layer to ensure structural integrity and detail authenticity during image reconstruction.
[0013] 4. A trained neural network model is obtained by using a forward diffusion process and a reverse denoising process. This model is used to denoise and restore the low-frequency components of the enhanced image. Furthermore, noise is predicted using a deep neural network, thereby improving the stability of the image's semantic structure.
[0014] 5. By employing selection kernel feature fusion, cross-attention mechanism, and dilated convolution, we enhance the expressive power of high-frequency information and improve the quality of image edges and texture details.
[0015] 6. Based on the Mean Teacher architecture, the model is trained by combining limited labeled data with a large amount of unlabeled data, which improves the adaptability and robustness of the model in real-world complex scenarios.
[0016] 7. A joint objective function consisting of diffusion loss, detail preservation loss, and content loss is introduced to ensure that the enhanced image achieves a good balance between visual quality and structural fidelity.
[0017] 8. This invention can maintain good enhancement performance even with limited labeled samples, making it particularly suitable for practical application scenarios with complex underwater imaging conditions and difficult data acquisition. Attached Figure Description
[0018] Figure 1 This is a flowchart of an underwater image enhancement system using wavelet transform and diffusion model, as described in an embodiment of the present invention. Figure 2 This is a schematic diagram of the underwater image enhancement process using wavelet transform and diffusion model in an embodiment of the present invention; Figure 3 This is a schematic diagram of a semi-supervised training framework in an embodiment of the present invention; Detailed Implementation
[0019] In real-world scenarios, acquiring labeled, realistic underwater images remains a significant challenge. Existing underwater image augmentation datasets are difficult to obtain. On one hand, real underwater data is scarce, and existing methods heavily rely on theoretical models or generative adversarial networks (GANs) to generate synthetic data simulating underwater degradation. However, these synthetic samples exhibit significant domain differences compared to real underwater images. Another approach generates pseudo-ground labels using traditional augmentation algorithms, but this is limited by the inherent augmentation capabilities of these algorithms, introducing biases. On the other hand, the data scale of underwater images is limited, and models trained on finite data are prone to overfitting and struggle to generalize to diverse underwater environments. In contrast, unlabeled underwater images are easier to acquire due to their lower acquisition costs. Therefore, this invention proposes a semi-supervised underwater image augmentation system and method based on wavelet transform and diffusion models. This system utilizes a semi-supervised learning framework to collaboratively label and unlabeled data. Pseudo-labels generated in the teacher network are used as labels in the student network for training, optimizing the low-frequency diffusion process of low-frequency components and the optimization process of high-frequency components, effectively alleviating the problem of limited underwater image data scale. Furthermore, by incorporating wavelet transform into the diffusion model, the wavelet transform decomposes the image, allowing the diffusion model to be trained and optimized separately on sub-images of different frequency bands, reducing training complexity and improving computational efficiency. The invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1: like Figures 1-3 The above describes a semi-supervised underwater image enhancement system based on wavelet transform and diffusion model, comprising: The image decomposition module is used to decompose the underwater image to be enhanced using discrete wavelet transform to obtain the low-frequency components of the image to be enhanced, as well as the high-frequency components of the image in the vertical, horizontal and diagonal directions. The low-frequency diffusion module is used to guide the process by using the low-frequency component as a condition, and to use the trained neural network model in the semi-supervised underwater image enhancement model to denoise the randomly generated pure noise image in sequence, so as to obtain the enhanced low-frequency component. During training, a forward diffusion process is used to add noise to the low-frequency components of the labeled image. Then, a neural network is used to predict the noise, a loss function is constructed to calculate the difference between the two, and then the gradient is calculated to update the weights, resulting in a trained neural network model. During prediction, the optimized neural network model in the trained semi-supervised underwater image enhancement model is used to predict the pure noise image. The low-frequency components of the image to be enhanced are used as conditional images to assist in the inverse denoising process until the enhanced low-frequency components are obtained.
[0020] The high-frequency repair module is used to fuse high-frequency components in the vertical, horizontal and diagonal directions using the selected kernel feature fusion method to obtain fused multi-scale high-frequency components. The multi-scale high-frequency components are compressed to obtain compressed high-frequency components. The enhanced low-frequency components are incorporated into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. The high-frequency features with enhanced low-frequency information are then used for local feature restoration to obtain optimized high-frequency components. The inverse discrete wavelet transform module is used to fuse the optimized high-frequency components and the enhanced low-frequency components through inverse discrete wavelet transform to obtain the reconstructed enhanced image.
[0021] The low-frequency components of an image refer to the regions where the image intensity changes gently, describing the main information of the image and serving as a comprehensive measure of the overall image intensity; the high-frequency components correspond to the parts of the image that change dramatically, containing information such as the image's outline and details.
[0022] This invention enhances underwater images through image decomposition, low-frequency diffusion, high-frequency restoration, and inverse discrete wavelet transform. The image decomposition module uses discrete wavelet transform to decompose the original image into components of different frequencies, effectively separating low-frequency and high-frequency information. The low-frequency diffusion module improves the quality of low-frequency components by sequentially adding Gaussian noise to them and using a model trained in a semi-supervised learning framework to predict and remove the noise. The high-frequency restoration module integrates high-frequency components from different directions using a kernel feature fusion method, compressing and restoring them to enhance image details. Finally, the inverse discrete wavelet transform module fuses the optimized low-frequency and high-frequency components to reconstruct the enhanced image. This method not only effectively removes blur and noise from underwater images but also significantly improves image contrast and clarity, resulting in a noticeable improvement in the visual effect of the processed underwater image and contributing to the accuracy of subsequent analysis tasks.
[0023] The above technical solution also includes: The image decomposition module is used to decompose the underwater image to be enhanced into K parts using discrete wavelet transform, and obtain the low-frequency component of the Kth decomposition of the image to be enhanced and the high-frequency components in the vertical, horizontal and diagonal directions obtained from the 1st to the Kth decomposition, respectively. The low-frequency diffusion module is used to guide the Kth decomposition of the low-frequency component as a condition, and to use the trained neural network model in the semi-supervised underwater image enhancement model to denoise the randomly generated pure noise image in sequence, so as to obtain the enhanced Kth low-frequency component. The high-frequency repair module is used to fuse the Kth high-frequency components in the vertical, horizontal and diagonal directions using the selected kernel feature fusion method to obtain the fused Kth multi-scale high-frequency component. The Kth multi-scale high-frequency component is compressed to obtain the Kth compressed high-frequency component. The enhanced Kth low-frequency component is incorporated into the Kth compressed high-frequency component to obtain the Kth high-frequency feature with enhanced low-frequency information. The Kth high-frequency feature with enhanced low-frequency information is then restored locally to obtain the Kth optimized high-frequency component. The inverse discrete wavelet transform module is used to fuse the Kth optimized high-frequency component and the enhanced Kth low-frequency component through inverse discrete wavelet transform to obtain the reconstructed K-1th enhanced low-frequency image. The reconstruction process is performed again using the (K-1)th enhanced low-frequency component. The reconstruction process is as follows: the (K-1)th high-frequency components in the vertical, horizontal and diagonal directions are fused using the kernel feature fusion method to obtain the fused (K-1)th multi-scale high-frequency component. The (K-1)th multi-scale high-frequency component is compressed to obtain the (K-1)th compressed high-frequency component. The (K-1)th enhanced low-frequency component is integrated into the (K-1)th compressed high-frequency component to obtain the (K-1)th high-frequency feature with enhanced low-frequency information. The (K-1)th high-frequency feature with enhanced low-frequency information is restored locally to obtain the (K-1)th optimized high-frequency component. The (K-1)th optimized high-frequency component and the (K-1)th enhanced low-frequency component are reconstructed using the inverse discrete wavelet transform module to obtain the (K-2)th enhanced low-frequency component. The (K-2)th enhanced low-frequency component is used to perform the reconstruction process again until the final enhanced image is obtained.
[0024] The underwater image is decomposed using K wavelet transforms. The resulting low-frequency component undergoes a low-frequency diffusion process and is then reconstructed using an inverse wavelet transform with the optimized Kth high-frequency component to obtain the (K-1)th low-frequency component. This is repeated multiple times with the corresponding optimized high-frequency components to finally obtain the enhanced image. Decomposing the underwater image to be enhanced K times using discrete wavelet transform not only yields the core low-frequency component but also high-frequency components in different directions (vertical, horizontal, and diagonal). This allows different image features to be processed separately, resulting in more accurate noise removal and detail preservation. The inverse discrete wavelet transform module is responsible for fusing the optimized low-frequency and high-frequency components, progressively improving image quality through layer-by-layer reconstruction, ultimately obtaining an enhanced image with higher clarity and stronger contrast. This scheme, through multiple iterative decomposition and reconstruction, can process different levels of image information more precisely, achieving excellent enhancement results, and is particularly suitable for underwater image processing in complex environments.
[0025] In the above technical solution, the discrete wavelet transform process in the image decomposition module is as follows: ; in, , This is represented by the low-frequency component obtained from the k-th decomposition. They represent the first k The high-frequency components obtained from the sub-decomposition are in the vertical, horizontal, and diagonal directions, where H represents the vertical direction, W represents the horizontal direction, and C represents the diagonal direction. Represented as the first k- The low-frequency components obtained from 1 decomposition, if k When =1, This represents the image to be enhanced, where DWT represents the discrete wavelet transform function. Represents a real number.
[0026] By introducing Discrete Wavelet Transform (DWT), underwater images to be enhanced can be precisely decomposed across multiple scales and directions to obtain low-frequency and high-frequency components at different levels, thereby achieving the separation of image structural information and detailed features. The low-frequency components reflect the global structure and main color distribution of the image, while the high-frequency components in the vertical, horizontal, and diagonal directions capture details such as edges and textures in different directions. This multi-level decomposition mechanism based on DWT not only provides a data foundation for subsequent low-frequency diffusion and high-frequency restoration, facilitating targeted enhancement of different frequency components, but also effectively preserves the spatial hierarchy and directional features of the image, improving the clarity and naturalness of the enhanced image. Furthermore, Discrete Wavelet Transform (DWT) can reconstruct the image from the low-frequency and high-frequency components obtained after low-frequency diffusion and high-frequency restoration through inverse Discrete Wavelet Transform, comprehensively improving the performance and robustness of the underwater image enhancement system.
[0027] In the above technical solution, the low-frequency diffusion module obtains the trained neural network model in the semi-supervised underwater image enhancement model, which includes a forward diffusion process and a reverse denoising process. The forward diffusion process includes: After the label image corresponding to the image to be enhanced is decomposed by discrete wavelet transform, the low-frequency component of the label image corresponding to the low-frequency component of the image to be enhanced is obtained. By analyzing the low-frequency components of the label image Input Gaussian noise sequentially until a pure noise image is obtained. ,for The forward diffusion process is represented as: ; in, Represented as the firstt The variance scheduling parameter for controlling noise intensity in steps. Represented as an identity matrix, For the first t The covariance matrix of a normal distribution. Represents the low-frequency components of the label image Indicates the first t A diffusion image with noise added during the forward diffusion process; The first obtained by using the forward diffusion process t The expression for the step diffusion image is: ; Among them, the definition ,of It is represented as following a standard distribution. A random variable; Obtaining a pure noise image through parameter renormalization and low-frequency components of the label image The direct derivation of the mapping relation is as follows: ; in, ; when asymptotically approaching At that time, the forward diffusion process is complete; The reverse denoising process includes: Using the low-frequency components of the image to be enhanced as conditional guidance, based on the pure noise image The original data distribution is recovered sequentially by estimating the conditional distribution through deep neural network parameterization. That is, the enhanced low-frequency component In the t In this step, the inverse denoising process is represented as: ; in, The mean function parameterized for a deep neural network. For variance scheduling parameters, Represented as an identity matrix, The conditional image is the low-frequency component of the image to be enhanced, corresponding to the label image. and Represented as: ; ; in, For Deep neural networks with parameters, This represents the first step in the reverse denoising process. tThe image restored step by step is an intermediate variable generated during the denoising process.
[0028] Among them, by using the low-frequency components of the label image The Gaussian noise is input sequentially, representing time step 1 to time step 2. T Gaussian noise is added sequentially, and the state of the current time step depends only on the state of the previous time step. In the process of using a pre-trained neural network model in a semi-supervised underwater image enhancement model to sequentially denoise randomly generated pure noise images, the sequence represents the time steps. T Inverse denoising up to time 1.
[0029] The forward diffusion and reverse denoising processes in the low-frequency diffusion module enhance the structure and remove noise from the low-frequency components of the image through a diffusion model. The forward diffusion process gradually transforms the input low-frequency components into a purely noisy image by sequentially adding Gaussian noise. This process is driven by parameters... Controlling noise intensity, and obtaining parameters through the variance scheduling parameters for controlling noise intensity. A mapping relationship is established between the purely noisy image and the input low-frequency components to ensure that the noise addition process is controllable and reversible. The inverse denoising process then utilizes a deep neural network to sequentially reconstruct clear low-frequency images from the purely noisy image. and These represent the mean and variance predicted by the network, respectively. Combined with the low-frequency components of the original underwater image, these components are used to make sequential predictions, thereby improving the accuracy of image enhancement. Through the aforementioned low-frequency diffusion process, not only is the structural information of the image enhanced, but noise interference is also effectively suppressed, providing a high-quality foundation for subsequent high-frequency restoration and image reconstruction, and significantly improving the effect and stability of underwater image enhancement.
[0030] In the above technical solution, the low-frequency diffusion module aims to minimize the difference between the noise predicted by the deep neural network and the actual noise. An objective function is established to optimize the noise predicted by the deep neural network. The objective function is: ; in, Represented as real noise, Represented as prediction noise, This represents the low-frequency component after enhancement by the low-frequency diffusion module. This represents the low-frequency components of the labeled image. , t Represented as the first t Each time step For conditional images; By optimizing the training process through the objective function, the trained neural network model in the semi-supervised underwater image enhancement model is obtained.
[0031] Using the objective function This study optimizes the difference between predicted and actual noise in the low-frequency diffusion module using a deep neural network, improving the model's accuracy in low-frequency image reconstruction. This includes measuring the mean squared error between predicted and actual noise to ensure the model accurately identifies and removes noise components from the image; and introducing a reconstruction error term to compare the enhanced low-frequency components. With the low-frequency components of the input The differences in image structure and content are carefully considered to ensure the fidelity of the enhanced image. This objective function not only provides excellent denoising capabilities throughout the diffusion process but also maintains stable learning of semantic information at different diffusion stages. Furthermore, introducing a conditional image as input allows the model to reference the original information of the image to be enhanced during denoising, thus achieving more accurate image noise prediction. This loss function effectively improves the clarity, contrast, and structural integrity of the low-frequency components of underwater images, laying a high-quality foundation for subsequent high-frequency restoration and overall image reconstruction.
[0032] In the above technical solution, the high-frequency repair module uses a kernel-selective feature fusion method to fuse high-frequency components in the vertical, horizontal, and diagonal directions to obtain fused multi-scale high-frequency components. The multi-scale high-frequency components are then compressed to obtain compressed high-frequency components. The compressed high-frequency components and the enhanced low-frequency components are then combined using depthwise separable convolution to extract features, resulting in low-frequency and high-frequency features. Cross-attention is used to fuse the low-frequency features into the high-frequency features to obtain high-frequency features enhanced with low-frequency information. Finally, dilated convolution is used to restore local features and obtain optimized high-frequency components.
[0033] High-frequency components in the vertical, horizontal, and diagonal directions are fused using a kernel-selective feature fusion method. The receptive field is adaptively adjusted through feature aggregation and selection to better integrate high-frequency coefficient information. Furthermore, the number of channels for the three coefficients is compressed from 3*C to C to facilitate subsequent information fusion via a cross-attention mechanism. The specific process is as follows: High-frequency components in the vertical, horizontal, and diagonal directions are extracted by selecting different receptive fields to capture feature information at different scales. The features extracted in the three directions are aggregated to obtain a global channel statistical vector of multi-scale distribution information. Using adaptive receptive fields, fusion weights are dynamically and adaptively assigned to the three directions to obtain the final fused multi-scale high-frequency components. The aggregation is then compressed by channel compression, reducing the number of channels of the high-frequency components in the three directions from 3*C to C to obtain compressed high-frequency components.
[0034] The process of extracting features from compressed high-frequency components and enhanced low-frequency components through depthwise separable convolution to obtain low-frequency and high-frequency features is as follows: The compressed high-frequency components are input into the Depthwise convolution (channel-wise convolution) to extract spatial features from the compressed high-frequency components. Then, the Pointwise convolution is used to fuse the channel information through 1x1 convolution, and the output dimension is adjusted to obtain high-frequency and low-frequency features of the same dimension.
[0035] The process of fusing low-frequency features with high-frequency features using cross-attention to obtain high-frequency features enhanced with low-frequency information is as follows: High-frequency features are used as query vectors; low-frequency features are used to generate key-value pairs through convolutional layers; attention layers calculate the relevance weights between high-frequency units and low-frequency regions; finally, these weights are used to dynamically weight the low-frequency features, injecting their semantic information into the high-frequency components through residual connections, thus obtaining high-frequency features enhanced with low-frequency information. This process enables high-frequency textures to adaptively absorb structural priors (such as object contours) provided by low frequencies during detail reconstruction, significantly improving edge coherence.
[0036] The process of using dilated convolution to restore local features and obtain optimized high-frequency components is as follows: First, the high-frequency features enhanced by low-frequency input information are channel-adjusted. Then, multiple convolutional layers with increasing dilation rates are used to extract features step by step. Small dilation rates focus on local details, while large dilation rates capture global context. Next, features with different dilation rates are concatenated and integrated through a fusion layer. Finally, the fusion result is added to the original input to obtain optimized high-frequency components, which both preserves the initial information and injects multi-scale features.
[0037] The high-frequency restoration module optimizes high-frequency information in underwater images through a multi-step process, thereby improving image detail and clarity. First, a kernel-selective feature fusion method is used to fuse the high-frequency components in the vertical, horizontal, and diagonal directions of the input, effectively integrating edge and texture information from different directions and enhancing the image's multi-scale detail representation. Next, the fused high-frequency components are compressed to reduce redundant information and improve computational efficiency, facilitating subsequent information fusion with the enhanced low-frequency components via a cross-attention mechanism. High- and low-frequency features are extracted separately using depthwise separable convolution, and the cross-attention mechanism integrates the low-frequency features of the enhanced low-frequency components into the high-frequency features, enhancing high-frequency details while preserving semantic structure. This improves edge sharpness and texture detail. Finally, dilated convolution is used to locally restore the high-frequency features fused with low-frequency features, outputting optimized high-frequency components that further enhance edge sharpness and texture detail, ultimately yielding optimized high-frequency components. This module significantly improves the detail quality of underwater images, providing higher-quality high-frequency information support for subsequent image reconstruction.
[0038] In the above technical solution, the inverse discrete wavelet transform module utilizes inverse discrete wavelet transform fusion to reconstruct the enhanced low-frequency components and optimized high-frequency components, thus reconstructing the first... k-1 The enhanced image is: ; in, For the first k Secondary optimization of high-frequency components. Represented as the first wavelet reconstructed using inverse discrete wavelet transform k Secondary enhancement of low-frequency images, when k When =K, This represents the enhanced low-frequency component after the Kth decomposition. It is represented as the inverse discrete wavelet transform function.
[0039] This module uses Inverse Discrete Wavelet Transform (IDWT) to reconstruct the image from optimized high-frequency components and enhanced low-frequency components, sequentially restoring high-quality underwater images. Reconstructing the image layer by layer, starting from layer K, not only preserves the global structural information of the image but also effectively integrates edge and texture features from multiple scales, improving the overall clarity and visual naturalness of the image. Furthermore, the layer-by-layer reconstruction mechanism provides good hierarchy and controllability in the image enhancement process, enhancing its adaptability to problems such as blur, color cast, and noise under complex underwater imaging conditions, thus providing a solid guarantee for obtaining a structurally complete and detail-rich enhanced image.
[0040] The Kth layer is reconstructed as the Kth decomposed low-frequency component after low-frequency component enhancement. The inverse discrete wavelet transform process is performed on the Kth optimized high-frequency component to obtain the reconstructed (K-1)th low-frequency component. Using the reconstructed K-1th low-frequency component and the (K-1)th optimization of high-frequency components Continue with the inverse discrete wavelet transform process.
[0041] In the above technical solution, the high-frequency restoration module utilizes detail preservation loss to guide high-frequency reconstruction and introduces content loss to mitigate the difference between the restored image and the reference image, specifically: ; ; in, Represented as a detail-preserving loss function, This is represented as content loss. Represented as high-frequency fidelity weighting coefficient, The weighting coefficients are represented as high-frequency regularization weighting coefficients, and TV represents the total variational loss. Represented as the enhanced image, Represented as tag data, This is represented as the structural similarity between the enhanced image and the label data. For the first k Optimized high-frequency components in the vertical, horizontal, and diagonal directions of the sub-decomposition. They represent the first k The high-frequency components obtained from the decomposition in the vertical, horizontal and diagonal directions.
[0042] SSIM (Structural Similarity Index) is an index that measures the structural similarity between two images. SSIM calculates brightness, contrast, and structural similarity separately in a local sliding window of the image, multiplies the three as the local similarity, and finally averages the results of all windows to obtain a comprehensive evaluation of the structural similarity between the two images.
[0043] This paper introduces detail-preserving loss and content loss to optimize the high-frequency inpainting module. Detail-preserving loss ensures that the enhanced image maintains high consistency with the original image in terms of local details such as edges and textures by applying fidelity constraints to high-frequency components (vertical, horizontal, and diagonal directions) across multiple scales. Simultaneously, it combines a total variation (TV) term to suppress high-frequency noise and artifacts, improving the smoothness and naturalness of the image. Content loss, on the other hand, focuses on the overall structure, using the L1 norm and structural similarity (SSIM) to measure the difference between the enhanced and reference images, effectively preserving the semantic information and visual quality of the image. The combination of these two methods not only improves the detail clarity and structural accuracy of the image but also enhances the model's robustness in complex underwater environments, resulting in higher-quality and more realistic enhancement effects, providing reliable support for subsequent image analysis and applications.
[0044] In the above technical solution, the construction process of the semi-supervised underwater image enhancement model for the low-frequency diffusion and high-frequency restoration modules is as follows: using a mean teacher architecture, two identical teacher and student networks are trained using labeled and unlabeled data respectively. The teacher network parameters are updated using an exponential moving average of the student parameters. ; in, This represents the weight of the teacher network. This represents the weight of the student network. The weighting coefficients represent the exponential moving average, which are used to update the student network through the teacher network. The student network parameters are optimized using gradient descent, with the objective function being the minimization of the composite loss. in and These are the supervised and unsupervised loss items, respectively. Represented as the weight coefficient of the unsupervised loss term, and the supervised loss term. and unsupervised losses All include a diffusion objective function, detail preservation loss, and content loss: ; Unsupervised loss The pseudo-labels generated by the teacher network are used as labels for training.
[0045] This paper describes the construction of a semi-supervised underwater image enhancement model based on a Mean Teacher architecture. The model is trained using limited labeled data and a large amount of unlabeled data, resulting in a trained semi-supervised underwater image enhancement model. Specifically, by constructing teacher and student networks with identical structures and using exponential moving average (EMA) to update the teacher network parameters, the model maintains more stable and higher-quality pseudo-label prediction capabilities during training, effectively guiding learning on unlabeled data. The student network optimizes a composite loss function containing supervised and unsupervised losses through gradient descent. The supervised loss utilizes real labels to optimize the model's enhancement ability on known data, while the unsupervised loss uses pseudo-labels generated by the teacher network to mine potential information in unlabeled data, enhancing the model's robustness in complex underwater environments. This method not only improves the model's data utilization and training stability but also significantly improves the quality and detail of image enhancement, making it particularly suitable for underwater image processing tasks where obtaining a large number of labeled samples is difficult in practical applications. It also enhances the model's generalization ability and enhancement effect.
[0046] like Figure 2 The diagram shows a schematic of the underwater image enhancement process based on wavelet transform and diffusion model. Represented as a label image k The -1st order low-frequency components are used to calculate the loss function and train the model.
[0047] Example 2: A semi-supervised underwater image enhancement method based on wavelet transform and diffusion model includes the following steps: Step 1: Decompose the underwater image to be enhanced using discrete wavelet transform to obtain the low-frequency components of the image to be enhanced, as well as the high-frequency components in the vertical, horizontal, and diagonal directions of the image to be enhanced. Step 2 uses the low-frequency component as a conditional guide and employs the trained neural network model in the semi-supervised underwater image enhancement model to sequentially denoise the randomly generated pure noise image to obtain the enhanced low-frequency component. Step 3: Use the kernel selection feature fusion method to fuse the high-frequency components in the vertical, horizontal and diagonal directions to obtain the fused multi-scale high-frequency components. Compress the multi-scale high-frequency components to obtain compressed high-frequency components. Integrate the enhanced low-frequency components into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. Perform local feature restoration on the high-frequency features with enhanced low-frequency information to obtain optimized high-frequency components. Step 4: The optimized high-frequency components and the enhanced low-frequency components are fused using inverse discrete wavelet transform to obtain the reconstructed enhanced image.
[0048] The specific process is as follows: 1. The underwater image to be enhanced is decomposed K times using discrete wavelet transform to obtain the low-frequency component obtained by the Kth decomposition and the high-frequency components in the vertical, horizontal and diagonal directions obtained by the 1st to Kth decomposition. After the 1st decomposition, the low-frequency component obtained by the first decomposition is subjected to discrete wavelet transform again to obtain the low-frequency component of the 2nd decomposition and the high-frequency components in the vertical, horizontal and diagonal directions of the 2nd decomposition. This process is repeated until the low-frequency component obtained by the Kth decomposition is obtained.
[0049] 2. Using the low-frequency component of the Kth decomposition as a conditional guide, the trained neural network model in the semi-supervised underwater image enhancement model is used to denoise the randomly generated pure noise image in turn to obtain the enhanced Kth low-frequency component. 3. The high-frequency components obtained from the 1st to the Kth decomposition in the vertical, horizontal and diagonal directions are processed as follows to obtain the optimized high-frequency components from the 1st to the Kth decomposition: The high-frequency components in the vertical, horizontal and diagonal directions are fused using the kernel feature fusion method to obtain the fused multi-scale high-frequency components. The multi-scale high-frequency components are compressed to obtain compressed high-frequency components. The enhanced low-frequency components are incorporated into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. The high-frequency features with enhanced low-frequency information are then restored locally to obtain the optimized high-frequency components. 5. The optimized Kth high-frequency component and the enhanced Kth low-frequency component are fused by inverse discrete wavelet transform to obtain the (K-1)th enhanced low-frequency component.
[0050] 6. Using the (K-1)th enhanced low-frequency component and the (K-1)th optimized high-frequency component, continue the inverse discrete wavelet transform process to obtain the (K-2)th reconstructed low-frequency component, and so on, until the enhanced image of the image to be enhanced is obtained.
[0051] Example 3: A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0052] Example 4: A computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0053] The contents not described in detail in this specification are existing technologies known to those skilled in the art.
Claims
1. A semi-supervised underwater image enhancement system based on wavelet transform and diffusion model, characterized in that, include: The image decomposition module is used to decompose the underwater image to be enhanced using discrete wavelet transform to obtain the low-frequency components of the image to be enhanced, as well as the high-frequency components of the image in the vertical, horizontal and diagonal directions. The low-frequency diffusion module is used to guide the process by using the low-frequency component as a condition, and to use the trained neural network model in the semi-supervised underwater image enhancement model to denoise the randomly generated pure noise image in sequence, so as to obtain the enhanced low-frequency component. The high-frequency repair module is used to fuse high-frequency components in the vertical, horizontal and diagonal directions using the selected kernel feature fusion method to obtain fused multi-scale high-frequency components. The multi-scale high-frequency components are compressed to obtain compressed high-frequency components. The enhanced low-frequency components are incorporated into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. The high-frequency features with enhanced low-frequency information are then used for local feature restoration to obtain optimized high-frequency components. The inverse discrete wavelet transform module is used to fuse the optimized high-frequency components and the enhanced low-frequency components through inverse discrete wavelet transform to obtain the reconstructed enhanced image.
2. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 1, characterized in that, Also includes: The image decomposition module is used to decompose the underwater image to be enhanced into K parts using discrete wavelet transform, and obtain the low-frequency component of the Kth decomposition of the image to be enhanced and the high-frequency components in the vertical, horizontal and diagonal directions obtained from the 1st to the Kth decomposition, respectively. The low-frequency diffusion module is used to guide the Kth decomposition with the low-frequency component as a condition, and to use the trained neural network model in the semi-supervised underwater image enhancement model to denoise the randomly generated pure noise image in sequence, so as to obtain the enhanced Kth low-frequency component. The high-frequency repair module is used to fuse the Kth high-frequency components in the vertical, horizontal and diagonal directions using the selected kernel feature fusion method to obtain the fused Kth multi-scale high-frequency component. The Kth multi-scale high-frequency component is compressed to obtain the Kth compressed high-frequency component. The enhanced Kth low-frequency component is incorporated into the Kth compressed high-frequency component to obtain the Kth high-frequency feature with enhanced low-frequency information. The Kth high-frequency feature with enhanced low-frequency information is then restored locally to obtain the Kth optimized high-frequency component. The inverse discrete wavelet transform module is used to fuse the Kth optimized high-frequency component and the enhanced Kth low-frequency component through inverse discrete wavelet transform to obtain the reconstructed K-1th enhanced low-frequency image. The K-1 enhanced low-frequency components undergo a second reconstruction process, which involves fusing the K-1 high-frequency components in the vertical, horizontal, and diagonal directions using a kernel feature fusion method to obtain the fused K-1 multi-scale high-frequency components. These K-1 multi-scale high-frequency components are then compressed to obtain the K-1 compressed high-frequency components. The K-1 enhanced low-frequency components are then integrated into the K-1 compressed high-frequency components to obtain the K-1 high-frequency features with enhanced low-frequency information. Local feature restoration is performed on these K-1 high-frequency features to obtain the K-1 optimized high-frequency components. The K-1 optimized high-frequency components and the K-1 enhanced low-frequency components are then reconstructed using an inverse discrete wavelet transform module to obtain the K-2 enhanced low-frequency components. The K-2 enhanced low-frequency components are then used to perform a second reconstruction process until the final enhanced image is obtained.
3. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 2, characterized in that, In the image decomposition module, the discrete wavelet transform process is as follows: ; in, , Represented as the first k The low-frequency components obtained from the second decomposition. They represent the first k The high-frequency components obtained from the sub-decomposition are in the vertical, horizontal, and diagonal directions, where H represents the vertical direction, W represents the horizontal direction, and C represents the diagonal direction. Represented as the first k- The low-frequency components obtained from 1 decomposition, if k When =1, This represents the image to be enhanced, where DWT represents the discrete wavelet transform function. Represents a real number.
4. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 3, characterized in that, In the low-frequency diffusion module, the trained neural network model obtained in the semi-supervised underwater image enhancement model includes: a forward diffusion process and a reverse denoising process; The forward diffusion process includes: After the label image corresponding to the image to be enhanced is decomposed by discrete wavelet transform, the low-frequency component of the label image corresponding to the low-frequency component of the image to be enhanced is obtained. By analyzing the low-frequency components of the label image Input Gaussian noise sequentially until a pure noise image is obtained. ,for The forward diffusion process is represented as: ; in, Represented as the first t The variance scheduling parameter for controlling noise intensity in steps. Represented as an identity matrix, For the first t The covariance matrix of a normal distribution. This represents the low-frequency components of the labeled image. Indicates the first t A diffusion image with noise added during the forward diffusion process; The first obtained by using the forward diffusion process t The process of step-by-step image diffusion is as follows: ; Among them, the definition , It is represented as following a standard distribution. A random variable; Obtaining a pure noise image through parameter renormalization and low-frequency components of the label image The direct derivation of the mapping relation is as follows: ; in, ; when asymptotically approaching At that time, the forward diffusion process is complete; The reverse denoising process includes: Using the low-frequency components of the image to be enhanced as conditional guidance, based on the pure noise image By estimating the conditional distribution through deep neural network parameterization, the original data distribution, i.e., the low-frequency components of the image to be enhanced, is restored sequentially. In the t In the next step, the reverse denoising process is as follows: ; in, This represents the first step in the reverse denoising process. t The image was restored step by step. The mean function parameterized for a deep neural network. For variance scheduling parameters, Represented as an identity matrix, The conditional image is the low-frequency component of the image to be enhanced. and Represented as: ; ; in, For A deep neural network with parameters.
5. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 4, characterized in that, In the low-frequency diffusion module, the objective function for optimizing the noise predicted by the deep neural network is established with the goal of minimizing the difference between the noise predicted by the deep neural network and the actual noise. The objective function is: ; in, Represented as real noise, Represented as prediction noise, This represents the low-frequency component after passing through the low-frequency diffusion module. This represents the low-frequency components of the labeled image. , t Represented as the first t Each time step For conditional images; By optimizing the training process through the objective function, the trained neural network model in the semi-supervised underwater image enhancement model is obtained.
6. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 5, characterized in that, In the high-frequency repair module, the high-frequency components in the vertical, horizontal, and diagonal directions are fused using a kernel-selective feature fusion method to obtain fused multi-scale high-frequency components. The multi-scale high-frequency components are then compressed to obtain compressed high-frequency components. The compressed high-frequency components and the enhanced low-frequency components are then subjected to feature extraction through depthwise separable convolution to obtain low-frequency and high-frequency features. The low-frequency features are then fused into the high-frequency features using cross-attention to obtain high-frequency features with enhanced low-frequency information. Finally, local feature restoration is performed using dilated convolution to obtain optimized high-frequency components.
7. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 6, characterized in that, In the inverse discrete wavelet transform module, detail-preserving loss is used to guide high-frequency reconstruction, and content loss is introduced to mitigate the difference between the restored image and the reference image. Specifically: ; ; in, Represented as a detail-preserving loss function, This is represented as content loss. Represented as high-frequency fidelity weighting coefficient, The weighting coefficients are represented as high-frequency regularization weighting coefficients, and TV represents the total variational loss. Represented as the enhanced image, Represented as label data, This is represented as the structural similarity between the enhanced image and the label data. For the first k Optimized high-frequency components in the vertical, horizontal, and diagonal directions of the sub-decomposition. They represent the first k The high-frequency components obtained from the decomposition in the vertical, horizontal and diagonal directions.
8. The semi-supervised underwater image enhancement system based on wavelet transform and diffusion model according to claim 7, characterized in that, In the low-frequency diffusion and high-frequency restoration modules, the construction process of the semi-supervised underwater image enhancement model is as follows: using a meanteacher architecture, a teacher network and a student network with identical structures are trained on labeled and unlabeled data respectively. The teacher network parameters are updated through an exponential moving average of the student parameters. ; in, This represents the weight of the teacher network. This represents the weight of the student network. The weighting coefficients of the exponential moving average; The student network parameters are optimized using gradient descent, with the objective function being the minimization of the composite loss. ; in and These are the supervised and unsupervised loss items, respectively. Represented as the weight coefficient of the unsupervised loss term, and the supervised loss term. and unsupervised losses All include a diffusion objective function, detail preservation loss, and content loss: ; Unsupervised loss The pseudo-labels generated by the teacher network are used as labels for training.
9. A semi-supervised underwater image enhancement method based on wavelet transform and diffusion model, characterized in that, Includes the following steps: The underwater image to be enhanced is decomposed using discrete wavelet transform to obtain the low-frequency components of the image to be enhanced, as well as the high-frequency components in the vertical, horizontal, and diagonal directions of the image to be enhanced. Using the low-frequency component as a conditional guide, the trained neural network model in the semi-supervised underwater image enhancement model is used to denoise the randomly generated pure noise image in sequence to obtain the enhanced low-frequency component. The high-frequency components in the vertical, horizontal and diagonal directions are fused using the kernel selection feature fusion method to obtain the fused multi-scale high-frequency components. The multi-scale high-frequency components are compressed to obtain compressed high-frequency components. The enhanced low-frequency components are incorporated into the compressed high-frequency components to obtain high-frequency features with enhanced low-frequency information. The high-frequency features with enhanced low-frequency information are then restored locally to obtain optimized high-frequency components. The optimized high-frequency components and the enhanced low-frequency components are fused using inverse discrete wavelet transform to obtain the reconstructed enhanced image.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 9.
Citation Information
Cited By
Image restoration method and system based on self-content-guided diffusion model
CN121685336A
Image restoration method and system based on self-content guided diffusion model
CN121685336B
Image denoising model training and image denoising method, image denoising model training device, equipment and medium
CN122391016A
Image denoising model training and image denoising methods, image denoising model training devices, equipment and media
CN122391016B