A two-stage blind image dehazing method of priori guided diffusion

By employing a two-stage blind image dehazing method based on prior-guided diffusion, and utilizing techniques such as an improved atmospheric scattering model and adaptive differential fusion convolution, this method solves the image distortion problem in complex scenes, achieves efficient image dehazing, and improves image clarity and color fidelity.

CN121280273BActive Publication Date: 2026-03-17TAIYUAN UNIVERSITY OF TECHNOLOGY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511463620.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-03-17
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

Existing image dehazing techniques suffer from distortion in complex scenes, especially in dense fog conditions where image structure is damaged and color is distorted. Furthermore, they are computationally expensive and difficult to adapt to real-time scenarios.

Method used

A two-stage blind image dehazing method with prior-guided diffusion is adopted. Physical modeling is performed through an improved atmospheric scattering model. Combined with adaptive differential fusion convolution, fog domain multi-source fusion attention mechanism and pixel-level wavelet domain dual-effect color correction strategy, the image restoration quality and color fidelity are improved.

Benefits of technology

It significantly improves the structural integrity and visual rationality of images in complex scenes, enhances the ability to restore high-frequency details, has a wider range of applications, suppresses color distortion, and improves image clarity and color fidelity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280273B_ABST
    Figure CN121280273B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of deep learning, and particularly relates to a two-stage blind image defogging method based on priori guiding diffusion, aiming at solving the distortion problem of traditional defogging methods in complex scenes. The method comprises constructing a two-stage blind image defogging model, which comprises a first stage and a second stage. The first stage is based on an improved atmospheric scattering model for physical modeling, and the improved atmospheric scattering model is an enhanced atmospheric scattering model with the introduction of an optical absorption coefficient. The first stage outputs a transmission map, a haze-free reference image and an atmospheric light parameter. The second stage is based on a diffusion model for generation optimization. The transmission map, the haze-free reference image and the atmospheric light parameter output by the first stage are used as physical priors to be integrated into the generation process of the diffusion model for image defogging. In the second stage, an adaptive difference fusion convolution is set, a fog domain multi-source fusion attention mechanism is set, and a pixel-level and wavelet domain dual-effect color correction strategy is adopted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and in particular to a two-stage blind image dehazing method based on prior-guided diffusion. Background Technology

[0002] In foggy environments, the absorption and scattering of light by suspended particulate matter significantly degrades image quality, manifesting as blurred details and textures, reduced color fidelity, and decreased contrast. This type of image degradation not only weakens the image's inherent information clarity but also hinders subsequent computer vision tasks that rely on clear images. Applications such as environmental perception in autonomous driving, behavior recognition in surveillance systems, and land cover classification from remote sensing imagery may all be affected. Therefore, image dehazing technology has become an important research direction in the field of computer vision.

[0003] Atmospheric scattering models decompose foggy images into a direct attenuation term and an atmospheric light component. Based on this model, researchers have developed classic methods such as dark channel priors and guided filtering. However, these methods rely on artificial prior knowledge assumed for specific scenarios, resulting in limited robustness. In recent years, deep learning-driven end-to-end deep dehazing methods have made progress in light fog scenes, but they are prone to image structure destruction and color distortion under dense fog conditions. Existing dehazing methods based on diffusion models, due to insufficient integration of the physical characteristics of foggy imaging, suffer from insufficient high-frequency information completion in the generated image, color shift, and the high sampling iteration count and computational load of traditional diffusion models, making them difficult to adapt to real-time scenarios. Summary of the Invention

[0004] The purpose of this invention is to provide a two-stage blind image dehazing method based on prior-guided diffusion, which aims to solve the distortion problem that occurs in traditional dehazing methods in complex scenes.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] This invention provides a two-stage blind image dehazing method based on prior-guided diffusion, comprising: S1: Constructing a two-stage blind image dehazing model, which includes a first stage and a second stage; wherein, the first stage performs physical modeling based on an improved atmospheric scattering model, which is an enhanced atmospheric scattering model incorporating a light absorption coefficient, and outputs a transmission map, a haze-free reference image, and atmospheric light parameters through the first stage; the second stage performs generation optimization based on a diffusion model, incorporating the transmission map, haze-free reference image, and atmospheric light parameters output from the first stage as physical priors into the generation process of the diffusion model for image dehazing. S2: In the second stage, an adaptive differential fusion convolution is set; the adaptive differential fusion convolution is a convolutional structure that dynamically fuses ordinary convolution and multi-directional differential convolution, which enhances the image's ability to recover high-frequency details at multiple scales. S3: In the second stage, a fog domain multi-source fusion attention mechanism is set; the fog domain multi-source fusion attention mechanism is an attention structure that integrates physical features, diffusion intermediate features, and semantic context, which strengthens the association of global features in the image. S4: In the second stage, a dual-effect color correction strategy of pixel-level and wavelet domain is adopted; the dual-effect color correction strategy of pixel-level and wavelet domain is a color adjustment method that combines pixel domain correction and wavelet domain correction; the dual-effect color correction strategy of pixel-level and wavelet domain suppresses image color distortion in the diffusion model generation process, so as to improve the image color fidelity.

