An unsupervised image dehazing method and system based on symbiotic dual model

Through the unsupervised image defog removal method of the symbiotic dual model, the joint training of defog removal and fog addition networks is used to solve the problem of dependence on paired data sets in the existing technology, and the effective image defog removal in real scenes is realized. Improved fog removal effect and network performance.

CN114359107BActive Publication Date: 2025-01-10JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210026095.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-11
Publication Date
2025-01-10
Estimated Expiration
2042-01-11

AI Technical Summary

Technical Problem

The existing image defogging algorithm relies on paired foggy and foggy-free datasets, making it difficult to effectively defogging in real scenes, and training data is difficult to obtain, resulting in poor processing of real foggy images or supersaturation or distortion. .

Method used

Unsupervised image defogging method based on symbiotic dual models is adopted. By constructing a defogging network and a fogging network, combined training, and using the adversarial loss function and the cyclic consistency loss function, the defogging processing of the image is achieved without distinguishing between fogging or Fog-free images, reducing dependence on paired datasets.

Benefits of technology

The performance is better than traditional methods in objective indicators SSIM and PSNR, with more realistic fog removal and better subjective effects, reducing dependence on paired data sets and improving network performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359107B_ABST
    Figure CN114359107B_ABST
Patent Text Reader

Abstract

The present invention discloses an unsupervised image defogging method based on a symbiotic dual model, comprising the following steps: acquiring an image, and then obtaining an input image; constructing an image symbiotic dual model network, training the image symbiotic dual model network, and processing the image to be tested by the trained image symbiotic dual model network to obtain a defogging result; the present invention introduces the concept of relative defogging, and for an image, does not distinguish whether the image is degraded or not, that is, does not distinguish whether the image is a foggy image or a fog-free image. Output an image, treat it as a foggy image, and process it, and can also be treated as a clear image. The two models are mutually beneficial and symbiotic, jointly trained, and make progress together. Through such a model, the dependence on paired foggy and fog-free data sets is eliminated to achieve the defogging effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the research field of image processing, and in particular to an unsupervised image defogging method based on a symbiotic dual model and a system thereof. Background Art

[0002] Fog is a natural phenomenon. With the advent of the industrial age, smog weather has spread rapidly around the world. The presence of small floating particles (aerosols) in the air can cause smog. Under the scattering and attenuation of light, these floating particles reduce the visibility of distant objects. This causes distant objects to lose local contrast, adds noise to the image, and causes selective attenuation of the spectrum. Therefore, pictures taken in smog weather have degradation problems such as reduced contrast, hue shift, and poor visual effects.

[0003] Such degraded images will cause great interference to computer vision systems that are widely used in many electronic and information engineering fields today, and may even make them unable to work. The city intersection monitoring system cannot clearly identify license plate information due to the presence of haze, the remote sensing shooting system cannot obtain real useful information due to the obstruction of clouds and fog, and the target tracking system used in military reconnaissance will follow the wrong target or lose it due to the interference of haze. Therefore, in order to ensure that computer vision systems can obtain useful information and accurately process images in various aspects such as transportation, aerospace, and military reconnaissance, it is necessary to continuously improve the image defogging algorithm capabilities and restore the original clarity and detail information of foggy images as much as possible.

[0004] The problem of image dehazing is to restore the original fog-free image under the output condition of a degraded image caused by fog. Since ancient times, there have been many algorithms to solve this problem. According to the principle of dehazing, there are currently three algorithms: image enhancement; image restoration; deep learning. The methods based on image enhancement are mainly

