HFRC-Diff-based low-illumination superposition fog image enhancement method

Through the low-illumination superimposed fog image enhancement method based on the conditional diffusion model, the high-frequency and low-frequency components of the image are separated and fused, and the poor effect of low-illumination image enhancement and defog tasks in the prior art is solved, and higher quality is achieved image recovery effect.

CN119048381AActive Publication Date: 2024-11-29GUILIN UNIV OF ELECTRONIC TECH

Patent Information

Application Number
CN202410934577.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-11-29
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

The existing low-illumination image enhancement methods and image defogging algorithms perform poorly on low-illumination combined defogging tasks, and cannot effectively deal with low brightness, high noise and loss of details in low-illumination superimposed fogging images, especially at edges and details. part.

Method used

Using a low-illumination superimposed fog image enhancement method based on conditional diffusion model, the high-frequency and low-frequency components of the image are separated by the IP-Net initial prediction module, and combined frequency domain and spatial domain information in the MFS-Unet network to utilize parallel attention features The fusion module performs feature fusion to generate high-quality clean images.

Benefits of technology

The enhancement effect of low-illumination superimposed fog images is improved, making the enhanced results closer to the state when the normal illumination is not foggy, reducing noise and color distortion, and improving the clarity and detail recovery ability of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048381A_ABST
    Figure CN119048381A_ABST
Patent Text Reader

Abstract

The invention discloses a low-illumination superposition fog image enhancement method based on HFRC-Diff, and the method can enhance and recover a scene image which is poor in illumination condition and generates fog, and enables the scene image to be restored to a high-quality image which is normal in illumination and is clean in surface. Comprising the following steps: 1) processing an existing data set; (2) an IP-Net (Initial Prediction Network) initial prediction module is trained, and an IP-Net (Initial Prediction Network) initial prediction module is trained; (3) training a conditional diffusion model (Freight-domain and Spatial-domain Guided For Diffusion) which is guided by a spatial domain and a frequency domain, and training the conditional diffusion model (Freight-domain and Spatial-domain Guided For Diffusion) which is guided by the spatial domain and the frequency domain; and 4) training a parallel attention feature fusion module. And 5) testing the whole low-illumination superposition fog image enhancement network. According to the method, the difference between the pixel level and the semantic level between the low-illumination image and the normal-illumination image can be made up, meanwhile, a good defogging effect is achieved, and an image with higher quality is generated in a complex scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the fields of image enhancement, digital image processing technology, image defogging and denoising diffusion probability model, and specifically to a low-illuminance superimposed fog image enhancement method based on a high frequency-domain residual condition diffusion model (High Frequency-domain Residual Condition Diffusion). Background Art

[0002] Fog is a common weather phenomenon that is the product of water vapor condensation under certain atmospheric conditions. When fog occurs at night or in a cloudy scene, the image captured by the camera is called a low-light fog image. Such images often show the characteristics of low brightness, low contrast, and high noise. As an upstream task of image processing, it is very necessary to enhance the brightness and restore the details of such special images to restore the original appearance of the image under normal illumination to a greater extent.

[0003] At present, low-light image enhancement methods are mainly divided into traditional methods and deep learning methods. Due to the limitations of traditional methods, the effect of low-light image enhancement is often not good. Deep learning technology relies on continuously improved data sets and powerful computing power levels to better extract features and restore details. Its enhancement effect has greatly surpassed traditional methods, and it can better handle enhancement tasks in complex scenes. Therefore, it has become the mainstream technology for low-light image enhancement. Most of the existing low-light image enhancement methods only focus on enhancement tasks in simple scenes, that is, enhancement tasks that do not introduce other image degradation problems. In addition, most of the existing image defogging algorithms are based on image restoration tasks completed under normal illumination, and it is difficult to effectively handle the defogging problem in low-light superimposed fog scenes. Low-light superimposed fog images are visually manifested as low brightness and complex characteristics of objects being partially or completely covered. From the frequency domain, fog exists in the low-frequency components of the image and acts on the high-frequency components of the image. With the increase of fog concentration and the influence of low light, the degree of image degradation will be aggravated, especially the edges and details. From the analysis of the spatial domain and frequency domain of low-light superimposed fog images, the performance of both is significantly different from that of single low-light images and normal-light foggy images. Therefore, simply connecting these two existing algorithms in series cannot effectively complete the restoration task of this type of special image. Based on this, the present invention designs an integrated network for low-light enhancement and defogging, specifically a low-light superimposed fog image enhancement network based on HFRC-Diff.