[0007] Step S1 includes the following sub-steps: S11: Add prediction branches for atmospheric light, scene depth, and scattering coefficients to the backbone network based on the DFP network; S12: Generate a reconstructed fog map using the atmospheric light, scene depth, and scattering coefficients output by the prediction branches through the physical reconstruction layer of the backbone network; S13: Construct a multi-task loss function to optimize the parameter estimation process of the transmission map, the fog-free reference image, atmospheric light parameters, and the reconstructed fog map.

[0008] The multi-task loss function is:

[0009] in, , , The estimated losses are for haze-free images, transmission maps, and atmospheric light, respectively. To reconstruct the loss between the fog map and the input fog map, , , , This is the balance coefficient.

[0010] Step S2 includes the following sub-steps: S21: Construct a five-branch parallel structure, which includes a normal convolution branch, a central difference convolution branch, a diagonal difference convolution branch, a horizontal difference convolution branch, and a vertical difference convolution branch; S22: Calculate the fog density map based on the transmission map output in step S1, and normalize the fog density map. Adjust the fusion weights of each difference convolution branch and the normal convolution branch according to the normalized fog density map through a dynamic weight allocation strategy; S23: Use reparameterization technology to convert the five-branch parallel structure into a single convolutional layer, which enhances the ability to perceive high-frequency details of the image while maintaining computational efficiency.

[0011] The fusion weights of each differential convolutional branch and the ordinary convolutional branch are adjusted according to the normalized fog density map using a dynamic weight allocation strategy, based on the following formula:

[0012]

[0013] in, For the sigmoid function, , These are learnable parameters.

[0014] Step S3 includes the following sub-steps: S31: Set up a multi-head feature decomposition mechanism to decompose the haze-free reference image features output in step S1 into three types of sub-features, and process each type of sub-feature separately through independent sub-heads; wherein, the three types of sub-features include edge structure features, texture detail features, and color distribution features; S32: Construct a multi-class attention fusion structure, which includes haze image attention, dehaze reference image attention, self-attention, and cross-attention; S33: Perform correlation processing on the features output by the multi-class attention fusion structure through one-hot mapping and weighted summation, and finally output the fused features.

[0015] In sub-step S32, the attention for haze images uses the intermediate features of the U-shaped network as the query and the haze image features as the key; the attention for dehaze reference images uses the haze image features as the query and the features of the haze-free reference images as the key; and the cross-attention introduces the semantic embedding extracted by the CLIP image encoder as the key.

[0016] Step S4 includes the following sub-steps: S41: Perform wavelet multi-scale decomposition on the image generated by the diffusion model and the input fog image respectively to obtain their corresponding high-frequency components and low-frequency components; S42: In the pixel domain, perform mean and standard deviation alignment correction on the low-frequency components of the generated image and the low-frequency components of the input fog image; S43: Fuse the corrected low-frequency components of the generated image with the original high-frequency components of the generated image obtained in sub-step S41 to reconstruct the final defogging image.

[0017] In step S42, the alignment correction of the mean and standard deviation is performed on the three RGB channels of the image respectively. The pixel value distribution of the low-frequency component of the generated image is adjusted by inputting the mean and standard deviation of the low-frequency component of the fog image.

[0018] In step S1, the second-stage diffusion model is built on a lightweight and stable diffusion architecture. The main parameters of the pre-trained model in this architecture are frozen, and only the ControlNet conditional control branch is fine-tuned. The computational efficiency is improved by reducing the number of sampling steps in the diffusion model.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0020] 1. The prior-guided diffusion two-stage blind image dehazing method provided in this application adopts a two-stage collaboration to improve the restoration quality and achieve synergistic optimization of physical realism and generation diversity. The first stage is based on the enhanced atmospheric scattering model with the introduction of light absorption coefficient for physical modeling. The output transmission map, fog-free reference image and atmospheric light parameters provide accurate physical priors for the second stage, avoiding the diffusion model from generating results that do not conform to the imaging law of foggy weather. The second-stage diffusion model uses this physical prior to compensate for the information loss in dense fog areas, solves the problem of insufficient detail recovery in complex texture areas by traditional physical dehazing methods, and significantly improves the structural integrity and visual rationality of the dehazed image.

