A Single Image Dehazing Method

By using a multi-scale convolutional neural network and a stepped dehazing network structure in the image dehazing method, combined with the depth loss function and the guided filter layer, the problem of poor image dehazing effect in the existing technology is solved and high-quality Clear image output, significantly improving the defogging effect.

CN114049274BInactive Publication Date: 2024-08-27HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202111343676.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-13
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing image defogging methods have limited effects when processing foggy images. Especially when the fog concentration is heavy, it is difficult to output high-quality clear images. Although deep learning methods have been improved, they still have limitations.

Method used

A single image dehazing method is proposed, which uses multi-scale convolutional neural network and stepped dehazing network structure. By constructing the dehazing module D, including optimized ResNet, lightweight U-Net and image regression parts, combined with the guided filter layer , use the depth loss function for training to achieve end-to-end dehazing mapping and gradually optimize the dehazing effect.

Benefits of technology

On the RESIDE indoor and outdoor test sets, high dehazing effects were achieved through PSNR and SSIM index evaluation. The PSNR and SSIM indexes were 35.56 and 0.9896, 32.97 and 0.9784 respectively, which were better than existing methods and significantly improved the image dehazing effect. Fog quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114049274B
    Figure CN114049274B
Patent Text Reader

Abstract

The invention discloses a single image defogging method, which belongs to the technical field of digital image processing. The method first constructs a defogging module, and then constructs a stepped defogging network structure: a foggy image is input into the defogging module to obtain a first gradient defogging module, and a rougher defogging image is output, and then the foggy image is input into the defogging module to obtain a second gradient defogging module, so as to obtain a clear and fog-free image with higher quality; finally, a depth loss function is designed. The single image defogging method of the invention fully combines the stepped defogging strategy with the improved defogging module, so as to obtain a better defogging effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a single image defogging method, belonging to the technical field of digital image processing. Background Art

[0002] Haze is a common atmospheric phenomenon caused by small floating particles such as dust and smoke in the air. These floating particles greatly absorb scattered light, resulting in image quality degradation. Under the influence of haze, many practical applications such as video surveillance, remote sensing, and autonomous driving are easily threatened, and advanced computer vision tasks such as detection and recognition are difficult to complete. Therefore, image dehazing has become an increasingly important technology.

[0003] In order to eliminate the impact of haze weather on images, researchers have proposed many different methods. Currently, the processing methods for foggy images are mainly divided into two categories: foggy image enhancement and foggy image restoration. The difference lies in whether the atmospheric scattering model is used.

[0004] In recent years, deep learning has been increasingly used in the field of image processing. Therefore, some researchers have begun to consider applying it to the field of image dehazing. Because it can obtain image information through learning, it has also achieved good results in dehazing. These include the end-to-end dehazing network Dehaze Net proposed by Cai et al., a multi-scale convolutional neural network MSCNN proposed by Ren et al., a deep full convolutional regression network DFCRN proposed by Zhao et al. on the basis of the former, and a dehazing network AOD-Net based on a residual deep convolutional neural network proposed by Li et al. by improving the atmospheric scattering model formula. Although the above algorithms have achieved good results, each of them has certain limitations.

[0005] Based on deep learning, this paper proposes a multi-scale convolutional neural network to restore clear images through end-to-end mapping to achieve better dehazing effect. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a single image defogging method, which combines a new defogging strategy with a defogging model to gradually optimize the image defogging effect, and ultimately obtain a clear and fog-free image with relatively high quality at the output of the last defogging module of the network.

[0007] The object of the present invention is achieved in that:

[0008] A single image defogging method comprises the following steps:

[0009] S1, build defogging module D;

[0010] S2, construct a step-by-step defogging network structure θ: input the foggy image x into the defogging module D to obtain the first gradient defogging module D1, and D1 outputs a rougher defogging image x1; then input x1 into the defogging module D to obtain the second gradient defogging module D2, and finally D2 obtains a higher quality clear fog-free image x2;