[0005] From the perspective of noise removal, the image contrast is improved to restore a clear image without fog; the image restoration method is mainly based on the atmospheric degradation model for defogging. The first two methods are highly dependent on data, and only when they meet the prior knowledge of the corresponding algorithm can they have a better defogging effect. The current mainstream defogging method based on deep learning has better defogging effect and universality, but there is still such a problem. Most of the current defogging training is highly dependent on paired foggy and foggy datasets, and such paired images are difficult to obtain in large quantities, because in real scenes, keeping other environmental conditions the same and only controlling the conditional variable of whether there is fog is difficult to capture the same visual scene. Therefore, the recent defogging models all use foggy images artificially synthesized from clear images to form training sets, resulting in some networks having good defogging effects on existing datasets (synthetic images), but almost no defogging effects in real foggy images or oversaturation or image distortion after defogging. Summary of the invention

[0006] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide an unsupervised image defogging method and system based on a symbiotic dual model, which introduces the concept of relative defogging. For an image, it does not distinguish whether the image is degraded or not, that is, it does not distinguish whether an image is a foggy image or a fog-free image; an image is output and processed as a foggy image, or as a clear image. The two models are mutually beneficial and symbiotic, jointly trained, and make progress together. Through such a model, the dependence on paired foggy and fog-free data sets can be eliminated to achieve the defogging effect.

[0007] The first object of the present invention is to provide an unsupervised image defogging method based on a symbiotic dual model;

[0008] The second object of the present invention is to provide an unsupervised image defogging system based on a symbiotic dual model.

[0009] The purpose of the present invention is achieved through the following technical solutions:

[0010] An unsupervised image dehazing method based on a symbiotic dual model comprises the following steps:

[0011] Acquire an image, and preprocess the image to obtain an input image;

[0012] Constructing an image symbiotic dual-model network, wherein the image symbiotic dual-model network includes a defogging network and a fogging network;

[0013] The image symbiotic dual model network is trained to obtain a trained image symbiotic dual model network; the training is as follows: the input image is fogged and fog-free respectively through the defogging network and the fogging network to obtain a first defogging image, a first output image, a second foggy image, and a second output image respectively; the first discriminator is used to calculate the loss of the first foggy image and the second discriminator is used to calculate the loss of the second foggy image to obtain an adversarial loss function; the input image and the first output image and the second output image are respectively calculated to obtain a first output loss function; the input image and the first output image and the second output image are respectively calculated to obtain a second output loss function through a pre-trained VGG16 network; the total loss function is obtained according to the adversarial loss function, the first output loss function, and the second output loss function;

[0014] After training, an image symbiotic dual-model network is obtained, and the image to be tested is processed through the dehazing network to obtain the dehazing result.

[0015] Furthermore, the preprocessing is specifically: classifying the acquired image and randomly cutting the classified image into 256x256 blocks,

[0016] Furthermore, the classification is specifically to divide the acquired images into dense fog images, light fog images, and clear images according to the atmospheric light intensity and random parameters.

[0017] Furthermore, the defogging network and the fogging network respectively perform fog processing and fog-free processing on the input image to obtain a first defogged image, a first output image, a second fogged image, and a second output image, respectively. Specifically, the input image is taken as the first foggy image, the first foggy image is passed through the defogging network to obtain the first defogged image, and the first defogged image is passed through the fogging network to obtain the first output image; the input image is taken as the second defogged image, the second defogged image is passed through the fogging network to obtain the second foggy image, and the second foggy image is passed through the defogging network to obtain the second output image.

[0018] Furthermore, the loss of the first dehazed image is calculated by the first discriminator, and the loss of the second foggy image is calculated by the second discriminator to obtain an adversarial loss function; the loss of the input image and the first output image and the second output image are respectively calculated to obtain a first output loss function; the loss of the input image and the first output image and the second output image are respectively calculated by the pre-trained VGG16 network to obtain a second output loss function, specifically: the cycle consistency loss of the input image is calculated with the first output image and the second output image to obtain a cycle consistency loss function, that is, the first output loss function; the cycle perceptual consistency loss of the input image and the first output image and the second output image are calculated with the pre-trained VGG16 network to obtain a cycle perceptual consistency loss function, that is, the second output loss function.