[0021] 2. By using a five-branch parallel structure of adaptive differential fusion convolution, the feature extraction advantages of ordinary convolution and multi-directional differential convolution are dynamically integrated. Combined with a dynamic weight allocation strategy based on the transmission map and reparameterization technology, while ensuring computational efficiency, the extraction and reconstruction of high-frequency details such as edges and textures in dense fog areas can be specifically enhanced, which greatly improves the clarity in complex scenes.

[0022] 3. The fog domain multi-source fusion attention mechanism achieves refined processing of fog-free reference image features through multi-head feature decomposition, and integrates fog image attention, defogging reference image attention, self-attention and cross attention. It integrates physical features, diffuse intermediate features and semantic context, strengthens the correlation between global features, and enables the model to still output high-quality defogging results stably in complex fog scenarios such as non-uniform fog and dense fog, with a wider range of applications.

[0023] 4. A dual-effect color correction strategy at the pixel level and wavelet domain: First, wavelet multi-scale decomposition is performed on the input hazy image and the generated dehazed image to obtain high-frequency and low-frequency components at different levels. Then, in the pixel domain, the low-frequency components of the generated image are statistically aligned with the low-frequency components of the input image. Finally, the corrected low-frequency components are fused with the original high-frequency components. This can effectively suppress problems such as color cast in the sky area and inconsistent color in the transition zone that are prone to occur during the generation process of the diffusion model, and improve the color fidelity of the image. Attached Figure Description

[0024] Figure 1 This is a flowchart of a two-stage blind image dehazing method based on prior-guided diffusion provided in an embodiment of this application;

[0025] Figure 2 This is a schematic diagram of the model structure of a two-stage blind image dehazing method with prior guided diffusion provided in an embodiment of this application;

[0026] Figure 3 This is a schematic diagram of an ADFConv structure provided in an embodiment of this application;

[0027] Figure 4 This is a schematic diagram of an FD-MSFA structure provided in an embodiment of this application;

[0028] Figure 5 This is a schematic diagram illustrating the quantitative comparison results of different methods on the DENSE-HAZE dataset provided in the embodiments of this application;

[0029] Figure 6 This is a schematic diagram illustrating the quantitative comparison results of different methods on the NH-HAZE dataset provided in the embodiments of this application;

[0030] Figure 7 This is a schematic diagram illustrating the quantitative comparison results of different methods on the SOTS dataset provided in the embodiments of this application;

[0031] Figure 8 This is a comparison chart of the effects of different methods provided in the embodiments of this application on the DENSE-HAZE dataset;

[0032] Figure 9 This is a comparison chart of the effects of different methods provided in the embodiments of this application on the NH-HAZE dataset;

[0033] Figure 10 This is a comparison chart showing the effects of different methods provided in the embodiments of this application on the SOTS dataset. Detailed Implementation

[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0035] This application provides a two-stage blind image dehazing method based on prior-guided diffusion, exemplified by, for example... Figure 1 As shown, the method includes:

[0036] S1: Construct a two-stage blind image dehazing model, which includes a first stage and a second stage.

[0037] The first stage is based on the improved atmospheric scattering model (EASM) for physical modeling. The improved atmospheric scattering model is an enhanced atmospheric scattering model that incorporates the light absorption coefficient. The first stage outputs a transmission map, a haze-free reference image, and atmospheric light parameters. The second stage is based on the diffusion model for generation optimization. The transmission map, haze-free reference image, and atmospheric light parameters output from the first stage are incorporated as physical priors into the generation process of the diffusion model to perform image dehazing.

[0038] For example, based on the Enhanced Atmospheric Scattering Model (EASM), a light absorption coefficient is introduced. The traditional atmospheric scattering model is modified as follows:

[0039]

[0040] in, For scene depth, For maximum depth, The scattering coefficient is... It is atmospheric light.

[0041] Step S1 includes the following sub-steps: S11: Add atmospheric light to the backbone network based on the DFP network. Scene depth Scattering coefficient The prediction branch; S12: Through the physical reconstruction layer of the backbone network, the atmospheric light output of the prediction branch is used. Scene depth Scattering coefficient Generate reconstructed fog map S13: Construct a multi-task loss function to optimize the parameter estimation process of the transmission map, the haze-free reference image, the atmospheric light parameters, and the reconstructed haze map.

[0042] The multi-task loss function is:

[0043] in, , , The estimated losses are for haze-free images, transmission maps, and atmospheric light, respectively. To reconstruct the loss between the fog map and the input fog map, , , , This is the balance coefficient.