[0011] S3. Design the depth loss function L:

[0012]

[0013] Among them, L n1 and L n2 They represent the average variance error loss before and after the nth guided filter layer respectively. α and β are a pair of adjustable scale parameters. Different dehazing effects can be obtained by setting them to different scales.

[0014] In the above-mentioned single image defogging method, in step S1, the defogging module D sequentially includes an optimized ResNet, wherein the ResNet is a residual neural network, a lightweight U-Net, wherein the U-Net is a U-shaped full convolutional network, image regression, a guided filter layer, and front and back supervision, so that the network has both high performance and high efficiency.

[0015] The defogging module optimizes the ResNet part, which consists of seven layers, wherein the first layer is a convolutional layer, the second, fourth and sixth layers are multi-scale convolutional layers, the third, fifth and seventh layers are connection layers, wherein all convolution operations use the ReLU function as the activation function, wherein the ReLU is a rectified linear unit, and the 1st, 2nd and 3rd layers, the 3rd, 4th and 5th layers, and the 5th, 6th and 7th layers are the building blocks of three CNNs, wherein the CNN is a convolutional neural network, wherein each block contains a shortcut connection and a connection layer, which fully retains the feature map generated by the previous layer and inputs it into the next layer; this part mainly performs structural feature extraction.

[0016] The lightweight U-Net part of the dehazing module consists of eight layers, first of which is composed of two convolutional layers with different numbers of filters and kernel sizes. Both convolutional layers are followed by a ReLU and a maximum pooling and downsampling operation. Then, a convolutional layer with ReLU with 32 filters with a kernel size of 3×3 is used. Finally, the expansion path of the lightweight U-Net consists of two upsampling steps, each of which includes a deconvolution and a cascade layer, and the cascade layer downsamples the feature map from the contraction path accordingly; during the expansion path, the feature and spatial information are combined with the high-resolution features from the contraction path through a series of deconvolution and cascade operations. This structure is used to extract complex statistical image features.

[0017] The image regression part of the dehazing module consists of three layers: the feature channels of the two previous parallel paths for feature extraction are converted into a dehazed base image component, two convolutional layers have 3×3 filters and 32 output channels, and the last layer is a deconvolution layer with a 3×3 filter and 3 output channels to form the RGB channels of the dehazed base image component.

[0018] In the defogging module, the guided filter layer is added to the end of each defogging module for joint training. In order to adapt to the different receptive field sizes of different network depths, different radius sizes are used. The first gradient defogging module D1 is 8 pixels, and the second gradient defogging module D2 is 16 pixels.

[0019] The defogging module adds supervision before and after the guided filter layer, which plays a role of strong supervision, allowing the main part of the defogging module to focus on learning the feature information related to defogging, and then the guided filter layer plays a role of edge preservation, and jointly coordinates to promote a better defogging effect of the network.

[0020] The dehazing module optimizes the ResNet part as a building block of a multi-scale deep residual learning network:

[0021]

[0022] Where S represents the number of scales considered in the network, Fj represents the residual mapping to be learned in the jth scale, and W i-j represents the weight coefficient of the jth scale in the i-th layer. By considering the case of S = 2, the formula becomes:

[0023] y=F1(ω,{W i-1})+F2(ω,{W i-2})+x=σ(ω*W i-1 )+σ(ω*W i-2 )

[0024] Where, "ω" represents the convolution operation and σ represents the activation function. In our network, the ReLU function is also used as the activation function. ReLU is mainly used for nonlinearity, which has been shown to allow faster training separators than other nonlinearities. In addition, the "+" operation integrates the three terms implemented by the connection layer. In this deep model, in order to jointly extract multi-scale features and preserve the color information of the input blurred image, we superimpose all feature maps and the original input to generate the output of the current layer, which constitutes the proposed dehazing module.

[0025] In the above single image defogging method, in step S2, the defogging network structure is expressed by the following formula:

[0026]

