Density perception image defogging method combined with physical prior

By introducing a density-aware image dehazing method that incorporates a multi-scale density-aware convolution module, a grid-aware atmospheric attention module, and a spatial detail enhancement module, the problems of incomplete restoration and image distortion in dense fog areas are solved, achieving efficient image restoration in foggy environments.

CN121837076APending Publication Date: 2026-04-10CHINA THREE GORGES UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA THREE GORGES UNIV
Filing Date
2025-12-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing image dehazing methods often result in incomplete restoration, blurred details, and image distortion in dense fog areas. They lack physical prior constraints, leading to artifacts generated by the model. Furthermore, their loss functions are too simplistic and fail to balance the restoration of both overall structure and detailed textures.

Method used

A density-aware image dehazing method combining physical priors is adopted. By constructing a density-aware dehazing network DADehaze, a multi-scale density-aware convolutional module MSDA, a grid-aware atmospheric attention module GAA, and a spatial detail enhancement module SDE are introduced. The network is optimized by using an atmospheric physical model and wavelet decomposition technology, combined with L1 loss and perception loss.

Benefits of technology

It improves the model's adaptive recovery capability under different fog densities, enhances the robustness and detail recovery of images, and achieves synergistic enhancement of global consistency and detail texture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837076A_ABST
    Figure CN121837076A_ABST
Patent Text Reader

Abstract

A density perception image defogging method in combination with physical prior comprises the following steps: S1, acquiring a fog-containing image, marking a fog area and a fog-affected area, constructing a data set D1 through size unification, normalization and multi-dimensional data enhancement, and dividing the data set D1 into a training set and a verification set according to a proportion; s2, a density perception defogging network is constructed, the density perception defogging network comprises an encoder sub-network, a middle layer sub-network and a decoder sub-network, core modules are a gridding atmospheric light attention module and a space detail enhancement module, and a GAAB integrates a multi-scale density perception convolution module, a grid perception atmospheric attention module and a feature fusion module; fog density features can be accurately captured, and physical prior can be fused; s3, inputting the data set into a defogging network to generate a multi-scale feature map; s4, carrying out training optimization on the network by adopting a combined loss function of L1 loss and perception loss; s5, evaluating the network performance through the verification set; according to the invention, adaptive defogging in different fog concentration scenes is realized, and the definition of the defogged image is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing and computer vision technology, and specifically relates to a density-aware image dehazing method that combines physical priors. Background Technology

[0002] In scenarios such as outdoor monitoring, autonomous driving, and remote sensing, images acquired in foggy environments often suffer from reduced contrast, color distortion, and blurred edges, which seriously affect subsequent target detection and recognition tasks. Existing image dehazing methods mainly include traditional methods based on image enhancement and end-to-end restoration methods based on deep learning.

[0003] Traditional image enhancement methods, such as histogram equalization and Retinex methods, can improve image visibility to some extent, but they often ignore the optical scattering and attenuation mechanisms during imaging, leading to defects such as over-enhancement and color distortion. Deep learning-based methods utilize convolutional neural networks or transformer structures to learn and restore features of hazy images. While these methods have achieved good visual results, they generally suffer from the following problems: 1. The model does not fully consider the spatial distribution of fog, and is prone to failure in dense fog areas; 2. Without prior physical constraints, the model may generate artifacts, leading to image distortion; 3. The loss function design is too simplistic and cannot balance the restoration of both the overall structure and the detailed texture.

[0004] Therefore, a dehazing method that combines fog density perception with physical imaging priors is needed, which can adaptively recover images under different fog densities, maintain image details and global consistency, and improve the robustness and generalization ability of the model. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a density-aware image dehazing method that incorporates physical priors, which can solve the problems of incomplete recovery, blurred details, and image distortion in existing methods in dense fog areas.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A density-aware image dehazing method incorporating physical priors includes the following steps: S1: Collect images of foggy scenes, construct dataset D1, and divide it into training and validation sets proportionally; S2: Construct the density-aware dehazing network DADehaze; S3: Input the dataset into the DADEhaze network to generate feature maps at different scales; S4: Input the training set in dataset D1 into the DADEhaze network for training, and optimize it using a combination of L1 loss and perceptual loss as the loss function; S5: Input the validation set from dataset D1 into the improved DADehaze network and evaluate the network using evaluation metrics.

[0007] In S1, acquiring images of foggy scenes includes labeling the acquired images of foggy scenes; The annotation includes marking foggy areas and fog-affected areas in the image, allowing for the annotation of the outline of clear targets and reference areas; The construction of dataset D1 also includes preprocessing the dataset, including uniform image size, normalization, and data augmentation; The data augmentation includes random flipping, rotation, cropping, brightness and contrast adjustment, and simulating changes in different fog concentrations to improve the robustness and generalization ability of the defogging model.