[0044] As one possible implementation, the diffusion model in the second stage of step S1 is built based on a lightweight stable diffusion architecture. The main parameters of the pre-trained model in this architecture are frozen, and only the ControlNet conditional control branch is fine-tuned. Computational efficiency is improved by reducing the number of sampling steps in the diffusion model. For example, the number of sampling steps is reduced to 50-100 steps.

[0045] S2: In the second stage, adaptive differential fusion convolution (ADFConv) is set; adaptive differential fusion convolution is a convolution structure that dynamically fuses ordinary convolution and multi-directional differential convolution, which enhances the ability to restore high-frequency details of the image at multiple scales.

[0046] Step S2 includes the following sub-steps: S21: Construct a five-branch parallel structure, which includes a normal convolutional branch (VC), a central differential convolutional branch (CDC), a diagonal differential convolutional branch (DDC), a horizontal differential convolutional branch (HDC), and a vertical differential convolutional branch (VDC); S22: Calculate the fog density map based on the transmission map output in step S1, and normalize the fog density map. Adjust the fusion weights of each differential convolutional branch and the normal convolutional branch according to the normalized fog density map through a dynamic weight allocation strategy; S23: Use reparameterization technology to convert the five-branch parallel structure into a single convolutional layer, which enhances the ability to perceive high-frequency details of the image while maintaining computational efficiency.

[0047] For example, calculating the fog concentration map based on the transmittance in the projection map. The fusion weights of each differential convolutional branch and the ordinary convolutional branch are adjusted according to the normalized fog concentration map using a dynamic weight allocation strategy, based on the following formula:

[0048]

[0049] in, For the sigmoid function, , These are learnable parameters.

[0050] S3: In the second stage, a fog-domain multi-source fusion attention (FD-MSFA) mechanism is set up. The fog-domain multi-source fusion attention mechanism is an attention structure that integrates physical features, diffuse intermediate features, and semantic context, and strengthens the association of global features in the image through the fog-domain multi-source fusion attention mechanism.

[0051] Step S3 includes the following sub-steps: S31: Set up a multi-head feature decomposition mechanism to decompose the haze-free reference image features output in step S1 into three types of sub-features, and process each type of sub-feature separately using independent sub-heads; the three types of sub-features include edge structure features, texture detail features, and color distribution features; S32: Construct a multi-class attention fusion structure, which includes haze image attention, dehaze reference image attention, self-attention, and cross-attention; S33: Perform correlation processing on the features output by the multi-class attention fusion structure through one-hot mapping and weighted summation, and finally output the fused features. .

[0052] In sub-step S32, the attention for haze images uses the intermediate features of the U-shaped network as the query and the haze image features as the key; the attention for dehaze reference images uses the haze image features as the query and the features of the haze-free reference images as the key; and the cross-attention introduces the semantic embedding extracted by the CLIP image encoder as the key.

[0053] S4: In the second stage, a dual-effect color correction strategy of pixel-level and wavelet domain is adopted; the dual-effect color correction strategy of pixel-level and wavelet domain is a color adjustment method that combines pixel domain correction and wavelet domain correction; the dual-effect color correction strategy of pixel-level and wavelet domain suppresses image color distortion in the diffusion model generation process, so as to improve the image color fidelity.

[0054] Step S4 includes the following sub-steps: S41: Perform wavelet multi-scale decomposition on the image generated by the diffusion model and the input fog map respectively to obtain their corresponding high-frequency components. with low-frequency components S42: Within the pixel domain, the low-frequency components of the generated image and the low-frequency components of the input hazy image are aligned and corrected for mean and standard deviation; S43: The corrected low-frequency components of the generated image are fused with the original high-frequency components of the generated image obtained in sub-step S41 to reconstruct the final dehazed image.

[0055] In step S42, the alignment correction of the mean and standard deviation is performed on the three RGB channels of the image respectively. The pixel value distribution of the low-frequency component of the generated image is adjusted by inputting the mean and standard deviation of the low-frequency component of the fog image.

[0056] For example, the mean and standard deviation of the low-frequency components are calculated using the following formula:

[0057]

[0058] in, , These are the mean and standard deviation, respectively. Represents the RGB channel.

[0059] The method provided by this invention is implemented based on the PyTorch deep learning framework. For example, the embodiments of this application also provide specific implementation steps, which are divided into three main steps: data preparation, model building, and model training.