[0027] Among them, x1 represents the output of the first gradient defogging module D1, x2 represents the output of the second gradient defogging module D2, D represents the defogging module, and x represents the original input foggy image. By using the step-by-step defogging learning strategy, the output of the previous defogging module is used as the input of the next defogging module, and the image defogging effect is gradually optimized. Finally, a clear and fog-free image with relatively high quality can be obtained at the output of the last defogging module of the network.

[0028] Beneficial effects:

[0029] Based on the traditional multi-scale network, the present invention proposes a step-by-step defogging network strategy. The parts of the image with lighter fog concentration are processed by the first gradient defogging module, and the parts with heavier fog concentration are processed by the second gradient defogging module. The step-by-step defogging strategy is fully combined with the improved defogging module to obtain a better defogging effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0031] Figure 2 is a structural diagram of the defogging module in the present invention;

[0032] Figure 3 This is a diagram of the structure of the stepped defogging network in the present invention;

[0033] Figure 4 It is a diagram of the structure feature extraction part in the present invention;

[0034] Figure 5 This is a diagram showing the composition of the statistical feature extraction part in the present invention;

[0035] Figure 6 This is a diagram showing the regression part of the method of the present invention;

[0036] Figure 7 This is a comparison diagram of the image before and after defogging according to the present invention. DETAILED DESCRIPTION

[0037] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.

[0038] A single image defogging method, the flow chart is as follows Figure 1 As shown, the method comprises the following steps:

[0039] S1. Construction Figure 2 The defogging module D shown;

[0040] S2, build Figure 3The step-wise defogging network structure θ shown in the figure: the foggy image x is input into the defogging module D to obtain the first gradient defogging module D1, and D1 outputs a rougher defogging image x1; then x1 is input into the defogging module D to obtain the second gradient defogging module D2, and finally D2 obtains a higher quality clear fog-free image x2;

[0041] S3. Design the depth loss function L:

[0042]

[0043] Among them, L n1 and L n2 They represent the average variance error loss before and after the nth guided filter layer, respectively. α and β are a pair of adjustable ratio parameters. Different dehazing effects can be obtained by setting them to different ratios. Deep supervision not only enables the network to obtain edge sharpening results during dehazing, but also allows the main body of the network to play a greater role in dehazing.

[0044] Model training is performed by using a sample set consisting of foggy images and their corresponding clean images to train a neural network and obtain an end-to-end network model. When restoring an image, the trained model is used to input a foggy image and output a clean image, so there is no intermediate result. In other words, the method is mainly reflected in the construction of the network structure. Once the network is constructed, it can be trained with a sample set, and the training results can be directly used for image defogging.

[0045] In step S1, the defogging module D includes an optimized ResNet, which is a residual neural network, a lightweight U-Net, which is a U-shaped full convolutional network, an image regression, a guided filter layer, and front and back supervision, so that the network has both high performance and high efficiency.

[0046] The dehazing module optimizes the ResNet part, such as Figure 4 As shown in the figure, it consists of seven layers, wherein the first layer is a convolutional layer, the second, fourth and sixth layers are multi-scale convolutional layers, the third, fifth and seventh layers are connection layers, wherein all convolution operations use the ReLU function as the activation function, wherein the ReLU is a rectified linear unit, and the first, second and third layers, the third, fourth and fifth layers, and the fifth, sixth and seventh layers are the building blocks of three CNNs, wherein the CNN is a convolutional neural network, wherein each block contains a shortcut connection and a connection layer, which fully retains the feature map generated by the previous layer and inputs it into the next layer; this part mainly performs structural feature extraction.

[0047] The dehazing module is a lightweight U-Net part, such as Figure 5As shown in the figure, it consists of eight layers. The first is composed of two convolutional layers with different numbers of filters and kernel sizes. Both convolutional layers are followed by a ReLU and a maximum pooling and downsampling operation. Then, a convolutional layer with ReLU with 32 filters of kernel size 3×3 is used. Finally, the expansion path of the lightweight U-Net consists of two upsampling steps, each of which includes a deconvolution and a cascade layer, and the cascade layer downsamples the feature map from the contraction path accordingly; during the expansion path, the feature and spatial information are combined with the high-resolution features from the contraction path through a series of deconvolution and cascade operations. This structure is used to extract complex statistical image features.