[0004] The existing mainstream enhancement methods are mainly divided into two categories: improved methods based on Retinex theory and improved methods based on generative adversarial networks (GANs). The Retinex-based method decomposes the image into illumination components and reflection components, and then processes the two components separately and performs corresponding feature fusion operations. The enhanced results inevitably produce problems such as color distortion and detail loss. The method based on generative adversarial networks (GANs) belongs to unsupervised enhancement methods. The basic GAN consists of a generator and a discriminator. Due to the instability of its training, the enhancement effect is often not very ideal, which is manifested in detail loss, introduction of additional noise, and certain color deviation. At present, the advanced single image defogging methods are mainly divided into three categories: image defogging based on physical models and prior knowledge, image defogging based on pixel domain mapping, and image defogging based on domain knowledge transfer learning. Although they have made certain progress in their respective technical fields for defogging problems, most of them are only studied under normal illumination scenes.

[0005] In recent years, the diffusion model, as a new generative model, can be applied to image generation, image enhancement and image restoration tasks, and has emerged in low-light image enhancement and image defogging under normal illumination. Its stability and experimental effect even surpass GAN, and it has greater research and application prospects. The present invention is proposed under the support of many problems analyzed above and in new technical fields. Specifically, after performing corresponding data preprocessing, the present invention first uses the IP-Net initial prediction module to obtain the high-frequency component and low-frequency component of the image, and then adds the enhanced high-frequency component and the extracted low-frequency component and the mixed frequency domain information prediction map as conditions to the MFS-Unet network on the basis of the original diffusion model, so as to predict a more accurate pure noise image and guide the model to generate the clear image we expect. Finally, the parallel attention feature fusion module is used to fuse the low-frequency component image output by IP-Net and the denoised high-frequency residual image output by FSG-Diff at the channel level and pixel level, so as to complete the final low-light enhancement and defogging tasks and generate high-quality clean images. Summary of the invention

[0006] In view of the problem that the existing low-illumination image enhancement algorithms and image defogging algorithms perform poorly in the low-illumination joint defogging task, the present invention provides a low-illumination superimposed fog image enhancement method based on the conditional diffusion model. This method enables the model to pay more attention to the high-frequency and low-frequency information of the degraded image, and can more efficiently fuse the features of these two types of information after completing the inverse denoising process, so that the enhanced result is closer to the state under normal illumination and without fog.

[0007] Reference Figure 1 , a low-illumination superimposed fog image enhancement method based on a conditional diffusion model, comprising the following steps:

[0008] 1) Processing existing public datasets:

[0009] (1) The LOL-V1 dataset contains 500 low-light / normal-light image pairs, 80% of which are randomly selected as training sets and 20% as test sets; the LOL-V2 dataset includes two subsets, LOL-v2-real and LOL-v2-synthetic, of which LOL-v2-real contains 689 low-light / normal-light image pairs and LOL-v2-synthetic contains 1000 low-light / normal-light image pairs. For both subsets, 80% are randomly selected as training sets and 20% are randomly selected as test sets. The low-light images in the dataset are fused with fog of random size using the existing natural fog synthesis algorithm.

[0010] 2) Train the IP-Net (Initial Prediction Network) initial prediction module, see Figure 2 , comprising the following steps:

[0011] (1) The training data set in 1) is preprocessed. The width and height of all low-light superimposed fog images are uniformly scaled to 256*256 pixels. Then, histogram equalization is used to improve the image brightness and contrast to obtain a preliminarily enhanced low-light superimposed fog image.

[0012] (2) The low-light superimposed fog image obtained in (1) is sent to the hybrid frequency-domain information extraction module (Frequency-domain Information Extractor), see Figure 3 , and introduces two additional loss functions, namely the fast Fourier transform loss and the two-dimensional discrete wavelet transform loss, see Figure 4 , while obtaining the main low-frequency information, the high-frequency information is further restored, so as to obtain a prediction map that is a mixture of low-frequency and high-frequency information.