[0060] For data preparation, the data sample of this invention includes an image dehazing dataset that combines synthetic data with real-world scenes: During the training phase, the indoor training set (ITS) and outdoor training set (OTS) of the RESIDE benchmark dataset are used: The ITS contains 1399 clear indoor images and 13990 multi-concentration haze images synthesized through an atmospheric scattering model, covering degraded scenes under different haze conditions. The OTS contains 8970 clear outdoor images and 313950 synthetic haze images, simulating the distribution of fog effects in natural scenes. Model performance evaluation is conducted from two dimensions: synthetic scene benchmark testing and zero-shot evaluation in real complex scenes. In synthetic scene benchmark testing, 500 indoor (SOTS-indoor) and 500 outdoor (SOTS-outdoor) fogged images from the SOTS subset are used for quantitative index analysis. In real complex scene zero-shot evaluation, two challenging real datasets, Dense-Haze (55 pairs of dense fog images with visibility <50 meters) and Nh-Haze (55 pairs of non-uniform fog images with spatially heterogeneous fog concentration distribution), are introduced. The zero-shot transfer evaluation paradigm is strictly followed (it should be noted that the training phase does not involve any real fog images, and model fine-tuning is prohibited during the testing process) to test the model's inherent modeling ability for complex physical degradation processes.

[0061] The network model structure of the constructed prior-guided diffusion two-stage blind image dehazing method is as follows: Figure 2 As shown, the overall architecture presents a two-stage sequential architecture of "physical modeling - generation optimization". The first stage on the left is the Physical Modeling Network, which starts with the input hazy input (I) and extracts basic features through the ResNet module. Based on the DFP network backbone, prediction branches for atmospheric light (A), scene depth, and scattering coefficient are added, and the outputs are a transmission map (Trmap, t), a hazy reference image (Reference, J), and atmospheric light parameters. At the same time, the physical reconstruction layer generates a reconstructed hazy map according to the formula I'=J (1-α) t + A (1-t), and optimizes the estimation process of each parameter by combining a multi-task loss function. In addition, the CLIP image encoder is introduced to extract semantic embeddings and the VQGAN encoder is introduced to encode key features to enhance the accuracy and robustness of physical parameter prediction.

[0062] The second stage on the right is the generation optimization stage based on a lightweight and stable diffusion architecture. The core is DeControlNet, which freezes the main parameters of the pre-trained model and only fine-tunes the conditional control branch of ControlNet. The physical parameters output from the first stage are incorporated into the diffusion generation process as priors. This stage embeds an adaptive differential fusion convolution module, which dynamically fuses ordinary convolution and multi-directional differential convolution through a five-branch parallel structure to enhance the ability to recover high-frequency details. A fog domain multi-source fusion attention module is set up. After processing the features of the fog-free reference image through multi-head feature decomposition, it fuses the attention of the fog image, the attention of the defogging reference image, self-attention, and cross-attention to strengthen the global feature association. At the end, a pixel and wavelet dual-effect color correction module (DW(P+W)CC) is used to perform wavelet multi-scale decomposition on the diffused image and the input fog image. After aligning the mean and standard deviation of the low-frequency components in the pixel domain, the high-frequency components are fused to finally output a clear defogging image (Clear output, y). The bottom also shows the iterative training process of DeControlNet, including steps such as sampling Gaussian noise, iterative denoising, UNet predicting noise, and calculating loss (Loss=||ε-ε_θ(x_t,t)||).

[0063] By achieving synergy between physical constraints and generative capabilities through cross-stage deep fusion, a transmission map, a haze-free reference image, and atmospheric light parameters are estimated based on an improved atmospheric scattering model, providing physical priors for the diffusion model. Adaptive differential fusion convolution is introduced to enhance multi-scale high-frequency detail recovery capabilities. High- and low-frequency features are collaboratively extracted by dynamically fusing multi-directional differential convolution and standard convolution, as shown in the structure... Figure 3 As shown.

[0064] Figure 3 This is a schematic diagram of the structure of the core part of the second-stage diffusion generation optimization - Adaptive Differential Fusion Convolution (ADFConv). It intuitively presents its design logic of "multi-branch parallelism + dynamic weight fusion", which aims to solve the problem of insufficient ability of traditional convolution to extract high-frequency details of images at multiple scales, especially for the recovery of details such as edges and textures in foggy areas in fog images.

[0065] Reference Figure 3ADFConv employs a five-branch parallel structure, comprising one ordinary convolution branch and four multi-directional differential convolution branches (central differential convolution, diagonal differential convolution, horizontal differential convolution, and vertical differential convolution). Each branch is labeled with an initial convolution parameter matrix, clarifying the feature extraction direction of different differential convolutions: the central differential convolution enhances the perception of differences between the central region and surrounding pixels through parameters such as "-1,-2,-1; 0,0,0; 1,2,1"; the horizontal differential convolution focuses on horizontal details with "-1,0,1; -1,0,1; -1,0,1"; the vertical differential convolution captures vertical features with "-1,-1,-1; 0,0,0; 1,1,1"; and the diagonal differential convolution models the pixel relationships in the diagonal direction.