[0048] The image regression part of the defogging module is as follows Figure 6 As shown, it consists of three layers, the feature channels of the two previous parallel paths for feature extraction are converted into the de-noised base image components, two convolutional layers have 3×3 filters and 32 output channels, and the last layer is a deconvolution layer with 3×3 filters and 3 output channels to form the RGB channels of the de-noised base image components.

[0049] In the defogging module, a guided filter layer is added to the end of each defogging module for joint training. In order to adapt to the different receptive field sizes of different network depths, different radius sizes are used. The first gradient defogging module D1 is 8 pixels, and the second gradient defogging module D2 is 16 pixels. Supervision is added before and after the guided filter layer to play a role of strong supervision, so that the main part of the defogging module can focus on learning the feature information related to defogging, and then the guided filter layer plays a role of edge preservation, and jointly coordinates to promote a better defogging effect of the network.

[0050] The dehazing module optimizes the ResNet part as a building block of a multi-scale deep residual learning network:

[0051]

[0052] Where S represents the number of scales considered in the network, Fj represents the residual mapping to be learned in the jth scale, and W i-j represents the weight coefficient of the jth scale in the i-th layer. By considering the case of S = 2, the formula becomes:

[0053] y=F1(ω,{W i-1})+F2(ω,{W i-2})+x=σ(ω*W i-1 ))+σ(ω*W i-2 )

[0054] Where, "ω" represents the convolution operation and σ represents the activation function. In our network, the ReLU function is also used as the activation function. ReLU is mainly used for nonlinearity, which has been shown to allow faster training separators than other nonlinearities. In addition, the "+" operation integrates the three terms implemented by the connection layer. In this deep model, in order to jointly extract multi-scale features and preserve the color information of the input blurred image, we superimpose all feature maps and the original input to generate the output of the current layer, which constitutes the proposed dehazing module.

[0055] In step S2, the defogging network structure is expressed by the following formula:

[0056]

[0057] Among them, x1 represents the output of the first gradient defogging module D1, x2 represents the output of the second gradient defogging module D2, D represents the defogging module, and x represents the original input foggy image. By using the step-by-step defogging learning strategy, the output of the previous defogging module is used as the input of the next defogging module, and the image defogging effect is gradually optimized. Finally, a clear and fog-free image with relatively high quality can be obtained at the output of the last defogging module of the network.

[0058] The final test results of the above method are: using peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) for measurement, PSNR = 35.56, SSIM = 0.9896 on the RESIDE indoor test set, PSNR = 32.97, SSIM = 0.9784 on the outdoor test, the results are better than the existing methods. Some visualization results are as follows Figure 7 shown.

[0059] in, Figure 7 The first row is the image before dehazing. Figure 7 The second row is the dehazed image.