[0013] (3) The mixed frequency domain information prediction map obtained in (2) is sent to the frequency domain information separation module (Frequency-domainInformation Splitter), see Figure 2 That is, the mixed frequency domain information prediction map is input into the adaptive Gaussian high-pass filter and the adaptive Gaussian low-pass filter respectively by using the inverse fast Fourier transform to obtain two initial prediction maps containing only high-frequency information and only low-frequency information.

[0014] 3) Training a conditional diffusion model guided by the spatial domain and the frequency domain, including the following steps:

[0015] (1) Perform a forward Gaussian noise addition process on the normal illumination image corresponding to the preprocessed data in 2)-(1).

[0016] (2) Construct a high-frequency information-guided channel attention module (HF-guided CA), see Figure 7 , HF-guided CA is embedded in each downsampling layer and the corresponding upsampling layer of Unet, that is, the output of the downsampling layer of Unet is used as the input of the channel attention module, and the attention mechanism is applied to all channels of the input feature map for weighted operations, which can flexibly capture the dependencies between channels to capture information that has a prominent effect on color, thereby aligning semantic information.

[0017] (3) In the inverse denoising process, the MFS-Unet (Mix Frequency-domain and Spatial-domain Condition for Unet) network is used to estimate the noise, see Figure 6 That is, a Unet network with a channel attention module guided by high-frequency information is introduced. The mixed frequency domain information prediction map in 2)-(2) and the three images of separated high-frequency components and low-frequency components are used as one input of the MFS-Unet network. The other input is the noise image obtained at time step t. The added channel attention module guided by high-frequency details can improve the MFS-Unet network's ability to extract high-frequency features and help restore finer high-frequency details, thereby achieving a more accurate estimation of noise.

[0018] (4) Subtract the pure noise image obtained in step (3) from the image with Gaussian noise added obtained at the current time step t to obtain a high-frequency residual image of the denoising process. Similarly, after the preset time step is completed, the final denoised high-frequency residual image is obtained.

[0019] 4) Training the parallel attention feature fusion module includes the following steps:

[0020] (1) First, the low-frequency component feature map output in 2)-(3) and the denoised high-frequency residual feature map output in 3)-(4) are respectively subjected to channel-by-channel concatenation and element-by-element addition operations. These two branches each obtain an initial feature fusion map.

[0021] (2) The channel attention mechanism is applied to the output result after the channel-by-channel concatenation operation in 4)-(1), and the pixel attention mechanism is applied to the output result after the element-by-element addition operation, and the two operations are performed in parallel.

[0022] (3) Perform element-by-element addition operation on the two attention maps obtained in 4)-(2) to complete the final feature fusion and output the enhanced result of the low-light superimposed fog image.

[0023] 5) Testing the entire low-light fog image enhancement network includes the following steps:

[0024] 1) The low-light foggy images in the LOL-V1, LOL-V2 and SID test sets are first equalized to improve brightness and contrast, and then sent to the IP-Net initial prediction module with pre-trained weights to obtain a preliminary prediction map of mixed high-frequency and low-frequency information and the decomposed high-frequency and low-frequency components, see Figure 2 .

[0025] (2) The three images obtained in (1) are concatenated channel by channel as the conditional image, and random Gaussian noise is generated and sent to the trained conditional diffusion model for denoising and enhancement.

[0026] (3) The enhanced result and the low-frequency component image obtained in (1) are sent to the parallel attention feature fusion module.

[0027] (4) Perform PSNR and SSIM image quality evaluation on the feature fusion results obtained in (3).

[0028] This technical solution solves the problem that in the low-light fog image enhancement task, the image becomes more blurred and the noise increases significantly due to the degradation problem in the low-light environment, resulting in the inability to effectively handle the enhancement of such images using the existing low-light image enhancement method. First, this technology synthesizes natural fog in the existing low-light image to form a training and test data set; secondly, the processed training data set is sent to the IP-Net initial prediction module to obtain an RGB prediction map containing high-frequency and low-frequency components, and decomposes it into two initial prediction maps containing only high-frequency information and only low-frequency information; thirdly, a spatial domain prediction map and two frequency domain prediction maps are spliced ​​together along the channel and sent to a diffusion model combining the spatial domain and the frequency domain to obtain a denoised enhanced image; finally, the denoised enhanced image and the low-frequency component image obtained by the IP-Net initial prediction module are first subjected to a feature fusion operation, and then the pixel attention mechanism and the channel attention mechanism are respectively applied to complete the final feature fusion to obtain the final enhancement result. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 : HFRC-Diff network structure diagram