[0008] In S2, the DADehaze network includes an encoder subnetwork, an intermediate layer subnetwork, and a decoder subnetwork; The encoder subnetwork includes a gridded atmospheric light attention module (GAAB); The Gridded Atmospheric Light Attention Block (GAAB) includes a Multi-Scale Density-Aware Convolutional Module (MSDA), a Grid-Aware Atmospheric Attention Module (GAA), and a Feature Fusion Module. The MSDA performs multi-level feature extraction on the input foggy image to generate features at different scales. The GAA enhances the modeling ability of fog distribution through a grid-aware attention mechanism. The outputs of the two are then fused through the Feature Fusion Module. The intermediate sub-network includes a gridded atmospheric light attention block (GAAB) and a spatial detail enhancement module (SDE). The SDE enhances the features of the intermediate output of the encoder sub-network and outputs them. The features output by the SDE are fused with the output of the decoder sub-network. The decoder subnetwork includes a gridded atmospheric light attention block (GAAB). The decoder subnetwork upsamples the multi-scale features output by the gridded atmospheric light attention block (GAAB) layer by layer, and concatenates them with the SDE output features to restore the image spatial resolution and output the dehazed image result.

[0009] The MSDA contains hybrid convolutional branches with different kernel sizes to capture local texture and density features at different scales. It also adaptively adjusts feature importance through channel attention branches and gating branches. Finally, it is fused and output through a projection convolutional layer. The specific steps are as follows: The Multi-Scale Density-Aware Convolutional Module (MSDA) includes the following steps: S3.1.1: The training set of dataset D1, after preprocessing by S1, is... After normalization, it becomes As shown in Equation (1), multi-scale dilated convolution kernels are then performed in parallel to capture texture and fog density under different receptive fields: (1); (2); In equations (1) and (2): Represents the normalization function. The image after normalization. , , These represent dilated convolutions with 13, 19, and 7 cores, respectively. This represents the channel splicing function; S3.1.2: After the above concatenation, the output features are processed by a multilayer perceptron and added to the initial input x as shown in equation (3). Its function is to fuse the three-way features and fit the dehazed features. After normalization, the features are calculated through channel attention (CA) and gating mechanism (Gating) respectively. (3); (4); (5); In equations (3), (4), and (5): This is the matrix multiplication symbol; GELU and Sigmoid are activation functions; and Conv is a simple convolution. For the output features of a multilayer perceptron, GAP is an average pooling layer. and These are the feature outputs of the channel attention mechanism and the gating mechanism, respectively. These two mechanisms allow the network to focus its attention on fog density and enhance detailed features. S3.1.3: Output the fused density-aware features and then combine them with... Feature addition: (6); In formula (6): These are the characteristics output by the MSDA module.

[0010] The grid-aware atmospheric attention module (GAA) achieves local ambient light estimation through gridded channel attention and introduces a global ambient light vector by combining a sky confidence branch. Simultaneously, it models the transmittance distribution and residual fog through spatial attention and anti-fog estimation branches, specifically including: The grid-aware atmospheric attention module (GAA) achieves local ambient light estimation through gridded channel attention and introduces a global ambient light vector by combining a sky confidence branch. Simultaneously, it models the transmittance distribution and residual fog through spatial attention and anti-fog estimation branches, specifically including: S3.2.1: Implicitly partition the feature map into The system constructs a grid region and learns a local atmospheric light prototype for each grid. By introducing position encoding and predicting the attention weights from pixels to each grid, pixel-level local atmospheric light can be represented as a weighted sum of atmospheric light across all grids: (7); In equation (7): weight The attention weight of a pixel to the k-th grid is represented. This is the atmospheric light prototype for the k-th grid; S3.2.2: After obtaining pixel-level local atmospheric light estimation, a global ambient light vector is introduced to model the uniform scattering characteristics of the sky region, and the local and global ambient light are adaptively fused using the predicted sky confidence score. (8); In equation (8): It is a sky confidence estimate, used to predict the probability of sky regions. Represents the global ambient light vector. This represents the final estimated atmospheric light, abbreviated as A; S3.2.3: Based on the atmospheric scattering model, the generation process of the fogged image is described as follows: (9); In equation (9): Represents the observed image, Represents a dehazed image. Transmittance, For global atmospheric light; To simplify the convolution operation, the equation is reconfigured and reexpressed as follows: (10); S3.2.4: Adopt Convolutional layers are used to extract features of T. By introducing physical priors, global and local features are balanced, thereby promoting more effective recovery of blurred images. use express Where T represents consistency with 1 / T: (11); In equation (11): ReLU is the activation function, and JT is the input feature; Finally, the physical characteristics of J are obtained through equation (10).

[0011] The feature fusion module is used to process the density-aware features output by the density-aware convolution module MSDA. The physical prior features J output by the grid-aware atmospheric attention module GAA are fused together. The fusion method of the encoder sub-network feature fusion module is the selective convolutional fusion method SKFusion.

[0012] The Spatial Detail Enhancement (SDE) module obtains low-frequency and high-frequency sub-bands through wavelet decomposition. Based on the detail reconstruction branch, spatial attention branch, and region adaptive enhancement branch of the high-frequency sub-band, high-frequency texture restoration is performed. This is combined with the low-frequency sub-band to maintain the global structure, achieving synergistic enhancement of details and structure. The specific steps are as follows: S3.3.1: The fused density-sensing features are decomposed by wavelet to obtain low-frequency LL and high-frequency LH, HL, and HH; S3.3.2: High-frequency branch splicing followed by convolution reconstruction to reconstruct detailed textures; S3.3.3: Spatial attention branch generation mask; S3.3.4: The region adaptive scaling factor α controls the enhancement intensity; S3.3.5: Output is the enhanced image.