[0060] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A single image defogging method, characterized in that: The steps include: S1, build defogging module D; The defogging module D includes an optimized ResNet, which is a residual neural network, a lightweight U-Net, which is a U-shaped full convolutional network, image regression, a guided filter layer, and front and back supervision. The optimized ResNet is used to extract structural features, and the lightweight U-Net is used to extract statistical features. The optimized ResNet and the lightweight U-Net are parallel paths. The dehazing module optimizes the ResNet part as a building block of a multi-scale deep residual learning network: Among them, S represents the number of scales considered in the network, and F j represents the residual mapping to be learned in the jth scale, W i-j represents the weight coefficient of the jth scale in the i-th layer. By considering the case of S = 2, the formula becomes: y=F1(ω,{W i-1 })+F2(ω,{W i-2 })+x=σ(ω*W i-1 )+σ(ω*W i-2 ) Among them, "ω" represents the convolution operation, σ represents the activation function. In our network, the ReLU function is also used as the activation function. ReLU is mainly used for nonlinearity, which has been shown to allow faster training of separators than other nonlinearities. In addition, the "+" operation integrates the three terms implemented by the connection layer. In the deep model, in order to jointly extract multi-scale features and retain the color information of the input blurred image, we superimpose all feature maps and the original input to generate the output of the current layer, which constitutes the proposed dehazing module; S2, construct a step-by-step defogging network structure θ: input the foggy image x into the defogging module D to obtain the first gradient defogging module D1, and D1 outputs a rougher defogging image x1; then input x1 into the defogging module D to obtain the second gradient defogging module D2, and finally D2 obtains a higher quality clear fog-free image x2; S3. Design the depth loss function L: Among them, L n1 and L n2 They represent the average variance error loss before and after the nth guided filter layer, respectively. α and β are a pair of adjustable ratio parameters. Different dehazing effects can be obtained by setting them to different ratios. The defogging module optimizes the ResNet part, which consists of seven layers, wherein the first layer is a convolution layer, the second, fourth and sixth layers are multi-scale convolution layers, the third, fifth and seventh layers are connection layers, wherein all convolution operations use the ReLU function as the activation function, wherein the ReLU is a rectified linear unit, and the 1st, 2nd and 3rd layers, the 3rd, 4th and 5th layers, and the 5th, 6th and 7th layers are the building blocks of three CNNs, wherein the CNN is a convolutional neural network, wherein each block contains a shortcut connection and a connection layer, which fully retains the feature map generated by the previous layer and inputs it into the next layer; this part mainly performs structural feature extraction; The lightweight U-Net part of the dehazing module consists of eight layers, first of all, it consists of two convolutional layers with different numbers of filters and kernel sizes, both of which are followed by a ReLU and a maximum pooling and downsampling operation, then, a convolutional layer with ReLU with 32 filters of kernel size 3×3 is used, and finally, the expansion path of the lightweight U-Net consists of two upsampling steps, each of which includes a deconvolution and a cascade layer, and the cascade layer accordingly downsamples the feature map from the contraction path; during the expansion path, the feature and spatial information are combined with the high-resolution features from the contraction path through a series of deconvolution and cascade operations, and this structure is used to extract complex statistical image features; The image regression part of the dehazing module consists of three layers: the feature channels of the two previous parallel paths for feature extraction are converted into the dehazed base image component, two convolutional layers have 3×3 filters and 32 output channels, and the last layer is a deconvolution layer with 3×3 filters and 3 output channels to form the RGB channels of the dehazed base image component.

2. The single image defogging method according to claim 1, characterized in that: In the defogging module, the guided filter layer is added to the end of each defogging module for joint training. In order to adapt to the different receptive field sizes of different network depths, different radius sizes are used. The first gradient defogging module D1 is 8 pixels, and the second gradient defogging module D2 is 16 pixels.

3. The single image defogging method according to claim 1, characterized in that: The defogging module adds supervision before and after the guided filter layer, which plays a role of strong supervision, allowing the main part of the defogging module to focus on learning the feature information related to defogging, and then the guided filter layer plays a role of edge preservation, and jointly coordinates to promote a better defogging effect of the network.

4. The single image defogging method according to claim 1, characterized in that: In step S2, the defogging network structure is expressed by the following formula: Among them, x1 represents the output of the first gradient defogging module D1, x2 represents the output of the second gradient defogging module D2, D represents the defogging module, and x represents the original input foggy image. By using the step-by-step defogging learning strategy, the output of the previous defogging module is used as the input of the next defogging module, and the image defogging effect is gradually optimized. Finally, a clear and fog-free image with relatively high quality can be obtained at the output of the last defogging module of the network.

Citation Information

Cited By

  • Mamba-CNN mixed image defogging method based on frequency domain prior guidance

    CN121414621A

  • Image defogging method fusing CLIP semantics and color balance

    CN121961919A