[0030] Figure 2 :IP-Net structure diagram

[0031] Figure 3:Structure diagram of hybrid frequency domain information extraction module

[0032] Figure 4 : Three loss function description structure diagram

[0033] Figure 5 :FSGDiff structure diagram

[0034] Figure 6 :MFS-Unet structure diagram

[0035] Figure 7 :HF-guided CA structure diagram

[0036] Figure 8 : Pixel attention module structure diagram DETAILED DESCRIPTION

[0037] Reference Figure 1 , a low illumination superimposed fog image enhancement method based on HFRC-Diff, comprising the following steps:

[0038] Step 1: Processing existing datasets

[0039] 1-1 The LOL-V1 dataset contains 500 low-light / normal-light image pairs, 80% of which are randomly selected as training sets and 20% as test sets; the LOL-V2 dataset includes two subsets, LOL-v2-real and LOL-v2-synthetic, of which LOL-v2-real contains 689 low-light / normal-light image pairs and LOL-v2-synthetic contains 1000 low-light / normal-light image pairs. For both subsets, 80% are randomly selected as training sets and 20% are randomly selected as test sets.

[0040] The 1-2SID dataset contains 5094 low-light images and their corresponding normal-light images. 70% are randomly selected as training sets and 30% as test sets.

[0041] 1-3 Use the existing natural fog synthesis algorithm to merge the low-light images of the above three data sets into fog of random size. Use the training set of low-light images of the three data sets superimposed with fog and normal light clean image pairs to train IP-Net, generate two initial prediction images of high frequency and low frequency respectively, and then use the obtained initial prediction images to train the MFS-Unet network to estimate noise. The test set of low-light images superimposed with fog images is used to detect the trained diffusion model.

[0042] Table 1 Source of the dataset

[0043]

[0044] Step 2: Train the IP-Net initial prediction module

[0045] Since a simple convolutional neural network can restore the main low-frequency content of an image, IP-Net is designed. It can not only restore the main low-frequency content but also predict some high-frequency information, so that the subsequent conditional diffusion model can use the high-frequency and low-frequency content predicted by IP-Net to guide the noise to the residual between the normal lighting clean image and the high-frequency content of the predicted image. This not only speeds up the model convergence time but also obtains better sample quality.

[0046] 2-1 Preprocess the training data sets of the three data sets LOL-V1, LOL-V2 and SID, and uniformly scale the width and height of all low-light fog images to 256*256 pixels. Then, histogram equalization is used to improve the image brightness and contrast, and a preliminary enhanced low-light image is obtained.

[0047] 2-2 Reference Figure 3 , the initially enhanced low-light image obtained in 2-1 is sent to the frequency domain information extraction module in IP-Net for frequency domain information extraction. The input image first passes through a convolution layer with a convolution kernel size of 3*3 and a step size of 1, and then a Relu activation function layer is added; then it passes through another convolution layer with a convolution kernel size of 3*3 and a step size of 1, and then a Relu activation function layer is added; then the feature map output by the first convolution layer is skipped with the feature map output by the second convolution layer, that is, the corresponding channel-by-channel and pixel-by-pixel addition is performed. This step integrates the extracted low-frequency information ; The output of the jump connection layer is used as the input of the third convolution layer. The third convolution layer also has a convolution kernel size of 3*3 and a step size of 1. Then a Relu activation function layer is added. The function of this layer is to integrate high and low frequency information. The fourth layer is a convolution layer with a convolution kernel size of 1*1 and a step size of 1, which is used to adjust the channel dimension of the feature map. The Relu activation function layer is added again. The third convolution layer and the last Relu layer perform a jump connection operation. Finally, a sigmoid activation function layer is used to obtain the weight corresponding to each channel of the feature map, so as to generate the initial prediction map. This prediction map restores the main low-frequency information of the image and predicts some high-frequency information. Reference Figure 4 , two additional loss functions are introduced based on the Ground Truth loss, namely the fast Fourier transform loss and the two-dimensional discrete wavelet transform loss. They are shown in the following formulas (1), (2) and (3) respectively:

[0048]

[0049] For L FFT , I and They represent the frequency domain images obtained by performing FFT on the ground-truth image and the predicted image. DWT , extract the wavelet coefficients of the high-frequency bands H, V and D in the image frequency domain, which refer to the high-frequency components in the horizontal, vertical and diagonal directions respectively, where H i ,V i ,D i is the subband of the real image in the ith downsampling, is the subband of the predicted image in the i-th downsampling, L is the total level of downsampling, and the loss in the spatial domain is L GT In, Y and Represent the real image and the predicted image respectively. Finally, the three losses are added together to get the overall loss of the hybrid frequency domain information extraction module, as shown in the following formula (4):

[0050] L Total =L FFT +L DWT +L GT (4)

[0051] 2-3 The obtained mixed frequency domain information prediction image is sent to the frequency domain information separation module. First, for the RGB prediction image x with high-frequency and low-frequency information mfi ∈R H×W×C , we first perform 2DFFT transformation along the spatial dimension to obtain the frequency domain feature map M, as shown in the following formula (5):

[0052] M = FFT(x mfi )∈R H×W×C (5)

[0053] Next, the standard deviation calculation formula is used, as shown in the following formula (6):

[0054]

[0055] Calculate the standard deviation of the feature map M, where σ is the standard deviation, N is the total number of pixels, and x i is the i-th pixel value, and μ is the average value of the pixel value. Using the calculated standard deviation, an adaptive Gaussian high-pass filter and an adaptive Gaussian low-pass filter can be constructed, as shown in formula (7) and formula (8), respectively:

[0056]

[0057] Where D(u,v) is the distance from the point (u,v) in the frequency domain to the center point. Then, the output of the Gaussian high-pass filter and the output of the Gaussian low-pass filter are respectively multiplied element by element with M to obtain the adaptive high-pass filter feature map M * h and adaptive low-pass filtering feature map M* l , as shown in formula (9) and formula (10) respectively:

[0058]

[0059]

[0060] Finally, the inverse FFT transform is used to transform M * h and M * l Reverse to the spatial domain and obtain feature maps x containing only high-frequency information. HF And the prediction graph x containing only low-frequency information LF , as shown in formula (11) and formula (12) respectively:

[0061] x HF =FFT -1 (M * h )∈R H×W×C (11)

[0062] x LF =FFT -1 (M * l )∈R H×W×C (12)

[0063] In order to introduce spatial and frequency domain information into the conditional diffusion model, x mfi , x HF and x LF Splice along the channel dimension to get the final conditional image X c , as shown in the following formula (13):

[0064] X c =concat(x mfi ,x HF ,x LF ) (13)

[0065] Step 3: Train the conditional diffusion model guided by spatial and frequency domains

[0066] The original diffusion model DDPM (Denoising Diffusion Probabilistic Models) is based on the Markov chain principle and includes two processes, namely forward diffusion denoising and reverse reasoning denoising. The forward diffusion denoising process of the conditional diffusion model is exactly the same as that of DDPM. The difference is that its reverse reasoning denoising process requires additional input information as a condition to guide the generation direction of the diffusion model. This method uses the output of the IP-Net initial prediction module as a control condition to speed up the model convergence and generate higher quality images.

[0067] 3-1 Reference Figure 5 , the forward diffusion noise adding process is performed on the normal illumination images of the three datasets LOL-V1, LOL-V2 and SID. That is, for the given real image samples x~q(x0), Gaussian noise is added to them by cumulatively executing T=1000 times to obtain X1, X2,...,X T , using the variance hyperparameter {β t ∈(0.0001,0.02)} to control the size of the noise added at each step, where t∈(1,T), that is, T=1000. The noise addition of the model is actually a weighted fusion of the image input in the previous stage with a Gaussian distribution sample. The weight increases with the time step. It can be seen that the noise amplitude is relatively small at the beginning, and the noise amplitude gradually increases later. Since the noise distribution obtained at each time t in the forward process is only related to the time t-1, it can also be equivalent to a Markov chain process, as shown in the following formulas (14) and (15):