[0019] Furthermore, the cycle consistency loss function is as follows:

[0020]

[0021] Among them, x is the input image, G is the defogging network, F is the fogging network, and P data(x) represents the data distribution of the input image x, is the mathematical expectation of the data distribution of the input image x, F(G(x)) is the image obtained by defogging and fogging the input image as a foggy image, which is consistent with the output image, i.e., the first output image; G(F(x)) is the image obtained by defogging and fogging the input image as a fog-free image, which is consistent with the input image, i.e., the second output image;

[0022] The cycle-aware consistency loss function is as follows:

[0023]

[0024] Among them, x is the input image, G is the defogging network, F is the fogging network, F(G(x)) is the first output image, G(F(x)) is the second output image, φ is the feature extractor of the second and fifth pooling layers of VGG16; VGG16 is a pre-trained feature extraction model. The VGG16 network contains 13 convolutional layers, 3 fully connected layers and 5 pooling layers.

[0025] Furthermore, the total loss function is obtained according to the first output loss function and the second output loss function, specifically:

[0026] The defogging image obtained by the defogging network is output to the first discriminator, and the foggy image obtained by the fogging network is output to the second discriminator, and adversarial loss calculation is performed to obtain an adversarial loss function;

[0027] Different parameters are assigned to the first output loss function, the second output loss function, and the adversarial loss function to obtain the total loss function.

[0028] Furthermore, the adversarial loss function is specifically:

[0029]

[0030]

[0031] L adv (G,F)=L adv (G,D1)+L adv (G,D2)

[0032] Among them, a is the network input image, b is the G network defogging image G(x), d is the F network fogging image F(x), r is the real clear image, f is the real dense fog image, D1 is the clear image discriminator referred to as the first discriminator, D2 is the dense fog discriminator referred to as the second discriminator, P data is the data distribution of the corresponding image, and E is the mathematical expectation of the data distribution of the corresponding image;

[0033] The total loss function is specifically:

[0034] L(G,F)=αL per (G,F)+γ*L cyc (G,F)+βL adv (G,F)

[0035] Among them, α, γ, and β are weight parameters for balancing the three types of losses, which are 1, 10, and 0.5 respectively. G is the defogging network and F is the fogging network.

[0036] Furthermore, the defogging network and the fogging network have the same network. Through the constraint of the loss function, the training process of the network is as follows: the input image is subjected to mirror padding, convolution, normalization and activation layers; down-sampling is performed through two convolution layers with a step size of 2; through the residual block; and the network output image with the same size as the output image is obtained through two up-samplings;

[0037] Among them, the normalization adopts InstanceNorm instance normalization, the input image is normalized at the channel layer, and the mean and standard deviation of all pixels of the input image are calculated;

[0038] The activation layer uses the Relu activation function, which remains unchanged for positive values ​​and suppresses negative values;

[0039] The residual block is K, and K is greater than 2.

[0040] The second object of the present invention is achieved by the following technical solutions:

[0041] An unsupervised image dehazing system based on a symbiotic dual model, comprising:

[0042] An image acquisition module, used for acquiring images;

[0043] A preprocessing module, used for preprocessing the image to obtain an input image;

[0044] A model network construction module, used to construct an image symbiotic dual-model network, wherein the image symbiotic dual-model network includes a defogging network and a fogging network;

[0045] A training module is used to train the image symbiotic dual model network to obtain the trained image symbiotic dual model network; the training is as follows: the defogging network and the fogging network are used to perform fogging and fog-free processing on the input image respectively, and the first defogging image, the first output image and the second output image are obtained respectively; the first discriminator is used to calculate the loss of the first defogging image and the second discriminator is used to calculate the loss of the second foggy image to obtain an adversarial loss function; the input image and the first output image and the second output image are respectively calculated to obtain a first output loss function; the pre-trained VGG16 network is used to calculate the loss of the input image and the first output image and the second output image to obtain a second output loss function; the total loss function is obtained according to the adversarial loss function, the first output loss function and the second output loss function;

