Illumination-controllable dehazing method based on unsupervised visual layer embedding and visual conversion model

By building a light-controllable defog removal network and a fog synthesis network, combining visual layer embedding and multi-head self-attention mechanism, using dark channel prior training, the problems of insufficient color restoration and blurred details in the existing technology are solved, and high-quality image defog removal effect is achieved.

CN115937048BActive Publication Date: 2025-08-19SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310059502.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-17
Publication Date
2025-08-19
Estimated Expiration
2043-01-17

AI Technical Summary

Technical Problem

The existing image defog removal technology has problems such as insufficient color restoration and blurred details, lacks consideration of lighting information, and the unsupervised defog removal algorithm lacks the use of prior knowledge, resulting in inaccurate and inconsistent image brightness after defog removal.

Method used

The light controllable defog removal method based on unsupervised view layer embedding and visual conversion model is adopted. By constructing a light controllable defog removal network, a fog synthesis network, a fog removal discrimination network and a fog synthesis discrimination network, combined with the visual layer embedding and multi-head self-attention mechanism, the dark channel prior is used for training to achieve end-to-end high-quality defog removal.

Benefits of technology

Higher peak signal-to-noise ratio and structural similarity values were obtained, which significantly improved the color restoration and detail restoration effects of the defogging image and improved the visual clarity of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937048B_ABST
    Figure CN115937048B_ABST
Patent Text Reader

Abstract

The present invention discloses an illumination-controllable defogging method based on an unsupervised visual layer embedding and visual conversion model. The defogging method includes four modules, namely an illumination-controllable defogging network, a defogging discriminant network, a fog synthesis network and a fog synthesis discriminant network. After training, the illumination-controllable defogging network can obtain high-quality defogging images. The illumination-controllable defogging network and the fog synthesis network are composed of a window-based multi-head self-attention module; the defogging discriminant network and the fog synthesis discriminant network are composed of a residual link-based convolution module; the illumination-controllable module is constructed according to the visual layer conversion model; the dark channel prior is used as a guide for the illumination-controllable defogging network during training; the training process of the four components adopts an unsupervised joint training method, and the network parameters are updated by fusing prior loss, image reconstruction loss and discrimination loss. The present invention can be used for traffic safety, information security, photography and intelligent robots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an illumination-controllable defogging technology based on an unsupervised visual layer embedding and visual conversion model, and belongs to the field of computer vision and image processing technology. Background Art

[0002] Image dehazing is a hot research topic in the field of computer vision and image processing, attracting widespread attention from researchers. Under the influence of fog, image quality degrades, reducing the visibility of objects in the scene and causing the image to appear visually blurred. Furthermore, the color of the image will shift to varying degrees depending on the fog concentration. On the one hand, the presence of fog can negatively impact human photography, causing the captured images to fail to meet aesthetic requirements. On the other hand, fog can negatively impact production and social activities, such as reducing target detection accuracy during autonomous driving and affecting the clarity of vehicles and pedestrians captured by road traffic monitoring. The purpose of image dehazing algorithms is to remove fog from foggy images, thereby improving the overall quality of foggy images and enhancing their visual clarity.

[0003] Existing research results in the field of image dehazing have made initial progress. By inputting foggy images captured by the camera into the image dehazing algorithm, it is possible to preliminarily remove the fog contained in the image and improve the clarity of objects in the image to a certain extent. However, there are still problems with insufficient color restoration and blurred details. Wang et al. proposed an unsupervised dehazing method called "SNSPGAN" using spectral normalization [Wang, Yongzhen, et al. Cycle-SNSPGAN: Towards Real-World Image Dehazing via Cycle SpectralNormalized Soft Likelihood Estimation Patch GAN. IEEE Transactions on Intelligent Transportation Systems. 2022. 23: 20368-20382]. However, the color and detail restoration effects of the dehazed images obtained by this method are insufficient. There are three problems in the existing image dehazing technology that need to be further studied. First, image dehazing models built using convolutional neural networks can extract image features and reconstruct dehazed images, and are trained in an end-to-end manner. However, these models lack the ability to model the correlation of information within the image. Therefore, designing a dehazing model using a window-based local attention mechanism is a challenging problem of significant research significance. Second, deep learning-based dehazing algorithms lack consideration of illumination information during the dehazing process, resulting in inaccurate brightness information in the dehazed image and a brightness inconsistency between the dehazed image and the true clear image. Third, existing unsupervised dehazing algorithms lack the use of prior knowledge to reduce the model's dependence on data.