[0068]

[0069] It can be seen that as t increases, X t As T approaches infinity, X T is a completely pure noise image. After executing 1000 time steps, the input normal illumination image X0 has become a completely pure noise image X T , so far the forward diffusion noise adding process of the diffusion model is completed.

[0070] 3-2 Reference Figure 5 , the Gaussian noise X obtained in 3-1 T ~N(0,I) is used as the input information of the inverse denoising process, refer to Figure 6 Then, a noise predictor, namely the MFS-Unet network, is constructed to predict the noise added at each time step in the forward noise addition process. c As a condition for the inverse denoising process, we then set X c and X TThey are concatenated channel by channel and sent to MFS-Unet. Through T iterations, random noise X T Revert to enhanced result X * 0, each denoising step of the reverse process is shown in the following formula (16):

[0071]

[0072] in represents the conditional image X defined by c , X t represents the sampled Gaussian noise with constant variance Learning the mean Here α t =1-β t , It can be seen As the only unknown variable, the MFS-Unet denoising network is required to predict.

[0073] 3-3 In the original U-net architecture, the encoder features are directly connected to the features obtained by the decoder. This fusion is conducive to the network to effectively fuse high-level and low-level features, but lacks the ability to extract high-frequency features. To solve this problem, a channel attention module guided by high-frequency details (HF-guided CA) is designed to help restore finer high-frequency details. Figure 7 , HF-guided CA is improved based on SENet (Squeeze-and-Excitation Networks) of the classic channel attention network. Specifically, for the input H×W×C feature map, it first passes through a GAP (Global Average Pooling) layer to add and average all pixel values ​​of the feature map to obtain a feature map with a shape of 1×1×C; then it passes through a FC (Fully Connected) layer for compression operation to obtain a feature map with a shape of 1×1×C / r, where r=16 represents the compression ratio; then it passes through a Relu layer for nonlinear activation, and then passes through a convolution layer with a convolution kernel size of 1*1 and a step size of 1 instead of the original FC layer. The purpose is to adjust the channel dimension while capturing the dependency between channels, thereby effectively reducing the color deviation problem caused by the downsampling operation of the U-net network on the feature map, and then obtains a shape of 1×1×C, which is then passed through a Relu layer for nonlinear activation again; finally, the sigmoid layer normalizes the values ​​of each layer to between 0-1 to represent the weight of each channel; the feature fusion operation multiplies the original feature map with the output 1×1×C to obtain the final feature map, whose dimension is consistent with the original input feature map, also H×W×C.

[0074] 3-4 Reference Figure 6 , use MFS-Unet to predict random noise, that is, predict One of the inputs is the noise X obtained at time step T T As input, the other input is X c By setting X c and X T The channels are spliced ​​together and sent to MFS-Unet. The objective function of this process is shown in the following formula (17):

[0075]

[0076] The goal of MFS-Unet optimization is to fit the noise residual, that is, the residual image with high-frequency information predicted by IP-Net and the normal illumination clean image. This requires that the "distance" between the noise distribution predicted in the backward process and the noise distribution applied in the forward process is minimized. Figure 5 Specifically, for the current time step t, we take the random Gaussian noise X obtained by the forward noise addition process t With X c Send it into the MFS-Unet network to get the predicted noise ∈ θ , our goal is to make ∈ θ With ∈ t The difference is the smallest, and at the same time X t With ∈ θ Perform the subtraction operation to obtain the denoised restored state X corresponding to the current time step t * t , and so on, we define the reduced state obtained by each step through the MFS-Unet network as X * T , X * T-1 , ..., X * t , X * 0, each step tries to gradually reduce the noise and restore the earlier state of the original image until it is restored to a state X close to the initial clear state X0 * 0, which is the final denoised high-frequency residual image.

[0077] Step 4: Train the parallel attention feature fusion module

[0078] From the above steps, we can see that the low-frequency component feature map M * l The high-frequency residual feature map X has been generated by the IP-Net network and denoised *0 has also been generated by FSGDiff. Next, the feature fusion operation is performed. Since the effect of fusing two feature maps by only adding or connecting operations is poor, a parallel attention feature fusion module is designed to further fuse features in a pixel and channel collaborative manner. The two attention mechanisms are executed in parallel, which can flexibly process different types of information, namely low-light plus fog pixel information and more important channel information. This provides additional compensation in the low-light enhancement and defogging process to improve the final image quality.