[0046] The defogging module is used to process the image to be tested through the trained image symbiotic dual model network to obtain the defogging result;

[0047] The result output module is used to output the dehazing results.

[0048] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0049] 1. The present invention only needs to output a foggy image for training, takes the Cycle-Dehaze network as the basic network, adopts the idea of ​​relative dehazing in the training process, does not require paired data sets, and redesigns the structure of the discriminator to achieve a certain dehazing effect; in terms of objective indicators SSIM and PSNR, the network in the present invention is better than the base network of Cycle-Dehaze, and in terms of dehazing effect, the image restored by the network in the present invention is more realistic and subjectively has better effect.

[0050] 2. The existing technology distinguishes between foggy and non-fog in output, and the same is true for the training process. The present invention introduces the relative concept in the training process. For an input image, it can be regarded as a foggy image, which can be treated as a foggy image after the defogging and fogging process, or it can be regarded as a non-fog image after the fogging and defogging process, forming two cycles. At the same time, the fogging network and the defogging network are jointly trained in the whole cycle process and make progress together. The image defogging effect is achieved through this symbiotic joint action.

[0051] 3. Regarding the constraints on the intermediate output graph, the present invention redesigns the loss structure of the discriminator, changing the original discriminator that only judges whether the input graph comes from the real distribution or the network output to a discriminator similar to classification, increasing the proportion of different categories in the discriminant loss, so that the network output achieves the expected effect and improves the network performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of an unsupervised image defogging method based on a symbiotic dual model according to the present invention;

[0053] Figure 2 is a training flow chart in Embodiment 1 of the present invention;

[0054] Figure 3 is a schematic diagram of the structure of the first discriminator in Embodiment 1 of the present invention;

[0055] Figure 4 is a schematic diagram of the structure of the second discriminator in Embodiment 1 of the present invention;

[0056] Figure 5 is a schematic diagram of the defogging effect in Embodiment 1 of the present invention;

[0057] Figure 6 This is a structural block diagram of an unsupervised image defogging system based on a symbiotic dual model described in the present invention. DETAILED DESCRIPTION

[0058] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0059] Embodiment 1:

[0060] An unsupervised image dehazing method based on symbiotic dual models, such as Figure 1 As shown, the following steps are included:

[0061] Acquire an image, and preprocess the image to obtain an input image;

[0062] Constructing an image symbiotic dual-model network, wherein the image symbiotic dual-model network includes a defogging network and a fogging network;

[0063] The image symbiotic dual model network is trained to obtain a trained image symbiotic dual model network; the training is as follows: the input image is fogged and fog-free respectively through the defogging network and the fogging network to obtain the first defogging image, the first output image and the second foggy image, and the second output image respectively; the loss of the first defogging image is calculated by the first discriminator and the loss of the second foggy image is calculated by the second discriminator to obtain an adversarial loss function; the input image and the first output image and the second output image are respectively calculated to obtain a first output loss function; the input image and the first output image and the second output image are respectively calculated to obtain a second output loss function through the pre-trained VGG16 network; the total loss function is obtained according to the adversarial loss function, the first output loss function and the second output loss function; the pre-trained VGG16 network is specifically: a network pre-trained on the ImageNet dataset, which is a general feature extraction network, and there is a corresponding pre-trained model file in Pytorch;

[0064] The trained image symbiotic dual-model network is used to process the image to be tested and obtain the dehazing result.

[0065] The details are as follows:

[0066] S1: Obtain images from OTS, a subset of the RESIDE dataset, manually classify the images, and preprocess all classified images, specifically:

[0067] S11: The foggy images are screened into two categories according to the atmospheric scattering model parameters in the file name. The images with an atmospheric light intensity of 0.85 and a random parameter of 0.12 are set as the light fog category, i.e., the output image. The images with an atmospheric light intensity of 1 and a random parameter of 0.2 are set as the dense fog category, and participate in the subsequent training of the dense fog discriminator. The clear fog-free image is the GT. OTS in the RESIDE dataset is selected as the training set and SOTS as the test set, which are divided into dense fog, light fog, and clear fog. Figure 3 category;

[0068] S12: Preprocess all training images, enlarge them by 1.12 times to 256x256, and randomly crop them into 256x256 tiles.

[0069] S2: Use the base network of Cycle-Dehaze to construct training networks G, F, clear image discriminator D1, and dense fog discriminator D2. The clear image discriminator D1 is the first discriminator, and the dense fog discriminator D2 is the second discriminator.

[0070] S3: Train the image symbiosis dual model network, specifically:

[0071] S31: Input a haze image, treat it as a haze image, pass it through the defogging network G to obtain a defogging image B, and then pass it through the fogging network to restore it to a haze image C; treat the input haze image as a haze-free image, pass it through the fogging network F to obtain a haze image (dense fog) D, and then pass it through the defogging network G to obtain a haze image E; the haze image C is the first output image, and the haze image E is the second output image; Figure 2 As shown; for the discriminator, use Figure 3 and Figure 4 The clear image discriminator D1 and the dense fog discriminator D2 are trained separately and the parameters of the network G, F, D1, and D2 are updated using the Adam algorithm. The ideal result is obtained after about 50 iterations.

[0072] S32: Calculate the L1 loss for each of the input image A, the haze image C, and the haze image E to obtain the cycle consistency loss L cyc , that is, the cycle consistency loss function is obtained;

[0073] The cycle consistency loss function is as follows:

[0074]

[0075] Among them, x is the input image, G is the defogging network, F is the fogging network, and P data(x) represents the data distribution of the input image x, is the mathematical expectation of the data distribution of the input image x, F(G(x)) is the image obtained by defogging and fogging the input image as a foggy image, which is consistent with the output image, i.e., the first output image; G(F(x)) is the image obtained by defogging and fogging the input image as a fog-free image, which is consistent with the input image, i.e., the second output image;

[0076] S33: Output the input image A, the first output image C, and the second output image E in pairs to the pre-trained VGG16 feature extraction network, calculate the perceptual loss, and obtain Lper, that is, obtain the perceptual consistency loss function;

[0077] The cycle-aware consistency loss function is as follows:

[0078]

[0079] Among them, x is the input image, G is the defogging network, F is the fogging network, F(G(x)) is the first output image, G(F(x)) is the second output image, φ is the feature extractor of the second and fifth pooling layers of VGG16; VGG16 is a pre-trained feature extraction model. The VGG16 network contains 13 convolutional layers, 3 fully connected layers and 5 pooling layers.

[0080] S34: During the training process, the first defogging image B is output to the clear image discriminator D1, and the second foggy image D is output to the dense fog discriminator D2, and the adversarial loss is calculated to obtain L adv , that is, we get the adversarial loss function;

[0081] The adversarial loss function is specifically:

[0082]

[0083]

[0084] L adv (G,F)=L adv (G,D1)+L adv (G,D2)

[0085] Among them, a is the network input image, b is the G network defogging image G(x), d is the F network fogging image F(x), r is the real clear image, f is the real dense fog image, D1 is the clear image discriminator referred to as the first discriminator, D2 is the dense fog discriminator referred to as the second discriminator, P data is the data distribution of the corresponding image, and E is the mathematical expectation of the data distribution of the corresponding image;

[0086] S35: Give different losses different parameters and combine them into L total , that is, assign different parameters to the first output loss function, the second output loss function, and the adversarial loss function to obtain the total loss function;

[0087] The total loss function is specifically:

[0088] L(G,F)=αL per (G,F)+γ*L cyc (G,F)+βL adv (G,F)