[0013] In S3.3.1, the density-aware features after input fusion are decomposed by wavelet to obtain high-frequency LH, HL, and HH. Among them, low-frequency information reflects the structural information of the image, and high-frequency information reflects the details of the image. The spatial detail enhancement module SDE mainly uses high-frequency information. Haar wavelet with low-pass kernel is used. Qualcomm core ; For the input features, a two-dimensional wavelet transform is performed, and its one-level decomposition process can be represented as follows: (12); (13); (14); (15); In equations (12) to (15): this transformation represents matrix multiplication, and F represents the fusion feature of the input. The symbol represents the accumulation operation. LL represents the low-frequency approximation component. LH, HL, and HH correspond to the high-frequency detail components in the vertical, horizontal, and diagonal directions, respectively. In S3.3.2, the high-frequency sub-bands in the three directions are spliced ​​together along the channel dimension to form a unified high-frequency feature representation: (16); In equation (16): This indicates the high-frequency characteristics after high-frequency splicing; Subsequently, the fused high-frequency features are re-textured using a convolutional reconstruction module. This process can be represented as follows: (17); In equation (17): Indicates the features after reconstruction; In S3.3.3, in order to highlight the focus on key spatial locations and suppress interference from the background area, a spatial attention branch is introduced to generate a spatial mask; The original features and high-frequency features are concatenated along the channel dimension and used as input for spatial attention. Then, a spatial weight map is generated through a spatial attention module consisting of convolutions and nonlinear mappings. Finally, the generated spatial mask is applied to the reconstructed high-frequency detail features through element-wise multiplication, achieving adaptive enhancement of key region detail information, as shown below: (18); In formula (18): Spatial attention is represented as ; S3.3.4 introduces a region adaptive scaling factor to enhance the intensity of high-frequency details in adaptive control. This factor is generated from the global context information of the input features and, combined with residual energy constraints, dynamically adjusts the level of detail enhancement in different regions. It is represented as follows: (19); In equation (19): Represents the learnable basic enhancement coefficient, Represents the region adaptive weight generation function, A scaling factor to control the steepness of the mapping, where E is a high-frequency feature. residual energy, It is the energy threshold. F This represents the features of the input space detail enhancement module (SDE). S3.3.5, the final enhancement result is fused with the original features in the form of residuals; (20); In equation (20): This represents the final output feature of the Spatial Detail Enhancement (SDE) module.

[0014] In the encoder sub-network, the data of dataset D1 is output in two branches after passing through the GAAB module. One branch passes through the SDE module in the intermediate layer sub-network, and the other branch is downsampled. The downsampling formula is as follows: (twenty one); In equation (21): This represents a convolution with a stride of p. This represents the features after downsampling; The features obtained after downsampling are input into the next GAAB and the output is downsampled. The above process is repeated until the third input to the GAAB module + downsampling operation, and then the transition to the GAAB module of the intermediate sub-network is achieved. The GAAB module of the intermediate layer sub-network is upsampled before entering the GAAB module of the decoder sub-network. The upsampling formula is as follows: (twenty two); In equation (22): This represents a subpixel convolution function for achieving super-resolution reconstruction. This represents the output features of the upsampled data; The concatenation function Concat is used to concatenate the upsampling result with the output of the SDE module in the intermediate sub-network, and the concatenated result is input into the GAAB module again. The above process is repeated until the third upsampling + concatenation with the SDE output feature + input into GAAB to obtain the final output feature. The final output feature is then reconstructed using Conv3×3. Finally, the reconstructed features are connected to the initial input image x via a residual network, as shown in the following formula: y=x+F(23; In equation (23): y represents the output image, F represents the reconstructed features, and x represents the initial input image.

[0015] In S4, optimization is performed using a combination of loss with loss function L1 and perceptual loss; The combination of L1 and perceptual loss has the following loss formula: (twenty four); (25); In equations (24) and (25): H and W represent the height and width dimensions of the image. and These represent the image after dehazing and the original hazy image, respectively. This indicates the VGG pre-trained network's first... Feature maps extracted from the layers, where S represents the set of feature layers. Indicates the first Layer feature size, Represents the L1 norm; The total losses are as follows: (26); In equation (26): where Indicates the weighting coefficient; The total loss is used to optimize the defogging network, thereby improving the network's defogging effect.

[0016] The main beneficial effects of this invention are as follows: 1) This invention proposes a density-aware image dehazing method that combines physical priors. It introduces a multi-scale density-aware convolutional module (MSDA), which can simultaneously perceive local texture details and global fog distribution, thereby improving the backbone network's ability to model changes in fog concentration.

[0017] 2) This invention proposes a density-aware image dehazing method that combines physical priors. It introduces a grid-aware atmospheric attention module (GAA) and uses an atmospheric physical model to improve the interpretability and overall robustness of the network model, achieving relatively ideal results in detail restoration and global consistency.

[0018] 3) This invention proposes a density-aware image dehazing method that combines physical priors and introduces a spatial detail enhancement module (SDE) to enable the network to adaptively process different fog distribution areas and improve the detail recovery effect in dense fog scenes. Attached Figure Description

[0019] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a block diagram of the overall structure of the defogging network of the present invention; Figure 2 This is a schematic diagram of the structure of the Multi-Scale Density-Aware Convolutional Module (MSDA) of the present invention; Figure 3 This is a schematic diagram of the spatial detail enhancement module (SDE) of the present invention; Figure 4 This is a schematic diagram of the structure of the grid-sensing atmospheric attention module (GAA) described in this invention. Detailed Implementation

