A video monitoring image defogging enhancement network and method
By combining the method of generative adversarial network and fast Fourier transform, using the feature extraction and reconstruction of high-definition images and haze images, the problem of slow image dehazing speed is solved, and efficient and high-definition dehazing effect is achieved, which is suitable for Real-time image processing in complex scenes.
Patent Information
- Application Number
- CN202410298559.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-03-15
AI Technical Summary
Existing image defogging algorithms are slow in processing image defogging and require a large amount of calculation in complex scenes, resulting in the problem that the dehazing process takes a long time.
Using a combination of Generative Adversarial Network (GAN) and Fast Fourier Transform (FFT) convolution, through training feature extraction and reconstruction of high-definition images and haze images, EfficientNetV2, channel attention module and spatial attention module are used to achieve rapid Dehaze effect and improve image quality through cycle consistency loss and color attenuation prior loss function.
The efficiency of image dehazing is significantly improved. The generated images have high saturation and contrast, which avoids the problems of poor generalization ability and haze residue in traditional algorithms. It is suitable for real-time or large-scale image processing needs.
Smart Images

Figure CN118279189B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image enhancement, and in particular relates to a video monitoring image defogging enhancement network and method. Background Art
[0002] At present, image dehazing algorithms can be roughly divided into two categories: one is model-based image dehazing algorithm and the other is model-free image dehazing algorithm.
[0003] Model-based image dehazing algorithm: It mainly considers the degradation mechanism of haze images, analyzes the atmospheric conditions when the image is formed, and constructs a degraded image imaging model based on the information of the image physical degradation process. A representative model is the atmospheric scattering model proposed by Narasimhan et al., who analyzed the formation mechanism of haze-degraded images, introduced the atmospheric medium scattering and absorption factors that cause image degradation into the imaging model. The introduction of the atmospheric scattering model has led to the rapid development of model-based image dehazing algorithms.
[0004] According to the atmospheric scattering model, He et al. proposed an image dehazing algorithm based on dark channel prior (DCP) in 2009. The dark channel prior is based on the statistical information of outdoor fog-free images. It is proposed that in some non-sky image areas, there are some pixels with very low intensity values in at least one color channel among RGB. In haze images, the intensity values of these pixels are mainly contributed by atmospheric light. Therefore, these dark pixels can directly provide a transmittance estimate for haze images. Combining the atmospheric scattering model and the soft cutout interpolation algorithm, a high-quality haze-free image can be restored.
[0005] In 2015, Zhu et al. proposed an image dehazing algorithm based on color attenuation prior (CAP). The algorithm extracts statistical features similar to the dark channel prior to assist in estimating the parameters of the atmospheric scattering model. Through a large number of observations, the authors found that haze can simultaneously reduce the saturation of the image and increase the brightness, which manifests as color attenuation globally. Based on the color attenuation prior, the difference between brightness and saturation is used to estimate the concentration of haze, thereby creating a linear regression model related to the depth of the foggy image scene, using a supervised learning algorithm to learn the model parameters, restore the image depth information, and then use the restored depth information to complete the image dehazing.
[0006] In 2016, Cai et al. believed that using a priori assumptions to extract features related to haze images is equivalent to convolving the input haze images with appropriate filters, and proposed the DehazeNet dehazing network algorithm. This network first used a deep convolutional neural network to estimate the intermediate parameters of the atmospheric scattering model and constructed a mapping relationship between haze images and intermediate parameters.
[0007] In 2017, Boyi et al. proposed the AOD-Net dehazing network, believing that estimating transmittance and atmospheric light separately will produce cumulative errors, which is not conducive to reconstructing a clear image and is a suboptimal solution algorithm. Therefore, AOD-Net includes two modules: K(x) estimation module and image reconstruction module. The K(x) estimation module is used to estimate the parameter K(x), which combines the two parameters transmittance and atmospheric light in the atmospheric scattering model. The image reconstruction module is used to multiply the input image to obtain a clear image.
[0008] Model-free image dehazing algorithm: Model-based image dehazing algorithm requires the model to accurately model the formation process of haze images on the one hand, and to accurately estimate the model parameters on the other hand. However, the above requirements will face huge challenges when applied in actual scenarios. That is, the limitations of model expression and the errors in parameter estimation. The above simplified assumptions on the atmospheric scattering model increase the feasibility of the model, but also limit the expression of the model, which is suitable for describing images with uniform haze concentration distribution. Therefore, compared with deep learning atmospheric scattering model parameter estimation algorithms such as DehazeNet and AOD-Net, the end-to-end dehazing algorithm based on deep learning is not restricted by the model. It can not only remove images with uniform haze concentration distribution, but also process non-uniform haze images. It can process a wider range of images and is more flexible.
[0009] In 2020, Wang et al. proposed a parallel heterogeneous twin end-to-end model-free dehazing algorithm for real non-uniform haze images. The main network structure is designed as a U-type encoding-decoding structure, which is used to complete the feature extraction and reconstruction of haze images. In order to improve the problem of detail information loss after restoration of non-uniform haze areas, a lightweight detail feature enhancement sub-network was constructed and connected in parallel with the backbone network. Finally, adaptive weighted fusion was used to obtain enhanced high-definition images.
[0010] In 2018, Engin et al. proposed a network called Cycle-Dehaze for image dehazing based on non-aligned training sets. The network framework consists of two generators and two discriminators. Generators G and F are used to fit the process of reversing haze images into clear images and the process of generating haze images from clear images, respectively. Discriminators Dx and Dy are used to identify the fitting capabilities of generators G and F, respectively. The algorithm enhances the cycle formula by combining cycle consistency and perceptual loss to improve the quality of texture information recovery and generate visually better haze-free images. Summary of the invention
[0011] The purpose of the present invention is to provide a video monitoring image defogging enhancement network and method to solve the problem of slow image defogging processing speed.
[0012] The present invention adopts the following technical scheme: a video monitoring image defogging enhancement method, using a high-definition image and a haze image to train a defogging enhancement network and obtain a trained defogging enhancement network, and then inputting the actually shot haze image into the defogging enhancement network to obtain an image without haze;
[0013] Wherein, the training method of the defogging enhancement network is:
[0014] The low-frequency features of the haze image are combined with the high-frequency features, low-frequency features, edge features and contour features of the high-definition image and fed into the first generator to obtain a generated haze image containing haze information; the generated haze image is continuously identified by the first discriminator, and the adversarial loss between the generated haze image and the haze image is continuously trained;
[0015] The high-frequency features, edge features and contour features of the haze image are sent to the second generator to generate a generated high-definition image with the haze features removed. The generated high-definition image is continuously identified by the second discriminator, and the adversarial loss between the generated high-definition image and the high-definition image is calculated for continuous training.
[0016] Furthermore, it also includes:
[0017] The low-frequency features of the generated haze image are combined with the generated high-definition image and sent to the third generator to obtain the reconstructed haze image;
[0018] The cycle consistency loss is used to calculate the pixel-level loss between the haze image and the reconstructed haze image, so that the haze image and the reconstructed haze image keep the content consistent.
[0019] Furthermore, it also includes:
[0020] The high-frequency features, edge features and contour features of the generated haze image are sent to the fourth generator to obtain a reconstructed high-definition image;
[0021] The cycle consistency loss is used to calculate the pixel-level loss between the HD image and the reconstructed HD image, so that the content of the HD image and the reconstructed HD image remains consistent.
[0022] Furthermore, the first generator, the second generator, the third generator, and the fourth generator are all composed of an EfficientNetV2, a convolutional layer with a 7*7 convolution kernel, a channel attention module, a spatial attention module, and a convolutional layer with a 3*3 convolution kernel, which are connected in sequence.
[0023] Furthermore, it also includes:
[0024] The color attenuation prior loss function is used to calculate the transformation and difference of the blue channel in the high-definition image, and then process the color information of the haze image.
[0025] A video monitoring image defogging enhancement network, comprising:
[0026] The first encoder encodes the high-definition image and extracts high-frequency features, low-frequency features, edge features, and contour features of the high-definition image;
[0027] The second encoder encodes the haze image and extracts the high-frequency features, edge features and contour features of the haze image;
[0028] A first haze encoder encodes the haze image and extracts low-frequency features of the haze image;
[0029] The first generator combines the low-frequency features of the haze image and the high-frequency features, low-frequency features, edge features and contour features of the high-definition image to generate a generated haze image containing haze information;
[0030] The second generator generates a high-definition image based on the high-frequency features, edge features, and contour features of the haze image;
[0031] A fourth encoder encodes the generated haze image and extracts high-frequency features, edge features, and contour features of the generated haze image;
[0032] A second haze encoder encodes the generated haze image and extracts low-frequency features of the generated haze image;
[0033] The third encoder encodes the generated high-definition image and extracts high-frequency features, low-frequency features, edge features and contour features of the generated high-definition image;
[0034] The third generator combines the high-frequency features, low-frequency features, edge features, contour features of the generated high-definition image, and the low-frequency features of the generated haze image to obtain a reconstructed haze image;
[0035] The fourth generator obtains a reconstructed high-definition image based on the high-frequency features, edge features, and contour features of the generated haze image;
[0036] The first discriminator discriminates the generated haze image obtained by the first generator and continuously trains;
[0037] The second discriminator discriminates the generated high-definition image obtained by the second generator and is continuously trained.
[0038] The beneficial effects of the present invention are:
[0039] The present invention adopts a color attenuation prior loss function to solve the disadvantage that the dark channel prior algorithm is prone to cause halo phenomenon in the sky area for outdoor image defogging;
[0040] The present invention adopts a generative adversarial network to directly learn the pixel difference between the haze image and the high-definition image, and uses an encoder to extract the haze information of the haze image, thereby generating a high-definition image, avoiding the shortcomings of the DehazeNet algorithm such as the parameter estimation link and poor generalization ability;
[0041] The present invention adopts a haze encoder, which does not need to consider the cause of image degradation. It solves the problem that the AOD-Net dehazing algorithm uses artificially selected parameters to synthesize haze data and obtains the final haze-free image by training the neural network, which leads to a large difference from the real haze image and poor generalization ability.
[0042] The present invention adopts the channel attention module, the spatial attention module and the EfficientNetV2 network to ensure the fast defogging speed of the parallel heterogeneous twin end-to-end model-free defogging algorithm while solving the disadvantage that it is prone to the phenomenon of haze residue;
[0043] The first haze encoder and the second haze encoder of the present invention adopt FFT convolution and introduce FFTLoss loss function, which reduces the running time and can achieve fast dehazing effect. The restored image has high saturation and contrast. Compared with the prior art Cycle-Dehaze dehazing algorithm, the image effect saturation and contrast are enhanced.
[0044] The present invention is based on the improvement of the generative adversarial network image defogging algorithm, which not only has significant progress in improving image quality, but also can effectively alleviate the speed problem of image defogging processing; the traditional algorithm has a large amount of calculation in complex scenes, resulting in a long defogging process; the method of introducing GAN and FFT convolution can improve the defogging effect while optimizing the model structure and accelerating the calculation process, which is expected to significantly improve the efficiency of image defogging processing, making it more suitable for real-time or large-scale image processing needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a network framework diagram of the present invention;
[0046] Figure 2 It is a high-definition image of Example 1 of the present invention;
[0047] Figure 3 This is a haze image of Example 1 of the present invention;
[0048] Figure 4 Generating a haze map according to Embodiment 1 of the present invention;
[0049] Figure 5 Generating a high-definition image according to Embodiment 1 of the present invention;
[0050] Figure 6 The reconstructed high-definition image of Example 1 of the present invention;
[0051] Figure 7 This is the reconstructed haze image of Example 1 of the present invention. DETAILED DESCRIPTION
[0052] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] The invention discloses a video monitoring image defogging and enhancement method, which uses a high-definition image and a haze image to train a defogging and enhancement network to obtain a trained defogging and enhancement network, and then inputs the actually shot haze image into the defogging and enhancement network to obtain an image removed from the haze.
[0054] Wherein, the training method of the defogging enhancement network is:
[0055] The low-frequency features of the haze image are combined with the high-frequency features, low-frequency features, edge features and contour features of the high-definition image and fed into the first generator to obtain a generated haze image containing haze information; the generated haze image is continuously identified by the first discriminator, and the adversarial loss between the generated haze image and the haze image is continuously trained;
[0056] The high-frequency features, edge features and contour features of the haze image are sent to the second generator to generate a generated high-definition image with the haze features removed. The generated high-definition image is continuously identified by the second discriminator, and the adversarial loss between the generated high-definition image and the high-definition image is calculated for continuous training.
[0057] The dehazing and enhancement method of the present invention also includes: combining the low-frequency features of the generated haze image with the generated high-definition image and sending them into a third generator to obtain a reconstructed haze image; using cycle consistency loss to calculate the pixel-level loss between the haze image and the reconstructed haze image, so that the haze image and the reconstructed haze image maintain consistent content.
[0058] The dehazing and enhancement method of the present invention also includes: sending the high-frequency features, edge features and contour features of the generated haze image into a fourth generator to obtain a reconstructed high-definition image; using cycle consistency loss to calculate the pixel-level loss between the high-definition image and the reconstructed high-definition image, so that the high-definition image and the reconstructed high-definition image maintain consistent content.
[0059] The first generator, the second generator, the third generator, and the fourth generator are all composed of EfficientNetV2, a convolutional layer with a 7*7 convolution kernel, a channel attention module, a spatial attention module, and a convolutional layer with a 3*3 convolution kernel, which are connected in sequence.
[0060] The defogging and enhancement method of the present invention further includes: using a color attenuation priori loss function to calculate and generate the transformation and difference of the blue channel in the high-definition image, and then processing the color information of the haze image.
[0061] The present invention also discloses a video monitoring image defogging enhancement network, comprising: a first encoder, a second encoder, a first haze encoder, a first generator, a second generator, a fourth encoder, a second haze encoder, a third encoder, a third generator, a fourth generator, a first discriminator and a second discriminator.
[0062] The first encoder encodes the high-definition image and extracts the high-frequency features, low-frequency features, edge features and contour features of the high-definition image; the second encoder encodes the haze image and extracts the high-frequency features, edge features and contour features of the haze image.
[0063] The first haze encoder encodes the haze image and extracts the low-frequency features of the haze image; the first generator is used to combine the low-frequency features of the haze image, and the high-frequency features, low-frequency features, edge features and contour features of the high-definition image to generate a generated haze image containing haze information.
[0064] The second generator generates a high-definition image according to the high-frequency features, edge features, and contour features of the haze image; the fourth encoder encodes the generated haze image and extracts the high-frequency features, edge features, and contour features of the generated haze image.
[0065] The second haze encoder encodes the generated haze image and extracts the low-frequency features of the generated haze image; the third encoder encodes the generated high-definition image and extracts the high-frequency features, low-frequency features, edge features and contour features of the generated high-definition image.
[0066] The third generator combines the high-frequency features, low-frequency features, edge features, contour features of the generated high-definition image with the low-frequency features of the generated haze image to obtain a reconstructed haze image; the fourth generator obtains a reconstructed high-definition image based on the high-frequency features, edge features, and contour features of the generated haze image.
[0067] The first discriminator discriminates the generated haze image obtained by the first generator and is continuously trained; the second discriminator discriminates the generated high-definition image obtained by the second generator and is continuously trained.
[0068] The overall network process of the present invention includes two parts: forward translation and backward reconstruction. In the forward translation process, the input of the disentanglement framework is unpaired high-definition images and haze images, that is, the high-definition images and haze images are not matched with each other. Unpaired and unmatched means that the shooting content and angle of the high-definition images and haze images do not need to correspond one to one, the shooting content can be completely different, and there is no requirement for the shooting angle. In the network architecture, the network stability, the discriminator generator performance, and the defogging performance are controlled using cycle consistency, semantic consistency, and color attenuation prior as loss functions.
[0069] Example 1
[0070] The high-definition image J and the haze image I are input into the disentanglement framework, and the first encoder EnconderE1 and the second encoder Enconder E2 are used to encode the image features ZJ and ZI of the high-definition image and the haze image respectively. Figure 2 This is a high-definition picture of this embodiment; Figure 3 This is the haze picture of this embodiment; Figure 4 Generate a haze map for this embodiment; Figure 5 Generate a high-definition image for this embodiment; Figure 6 This is the reconstructed high-definition image of this embodiment; Figure 7 This is the reconstructed haze image of this embodiment.
[0071] The low-frequency features of the haze image are combined with the high-frequency features, low-frequency features, edge features and contour features of the high-definition image and fed into the first generator to obtain a generated haze image containing haze information; the generated haze image is continuously identified by the first discriminator, and the adversarial loss between the generated haze image and the haze image is continuously trained.
[0072] The high-frequency features, edge features and contour features of the haze image are sent to the second generator to generate a generated high-definition image with the haze features removed. The generated high-definition image is continuously identified by the second discriminator, and the adversarial loss between the generated high-definition image and the high-definition image is calculated for continuous training.
[0073] The low-frequency features of the generated haze image are combined with the generated high-definition image and sent to the third generator to obtain the reconstructed haze image. The cycle consistency loss is used to calculate the pixel-level loss between the haze image and the reconstructed haze image, so that the haze image and the reconstructed haze image maintain consistent content.
[0074] The high-frequency features, edge features and contour features of the generated haze image are sent to the fourth generator to obtain a reconstructed high-definition image. The cycle consistency loss is used to calculate the pixel-level loss between the high-definition image and the reconstructed high-definition image, so that the content of the high-definition image and the reconstructed high-definition image remains consistent.
[0075] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A video monitoring image defogging and enhancement method, characterized in that: The high-definition image and the haze image are used to train the dehazing enhancement network and obtain the trained dehazing enhancement network. Then, the haze image actually taken is input into the dehazing enhancement network to obtain the image without haze. Wherein, the training method of the defogging enhancement network is: The low-frequency features of the haze image are combined with the high-frequency features, low-frequency features, edge features and contour features of the high-definition image and fed into the first generator to obtain a generated haze image containing haze information; the generated haze image is continuously identified by the first discriminator, and the adversarial loss between the generated haze image and the haze image is continuously trained; The high-frequency features, edge features and contour features of the haze image are sent to the second generator to generate a generated high-definition image with the haze features removed; the generated high-definition image is continuously identified by the second discriminator, and the adversarial loss between the generated high-definition image and the high-definition image is calculated for continuous training; Also includes: The low-frequency features of the generated haze image are combined with the generated high-definition image and sent to the third generator to obtain the reconstructed haze image; Cycle consistency loss is used to calculate the pixel-level loss between the haze image and the reconstructed haze image, so that the haze image and the reconstructed haze image keep the content consistent; Also includes: The high-frequency features, edge features and contour features of the generated haze image are sent to the fourth generator to obtain a reconstructed high-definition image; Cycle consistency loss is used to calculate the pixel-level loss between the HD image and the reconstructed HD image, so that the content of the HD image and the reconstructed HD image remains consistent; The first generator, the second generator, the third generator, and the fourth generator are all composed of an EfficientNetV2, a convolutional layer with a convolution kernel of 7*7, a channel attention module, a spatial attention module, and a convolutional layer with a convolution kernel of 3*3, which are connected in sequence; Also includes: The color attenuation prior loss function is used to calculate the transformation and difference of the blue channel in the high-definition image, and then process the color information of the haze image.
2. A video surveillance image defogging enhancement network, the video surveillance image defogging enhancement network is applicable to a video surveillance image defogging enhancement method as claimed in claim 1, characterized in that: include: The first encoder encodes the high-definition image and extracts high-frequency features, low-frequency features, edge features, and contour features of the high-definition image; The second encoder encodes the haze image and extracts the high-frequency features, edge features and contour features of the haze image; A first haze encoder encodes the haze image and extracts low-frequency features of the haze image; The first generator combines the low-frequency features of the haze image and the high-frequency features, low-frequency features, edge features and contour features of the high-definition image to generate a generated haze image containing haze information; The second generator generates a high-definition image based on the high-frequency features, edge features, and contour features of the haze image; A fourth encoder encodes the generated haze image and extracts high-frequency features, edge features, and contour features of the generated haze image; A second haze encoder encodes the generated haze image and extracts low-frequency features of the generated haze image; The third encoder encodes the generated high-definition image and extracts high-frequency features, low-frequency features, edge features and contour features of the generated high-definition image; The third generator combines the high-frequency features, low-frequency features, edge features, and contour features of the generated high-definition image with the low-frequency features of the generated haze image to obtain a reconstructed haze image; The fourth generator obtains a reconstructed high-definition image based on the high-frequency features, edge features, and contour features of the generated haze image; The first discriminator discriminates the generated haze image obtained by the first generator and continuously trains; The second discriminator discriminates the generated high-definition image obtained by the second generator and is continuously trained.