[0089] Among them, α, γ, and β are weight parameters for balancing the three types of losses, which are 1, 10, and 0.5 respectively. The G network is the defogging network, and the F network is the fogging network.

[0090] S36: Calculate the gradient of the network loss function through the gradient descent method, continuously update the weight value, minimize the loss, and iterate continuously until the network converges.

[0091] S4: Network inference stage, output a foggy image, and then pass it through the trained defogging network G to obtain the ideal defogging image.

[0092] The number of training times is set to 65, and one sample is trained each time, that is, Batch_Size = 1. The value of the training set sample dataloader is the number of images contained in the training set, which is 6279 in the OTS dataset. During training, all images are resized to 1.12 times of 256 and randomly cropped into small blocks of 256x256. The number of epochs for saving the model is set to 1, the number of CPU threads to be used during batch generation is set to 8, and 9 residual blocks are used. The weight parameters α, γ, and β in the total loss function formula are set to 1, 10, and 0.5 respectively.

[0093] The present invention only needs to input a foggy image for training, and uses the Cycle-Dehaze network as the base network. In the training process, the idea of ​​relative dehazing is adopted, and no paired data sets are required. The discriminator structure is redesigned to achieve a certain dehazing effect. In terms of objective indicators SSIM and PSNR, this network is better than the Cycle-Dehaze base network, and in terms of dehazing effect, the image restored by this network is more realistic and subjectively better. The dehazing effect diagram is shown in the figure. Figure 5 As shown in Table 1, the symbiotic dual model network is improved on the basis of Cycle-Dehaze. Whether in terms of structural similarity SSIM or peak signal-to-noise ratio PSNR, the indicators are better than Cycle-Dehaze and have been significantly improved; as shown in Table 1.

[0094] Table 1: Dehazing comparison results

[0095] Dehazing Method SSIM PSNR Cycle-Dehaze 0.823603 22.329728 Ours 0.897905 23.768612

[0096] Embodiment 2:

[0097] An unsupervised image dehazing system based on symbiotic dual models, such as Figure 6 As shown, including:

[0098] An image acquisition module, used for acquiring images;

[0099] A preprocessing module, used for preprocessing the image to obtain an input image;

[0100] A model network construction module, used to construct an image symbiotic dual-model network, wherein the image symbiotic dual-model network includes a defogging network and a fogging network;

[0101] A training module is used to train the image symbiotic dual model network to obtain the trained image symbiotic dual model network; the training is as follows: the input image is fogged and fog-free respectively through the defogging network and the fogging network to obtain the first defogging image, the first output image and the second foggy image, and the second output image respectively; the loss of the first defogging image is calculated by the first discriminator and the loss of the second foggy image is calculated by the second discriminator to obtain the adversarial loss function; the input image and the first output image and the second output image are respectively calculated to obtain the first output loss function; the input image and the first output image and the second output image are respectively calculated to obtain the second input loss function through the pre-trained VGG16 network; the total loss function is obtained according to the adversarial loss function, the first output loss function and the second output loss function;

[0102] The defogging module is used to process the image to be tested through the trained image symbiotic dual model network to obtain the defogging result;

[0103] The result output module is used to output the dehazing results.

[0104] The details are as follows:

[0105] The symbiotic dual model network consists of two networks, a defogging network and a fogging network. The two networks have the same structure, and their functions are distinguished during the training process. It also includes a clear image discriminator and a dense fog discriminator.

[0106] By reclassifying the subset of OTS of the RESIDE dataset, three categories of images are constructed, and these three categories of images are preprocessed to facilitate network input.

[0107] The dehazing network and the fogging network first perform mirror padding, convolution, normalization and activation layers on the input image, then downsample it through two convolution layers with a step size of 2, pass through the residual block, and finally obtain a network output image with the same size as the input image through two upsamplings.

[0108] Normalization uses InstanceNorm instance normalization, and the output image is normalized at the channel layer, and the mean and standard deviation of all pixels in an image are calculated. This normalization method can accelerate the convergence of the model and ensure the independence of each input image instance.