[0020] A density-aware image dehazing method incorporating physical priors includes the following steps: S1: Collect images of foggy scenes, construct dataset D1, and divide it into training and validation sets proportionally; S2: Construct the density-aware dehazing network DADehaze; S3: Input the dataset into the DADEhaze network to generate feature maps at different scales; S4: Input the training set in dataset D1 into the DADEhaze network for training, and optimize it using a combination of L1 loss and perceptual loss as the loss function; S5: Input the validation set from dataset D1 into the improved DADehaze network and evaluate the network using evaluation metrics.

[0021] In S1, acquiring images of foggy scenes includes labeling the acquired images of foggy scenes; The annotation includes marking foggy areas and fog-affected areas in the image, allowing for the annotation of the outline of clear targets and reference areas; The construction of dataset D1 also includes preprocessing the dataset, including uniform image size, normalization, and data augmentation; The data augmentation includes random flipping, rotation, cropping, brightness and contrast adjustment, and simulating changes in different fog concentrations to improve the robustness and generalization ability of the defogging model.

[0022] In S2, the DADehaze network includes an encoder subnetwork, an intermediate layer subnetwork, and a decoder subnetwork; The encoder subnetwork includes a gridded atmospheric light attention module (GAAB); The Gridded Atmospheric Light Attention Block (GAAB) includes a Multi-Scale Density-Aware Convolutional Module (MSDA), a Grid-Aware Atmospheric Attention Module (GAA), and a Feature Fusion Module. The MSDA performs multi-level feature extraction on the input foggy image to generate features at different scales. The GAA enhances the modeling ability of fog distribution through a grid-aware attention mechanism. The outputs of the two are then fused through the Feature Fusion Module. The intermediate sub-network includes a gridded atmospheric light attention block (GAAB) and a spatial detail enhancement module (SDE). The SDE enhances the features of the intermediate output of the encoder sub-network and outputs them. The features output by the SDE are fused with the output of the decoder sub-network. The decoder subnetwork includes a gridded atmospheric light attention block (GAAB). The decoder subnetwork upsamples the multi-scale features output by the gridded atmospheric light attention block (GAAB) layer by layer, and concatenates them with the SDE output features to restore the image spatial resolution and output the dehazed image result.

[0023] like Figure 2 As shown, the MSDA includes hybrid convolutional branches with different kernel scales to capture local texture and density features at different scales. It also adaptively adjusts feature importance through channel attention and gating branches, and finally fuses the output through a projection convolutional layer. The specific steps are as follows: The Multi-Scale Density-Aware Convolutional Module (MSDA) includes the following steps: S3.1.1: The training set of dataset D1, after preprocessing by S1, is... After normalization, it becomes As shown in Equation (1), multi-scale dilated convolution kernels are then performed in parallel to capture texture and fog density under different receptive fields: (1); (2); In equations (1) and (2): Represents the normalization function. The image after normalization. , , These represent dilated convolutions with 13, 19, and 7 cores, respectively. This represents the channel splicing function; S3.1.2: After the above concatenation, the output features are processed by a multilayer perceptron and added to the initial input x as shown in equation (3). Its function is to fuse the three-way features and fit the dehazed features. After normalization, the features are calculated through channel attention (CA) and gating mechanism (Gating) respectively. (3); (4); (5); In equations (3), (4), and (5): This is the matrix multiplication symbol; GELU and Sigmoid are activation functions; and Conv is a simple convolution. For the output features of a multilayer perceptron, GAP is an average pooling layer. and These are the feature outputs of the channel attention mechanism and the gating mechanism, respectively. These two mechanisms allow the network to focus its attention on fog density and enhance detailed features. S3.1.3: Output the fused density-aware features and then combine them with... Feature addition: (6); In formula (6): These are the characteristics output by the MSDA module.

[0024] like Figure 4As shown, the Grid-Aware Atmospheric Attention (GAA) module achieves local ambient light estimation through gridded channel attention and introduces a global ambient light vector by combining a sky confidence branch. Simultaneously, it models the transmittance distribution and residual fog through a spatial attention branch and an anti-fog estimation branch, specifically including: The grid-aware atmospheric attention module (GAA) achieves local ambient light estimation through gridded channel attention and introduces a global ambient light vector by combining a sky confidence branch. Simultaneously, it models the transmittance distribution and residual fog through spatial attention and anti-fog estimation branches, specifically including: S3.2.1: Implicitly partition the feature map into The system constructs a grid region and learns a local atmospheric light prototype for each grid. By introducing position encoding and predicting the attention weights from pixels to each grid, pixel-level local atmospheric light can be represented as a weighted sum of atmospheric light across all grids: (7); In equation (7): weight The attention weight of a pixel to the k-th grid is represented. This is the atmospheric light prototype for the k-th grid; S3.2.2: After obtaining pixel-level local atmospheric light estimation, a global ambient light vector is introduced to model the uniform scattering characteristics of the sky region, and the local and global ambient light are adaptively fused using the predicted sky confidence score. (8); In equation (8): It is a sky confidence estimate, used to predict the probability of sky regions. Represents the global ambient light vector. This represents the final estimated atmospheric light, abbreviated as A; S3.2.3: Based on the atmospheric scattering model, the generation process of the fogged image is described as follows: (9); In equation (9): Represents the observed image, Represents a dehazed image. Transmittance, For global atmospheric light; To simplify the convolution operation, the equation is reconfigured and reexpressed as follows: (10); S3.2.4: Adopt Convolutional layers are used to extract features of T. By introducing physical priors, global and local features are balanced, thereby promoting more effective recovery of blurred images. use express Where T represents consistency with 1 / T: (11); In equation (11): ReLU is the activation function, and JT is the input feature; Finally, the physical characteristics of J are obtained through equation (10).