[0004] As image data plays an increasingly important role in social life, high-quality image data has become an important requirement for technological development. Therefore, designing high-quality defogging technology for foggy images is an urgent problem that researchers in this field need to solve. Summary of the Invention

[0005] In order to solve the problem of insufficient color and detail restoration in the dehazed images obtained by the image dehazing model, the present invention discloses an illumination-controllable dehazing method based on unsupervised visual layer embedding and visual conversion model. The dehazed images obtained by this method have higher peak signal-to-noise ratio and structural similarity value.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] First, we build the core network required for the image dehazing method. The steps are as follows:

[0008] Step S1: Construct the core network parameters and initialize the network parameters. The designed image dehazing method includes four core networks: an illumination-controlled dehazing network, a fog synthesis network, a dehazing discriminant network, and a fog synthesis discriminant network. The illumination-controlled dehazing network is the dehazing network used in actual applications. The other three networks are only used to assist in the training of the illumination-controlled dehazing network and are not required in actual applications. The illumination-controlled dehazing network is composed of a vision transformer block, which includes two processes: feature encoding and decoding reconstruction. During the decoding process, a feature output containing two branches is obtained, and the decoded features of the two branches are fused through the retinex embedding method. By controlling the decoded feature weights of the branches, dehazed images under different lighting conditions are obtained. The fog synthesis network is a single-branch encoding and decoding network composed of a vision transformer block. Its input is a fog-free image and its output is a foggy image. The dehazing discriminant network and the fog synthesis discriminant network are used to guide the training process of the illumination-controlled dehazing network and the fog synthesis network.

[0009] Secondly, build a light controllable module. The steps are as follows:

[0010] Step S2: The illumination controllable dehazing network controls the decoding feature weights of the inference phase through the illumination controllable module, thereby obtaining dehazed images with different feature weight ratios. The illumination controllable dehazing network consists of an encoder and two decoders. The encoder is φ and the decoders are and For the input data x, the encoder output feature is φ(x), and the decoding features obtained by the two decoders are o d (x) and o r (x), where o d (x) represents direct output, which is calculated as follows:

[0011]

[0012] o r (x) represents the embedded output, for o r The calculation of (x) uses the Retinex model and uses element-by-element multiplication “*” to perform the following calculation:

[0013]

[0014] in It is the feature obtained through the deep network.

[0015] Step S3: Get o d (x) and o rAfter (x), linear fusion and nonlinear mapping are required. The linear fusion process is as follows:

[0016] o f (x) = α × o d (x)+(1-α)×o r (x)

[0017] In the above formula, α represents the balance factor, o f (x) is the output of the linear fusion stage;

[0018] The nonlinear mapping process is implemented using the hyperbolic tangent function, and the final dehazing output o(x) can be obtained as follows:

[0019]

[0020] In the above formula, e represents an exponential function with the natural constant e as the base. Linear fusion and nonlinear mapping are used as illumination-controllable modules and embedded into the illumination-controllable dehazing network.

[0021] Third, build four core networks. The steps are as follows:

[0022] Step S4: Both the light-controlled dehazing network and the fog synthesis network include two feature map dimensionality reduction processes and two feature map dimensionality increase processes. The dimensions of the input and output images of the light-controlled dehazing network and the fog synthesis network are H×W×3, where H represents the height of the image, W represents the width of the image, and 3 represents that the image contains 3 channels. During the feature calculation process, the basic number of feature channels is set to L, and the value of L is 64. The operations required by both the light-controlled dehazing network and the fog synthesis network include patch partitioning, visual feature conversion, patch embedding, and upsampling. Patch partitioning and patch embedding are implemented using convolution operations, upsampling is implemented using deconvolution, and the visual feature conversion module is implemented using a window-mode multi-head self-attention mechanism, layer normalization, and a multi-layer perceptron. The calculation process of the light-controlled dehazing network and the fog synthesis network is as follows.