[0109] The activation layer uses the Relu activation function, which remains unchanged for positive values ​​and suppresses negative values. Using the Relu activation function can effectively avoid the gradient vanishing problem and enable the model to be better trained and converged.

[0110] The network uses 9 residual blocks to increase the depth of the network and effectively avoid the gradient vanishing and gradient exploding problems. Each residual block adds the convolution output features to the original features. Through this jump connection, the shallow features are passed to the subsequent deep network, making the network easier to optimize.

[0111] The unsupervised image dehazing network of the symbiotic dual model does not distinguish between fog and no fog during the training process. For an input image, it can be regarded as a foggy image, which can be dehazed and fogged, or it can be regarded as a non-fog image, which can be dehazed and fogged, forming two cycles. For the intermediate discriminator, the idea of ​​classification is adopted to redesign the discriminator, increase the proportion of different categories of discriminant loss, so that the network output can achieve the expected effect and improve the network performance.

[0112] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. An unsupervised image dehazing method based on symbiotic dual models, characterized in that: The following steps are involved: Acquire an image, and preprocess the image to obtain an input image; Constructing an image symbiotic dual-model network, wherein the image symbiotic dual-model network includes a defogging network and a fogging network; The image symbiotic dual model network is trained to obtain a trained image symbiotic dual model network; the training is as follows: the input image is fogged and fog-free respectively through the defogging network and the fogging network to obtain a first defogging image, a first output image, a second foggy image, and a second output image respectively; the first discriminator is used to calculate the loss of the first foggy image and the second discriminator is used to calculate the loss of the second foggy image to obtain an adversarial loss function; the input image and the first output image and the second output image are respectively calculated to obtain a first output loss function; the input image and the first output image and the second output image are respectively calculated to obtain a second output loss function through a pre-trained VGG16 network; the total loss function is obtained according to the adversarial loss function, the first output loss function, and the second output loss function; The defogging network and the fogging network are used to perform fog processing and fog-free processing on the input image, respectively, to obtain a first defogging image, a first output image, a second fogging image, and a second output image, respectively. Specifically, the input image is used as the first fogging image, the first fogging image is passed through the defogging network to obtain the first defogging image, and the first defogging image is passed through the fogging network to obtain the first output image; the input image is used as the second defogging image, the second defogging image is passed through the fogging network to obtain the second fogging image, and the second fogging image is passed through the defogging network to obtain the second output image; The first defogging image is subjected to loss calculation by the first discriminator, and the second foggy image is subjected to loss calculation by the second discriminator to obtain an adversarial loss function; the input image and the first output image and the second output image are subjected to loss calculation respectively to obtain a first output loss function; the input image and the first output image and the second output image are subjected to loss calculation by the pre-trained VGG16 network respectively to obtain a second output loss function, specifically: the input image is subjected to cycle consistency loss calculation by the first output image and the second output image respectively to obtain a cycle consistency loss function, i.e., the first output loss function; the input image is subjected to cycle perceptual consistency loss calculation by the pre-trained VGG16 network respectively to obtain a cycle perceptual consistency loss function, i.e., the second output loss function; The cycle consistency loss function is as follows: Among them, x is the input image, G is the defogging network, F is the fogging network, and P data(x) represents the data distribution of the input image x, is the mathematical expectation of the data distribution of the input image x, F(G(x)) is the image obtained by defogging and fogging the input image as a foggy image, which is consistent with the input image, i.e., the first output image; G(F(x)) is the image obtained by defogging and fogging the input image as a fog-free image, which is consistent with the input image, i.e., the second output image; The cycle-aware consistency loss function is as follows: Where x is the input image, G is the defogging network, F is the fogging network, F(G(x)) is the first output image, G(F(x)) is the second output image, φ is the feature extractor of the second and fifth pooling layers of VGG16; VGG16 is a pre-trained feature extraction model, and the VGG16 network contains 13 convolutional layers, 3 fully connected layers, and 5 pooling layers; After training, an image symbiotic dual-model network is obtained, and the image to be tested is processed through the dehazing network to obtain the dehazing result.