[0025] The feature fusion module is used to process the density-aware features output by the density-aware convolution module MSDA. The physical prior features J output by the grid-aware atmospheric attention module GAA are fused together. The fusion method of the encoder sub-network feature fusion module is the selective convolutional fusion method SKFusion.

[0026] like Figure 3 As shown, the Spatial Detail Enhancement (SDE) module obtains low-frequency and high-frequency sub-bands through wavelet decomposition. Based on the detail reconstruction branch, spatial attention branch, and region adaptive enhancement branch of the high-frequency sub-band, high-frequency texture restoration is performed. Combined with the low-frequency sub-band to maintain the global structure, this achieves synergistic enhancement of details and structure. The specific steps are as follows: S3.3.1: The fused density-sensing features are decomposed by wavelet to obtain low-frequency LL and high-frequency LH, HL, and HH; S3.3.2: High-frequency branch splicing followed by convolution reconstruction to reconstruct detailed textures; S3.3.3: Spatial attention branch generation mask; S3.3.4: The region adaptive scaling factor α controls the enhancement intensity; S3.3.5: Output is the enhanced image.

[0027] In S3.3.1, the density-aware features after input fusion are decomposed by wavelet to obtain high-frequency LH, HL, and HH. Among them, low-frequency information reflects the structural information of the image, and high-frequency information reflects the details of the image. The spatial detail enhancement module SDE mainly uses high-frequency information. Haar wavelet with low-pass kernel is used. Qualcomm core ; For the input features, a two-dimensional wavelet transform is performed, and its one-level decomposition process can be represented as follows: (12); (13); (14); (15); In equations (12) to (15): this transformation represents matrix multiplication, and F represents the fusion feature of the input. The symbol represents the accumulation operation. LL represents the low-frequency approximation component. LH, HL, and HH correspond to the high-frequency detail components in the vertical, horizontal, and diagonal directions, respectively. In S3.3.2, the high-frequency sub-bands in the three directions are spliced ​​together along the channel dimension to form a unified high-frequency feature representation: (16); In equation (16): This indicates the high-frequency characteristics after high-frequency splicing; Subsequently, the fused high-frequency features are re-textured using a convolutional reconstruction module. This process can be represented as follows: (17); In equation (17): Indicates the features after reconstruction; In S3.3.3, in order to highlight the focus on key spatial locations and suppress interference from the background area, a spatial attention branch is introduced to generate a spatial mask; The original features and high-frequency features are concatenated along the channel dimension and used as input for spatial attention. Then, a spatial weight map is generated through a spatial attention module consisting of convolutions and nonlinear mappings. Finally, the generated spatial mask is applied to the reconstructed high-frequency detail features through element-wise multiplication, achieving adaptive enhancement of key region detail information, as shown below: (18); In formula (18): Spatial attention is represented as ; S3.3.4 introduces a region adaptive scaling factor to enhance the intensity of high-frequency details in adaptive control. This factor is generated from the global context information of the input features and, combined with residual energy constraints, dynamically adjusts the level of detail enhancement in different regions. It is represented as follows: (19); In equation (19): Represents the learnable basic enhancement coefficient, Represents the region adaptive weight generation function, A scaling factor to control the steepness of the mapping, where E is a high-frequency feature. residual energy, It is the energy threshold. F This represents the features of the input space detail enhancement module (SDE). S3.3.5, the final enhancement result is fused with the original features in the form of residuals; (20); In equation (20): This represents the final output feature of the Spatial Detail Enhancement (SDE) module.