[0079] 4-1 Reference Figure 1 First, IP-Net outputs the low-frequency component feature map M * l Denoised high-frequency residual feature map X output by FSGDiff * 0 respectively performs channel-by-channel concatenation and element-by-element addition operations, and these two branches obtain an initial feature fusion graph F1 and F2 respectively.

[0080] 4-2 Reference Figure 8 , applying the pixel attention mechanism, the feature map F1 with a shape of H×W×C obtained in 4-1 is input into a convolution layer with a convolution kernel size of 1*1 and a stride of 1 to obtain a feature map of H×W×C / 2; then it passes through a Relu activation function layer, and the shape of the feature map remains unchanged; then it also passes through a convolution layer with a convolution kernel size of 1*1 and a stride of 1 to obtain a feature map of H×W×1; then it passes through a sigmoid layer, and weighted sums all pixels on the feature map to obtain a feature vector of H×W×1. Finally, F1 is element-wise multiplied with the output of the sigmoid layer to obtain F°1. The dimension of this attention map is consistent with that of F1, which is also H×W×C.

[0081] 4-3 Reference Figure 7 , reuse the HF-guided CA module to apply the channel attention mechanism, take the feature map F2 with a shape of H×W×C obtained in 4-1 as the input of the channel attention module, and output the attention map F°2 with a shape of H×W×C.

[0082] 4-4 performs element-by-element addition operation on the two attention maps F°1 and F°2 to complete the final feature fusion and output the enhanced result of the low-light foggy image.

[0083] Step 5: Test the entire low-light fog image enhancement network

[0084] (1) The low-light foggy images in the LOL-V1, LOL-V2 and SID test sets are first equalized to improve brightness and contrast, and then sent to the IP-Net initial prediction module with pre-trained weights to obtain a preliminary prediction map of mixed high-frequency and low-frequency information as well as the decomposed high-frequency and low-frequency components.

[0085] (2) The three images obtained in (1) are concatenated channel by channel as the conditional image, and random Gaussian noise is generated and sent to the trained conditional diffusion model for denoising and enhancement.

[0086] (3) The enhanced result and the low-frequency component image obtained in (1) are sent to the parallel attention feature fusion module.

[0087] (4) Perform PSNR and SSIM image quality evaluation on the feature fusion results obtained in (3).

Claims