[0066] In the feature fusion stage, ADFConv introduces a dynamic weight allocation strategy, which achieves adaptive fusion of branch features through α_vanilla (weights of ordinary convolutional branches) and α_diff (weights of differential convolutional branches). The weight calculation is based on the normalized fog density map transformed from the first-stage output transmission map, following the formulas α_diff=σ(γ⋅c_norm+β) and α_vanilla=1-α_diff (where σ is the sigmoid function, and γ and β are learnable parameters). This can increase the weights of differential convolutional branches in dense fog regions (with high c_norm) to enhance high-frequency detail extraction, and increase the proportion of ordinary convolutional branches in light fog regions (with low c_norm) to ensure image smoothness. At the same time, this structure uses reparameterization technology to convert the five-branch parallel structure into a single convolutional layer, ensuring that the computational efficiency is adapted to the iterative generation requirements of the diffusion model without losing the ability to extract details.

[0067] This application's embodiments design a fog-domain multi-source fusion attention mechanism to achieve the association between fused physical features, diffused intermediate features, and semantic context-enhanced global features, with the structure as follows: Figure 4 As shown. According to Figure 4It can be seen that FD-MSFA first decomposes the features of the haze-free reference image output in the first stage into edge structure features, texture detail features, and color distribution features through a multi-head feature decomposition mechanism, and processes them separately through independent sub-heads. Then, it constructs a multi-class attention fusion structure, including haze image attention, dehaze reference image attention, self-attention, and cross-attention. The haze image attention uses the intermediate features of the U-shaped network as the query (Q) and the haze image features as the key (K,V). The dehaze reference image attention uses the haze image features as the query (Q) and the haze-free reference image features as the key (K,V). The cross-attention incorporates the semantic embedding extracted by the CLIP image encoder as the key (K,V). Finally, through one-hot mapping and weighted summation, the features output by the multi-class attention fusion structure are correlated, ultimately outputting a fused feature (Z_out), providing globally correlated feature support for the generation and optimization of the second-stage diffusion model.

[0068] In addition, a dual-effect color correction strategy using pixel-level and wavelet domain is adopted to effectively suppress color distortion during the generation process, while a lightweight diffusion architecture is used to improve computational efficiency in dense fog scenarios.

[0069] This application embodiment uses a DFP network as the backbone architecture of the physical modeling network, and builds basic feature extraction capabilities through pre-training. The pre-training stage employs the Adam optimizer (…). ) Perform parameter optimization, with the initial learning rate set to The learning rate is dynamically adjusted based on the cosine annealing scheduling strategy

[67] . The training configuration is as follows: the batch size is 16, the input patch size is 256×256, and the generalization ability of the model is improved by standardizing the data input.

[0070] The prior model was generated using Stable Diffusion 2.1-base1, and DeControlNet was fine-tuned through 80,000 iterations. The optimization strategy during the fine-tuning phase was as follows: the Adam optimizer was used, and the first 30,000 iterations employed... The learning rate was reduced to a certain value in the subsequent 50,000 iterations. The batch size was adjusted to 256 to improve training efficiency. To fully utilize the parameter initialization advantages of the pre-trained model, both the reference attention module and the haze attention module were initialized using self-attention weights.

[0071] To comprehensively quantify the performance of dehazing algorithms, a multi-layered evaluation system integrating traditional fidelity metrics and perceptual quality metrics is constructed. Peak Signal-to-Noise Ratio (PSNR) quantifies image restoration accuracy by calculating the mean square error of pixel grayscale values. Structural Similarity (SSIM) assesses the structural similarity of local regions based on three factors: brightness, contrast, and structure. Together, these two metrics characterize the matching degree of the dehazing result with the underlying physical features of the real image. Simultaneously, Fraser Initial Distance (FID) is introduced to measure the matching consistency of global semantic features, and Learning Perceptual Patch Similarity (LPIPS) is employed to extract multi-scale semantic features using deep neural networks, evaluating high-level semantic differences at the patch level from a human visual perception perspective. This metric system integrates the quantitative rigor of traditional metrics with the visual consistency of perceptual metrics, providing a comprehensive and objective evaluation basis for algorithm performance from a multi-granular perspective from pixels to semantics. For example, ... Figure 5 , Figure 6 , Figure 8 and Figure 9 As shown.