2. The unsupervised image dehazing method based on symbiotic dual models according to claim 1, characterized in that: The preprocessing is specifically: classifying the acquired image, and randomly cutting the classified image into 256x256 blocks.

3. The unsupervised image dehazing method based on symbiotic dual models according to claim 2 is characterized in that: The classification is specifically to divide the acquired images into dense fog images, light fog images, and clear images according to the atmospheric light intensity and random parameters.

4. The unsupervised image dehazing method based on symbiotic dual models according to claim 1, characterized in that: The total loss function is obtained according to the first output loss function and the second output loss function, which is: The defogging image obtained by the defogging network is output to the first discriminator, and the foggy image obtained by the fogging network is output to the second discriminator, and adversarial loss calculation is performed to obtain an adversarial loss function; Different parameters are assigned to the first output loss function, the second output loss function, and the adversarial loss function to obtain the total loss function.

5. The unsupervised image dehazing method based on symbiotic dual models according to claim 1, characterized in that: The adversarial loss function is specifically: L adv (G,F)=L adv (G,D1)+L adv (G,D2) Among them, a is the network input image, b is the G network defogging image G(x), d is the F network fogging image F(x), r is the real clear image, f is the real dense fog image, D1 is the clear image discriminator referred to as the first discriminator, D2 is the dense fog discriminator referred to as the second discriminator, P data is the data distribution of the corresponding image, and E is the mathematical expectation of the data distribution of the corresponding image; The total loss function is specifically: L(G,F)=αL per (G,F)+γ*L cyc (G,F)+βL adv (G,F) Among them, α, γ, and β are weight parameters for balancing the three types of losses, which are 1, 10, and 0.5 respectively. G is the defogging network and F is the fogging network.

6. The unsupervised image dehazing method based on symbiotic dual models according to claim 1, characterized in that: The defogging network and the fogging network have the same network. Through the loss function constraint, the training process of the network is as follows: the output image is mirrored, convolved, normalized and activated; down-sampled through two convolution layers with a step size of 2; passed through the residual block; and up-sampled twice to obtain a network output image with the same size as the output image; Among them, the normalization adopts InstanceNorm instance normalization, the output image is normalized at the channel layer, and the mean and standard deviation of all pixels of the output image are calculated; The activation layer uses the Relu activation function, which remains unchanged for positive values ​​and suppresses negative values; The residual block is K, and K is greater than 2.

7. An unsupervised image defogging system based on a symbiotic dual model, used to implement an unsupervised image defogging method based on a symbiotic dual model as described in any one of claims 1 to 6, characterized in that: include: An image acquisition module, used for acquiring images; A preprocessing module, used for preprocessing the image to obtain an input image; A model network construction module, used to construct an image symbiotic dual-model network, wherein the image symbiotic dual-model network includes a defogging network and a fogging network; A training module is used to train the image symbiotic dual model network to obtain a trained image symbiotic dual model network; the training is as follows: the first discriminator is used to calculate the loss of the first defogging image and the second discriminator is used to calculate the loss of the second foggy image to obtain an adversarial loss function; the input image and the first output image and the second output image are respectively calculated to obtain a first output loss function; the input image and the first output image and the second output image are respectively calculated to obtain a second output loss function through a pre-trained VGG16 network; The defogging module is used to process the image to be tested through the trained image symbiotic dual model network to obtain the defogging result; The result output module is used to output the dehazing results.

Citation Information

Patent Citations

  • Deep learning-based dual-supervision image defogging method, system, medium and equipment

    CN110097519A

  • Single image defogging method based on unsupervised learning

    CN111861939A