1. A low-light superimposed fog image enhancement method based on HFRC-Diff, which is characterized by comprising the following method steps: 1) Processing existing public datasets: (1) The LOL-V1 dataset contains 500 low-light / normal-light image pairs, 80% of which are randomly selected as training sets and 20% as test sets; the LOL-V2 dataset includes two subsets, LOL-v2-real and LOL-v2-synthetic, of which LOL-v2-real contains 689 low-light / normal-light image pairs and LOL-v2-synthetic contains 1000 low-light / normal-light image pairs. For both subsets, 80% are randomly selected as training sets and 20% are randomly selected as test sets. The low-light images in the dataset are fused with fog of random size using the existing natural fog synthesis algorithm. (2) The SID dataset contains 5094 low-light images and their corresponding normal-light images. 70% are randomly selected as the training set and 30% as the test set. The existing natural fog synthesis algorithm is used to fuse the low-light images in the dataset into fog of random size. 2) Training the IP-Net (Initial Prediction Network) initial prediction module, as shown in Figure 2, includes the following steps: (1) The training data set in 1) is preprocessed. The width and height of all low-light superimposed fog images are uniformly scaled to 256*256 pixels. Then, histogram equalization is used to improve the image brightness and contrast to obtain a preliminarily enhanced low-light superimposed fog image. (2) The low-light superimposed fog image initially enhanced in (1) is sent to the frequency-domain information extractor module (Frequency-domain Information Extractor), as shown in Figure 3. At the same time, two additional loss functions are introduced, namely the fast Fourier transform loss and the two-dimensional discrete wavelet transform loss, as shown in Figure 4. While obtaining the main low-frequency information, the high-frequency information is further restored, so as to obtain a prediction image that is a mixture of low-frequency and high-frequency information. (3) The mixed frequency domain information prediction map obtained in (2) is sent to the frequency domain information separation module (Frequency-domainInformation Splitter), see Figure 2, that is, the mixed frequency domain information prediction map is input into the adaptive Gaussian high-pass filter and the adaptive Gaussian low-pass filter respectively by inverse fast Fourier transform, and two initial prediction maps containing only high-frequency information and only low-frequency information are obtained. 3) Training a conditional diffusion model guided by the spatial domain and the frequency domain, including the following steps: (1) Perform a forward Gaussian noise addition process on the normal illumination image corresponding to the preprocessed data in 2)-(1). (2) Construct a channel attention module guided by high-frequency information (HF-guided CA), as shown in Figure 7. HF-guided CA is embedded in each downsampling layer and the corresponding upsampling layer of Unet. That is, the output of the downsampling layer of Unet is used as the input of the channel attention module. The attention mechanism is applied to all channels of the input feature map for weighted operations. This can flexibly capture the dependencies between channels to capture information that has a prominent effect on color, thereby aligning semantic information. (3) In the inverse denoising process, the MFS-Unet (Mix Frequency-domain and Spatial-domain Condition for Unet) network is used to estimate the noise, as shown in Figure 6. That is, a Unet network with a channel attention module guided by high-frequency information is introduced. The mixed frequency domain information prediction image in 2)-(2) and the three images of separated high-frequency components and low-frequency components are used as one input of the MFS-Unet network, and the other input is the noise image obtained at time step t. The added high-frequency information guided channel attention module can enable the MFS-Unet network to improve its ability to extract high-frequency features and help restore finer high-frequency details, thereby achieving the purpose of more accurate noise estimation. (4) Subtract the pure noise image obtained in step (3) from the image with Gaussian noise added obtained at the current time step t to obtain a high-frequency residual image of the denoising process. Similarly, after the preset time step is completed, the final denoised high-frequency residual image is obtained. 4) Training the parallel attention feature fusion module includes the following steps: (1) First, the low-frequency component feature map output in 2)-(3) and the denoised high-frequency residual feature map output in 3)-(4) are respectively subjected to channel-by-channel concatenation and element-by-element addition operations. These two branches each obtain an initial feature fusion map. (2) The channel attention mechanism is applied to the output result after the channel-by-channel concatenation operation in 4)-(1), and the pixel attention mechanism is applied to the output result after the element-by-element addition operation, and the two operations are performed in parallel. (3) Perform element-by-element addition operation on the two attention maps obtained in 4)-(2) to complete the final feature fusion and output the enhanced result of the low-light superimposed fog image. 5) Testing the entire low-light superimposed fog image enhancement network includes the following steps: 1) The low-light foggy images in the LOL-V1, LOL-V2 and SID test sets are first equalized to improve brightness and contrast, and then sent to the IP-Net initial prediction module with pre-trained weights to obtain a preliminary prediction map of mixed high-frequency and low-frequency information and the decomposed high-frequency and low-frequency components, as shown in Figure 2. (2) The three images obtained in (1) are concatenated channel by channel as the conditional image, and random Gaussian noise is generated and sent to the trained conditional diffusion model for denoising and enhancement. (3) The enhanced result and the low-frequency component image obtained in (1) are sent to the parallel attention feature fusion module. (4) Perform PSNR and SSIM image quality evaluation on the feature fusion results obtained in (3).

Citation Information

Patent Citations

  • Weak light image enhancement method for high-frequency texture reconstruction

    CN117058041A

  • Underwater low-illumination image enhancement method based on conditional diffusion model

    CN117911302A

  • Ultrasound image denoising model establishing method and ultrasound image denoising method

    WO2022083026A1

  • Two-order lightweight network panchromatic sharpening method combining guided filtering and nsct

    WO2023000505A1

Cited By

  • Image defogging method based on Laplace image decomposition and diffusion model

    CN119762370A

  • Coal face dust fog image defogging method and system based on potential diffusion model

    CN120125467A

  • Diffusion road image enhancement method based on wavelet transform and prior

    CN120410864A

  • Defogging method based on frequency information differential fusion

    CN120725904A

  • Dehazing method based on frequency information differential fusion

    CN120725904B