[0072] Figure 5 and Figure 6 The quantitative evaluation results of each method on the DENSE-HAZE and NH-HAZE datasets are presented respectively (bold indicates the optimal value, and underline indicates the suboptimal value). Figure 8 and Figure 9 The results of each method on the DENSE-HAZE and NH-HAZE datasets are presented separately. The original DFP-Net architecture, after improvement, is based on an Enhanced Atmospheric Scattering Model (EASM) to construct a multi-task learning framework (simultaneously estimating transmittance, haze-free images, and atmospheric light), hence its performance differs from the original version. Experimental data show that on the highly challenging DENSE-HAZE and NH-HAZE datasets, the method provided in this application outperforms existing schemes in both perceptual quality and distortion metrics: lower FID values ​​confirm a smaller distribution difference between the generated image and the real haze-free image, demonstrating accurate visual effect reproduction; higher PSNR values ​​indicate lower image distortion, showcasing effective recovery of image structure under haze interference. These results not only verify the technical advantages of the method provided in this invention in dealing with complex haze scenarios but also highlight its superior performance in balancing image perceptual quality optimization and distortion control.

[0073] For example, such as Figure 7 and Figure 10 As shown. Figure 7 and Figure 10 The quantitative evaluation results and performance illustrations of each method on the SOTS dataset are presented systematically, and the algorithm performance is quantitatively characterized from multiple dimensions such as perceptual quality indicators (FID, LPIPS) and distortion indicators (PSNR, SSIM). Figure 7 It can be seen that the method provided in this application embodiment performs best in all indicators: the FID value is as low as 1.5762, significantly lower than other methods (such as ODCR's 1.9573 and DEA-Net's 2.2948), indicating that the dehazed image generated by the method provided in this application embodiment has the highest consistency in global semantic feature matching with the real haze-free image; the LPIPS value is 0.0034, which is the smallest among all methods, reflecting that from the perspective of human visual perception, its image block-level high-level semantic difference is the smallest; the PSNR value reaches 39.7102, and the SSIM value is 0.9934, both higher than other comparative methods, indicating that its dehazed image has small mean square error of pixel grayscale value, high local region structural similarity, and the best image restoration accuracy and structural integrity, fully verifying the dehazing performance advantage of the method of this invention on the SOTS standard dataset.

[0074] Figure 10 This is a comparison chart of the effects of different dehazing methods on the SOTS dataset. The chart is arranged as follows: input hazy image - dehazing results of each method - Ours (the method of this invention) - ground-truth image, visually demonstrating the differences in the dehazing visual effects of each method. (Refer to...) Figure 10 Traditional methods such as DCP and AOD-Net dehazing often result in blurred details (e.g., loss of texture information) and slight color distortion. While methods like FFA-Net and MSBDN improve clarity, some areas still exhibit unnatural transitions. The method provided in this invention, however, achieves dehazing results highly consistent with ground truth in terms of detail rendering (e.g., object edges and textures), high color fidelity, no obvious color cast or blurring, and balanced overall brightness and contrast, resulting in a visual effect closer to a real, fog-free scene. Figure 7 The optimal performance of the quantitative indicators echoes this, further confirming that the method of this invention has both excellent quantitative performance and visual effects on the SOTS dataset.

[0075] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0076] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A two-stage blind image dehazing method based on prior-guided diffusion, characterized in that: Comprise: S1: Construct a two-stage blind image defogging model, the two-stage blind image defogging model includes first stage and second stage;Wherein, the first stage is based on the improved atmospheric scattering model for physical modeling, the improved atmospheric scattering model is the enhanced atmospheric scattering model introducing the light absorption coefficient, the transmission map, the haze-free reference image and the atmospheric light parameter are output through the first stage;The second stage is based on the diffusion model for generating optimization, the transmission map, the haze-free reference image and the atmospheric light parameter output by the first stage are fused into the generation process of the diffusion model as physical priori, and the image defogging is carried out; S2: In the second stage, set adaptive differential fusion convolution;Adaptive differential fusion convolution is a convolution structure dynamically fusing ordinary convolution and multi-directional differential convolution, and the recovery ability of image multi-scale high-frequency details is enhanced through adaptive differential fusion convolution; S3: In the second stage, set fog domain multi-source fusion attention mechanism;Fog domain multi-source fusion attention mechanism is an attention structure integrating physical features, diffusion intermediate features and semantic context, and the global feature association of the image is strengthened through the fog domain multi-source fusion attention mechanism; S4: In the second stage, pixel level and wavelet domain double effect color correction strategy is adopted;Pixel level and wavelet domain double effect color correction strategy is a color adjustment method combining pixel domain correction and wavelet domain correction;Through pixel level and wavelet domain double effect color correction strategy, the image color distortion in the generation process of diffusion model is suppressed, so as to improve the image color fidelity.