[0028] like Figure 1 As shown, in the encoder sub-network, the data of dataset D1 is output in two branches after passing through the GAAB module. One branch passes through the SDE module in the intermediate layer sub-network, and the other branch is downsampled. The downsampling formula is as follows: (twenty one); In equation (21): This represents a convolution with a stride of p. This represents the features after downsampling; The features obtained after downsampling are input into the next GAAB and the output is downsampled. The above process is repeated until the third input to the GAAB module + downsampling operation, and then the transition to the GAAB module of the intermediate sub-network is achieved. The GAAB module of the intermediate layer sub-network is upsampled before entering the GAAB module of the decoder sub-network. The upsampling formula is as follows: (twenty two); In equation (22): This represents a subpixel convolution function for achieving super-resolution reconstruction. This represents the output features of the upsampled data; The concatenation function Concat is used to concatenate the upsampling result with the output of the SDE module in the intermediate sub-network, and the concatenated result is input into the GAAB module again. The above process is repeated until the third upsampling + concatenation with the SDE output feature + input into GAAB to obtain the final output feature. The final output feature is then reconstructed using Conv3×3. Finally, the reconstructed features are connected to the initial input image x via a residual network, as shown in the following formula: y=x+F(23; In equation (23): y represents the output image, F represents the reconstructed features, and x represents the initial input image.

[0029] In S4, optimization is performed using a combination of loss with loss function L1 and perceptual loss; The combination of L1 and perceptual loss has the following loss formula: (twenty four); (25); In equations (24) and (25): H and W represent the height and width dimensions of the image. and These represent the image after dehazing and the original hazy image, respectively. This indicates the VGG pre-trained network's first... Feature maps extracted from the layers, where S represents the set of feature layers. Indicates the first Layer feature size, Represents the L1 norm; The total losses are as follows: (26); In equation (26): where This represents the weighting coefficient, set to 0.1; The total loss is used to optimize the defogging network, thereby improving the network's defogging effect.

[0030] The trained model is evaluated on the validation set to assess its detection performance, including peak signal-to-noise ratio (PSNR), structural similarity (SSIM), number of multiply-accumulate operations (MACs), and number of parameters (Params), and the dehazing results are quantitatively evaluated. PSNR is used to measure the pixel-level reconstruction accuracy between a predicted dehazed image and a true sharp image. SSIM is used to measure the similarity of images in terms of brightness, contrast, and structure; MACs measure the total number of multiply-accumulate operations required by a model in one forward inference; the smaller the value, the lower the computational complexity. Params represents the number of all trainable parameters in the model, reflecting the model's complexity and storage requirements.

[0031] The formula for calculating PSNR is as follows:

[0032] Where MAX is the maximum value of a pixel, and MSE is the mean square error between the predicted image and the real image.

[0033] The formula for calculating SSIM is as follows:

[0034] in, y and x are the mean values ​​of the image, respectively. Standard deviation, For covariance, , It is a stability constant; the closer the value is to 1, the better the image structure is preserved.

[0035] The formula for calculating MACs is as follows:

[0036] in, These represent the height and width of the output feature map, respectively. These represent the number of input and output channels, respectively. These represent the height and width of the convolution kernel, respectively. The total MACs of the entire network are the sum of the MACs of each layer; the smaller the value, the lower the computational complexity.

[0037] This invention utilizes the Ubuntu 22.04 operating system, equipped with an Intel Core i5-12400F 2.5GHz processor, 8GB of RAM, and an NVIDIA GeForce RTX 1080 graphics card. The algorithm is implemented using the PyTorch 2.3.1 deep learning framework, with programs written in Python 3.9. CUDA 12.4 is used to accelerate the training and inference of the network model. To ensure experimental reproducibility, the network model training was performed under uniform settings, with input images of size 256×256.

[0038] To verify the superiority of the method of this invention, this paper compares it with the current mainstream detection methods. The experimental comparison results are shown in Table 1: Table 1 Comparison Results

[0039] As shown in Table 1, our proposed method outperforms other mainstream algorithms in terms of peak signal-to-noise ratio (PSNR) and structural similarity (SSIM), demonstrating outstanding overall performance. Compared to the MixDehazeNet_B algorithm, our method improves PSNR and SSIM by 1.28 and 0.033, respectively, while increasing the number of parameters by 16.31M and reducing MACs by 18.02G. Compared to the MB_TaylorFormer algorithm, our method improves PSNR and SSIM by 1.77 and 0.062, respectively. Although the number of parameters increases by 19.88M, MACs are reduced by 6.23G, indicating that we effectively control computational complexity while improving performance. Compared to algorithms such as MAXIM, AECR-Net, and MSBDN, our method achieves significant improvements in both PSNR and SSIM, resulting in clearer and more natural dehazing effects, verifying the superiority of our proposed method in image detail restoration and structure preservation.

[0040] In summary, compared with other current advanced dehazing models, the method proposed in this invention achieves better results in peak signal-to-noise ratio and similarity ratio, while maintaining reasonable computational complexity. This fully verifies that the method proposed in this invention can meet the actual needs of image dehazing.

Claims

1. A density-aware image dehazing method combining physical priors, characterized in that... Includes the following steps: S1: Collect images of foggy scenes, construct dataset D1, and divide it into training and validation sets proportionally; S2: Construct the density-aware dehazing network DADehaze; S3: Input the dataset into the DADEhaze network to generate feature maps at different scales; S4: Input the training set in dataset D1 into the DADEhaze network for training, and optimize it using a combination of L1 loss and perceptual loss as the loss function; S5: Input the validation set from dataset D1 into the improved DADehaze network and evaluate the network using evaluation metrics.

2. The density-aware image dehazing method combining physical priors according to claim 1, characterized in that: In S1, acquiring images of foggy scenes includes labeling the acquired images of foggy scenes; The annotation includes marking foggy areas and fog-affected areas in the image, allowing for the annotation of the outline of clear targets and reference areas; The construction of dataset D1 also includes preprocessing the dataset, including uniform image size, normalization, and data augmentation; The data augmentation includes random flipping, rotation, cropping, brightness and contrast adjustment, and simulating changes in different fog concentrations to improve the robustness and generalization ability of the defogging model.

3. The density-aware image dehazing method combining physical priors according to claim 1, characterized in that: In S2, the DADehaze network includes an encoder subnetwork, an intermediate layer subnetwork, and a decoder subnetwork; The encoder subnetwork includes a gridded atmospheric light attention module (GAAB); The Gridded Atmospheric Light Attention Block (GAAB) includes a Multi-Scale Density-Aware Convolutional Module (MSDA), a Grid-Aware Atmospheric Attention Module (GAA), and a Feature Fusion Module. The MSDA performs multi-level feature extraction on the input foggy image to generate features at different scales. The GAA enhances the modeling ability of fog distribution through a grid-aware attention mechanism. The outputs of the two are then fused through the Feature Fusion Module. The intermediate sub-network includes a gridded atmospheric light attention block (GAAB) and a spatial detail enhancement module (SDE). The SDE enhances the features of the intermediate output of the encoder sub-network and outputs them. The features output by the SDE are fused with the output of the decoder sub-network. The decoder subnetwork includes a gridded atmospheric light attention block (GAAB). The decoder subnetwork upsamples the multi-scale features output by the gridded atmospheric light attention block (GAAB) layer by layer, and concatenates them with the SDE output features to restore the image spatial resolution and output the dehazed image result.

4. The density-sensing image dehazing method combining physical priors according to claim 3, characterized in that: The MSDA contains hybrid convolutional branches with different kernel scales to capture local texture and density features at different scales. It also adaptively adjusts feature importance through channel attention branches and gating branches. Finally, it is fused and output through a projection convolutional layer. The specific steps are as follows: The Multi-Scale Density-Aware Convolutional Module (MSDA) includes the following steps: S3.1.1: The training set of dataset D1, after preprocessing by S1, is... After normalization, it becomes As shown in Equation (1), multi-scale dilated convolution kernels are then performed in parallel to capture texture and fog density under different receptive fields: (1); (2); In equations (1) and (2): Represents the normalization function. The image after normalization. , , These represent dilated convolutions with 13, 19, and 7 cores, respectively. This represents the channel splicing function; S3.1.2: After the above concatenation, the output features are processed by a multilayer perceptron and added to the initial input x as shown in equation (3). Its function is to fuse the three-way features and fit the dehazed features. After normalization, the features are calculated through channel attention (CA) and gating mechanism (Gating) respectively. (3); (4); (5); In equations (3), (4), and (5): This is the matrix multiplication symbol; GELU and Sigmoid are activation functions; and Conv is a simple convolution. For the output features of a multilayer perceptron, GAP is an average pooling layer. and These are the feature outputs of the channel attention mechanism and the gating mechanism, respectively. These two mechanisms allow the network to focus its attention on fog density and enhance detailed features. S3.1.3: Output the fused density-aware features and then combine them with... Feature addition: (6); In formula (6): These are the characteristics output by the MSDA module.

5. The density-aware image dehazing method combining physical priors according to claim 3, characterized in that: The grid-aware atmospheric attention module (GAA) achieves local ambient light estimation through gridded channel attention and introduces a global ambient light vector by combining a sky confidence branch. Simultaneously, it models the transmittance distribution and residual fog through spatial attention and anti-fog estimation branches, specifically including: The grid-aware atmospheric attention module (GAA) achieves local ambient light estimation through gridded channel attention and introduces a global ambient light vector by combining a sky confidence branch. Simultaneously, it models the transmittance distribution and residual fog through spatial attention and anti-fog estimation branches, specifically including: S3.2.1: Implicitly partition the feature map into The system constructs a grid region and learns a local atmospheric light prototype for each grid. By introducing position encoding and predicting the attention weights from pixels to each grid, pixel-level local atmospheric light can be represented as a weighted sum of atmospheric light across all grids: (7); In equation (7): weight The attention weight of a pixel to the k-th grid is represented. This is the atmospheric light prototype for the k-th grid; S3.2.2: After obtaining pixel-level local atmospheric light estimation, a global ambient light vector is introduced to model the uniform scattering characteristics of the sky region, and the local and global ambient light are adaptively fused using the predicted sky confidence score. (8); In equation (8): It is a sky confidence estimate, used to predict the probability of sky regions. Represents the global ambient light vector. This represents the final estimated atmospheric light, abbreviated as A; S3.2.3: Based on the atmospheric scattering model, the generation process of the fogged image is described as follows: (9); In equation (9): Represents the observed image, Represents a dehazed image. Transmittance, For global atmospheric light; To simplify the convolution operation, the equation is reconfigured and reexpressed as follows: (10); S3.2.4: Adopt Convolutional layers are used to extract features of T. By introducing physical priors, global and local features are balanced, thereby promoting more effective recovery of blurred images. use express Where T represents consistency with 1 / T: (11); In equation (11): ReLU is the activation function, and JT is the input feature; Finally, the physical characteristics of J are obtained through equation (10).

6. The density-sensing image dehazing method combining physical priors according to claim 5, characterized in that: The feature fusion module is used to process the density-aware features output by the density-aware convolution module MSDA. The physical prior features J output by the grid-aware atmospheric attention module GAA are fused together. The fusion method of the encoder sub-network feature fusion module is the selective convolutional fusion method SKFusion.

7. The density-aware image dehazing method combining physical priors according to claim 3, characterized in that: The Spatial Detail Enhancement (SDE) module obtains low-frequency and high-frequency sub-bands through wavelet decomposition. Based on the detail reconstruction branch, spatial attention branch, and region adaptive enhancement branch of the high-frequency sub-band, high-frequency texture restoration is performed. This is combined with the low-frequency sub-band to maintain the global structure, achieving synergistic enhancement of details and structure. The specific steps are as follows: S3.3.1: The fused density-sensing features are decomposed by wavelet to obtain low-frequency LL and high-frequency LH, HL, and HH; S3.3.2: High-frequency branch splicing followed by convolution reconstruction to reconstruct detailed textures; S3.3.3: Spatial attention branch generation mask; S3.3.4: The region adaptive scaling factor α controls the enhancement intensity; S3.3.5: The output is the enhanced image.

8. The density-aware image dehazing method combining physical priors according to claim 7, characterized in that: In S3.3.1, the density-aware features after input fusion are decomposed by wavelet to obtain high-frequency LH, HL, and HH. The low-frequency information reflects the structural information of the image, while the high-frequency information reflects the details of the image. The spatial detail enhancement module SDE mainly uses the high-frequency information. Haar wavelet with low-pass kernel is used. Qualcomm core ; For the input features, a two-dimensional wavelet transform is performed, and its one-level decomposition process can be represented as follows: (12); (13); (14); (15); In equations (12) to (15): this transformation represents matrix multiplication, and F represents the fusion feature of the input. The symbol represents the accumulation operation. LL represents the low-frequency approximation component. LH, HL, and HH correspond to the high-frequency detail components in the vertical, horizontal, and diagonal directions, respectively. In S3.3.2, the high-frequency sub-bands in the three directions are spliced ​​together along the channel dimension to form a unified high-frequency feature representation: (16); In equation (16): This indicates the high-frequency characteristics after high-frequency splicing; Subsequently, the fused high-frequency features are re-textured using a convolutional reconstruction module. This process can be represented as follows: (17); In equation (17): Indicates the features after reconstruction; In S3.3.3, in order to highlight the focus on key spatial locations and suppress interference from the background area, a spatial attention branch is introduced to generate a spatial mask; The original features and high-frequency features are concatenated along the channel dimension and used as input for spatial attention. Then, a spatial weight map is generated through a spatial attention module consisting of convolutions and nonlinear mappings. Finally, the generated spatial mask is applied to the reconstructed high-frequency detail features through element-wise multiplication, achieving adaptive enhancement of key region detail information, as shown below: (18); In formula (18): Spatial attention is represented as ; S3.3.4 introduces a region adaptive scaling factor to enhance the intensity of high-frequency details in adaptive control. This factor is generated from the global context information of the input features and, combined with residual energy constraints, dynamically adjusts the level of detail enhancement in different regions. It is represented as follows: (19); In equation (19): Represents the learnable basic enhancement coefficient, Represents the region adaptive weight generation function, A scaling factor to control the steepness of the mapping, where E is a high-frequency feature. residual energy, It is the energy threshold. F This represents the features of the input space detail enhancement module (SDE). S3.3.5, the final enhancement result is fused with the original features in the form of residuals; (20); In equation (20): This represents the final output feature of the Spatial Detail Enhancement (SDE) module.

9. The density-sensing image dehazing method combining physical priors according to claim 3, characterized in that: In the encoder sub-network, the data of dataset D1 is output in two branches after passing through the GAAB module. One branch passes through the SDE module in the intermediate layer sub-network, and the other branch is downsampled. The downsampling formula is as follows: (21); In equation (21): This represents a convolution with a stride of p. This represents the features after downsampling; The features obtained after downsampling are input into the next GAAB and the output is downsampled. The above process is repeated until the third input to the GAAB module + downsampling operation, and then the transition to the GAAB module of the intermediate sub-network is achieved. The GAAB module of the intermediate layer sub-network is upsampled before entering the GAAB module of the decoder sub-network. The upsampling formula is as follows: (22); In equation (22): This represents a subpixel convolution function for achieving super-resolution reconstruction. This represents the output features of upsampling; The concatenation function Concat is used to concatenate the upsampling result with the output of the SDE module in the intermediate sub-network, and the concatenated result is input into the GAAB module again. The above process is repeated until the third upsampling + concatenation with the SDE output feature + input into GAAB to obtain the final output feature. The final output feature is then reconstructed using Conv3×3. Finally, the reconstructed features are connected to the initial input image x via a residual network, as shown in the following formula: y=x+F(23; In equation (23): y represents the output image, F represents the reconstructed features, and x represents the initial input image.

10. The density-aware image dehazing method combining physical priors according to claim 1, characterized in that: In S4, optimization is performed using a combination of loss with loss function L1 and perceptual loss; The combination of L1 and perceptual loss has the following loss formula: (24); (25); In equations (24) and (25): H and W represent the height and width dimensions of the image. and These represent the image after dehazing and the original hazy image, respectively. This indicates the VGG pre-trained network's first... Feature maps extracted from the layers, where S represents the set of feature layers. Indicates the first Layer feature size, Represents the L1 norm; The total losses are as follows: (26); In equation (26): where Indicates the weighting coefficient; The total loss is used to optimize the defogging network, thereby improving the network's defogging effect.

Citation Information

Cited By

  • Zero-sample image defogging method based on high-frequency enhancement and depth-guided optimization

    CN121961922A

  • Self-adaptive gating deblurring system and method fusing multi-scale and multi-direction blurring features

    CN122048719A