[0023] Step S5: For the illumination controllable dehazing network, the encoding process consists of four stages:

[0024] Stage 1: Block layer and visual feature conversion layer, the output feature dimension is H×W×L;

[0025] Stage 2: Block embedding layer and visual feature conversion layer, the output feature dimension is

[0026] Stage 3: Block embedding layer and visual feature conversion layer, the output feature dimension is

[0027] Stage 4: Visual Feature Conversion Layer

[0028] Step S6: The decoding process includes decoding calculations of two decoders. Both decoders perform calculations in stages 5 and 6. The network parameters of stage 5 are shared by the two decoders and are:

[0029] Stage 5: Upsampling layer and visual feature conversion layer, the output feature dimension is

[0030] Stage 6: Upsampling layer and visual feature conversion layer, the output feature dimension is H×W×L.

[0031] Step S7: For the illumination controllable defogging network, after completing 6 stages, the feature map is mapped from the dimension H×W×L to H×W×3 through patch projection, and the final defogging output is obtained through the illumination controllable module; for the fog synthesis network, it only contains one encoder and one decoder. The encoder contains the calculations of stages 1 to 4, and the decoder contains the calculations of stages 5 and 6. The input and output feature dimensions of each stage of the fog synthesis network are consistent with the input and output feature dimensions of each stage of the illumination controllable defogging network. After completing the calculation of 6 stages, the fog synthesis network uses patch projection to directly map the feature map of dimension H×W×L to the output image of dimension H×W×3.

[0032] Step S8: The structure of the defogging discriminant network is the same as that of the fog synthesis discriminant network. For an input image of dimension H×W×3, feature mapping is first performed through a convolution kernel with a length and width of 3 to obtain a feature map of dimension H×W×L. Next, the discriminant output is obtained through convolution with residual connection, batch normalization and activation operations.

[0033] Fourthly, calculate the prior feature constraint loss. The steps are as follows:

[0034] Step S9: Calculate the pseudo-label that can represent the features of the clear image through the dark channel prior, and guide the training process of the illumination controllable dehazing network by calculating the feature loss at the feature level. For a given input image x, the pseudo-label calculated using the dark channel prior is θ(x), and the output o(x) of the illumination controllable dehazing network is constrained by the prior statistical law. The corresponding prior feature constraint loss function L θ for:

[0035] L θ (θ(x),o(x))=γ||ψ(θ(x))-ψ(o(x))||2

[0036] In the above formula, the function ψ represents the pre-trained feature extraction network, which is used to evaluate the distance between the dehazed image o(x) and the pseudo label θ(x) features and calculate the loss function L θ During the training process of the illumination controllable dehazing network, the loss function L θ The weight γ is dynamically updated, and the weight γ decays to 0.9 times of the previous cycle every complete training cycle.

[0037] Fifth, calculate the network loss and update the parameters. The steps are as follows:

[0038] Step S10: The image defogging model is trained in an unsupervised manner. The illumination controllable defogging network and the defogging discriminant network are used for defogging training, and the fog synthesis network and the fog synthesis discriminant network are used for fog synthesis training. The defogging training and fog synthesis training are constrained by cycle consistency loss. The illumination controllable defogging network and the fog synthesis network use G J With G I Indicates that the defogging discriminant network and the fog synthesis discriminant network use D J With D I Indicates that during the sampling process, a foggy image x is randomly sampled from the foggy image domain I, and a fog-free image y is randomly sampled from the fog-free image domain J. The training loss of the invented image dehazing model includes adversarial loss, reconstruction constraint loss, and prior feature constraint loss function L θ , where the reconstruction constraint loss includes cycle consistency loss and identity loss. The adversarial loss is calculated as follows:

[0039]

[0040]

[0041] In the above formula, p x With p y Represent the distribution functions of x and y respectively, E represents the mathematical expectation, L(G J ,D J ) and L(G I ,D I ) are all adversarial losses;

[0042] Step S11: Use cycle consistency loss and identity loss to further constrain the generated image as follows:

[0043]

[0044] In the above formula, L r (G I ,G J ) represents the reconstruction constraint loss.

[0045] Step S12: The overall loss function is the adversarial loss, reconstruction constraint loss and prior feature constraint loss function L θ The weighted sum of :

[0046] L all =L(G J ,D J )+L(G I ,D I )+L r (G I ,G J )+λL θ

[0047] In the above formula, λ is the balance factor.

[0048] After the loss function is calculated, the parameters of the four networks are updated using the gradient descent algorithm.

[0049] The present invention can effectively remove fog from foggy images and restore color and details. In practical applications, a clear defogged image can be obtained in an end-to-end manner. The present invention can be used for data security, image processing, weather monitoring, and robotics. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a diagram of the illumination controllable dehazing network;

[0051] Figure 2 It is a fog synthesis network graph;

[0052] Figure 3 This is a comparison chart of the dehazing results of indoor images.

[0053] Figure 4 This is a comparison of the dehazing results of outdoor images. DETAILED DESCRIPTION