2. The two-stage blind image dehazing method of prior guided diffusion according to claim 1, characterized in that: Step S1 includes the following substeps: S11: Based on the DFP network as the backbone network, add the prediction branch of atmospheric light, scene depth and scattering coefficient; S12: Through the physical reconstruction layer of the backbone network, the atmospheric light, scene depth and scattering coefficient output by the prediction branch are used to generate the reconstructed fog map; S13: Construct a multi-task loss function, and optimize the parameter estimation process of the transmission map, the haze-free reference image, the atmospheric light parameter and the reconstructed fog map through the multi-task loss function.

3. The two-stage blind image dehazing method of prior guided diffusion according to claim 2, characterized in that, The multi-task loss function is: wherein, , , are the estimation loss of the haze-free image, the transmission map, and the estimated atmospheric light, respectively, is the loss of the reconstructed haze image and the input haze image, , , , are the balancing coefficients.

4. The two-stage blind image dehazing method of priori guided diffusion according to claim 1, characterized in that: Step S2 includes the following substeps: S21: Construct a five-branch parallel structure, which includes ordinary convolution branch, central difference convolution branch, diagonal difference convolution branch, horizontal difference convolution branch and vertical difference convolution branch; S22: Calculate the fog concentration map based on the transmission map output by step S1, and normalize the fog concentration map;According to the normalized fog concentration map, the fusion weight of each differential convolution branch and ordinary convolution branch is adjusted through dynamic weight distribution strategy; S23: Using reparameterization technology, the five-branch parallel structure is equivalent to a single convolution layer, which enhances the perception ability of high-frequency details of the image while maintaining the calculation efficiency.

5. The two-stage blind image dehazing method of prior guided diffusion according to claim 4, characterized in that, According to the following formula, the fusion weight of each differential convolution branch and ordinary convolution branch is adjusted through dynamic weight distribution strategy according to the normalized fog concentration map: wherein, is a sigmoid function, , are learnable parameters.

6. The two-stage blind image dehazing method of priori guided diffusion according to claim 1, characterized in that: Step S3 includes the following substeps: S31: Set multi-head feature decomposition mechanism, the haze-free reference image feature output by step S1 is decomposed into three types of sub-features through multi-head feature decomposition mechanism, and each type of sub-feature is processed through independent sub-head;Among them, the three types of sub-features include edge structure feature, texture detail feature and color distribution feature; S32: Construct a multi-class attention fusion structure, which includes haze image attention, defogging reference image attention, self-attention, and cross-attention; S33: Through one-hot mapping and weight weighting, the features output by the multi-class attention fusion structure are associated and processed, and finally the fusion features are output.

7. The two-stage blind image dehazing method of prior guided diffusion according to claim 6, characterized in that: In sub-step S32, the haze image attention takes the middle feature of the U-shaped network as the query and the haze image feature as the key value; the defogging reference image attention takes the haze image feature as the query and the haze-free reference image feature as the key value; The cross-attention introduces the semantic embedding extracted by the CLIP image encoder as the key value.

8. The two-stage blind image dehazing method of priori guided diffusion according to claim 1, characterized in that, Step S4 includes the following sub-steps: S41: Perform wavelet multi-scale decomposition on the image generated by the diffusion model and the input haze image respectively, to obtain their corresponding high-frequency components and low-frequency components; S42: In the pixel domain, align and correct the mean and standard deviation of the low-frequency components of the generated image and the input haze image; S43: Fuse the corrected low-frequency component of the generated image with the original high-frequency component of the generated image obtained in sub-step S41 to reconstruct the final defogging image.

9. The two-stage blind image dehazing method of prior guided diffusion according to claim 8, characterized in that, In step S42, the alignment and correction of the mean and standard deviation are performed respectively for the RGB three channels of the image. The pixel value distribution of the low-frequency component of the generated image is adjusted by the mean and standard deviation of the low-frequency component of the input haze image.

10. The two-stage blind image dehazing method of priori guided diffusion according to claim 1, characterized in that: In step S1, the diffusion model of the second stage is constructed based on a lightweight stable diffusion architecture. The main parameters of the pre-trained model in the architecture are frozen, only the ControlNet conditional control branch is fine-tuned, and the calculation efficiency is improved by reducing the sampling steps of the diffusion model.

Citation Information

Patent Citations

  • Diffusion model defogging method fusing parallel multi-convolution attention

    CN117994167A

  • Raw sensor image and video de-hazing and atmospheric light analysis methods and systems

    US20160196637A1