[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are intended only to illustrate the present invention and are not intended to limit the scope of the present invention. It should be noted that the terms "front," "rear," "left," "right," "up," and "down" used in the following description refer to directions in the accompanying drawings, and the terms "inward" and "outward" refer to directions toward or away from the geometric center of a particular component, respectively.

[0055] The illumination-controlled dehazing method proposed in this paper, based on unsupervised visual layer embedding and visual conversion model, does not require the use of supervised loss during training, and therefore does not require paired foggy and fog-free images corresponding to the scene. The training process uses the indoor fog dataset ITS [Li Boyi, et al. Benchmarking single-image dehazing and beyond. IEEE Transactions on Image Processing, 2018, 28(1): 492-505.] and the outdoor fog dataset 4KID [Zhuoran Zheng, et al. Ultra-high-definition image dehazing via multi-guided bilateral learning. IEEE Conference on Computer Vision and Pattern Recognition. 2021: 16180-16189.], respectively. The specific implementation process includes the following five steps corresponding to the following aspects.

[0056] First, we build the core network required for the image dehazing method. The steps are as follows:

[0057] Step S1: Construct and initialize the core network parameters. The designed image dehazing method includes four core networks: an illumination-controlled dehazing network, a fog synthesis network, a dehazing discriminant network, and a fog synthesis discriminant network. The illumination-controlled dehazing network is the dehazing network used in practical applications. The remaining three networks are only used to assist in the training of the illumination-controlled dehazing network and are not required in practical applications. A Gaussian distribution is used to generate the network initialization parameters. The illumination-controllable dehazing network is composed of a vision transformer block, which includes two processes: feature encoding and decoding reconstruction. During the decoding process, a feature output containing two branches is obtained, and the decoded features of the two branches are fused through retinex embedding. By controlling the decoding feature weights of the branches, dehazed images under different illumination conditions are obtained. The fog synthesis network is a single-branch encoding and decoding network composed of a vision transformer block. Its input is a fog-free image and its output is a foggy image. The dehazing discriminant network and the fog synthesis discriminant network are used to guide the training process of the illumination-controllable dehazing network and the fog synthesis network.

[0058] Secondly, build a light controllable module and add it to the light controllable dehazing model. The steps are as follows:

[0059] Step S2: The illumination controllable dehazing network controls the decoding feature weights of the inference phase through the illumination controllable module, thereby obtaining dehazed images with different feature weight ratios. The illumination controllable dehazing network consists of an encoder and two decoders. The encoder is φ and the decoders are and For the input data x, the encoder output feature is φ(x), and the decoding features obtained by the two decoders are o d (x) and o r (x), where o d (x) represents direct output, which is calculated as follows:

[0060]

[0061] o r (x) represents the embedded output, for o r The calculation of (x) uses the Retinex model and uses element-by-element multiplication “*” to perform the following calculation:

[0062]

[0063] in It is the feature obtained through the deep network.

[0064] Step S3: Get o d (x) and o r After (x), linear fusion and nonlinear mapping are required. The linear fusion process is as follows:

[0065] o f (x) = α × o d (x)+(1-α)×o r (x)

[0066] The nonlinear mapping process is implemented using the hyperbolic tangent function, and the final dehazing output o(x) can be obtained as follows:

[0067]

[0068] Linear fusion and nonlinear mapping are used as illumination controllable modules and embedded into the illumination controllable dehazing network. The illumination controllable module is shown in Figure 1 The output end of the (illumination-controlled dehazing network structure diagram).

[0069] Third, build four core networks. The steps are as follows:

[0070] Step S4: Both the light-controlled dehazing network and the fog synthesis network include two feature map dimensionality reduction processes and two feature map dimensionality increase processes. The dimensions of the input and output images of the light-controlled dehazing network and the fog synthesis network are H×W×3, where H represents the height of the image, W represents the width of the image, and 3 represents that the image contains 3 channels. During the feature calculation process, the basic number of feature channels is set to L, and the value of L is 64. The operations required by both the light-controlled dehazing network and the fog synthesis network include patch partitioning, visual feature conversion, patch embedding, and upsampling. Patch partitioning and patch embedding are implemented using convolution operations, upsampling is implemented using deconvolution, and the visual feature conversion module is implemented using a window-mode multi-head self-attention mechanism, layer normalization, and a multi-layer perceptron. The calculation process of the light-controlled dehazing network and the fog synthesis network is as follows.

[0071] Step S5: For the illumination controllable dehazing network, the encoding process consists of four stages:

[0072] Stage 1: Block layer and visual feature conversion layer, the output feature dimension is H×W×L;

[0073] Stage 2: Block embedding layer and visual feature conversion layer, the output feature dimension is

[0074] Stage 3: Block embedding layer and visual feature conversion layer, the output feature dimension is

[0075] Stage 4: Visual Feature Conversion Layer

[0076] Step S6: The decoding process includes decoding calculations of two decoders. Both decoders perform calculations in stages 5 and 6. The network parameters of stage 5 are shared by the two decoders and are:

[0077] Stage 5: Upsampling layer and visual feature conversion layer, the output feature dimension is

[0078] Stage 6: Upsampling layer and visual feature conversion layer, the output feature dimension is H×W×L.

[0079] Step S7: For the illumination controllable defogging network, after completing 6 stages, the feature map is mapped from the dimension H×W×L to H×W×3 through the patch project, and the final defogging output is obtained through the illumination controllable module; for the fog synthesis network, it only contains one encoder and one decoder. The encoder contains the calculations of stages 1 to 4, and the decoder contains the calculations of stages 5 and 6. The input and output feature dimensions of each stage of the fog synthesis network are consistent with the input and output feature dimensions of each stage of the illumination controllable defogging network. After completing the calculations of 6 stages, the fog synthesis network uses patch projection to directly map the feature map of dimension H×W×L to the output image of dimension H×W×3. The structure of the illumination controllable defogging network is shown in Figure 1 ,The structure of fog synthesis network is shown in Figure 2 .

[0080] Step S8: The structure of the defogging discriminant network is the same as that of the fog synthesis discriminant network. For an input image of dimension H×W×3, feature mapping is first performed through a convolution kernel with a length and width of 3 to obtain a feature map of dimension H×W×L. Next, the discriminant output is obtained through convolution with residual connection, batch normalization and activation operation (Linear Rectification Unit, ReLU). Each residual block (convolution + batch normalization + activation function) is followed by a convolution with a stride of 2 to reduce the dimensionality of the feature map. The defogging discriminant network and the fog synthesis discriminant network use a total of three residual blocks and three convolutions with a stride of 2.

[0081] Fourthly, calculate the prior feature constraint loss. The steps are as follows:

[0082] Step S9: Calculate the pseudo-label that can represent the features of the clear image through the dark channel prior, and guide the training process of the illumination controllable dehazing network by calculating the feature loss at the feature level. For a given input image x, the pseudo-label calculated using the dark channel prior is θ(x), and the output o(x) of the illumination controllable dehazing network is constrained by the prior statistical law. The corresponding prior feature constraint loss function L θ for:

[0083] L θ (θ(x),o(x))=γ||ψ(θ(x))-ψ(o(x))||2

[0084] In the above formula, the function ψ represents the pre-trained feature extraction network, which is used to evaluate the distance between the dehazed image o(x) and the pseudo label θ(x) features and calculate the loss function L θ During the training process of the illumination controllable dehazing network, the loss function L θThe weight γ is dynamically updated, and the weight γ decays to 0.9 times of the previous cycle every complete training cycle.

[0085] Fifth, calculate the network loss and update the parameters. The steps are as follows:

[0086] Step S10: The image defogging model is trained in an unsupervised manner. The illumination controllable defogging network and the defogging discriminant network are used for defogging training, and the fog synthesis network and the fog synthesis discriminant network are used for fog synthesis training. The defogging training and fog synthesis training are constrained by cycle consistency loss. The illumination controllable defogging network and the fog synthesis network use G J With G I Indicates that the defogging discriminant network and the fog synthesis discriminant network use D J With D I Indicates that during the sampling process, a foggy image x is randomly sampled from the foggy image domain I, and a fog-free image y is randomly sampled from the fog-free image domain J. The training loss of the invented image dehazing model includes adversarial loss, reconstruction constraint loss, and prior feature constraint loss function L θ , where the reconstruction constraint loss includes cycle consistency loss and identity loss. The adversarial loss is calculated as follows:

[0087]

[0088]

[0089] Step S11: Use cycle consistency loss and identity loss to further constrain the generated image as follows:

[0090]

[0091] Step S12: The overall loss function is the adversarial loss, reconstruction constraint loss and prior feature constraint loss function L θ The weighted sum of :

[0092] L all =L(G J ,D J )+L(G I ,D I )+L r (G I ,G J )+λL θ

[0093] After the loss function is calculated, the parameters of the four networks are updated using the gradient descent algorithm.

[0094] The performance evaluation of the dehazing algorithm uses two quantitative evaluation indicators, the first is the Peak Signal-to-Noise Ratio (PSNR), and the second is the Structural Similarity (SSIM). The larger the values of the two, the better the dehazing effect. The evaluation process compared three existing image dehazing methods, namely CycleDehaze[Engin Deniz, et al.Cycle-dehaze:Enhanced cyclegan for single imagedehazing.IEEE Conference on Computer Vision and Pattern RecognitionWorkshops.2018:825-833.], ZID[Li Boyun, et al.Zero-shot image dehazing.IEEETransactions on Image Processing,2020,29:8457-8466.] and SNSPGAN. The results in Table 1 and Table 2 show that the quantitative evaluation results obtained by the dehazing method proposed in the present invention are higher. Figure 3 and Figure 4 The dehazing visual effects show that the dehazing method proposed in this paper achieves better visual evaluation results, and the dehazed image obtained by this paper is closer to the reference image. Both visual and quantitative results demonstrate the effectiveness of the dehazing network designed in this paper.

[0095] Table 1: Quantitative evaluation results of dehazing for indoor data

[0096] index SSIM PSNR CycleDehaze 0.810 18.870 ZID 0.835 19.830 SNSPGAN 0.788 17.747 The present invention 0.894 22.558

[0097] Table 2: Quantitative evaluation results of dehazing on outdoor datasets

[0098] index SSIM PSNR CycleDehaze 0.886 21.067 ZID 0.506 12.499 SNSPGAN 0.714 14.045 The present invention 0.929 24.562

[0099] The technical means disclosed in the solution of the present invention are not limited to the technical means disclosed in the above-mentioned embodiment, but also include technical solutions composed of any combination of the above technical features.

Claims

1. An illumination-controlled dehazing method based on unsupervised visual layer embedding and visual conversion model, characterized by: The designed image defogging method includes four core networks, namely, the illumination controllable defogging network, the fog synthesis network, the defogging discriminant network and the fog synthesis discriminant network. The remaining fog synthesis network, defogging discriminant network and fog synthesis discriminant network are only used to assist the training of the illumination controllable defogging network; the illumination controllable defogging network is composed of a visual conversion module, including two processes of feature encoding and decoding reconstruction. During the decoding process, a feature output containing two branches is obtained, and the decoding features of the two branches are fused through the visual layer embedding method. The defogged images under different illumination conditions are obtained by controlling the decoding feature weights of the branches; the fog synthesis network is a single-branch encoding and decoding network composed of a visual conversion module. Its input is a fog-free image and its output is a foggy image; the defogging discriminant network and the fog synthesis discriminant network are used to guide the training process of the illumination controllable defogging network and the fog synthesis network; the illumination controllable defogging network controls the decoding feature weights of the inference stage through the illumination controllable module, thereby obtaining defogged images with different feature weight ratios; the illumination controllable defogging network contains an encoder and two decoders, the encoder is φ, and the decoders are respectively and For the input data x, the encoder output feature is φ(x), and the decoding feature obtained by the two decoders is o d (x) and o r (x), where o d (x) represents direct output, which is calculated as follows: o r (x) represents the visual layer embedding output, for o r The calculation of (x) uses the visual layer model and uses element-by-element multiplication "*" to perform the following calculation: in is the feature obtained through the deep network; get o d (x) and o r After (x), linear fusion and nonlinear mapping are required. The linear fusion process is as follows: the f (x)=α×o d (x)+(1-a)×o r (x) In the above formula, α represents the balance factor, o f (x) is the output of the linear fusion stage; the nonlinear mapping process is implemented using the hyperbolic tangent function, and the final dehazing output o(x) can be obtained as follows: In the above formula, e represents an exponential function with the natural constant e as the base. Linear fusion and nonlinear mapping are used as illumination-controllable modules and embedded into the illumination-controllable dehazing network.

2. The illumination-controlled dehazing method based on unsupervised visual layer embedding and visual conversion model according to claim 1 is characterized in that: Both the illumination-controlled dehazing network and the fog synthesis network include two feature map dimensionality reduction processes and two feature map dimensionality increase processes. The input and output image dimensions of the illumination-controlled dehazing network and the fog synthesis network are H×W×3, where H represents the height of the image, W represents the width of the image, and 3 represents that the image contains 3 channels. During the feature calculation process, the basic number of feature channels is set to L, and the value of L is 64. The operations required by the illumination-controlled dehazing network and the fog synthesis network include blocking, visual feature conversion, block embedding, and upsampling. Block segmentation and block embedding are implemented using convolution operations, upsampling is implemented using deconvolution, and the visual feature conversion module is implemented using a window-mode multi-head self-attention mechanism, layer normalization, and a multi-layer perceptron.

3. The illumination-controlled dehazing method based on unsupervised visual layer embedding and visual conversion model according to claim 2 is characterized in that: The calculation process of the illumination controllable defogging network and the fog synthesis network is as follows: First, for the illumination controllable dehazing network, the encoding process consists of four stages: Stage 1: block layer and visual feature conversion layer, the output feature dimension is H×W×L; Stage 2: block embedding layer and visual feature conversion layer, the output feature dimension is Stage 3: Block embedding layer and visual feature conversion layer, the output feature dimension is Stage 4: Visual Feature Conversion Layer The decoding process includes decoding calculations of two decoders. Both decoders perform calculations in stages 5 and 6. The network parameters of stage 5 are shared by the two decoders and are: Stage 5: Upsampling layer and visual feature conversion layer, the output feature dimension is Stage 6: Upsampling layer and visual feature conversion layer, the output feature dimension is H×W×L; Second, for the illumination-controlled dehazing network, after completing six stages, the feature map is mapped from dimension H×W×L to H×W×3 through block projection, and the final dehazing output is obtained through the illumination-controlled module; for the fog synthesis network, it only contains one encoder and one decoder. The encoder contains the calculations of stages 1 to 4, and the decoder contains the calculations of stages 5 and 6. The input and output feature dimensions of each stage of the fog synthesis network are consistent with the input and output feature dimensions of each stage of the illumination-controlled dehazing network. After completing the calculations of the six stages, the fog synthesis network uses block projection to directly map the feature map of dimension H×W×L to the output image of dimension H×W×3.

4. The illumination-controlled dehazing method based on unsupervised visual layer embedding and visual conversion model according to claim 1 is characterized in that: The dehazing discriminant network has the same structure as the fog synthesis discriminant network. For an input image of dimension H×W×3, feature mapping is first performed using a convolution kernel with a length and width of 3 to obtain a feature map of dimension H×W×L. Next, the discriminant output is obtained through convolution with residual connections, batch normalization, and activation operations.

5. The illumination-controlled dehazing method based on unsupervised visual layer embedding and visual conversion model according to claim 1 is characterized in that: The pseudo labels that can represent the features of the clear image are calculated by dark channel prior, and the training process of the illumination controllable dehazing network is guided by calculating the feature loss at the feature level. For a given input image x, the pseudo label calculated by using the dark channel prior is θ(x), and the output o(x) of the illumination controllable dehazing network is constrained by the prior statistical law. The corresponding prior feature constraint loss function L is θ for: L θ (θ(x),o(x))=γ||ψ(θ(x))-ψ(o(x))||2 In the above formula, the function ψ represents the pre-trained feature extraction network, which is used to evaluate the distance between the dehazed image o(x) and the pseudo label θ(x) features and calculate the loss function L θ During the training process of the illumination controllable dehazing network, the loss function L θ The weight γ is dynamically updated, and the weight γ decays to 0.9 times of the previous cycle every complete training cycle.

6. The illumination-controlled dehazing method based on unsupervised visual layer embedding and visual conversion model according to claim 1 is characterized in that: The designed image defogging model is trained in an unsupervised manner. The illumination controllable defogging network and the defogging discriminant network are used for defogging training, and the fog synthesis network and the fog synthesis discriminant network are used for fog synthesis training. The defogging training and fog synthesis training are constrained by cycle consistency loss. The illumination controllable defogging network and the fog synthesis network are trained by G J With G I Indicates that the defogging discriminant network and the fog synthesis discriminant network use D J With D I Indicates that during the sampling process, a foggy image x is randomly sampled from the foggy image domain I, and a fog-free image y is randomly sampled from the fog-free image domain J; the training loss of the image dehazing model includes adversarial loss, reconstruction constraint loss, and prior feature constraint loss function L θ , where the reconstruction constraint loss includes cycle consistency loss and identity loss; the adversarial loss is calculated as follows: In the above formula, p x With p y Represent the distribution functions of x and y respectively, E represents the mathematical expectation, L(G J ,D J ) and L(G I ,D I ) are all adversarial losses; The generated images are further constrained using cycle consistency loss and identity loss as follows: In the above formula, L R (G I ,G J ) represents the reconstruction constraint loss; The overall loss function is adversarial loss, reconstruction constraint loss and prior feature constraint loss function L θ The weighted sum of : L all =L(G J ,D J )+L(G I ,D I )+L r (G I ,G J )+λL θ In the above formula, λ is the balancing factor; finally, the network parameters are updated by the gradient descent algorithm.

Citation Information

Patent Citations

  • End-to-end image defogging method based on multi-feature fusion

    CN114742719A

  • Image defogging method and system based on cyclic generative adversarial network

    WO2022267641A1