Real world image defogging method
High-quality pseudo labels are generated in real-world image dehazing through the Colabator framework and the CORUN/DGUN network, which solves the problems of color distortion and insufficient generalization capabilities, and achieves better dehazing effects and model generalization capabilities.
Patent Information
- Application Number
- CN202410743894.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-11
AI Technical Summary
Existing technologies have problems with color distortion and insufficient generalization capabilities in real-world image dehazing, especially domain differences caused by the failure to accurately model the complex distribution of fog and the lack of sufficient paired data.
Using the Colabator framework, combined with the cooperative expansion network CORUN and the deep gradient expansion network DGUN, through the iterative mean teacher strategy and multi-stage iterative optimization, the synthetic data set is used to pre-train the teacher network to generate high-quality pseudo labels on real-world unlabeled data sets, guiding Student network training, and introducing global consistency loss to prevent overfitting.
It significantly improves the quality and detail clarity of dehazed images, enhances the model's generalization ability in real-world dehazing tasks, and surpasses the performance of existing technologies.
Smart Images

Figure CN118628402A
Abstract
Description
Technical Field
[0001] The present invention relates to computer image processing technology, and in particular to a real-world image defogging method. Background Art
[0002] The inconsistency between the distribution of synthetic haze and real haze often prevents existing learning-based dehazing methods from effectively removing haze from real-world images. Therefore, people pay more and more attention to solving the challenges specific to real-world dehazing. Given the characteristics of real haze, RIDCP and Wang et al. proposed new haze synthesis pipelines. However, relying solely on synthetic data limits the robustness of the model in real-world dehazing scenarios. Given the distribution difference between synthetic haze and real haze, CDD-GAN, D4, Shao et al., and Li et al. use CycleGAN for dehazing. However, the inherent challenges of GAN training often lead to artifacts in the generated images. Some methods combine synthetic and real-world data and apply unsupervised losses to supervise real-world dehazing learning. However, these losses lack sufficient precision, resulting in unsatisfactory results. Other methods use pseudo-labels, but incorrect pseudo-labels can degrade the quality.
[0003] Deep Unfolding Networks (DUNs) fuse model-based and learning-based methods, thus providing better interpretability and flexibility than traditional learning-based methods. Increasingly, DUNs are used in various image tasks, including image super-resolution, compressed sensing, hyperspectral image reconstruction, and image fusion. DGUN proposed a generalized proximal gradient descent form to learn degradation. However, it fails to decouple prior knowledge and relies only on a single-path DUN to model degradation and construct mapping, which poses challenges in understanding complex degradation. Yang and Sun first introduced DUN into the field of image dehazing and proposed PDN. However, PDN fails to exploit the complementary information between the dehazed image and the transmission map, resulting in blurred details.
[0004] Real-world image dehazing (RID) is a challenging task that aims to restore images in real scenes affected by complex haze. Its goal is to improve the performance of downstream tasks while producing visually pleasing results. The atmospheric scattering model (ASM) provides a physical framework for real-world dehazing, which is formulated as follows:
[0005] P(x)=J(x)t(x)+A(1-t(x)), (1)
[0006] Among them, P(x) and J(x) represent the haze image and the haze-free image respectively. A(x) represents the global atmospheric light. t(x) represents the transmission map, reflecting the changes in the visibility of haze in different areas.
[0007] Traditional methods are limited by fixed feature extractors and have difficulty handling the complexity of real fog. Although existing deep learning-based methods show improved performance, they face two major challenges: (1) These methods fail to accurately model the complex distribution of fog, resulting in color distortion (e.g. Figure 1 (2) Real-world environments lack sufficient paired data for network training, and optimizing the network using synthetic data will produce domain differences and limit the generalization ability of the model.
[0008] To overcome the first challenge, PDN first introduced the unfolding network into the RID field. Specifically, PDN unfolds the iterative optimization steps of the ASM-based solution into a deep network for end-to-end training, incorporating physical information into the deep network. However, PDN fails to effectively utilize the complementary information between the dehazed image and the transmittance map, resulting in overfitting problems and blurred details (see Figure 1 ).
[0009] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention
[0010] The main purpose of the present invention is to overcome the defects of the above-mentioned background technology and provide a real-world image defogging method.
[0011] To achieve the above object, the present invention adopts the following technical solutions:
[0012] A real-world image defogging method, comprising:
[0013] Construct a Colabator framework for generating high-quality pseudo labels. The Colabator framework is an iterative mean teacher framework, including a teacher network and a student network using a cooperative unfolding network CORUN architecture or a deep gradient unfolding network DGUN architecture. The CORUN is a deep unfolding network combined with an atmospheric scattering model.
[0014] Pre-training the teacher network using a synthetic dataset, wherein the teacher network is used to generate dehazed images on a real-world unlabeled dataset during a training phase, and the dehazed images are used as pseudo labels to train the student network;
[0015] The student network and the teacher network are used for training. The pseudo labels generated by the teacher network guide the training of the student network. The student network uses the pseudo labels generated by the teacher network for learning and adjusts its own weights according to these labels to learn how to effectively remove haze from the image. The training process optimizes the dehazing process of the student network through multiple stages of iterative optimization. In each iteration of the training, the weight of the student network is updated according to the result of the loss function to minimize the difference between the output and the target haze-free image.
[0016] The trained student network is further fine-tuned on real-world datasets to optimize its dehazing performance to adapt to real scenes, so as to use the student network for real-world image dehazing.
[0017] The present invention has the following beneficial effects:
[0018] The present invention proposes an innovative real-world image dehazing method. By constructing the Colabator framework, the problems of color distortion and insufficient generalization ability in the prior art are effectively solved. The Colabator framework adopts an iterative mean teacher strategy and combines the cooperative unfolding network CORUN and the deep gradient unfolding network DGUN architecture. CORUN specifically integrates the atmospheric scattering model to improve the modeling accuracy of the real haze distribution. CORUN introduces the transmission and scene gradient descent modules at each stage, corresponding to each iteration of the traditional optimization algorithm, and cooperatively models the atmospheric scattering and image scene. The teacher network pre-trained with the synthetic dataset can generate high-quality dehazed image pseudo labels on the real-world unlabeled dataset to guide the training of the student network. Based on the pseudo labels generated by the teacher network, the student network continuously adjusts the weights through multiple stages of iterative optimization to learn to effectively remove haze from the image. Furthermore, the patch-level trusted weights are introduced to encourage the student network to focus on the well-recovered areas of the pseudo labels and enhance the local consistency between the outputs of the student model and the teacher model. Furthermore, in order to prevent overfitting, the present invention introduces a global consistency loss, which constrains the entire process to follow the laws of physics while reducing the constraints on the intermediate layers. These design choices facilitate CORUN to effectively integrate physical information into the deep network, thereby performing well in restoring details affected by fog. This method not only improves the quality of dehazed images, but also enhances the generalization ability and practicality of the model in real-world dehazing tasks while maintaining natural colors and clear details. A large number of experiments have proved that the method of the present invention outperforms the existing technology in real-world dehazing tasks and demonstrates advanced dehazing effects. The method of the present invention can also be used as a plug-and-play tool and combined with other methods to bring substantial performance gains. Overall, the present invention effectively solves the limitations of existing image dehazing methods and provides a solution with excellent performance and broad application prospects.
[0019] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a detail restoration effect diagram of the CORUN method according to an embodiment of the present invention.
[0021] Figure 2 This is an overview diagram of the Colabator framework algorithm architecture of an embodiment of the present invention.
[0022] Figure 3 Schematic diagram of the iterative mean teacher dehazing strategy based on the consistent plug-and-play pseudo-label paradigm in an embodiment of the present invention.
[0023] Figure 4 The figure shows the comparison of the visualization effect of the embodiment of the present invention and the existing dehazing method on the RTTS dataset.
[0024] Figure 5 The figure is a comparison of the visualization effects of the embodiment of the present invention and the existing dehazing method on the Fattal's dataset.
[0025] Figure 6 The following is a comparison of the visualization effects of target detection between the embodiment of the present invention and the existing defogging method on the RTTS dataset. DETAILED DESCRIPTION
[0026] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.
[0027] An embodiment of the present invention provides a real-world image defogging method, comprising:
[0028] Construct a Colabator framework for generating high-quality pseudo labels. The Colabator framework is an iterative mean teacher framework, including a teacher network and a student network using a cooperative unfolding network CORUN architecture or a deep gradient unfolding network DGUN architecture. The CORUN is a deep unfolding network combined with an atmospheric scattering model.
[0029] Pre-training the teacher network using a synthetic dataset, wherein the teacher network is used to generate dehazed images on a real-world unlabeled dataset during a training phase, and the dehazed images are used as pseudo labels to train the student network;
[0030] The student network and the teacher network are used for training. The pseudo labels generated by the teacher network guide the training of the student network. The student network uses the pseudo labels generated by the teacher network for learning and adjusts its own weights according to these labels to learn how to effectively remove haze from the image. The training process optimizes the dehazing process of the student network through multiple stages of iterative optimization. In each iteration of the training, the weight of the student network is updated according to the result of the loss function to minimize the difference between the output and the target haze-free image.
[0031] The trained student network is further fine-tuned on real-world datasets to optimize its dehazing performance to adapt to real scenes, so as to use the student network for real-world image dehazing.
[0032] The real-world image defogging method provided by the embodiment of the present invention achieves a series of technical advantages by constructing the Colabator framework, which, as an iterative mean teacher framework, integrates the cooperative unfolding network CORUN or the deep gradient unfolding network DGUN architecture, and combines the atmospheric scattering model to enhance the accurate modeling of the real haze distribution. By pre-training the teacher network with a synthetic dataset and generating high-quality pseudo labels for defogging images on a real-world unlabeled dataset, the present invention effectively solves the problem of insufficient data in real scenes and significantly improves the learning efficiency and defogging performance of the student network. Under the guidance of the pseudo labels generated by the teacher network, the student network performs multi-stage iterative optimization, continuously adjusts the weights to minimize the difference between the output and the target haze-free image, and thus learns to effectively remove haze from the image. In addition, by further fine-tuning on the real-world dataset, the defogging performance of the student network is optimized, so that it can better adapt to the needs of real scenes. Overall, the technical advantages of the present invention are particularly its innovative framework design, which improves the quality of defogging images, enhances the generalization ability of the model, and demonstrates excellent performance in real-world defogging tasks.
[0033] In some preferred embodiments, the CORUN includes multiple stages, each stage including a transmission and scene gradient descent module T&SGDM and a paired cooperative proximal mapping module T&S-CPMM; the T&SGDM and T&S-CPMM work together to model the atmospheric scattering model ASM and image scene features to adaptively capture and recover global composite features in the scene.
[0034] In some preferred embodiments, the implementation method of CORUN includes: given a foggy image, initializing a transmittance map, simplifying the calculation of atmospheric light in gradient descent, and making implicit estimates so as to focus on the detailed characterization of the scene and the relationship between volumetric fog and the scene; based on the atmospheric scattering model formula, defining a cooperative defogging energy function, introducing a regularization term to simulate prior knowledge, and adding auxiliary variables to approximate the transmittance map and the defogged image; in the transmittance optimization stage, updating the transmittance map according to the defogged image and transmittance map of the previous iteration, and using a neural network with an encoder-decoder structure to construct a proximal mapping between the auxiliary variables and the transmittance map; in the scene optimization stage, updating the defogged image according to the updated auxiliary variables and the transmittance map, using a proximal mapping module with a similar structure but different inputs; the entire process is updated through iterative updates, using the learned parameters to adaptively control the update of the network during the iteration process to enhance the generalization ability until the stop condition is met or the predetermined number of iterations is reached.
[0035] In some preferred embodiments, the paired cooperative proximal mapping module T&S-CPMM includes a transmission and scene T-CPMM and a scene S-CPMM, which share the same structure based on an improved multi-scale transmission (MST) algorithm; each CPMM block uses a 4-channel convolution to embed the transmittance map T and the dehazed image J into a 30-dimensional feature map to enhance the feature expression capability; the T-CPMM generates a 1-channel result dedicated to predicting a transmittance map consistent with the scene; and the S-CPMM generates a 3-channel RGB image, enabling it to learn additional scene feature information, such as atmospheric light and blur, thereby improving the quality and details of the dehazed results; each CPMM consists of 3 layers, each layer contains a [1,1,1][1,1,1] convolution block, and the feature dimension is doubled as needed when the network depth increases.
[0036] In some preferred embodiments, the Colabator framework is a pluggable consistency label generator, the weights of the teacher network are shared with the student network through an exponential moving average EMA, and a mean teacher strategy is used to generate high-quality pseudo labels through a trust weighted process and an optimal label pool.
[0037] In some preferred embodiments, the processing operations of the Colabator framework include: calculating the trust weight of the pseudo-dehazed image using a pre-trained CLIP model and a no-reference image quality assessor; selecting the best pseudo-label based on the calculated trust weight and image quality assessment and storing it in an optimal label pool; during the training process, continuously comparing the newly generated pseudo-label with the existing labels in the label pool, and updating the label pool to maintain the optimal state; through the iterative process, the quality of the pseudo-labels generated by the teacher network is gradually improved, providing a more reliable learning signal for the student network.
[0038] In some preferred embodiments, an iterative mean teacher method is used, and the process of using a student network and a teacher network for training specifically includes: the teacher network uses an unenhanced real foggy image as input to generate a high-quality defogged image as a pseudo label; the student network uses a data-enhanced foggy image as input to generate a defogged image; the difference between the pseudo label generated by the teacher network and the defogged image generated by the student network is compared to evaluate the performance of the student network; the student network adjusts its own weights based on the comparison results with the pseudo label generated by the teacher network, and performs backpropagation through a loss function to minimize the difference between the output and the target fog-free image; in each iteration of training, the weight of the student network is updated according to the result of the loss function; the weight of the teacher network is shared with the student network through an exponential moving average EMA to maintain consistency and stability between the two; patch-level trusted weights are introduced to encourage the student network to focus on well-recovered areas of pseudo labels and enhance local consistency between the outputs of the student model and the teacher model; the best labels are selected based on visual fidelity and defogging performance, and these labels are stored in a label pool to guide subsequent training processes.
[0039] In some preferred embodiments, during the training process, a pseudo-dehazed image generated by a teacher network is used for model supervision based on label trust weighting, specifically including: using the teacher network to process an unenhanced real foggy image to generate a pseudo-dehazed image, and treating it as a pseudo-label; dividing the pseudo-dehazed image into multiple small blocks to form a sequence for local quality assessment; using a haze evaluator based on a pre-trained CLIP model and fixed text features to perform haze assessment on each image block; using a no-reference image quality evaluator to perform a quality score on each image block; combining the results of haze assessment and image quality assessment, calculating a trust weight for each image block to form a trust-weighted label; normalizing the scores obtained by the assessment; combining the normalized scores and resizing them to match the size of the original pseudo-dehazed image to generate a final trust weight image; using the generated trust weight to weight the pseudo-dehazed image, i.e., the pseudo-label, generated by the teacher network, so as to better supervise the student network in model training.
[0040] In some preferred embodiments, the optimal pseudo-label state is maintained during the training process, specifically including: creating an optimal label pool for storing optimal pseudo-labels to ensure that the best quality pseudo-labels are used during the training process; for each foggy image, the teacher network generates a pseudo-defogged image and calculates its trust weight; the generated pseudo-defogged image and its trust weight are compared with the pseudo-labels in the optimal label pool, and if the newly generated pseudo-defogged image is better than the existing pseudo-labels in the optimal label pool in quality, the content in the optimal label pool is updated with the new pseudo-defogged image; the weights of the teacher network are updated by the exponential moving average EMA of the student network weights to aggregate previously learned weights and ensure the stability of the update; after each weight update, the trust weight of the pseudo-label is recalculated, and through continuous comparison and updating, the pseudo-labels in the optimal label pool are always kept in the optimal state.
[0041] In some preferred embodiments, the reconstruction loss based on L1 norm ∥·∥1 is used to make the reconstruction result consistent with the true value in features at different levels; contrast and conventional perceptual regularization is used to enhance the visual perception effect through contrast and conventional perceptual loss, and the hidden layer features and weight coefficients of the pre-trained VGG-19 network are used for calculation; through global coherence loss, CORUN can integrate physical information into the deep network to promote the recovery of physically consistent details;
[0042] The model is scored and the dehazing process is constrained in the semantic domain through the density loss based on the haze evaluator; the pre-training stage uses contrastive perceptual loss, global coherence loss and density loss for end-to-end optimization; the fine-tuning stage uses both synthetic data and real-world data for training, and the overall loss in the fine-tuning stage includes contrastive perceptual loss, conventional perceptual loss, global coherence loss and density loss; in the pre-training and fine-tuning stages, trade-off weights are introduced to balance the impact of different loss functions on the overall performance.
[0043] The embodiment of the present invention proposes an innovative real-world image dehazing method, which effectively solves the problems of color distortion and insufficient paired data by constructing a Colabator framework. The method adopts an iterative mean teacher framework and integrates the cooperative expansion network CORUN or the deep gradient expansion network DGUN architecture to achieve collaborative training of teacher and student networks. The teacher network is pre-trained using a synthetic dataset, and then high-quality pseudo labels are generated on a real-world unlabeled dataset to guide the training of the student network. Based on the pseudo labels generated by the teacher network, the student network learns to effectively remove haze from the image through multi-stage iterative optimization, and updates the weights according to the loss function in each iteration to minimize the difference between the output and the target haze-free image. Experiments have shown that the present invention has excellent performance in real-world dehazing tasks, significantly improves the color and detail quality of dehazed images, enhances the generalization ability of the model, and surpasses the existing technology.
[0044] The specific embodiments of the present invention are further described below.
[0045] The method based on the cooperative unfolding network (CORUN) in the embodiment of the present invention can address the limitations of PDN and better model the real fog distribution. CORUN cooperatively models atmospheric scattering and image scenes by introducing transmission and scene gradient descent modules at each stage, corresponding to each iteration of the traditional optimization algorithm. To prevent overfitting, the embodiment of the present invention introduces a global consistency loss that constrains the entire process to follow the laws of physics while relieving constraints on intermediate layers. These design choices facilitate CORUN to effectively integrate physical information into deep networks, thereby performing well in recovering details affected by fog (see Figure 1 ).
[0046] In order to enhance the generalization ability in real-world scenes, the embodiments of the present invention introduce the first iterative mean teacher framework for RID, named consistency-based label generator (Colabator), to generate high-quality pseudo labels for defogging images for training defogging methods. Specifically, Colabator uses a teacher network, a defogging network pre-trained on a synthetic dataset, to generate defogging images on an unlabeled real-world dataset. These restored images are stored in a dynamically updated label pool as pseudo labels for training the student network. The student network has the same structure as the teacher network, but with different weights. During the network training process, the teacher network generates multiple pseudo labels for a single real-world foggy image. The present invention proposes to select the best labels based on visual fidelity and defogging performance and store them in the label pool.
[0047] The embodiment of the present invention designs a composite image quality assessment strategy specifically for the dehazing task, evaluates the global consistency of the dehazing image, and selects the most visually attractive and distortion-free images to be put into the label pool. In addition, the present invention proposes a patch-level trusted weight to encourage the network to focus on the well-recovered areas of the dehazing pseudo-labels, effectively constraining the local consistency between the outputs of the student model and the teacher model. Figure 1 As shown, Colabator generates high-quality pseudo labels for network training, enhancing the capabilities of the student dehazing network for dehazing and color correction.
[0048] CORUN - Collaboration Network
[0049] The architecture of CORUN is as follows Figure 2 As shown, including a detailed description of the kth stage.
[0050] This paper proposes the Collaborative Unfolding Network (CORUN), which is the first Deep Unfolding Network (DUN) method that uses Proximal Gradient Descent (PGD) to optimize image dehazing performance. CORUN uses the Atmospheric Scattering Model (ASM) and Neural Image Reconstruction in a collaborative manner. Each stage of CORUN includes a Transfer and Scene Gradient Descent Module (T&SGDM) and a Paired Collaborative Proximal Mapping Module (T&S-CPMM). These modules work together to model atmospheric scattering and image scene features, enabling the adaptive capture and recovery of global composite features in the scene.
[0051] According to formula (1), given a foggy image The present invention initializes a transmittance map In gradient descent, the present invention simplifies atmospheric light And make implicit estimates in the CORUN process to focus on the detailed representation of the scene and the relationship between volumetric fog and the scene. Therefore, formula (1) can be rewritten as
[0052] P=J·T+IT, (2)
[0053] Where J represents a clear image without fog, and I is an all-one matrix of the same size as T. Based on formula (2), the present invention can define the cooperative defogging energy function of the present invention as follows:
[0054]
[0055] Among them, ψ(J) and φ(T) are regularization terms for T and J, simulating prior knowledge. The present invention introduces two auxiliary variables and To approximate T and J, this leads to the following minimization problem:
[0056]
[0057] Transmittance optimization
[0058] Given the rough transmittance map T and the dehazed image estimated in the k-1th iteration The variable T can be updated as:
[0059]
[0060] The present invention constructs a neural network of a class encoder-decoder The proximal mapping between and T is called T-CPMM in the present invention and is represented by prox φ :
[0061]
[0062] Auxiliary variables calculated by the TGDM proposed by the present invention It can be expressed as:
[0063]
[0064] Variable λ k It is a learnable parameter. The present invention enables CORUN to learn this parameter in the end-to-end learning process, allowing the network to adaptively control the update during the iteration process.
[0065] Scene optimization. Given and J, variable J can be updated as:
[0066]
[0067] Similar to the proximal mapping process in transmittance optimization, S-CPMM has a similar structure to T-CPMM, but with different inputs. The present invention represents S-CPMM as prox ψ :
[0068]
[0069] The present invention is processed by SGDM It can be expressed as:
[0070]
[0071] and λ in transmittance optimization k Same, μ k It is also a learnable parameter that brings more generalization ability to the network.
[0072] Details of CPMM
[0073] T-CPMM and S-CPMM share the same structure, which is improved from MST to improve mapping quality. Each CPMM block embeds T and J into a 30-dimensional feature map using a 4-channel convolution. The difference between T-CPMM and S-CPMM lies in their outputs: T-CPMM generates a 1-channel result to help TGDM predict a transmittance map that conforms to the scene, while S-CPMM generates a 3-channel RGB image. This allows S-CPMM to learn additional scene feature information such as atmospheric light and blur, thereby helping SGDM generate higher quality dehazing results and provide more details. For more efficient computation, each CPMM contains only 3 layers, each with blocks of $[1, 1, 1]$, and the dimension doubles with increasing depth.
[0074] Colabator-Consistency-based Pseudo-Labeling
[0075] Figure 3 The process of Colabator of the present invention is shown, using the pluggable consistent label generator Colabator proposed in the present invention to generate and select pseudo labels. Colabator includes a teacher network with weights θ tea By exponential moving average (EMA) and student network θ stu It adopts a tailored mean teacher strategy to generate high-quality pseudo labels through a trust-weighted process and an optimal label pool, addressing the problem of real-world data scarcity. Figure 3 A consistency-based plug-and-play pseudo-labeling paradigm is shown.
[0076] Iterative mean teacher dehazing
[0077] Given a real foggy image The present invention first applies an enhancement operation, using a strong enhancer The corresponding strongly degraded data is generated. The enhancer randomly applies adjustments such as contrast, brightness, hue, sharpness, JPEG compression, and Gaussian blur. Unlike the common mean teacher strategy, the present invention omits functions such as exposure, equalization, shearing, and translation to prevent unnecessary degradation that may mislead model learning. The present invention uses the unenhanced image as the input of the teacher network and the strongly enhanced image as the input of the student network, generating the following results:
[0078]
[0079] in, is the result generated by the teacher network using the unaugmented input, is the result generated by the student network using strongly enhanced input, and is the corresponding transmission map. Different degrees of data enhancement lead to different dehazing results, usually The quality is better than This method ensures that the model is optimized in the right direction and helps alleviate the overfitting problem common in direct pseudo-label learning methods. Through iteration, the teacher network of the present invention generates increasingly high-quality pseudo-labels, providing more reliable supervision for model learning.
[0080] Tag trust weighting
[0081] In order to better utilize the pseudo dehazed images generated by the teacher network The present invention designs a comprehensive image quality assessment strategy to further process these pseudo-dehazed images and obtain the trust weight w representing the reliability of each position of the image. The comprehensive strategy of the present invention mainly includes a haze evaluator based on the pre-trained CLIP model and fixed text features. and a no-reference image quality estimator The present invention will Divide into a sequence and use and Predict the haze score and quality score. The final trust weight w can be obtained by the following formula:
[0082]
[0083] where Ψ is the combination of sequences into images and resized to The function of norm(·) means normalizing the score to between 0 and 1, and a higher score indicates lower haze and better image quality.
[0084] The following pseudo code describes the process of an optimal label pool, which processes and selects high-quality pseudo labels.
[0085]
[0086] Optimal label pool
[0087] In order to ensure the use of optimal pseudo labels and avoid domain adaptation collapse caused by instability during training, this paper proposes an optimal label pool To keep the pseudo-label in its optimal state. The overall steps of the optimal label pool process of the present invention are summarized as shown in Algorithm 1. With the previous pseudo-label If the new pseudo dehazed image is better than the previous pseudo label, the pseudo dehazed image is updated to the pseudo label.
[0088]
[0089] in, is the Colabator framework of the present invention, yes Paired pseudo labels, is the corresponding pseudo transmission graph, w pse represents the trust weight of the pseudo label.
[0090] Weight Update
[0091] The weights θ of the teacher network tea By the student network weight θ stu The exponential moving average (EMA) is updated, which is expressed as follows:
[0092] θ tea =ηθ tea +(1-η)θ stu , (14)
[0093] Where η is the momentum parameter, η∈(0, 1). Using this update strategy, the teacher model can aggregate the previously learned weights immediately after each training step, ensuring the stability of the update.
[0094] Semi-supervised real-world image dehazing
[0095] In order to succeed in the dehazing task in real scenes, the present invention designs several loss functions for CORUN and Colabator to constrain their learning process. The present invention introduces a reconstruction loss based on the L1 norm ||·||1. In order to enhance the visual perception effect, the present invention adopts contrast and conventional perceptual regularization to ensure that the reconstruction results are consistent with the true values at different levels of features. The perceptual loss is defined as follows:
[0096]
[0097]
[0098] Among them, P HQ This is the result after defogging. represents the i-th hidden layer feature of the pre-trained VGG-19 network, τ i is the weight coefficient. In addition, in order to constrain the entire process to follow the physical laws, while relaxing the constraints on the intermediate layers and preventing overfitting, the present invention introduces a global coherence loss:
[0099] L Coh (P LQ , P HQ , T HQ )=||(P HQ ⊙T HQ +(IT HQ ))-PLQ ||1, (17)
[0100] Where ⊙ is the Hadamard product, I represents the LQ The global coherence loss ensures that CORUN can more effectively integrate physical information into the deep network, thereby facilitating the recovery of more physically consistent details. In addition, the present invention introduces a Density loss L Dens , which is used to score the model and constrain the dehazing process in the semantic domain:
[0101]
[0102] Pre-training phase
[0103] In order to ensure the ability in defogging and transmission map estimation, the present invention includes clear images. And synthetic haze image CORUN is pre-trained on a synthetic paired dataset of As input, the present invention can obtain the following results:
[0104]
[0105] in, represents weak geometric data augmentation, represents the dehazing result of the synthetic haze image, is the corresponding transmission graph. In the pre-training stage, CORUN of the present invention uses two supervised loss functions for end-to-end optimization. The overall loss in the pre-training stage is:
[0106]
[0107] Among them, ρ r yes The trade-off weight, ρ c YesL Coh The trade-off weight.
[0108] Fine-tuning stage
[0109] In the fine-tuning stage, the Colabator framework of the present invention is used to adapt the CORUN pre-trained on synthetic data to the actual scene domain. For more stable learning, in this stage, the present invention uses both synthetic data and real-world data for training. As shown in Formula 13, the present invention is from generate Using formula 19, the present invention obtains The overall loss in the fine-tuning phase is:
[0110]
[0111] Experimental Evaluation
[0112] Data preparation
[0113] The present invention uses the RIDCP500 dataset, which contains 500 clear images, whose depth maps are estimated by RA-depth, and paired data is generated in the manner of RIDCP. In the fine-tuning stage, the present invention incorporates the URHI subset of the RESIDE dataset (containing only 4,807 real foggy images) for generating pseudo labels and fine-tuning the network. The framework of the present invention is qualitatively and quantitatively evaluated on the RTTS subset, which contains more than 4,000 real foggy images with diverse scenes, resolutions, and degrees of degradation. Fattal's dataset contains 31 classic real foggy cases, which are used as a supplementary source for visual comparison across datasets.
[0114] Implementation details
[0115] The framework of the present invention is implemented using PyTorch and trained on four NVIDIA RTX 4090 GPUs. In the pre-training stage, the network is trained for 30K iterations using the AdamW optimizer with momentum parameters (β1 = 0.9, β2 = 0.999) and an initial learning rate of 2 × 10 -4 , gradually decreasing to 1×10 -6 , using cosine annealing. In Colabator, the initial learning rate is set to 5×10 -5 , the number of iterations is 5K. According to RIDCP, the present invention uses random cropping and flipping for synthetic data enhancement. The present invention uses DA-CLIP as a haze evaluator and MUSIQ as an image quality evaluator. The CORUN of the present invention includes 4 stages, and the trade-off parameter α in the loss c ,ρ r ,ρ c Set to 0.2, 5, 10 respectively -2 .
[0116] Evaluation Metrics
[0117] The present invention uses the fog-aware density evaluator (FADE) to evaluate the fog density among various methods. However, FADE focuses on fog density and ignores other key image features such as color, brightness, and details. To address this limitation, the present invention also adopts the blind / no-reference image spatial quality evaluator (BRISQUE) and neural image assessment (NIMA) to perform a more comprehensive evaluation of image quality and aesthetics. Higher NIMA scores and lower FADE and BRISQUE scores indicate better performance. The present invention uses PyIQA for BRISQUE and NIMA calculations and the official MATLAB code for FADE calculations. All of these metrics are non-reference because there are no corresponding labels in RTTS.
[0118] Effect comparison
[0119] Table 1: Quantitative results on the RTTS dataset
[0120]
[0121] The proposed method is compared with eight state-of-the-art methods: PDN, MBDN, DH, DAD, PSD, D4, RIDCP and DGUN. The quantitative results presented in Table 1 show that the proposed method achieves the highest performance, outperforming the second best method (RIDCP) by 19.0%. Specifically, the proposed method improves the FADE, BRISQUE and NIMA scores by 20.4%, 30.8% and 7.0%, respectively. This shows that the proposed method surpasses the current state-of-the-art in both dehazing capability and the quality and aesthetics of the generated images.
[0122] The visual comparison results of the proposed method and the most advanced algorithms are shown in Figure 4 , 5 As shown. It can be observed that these methods show some effectiveness in real-world dehazing tasks, but when the image contains white objects, sky, or extreme haze, the results from PDN, DAD, PSD, and RIDCP show different degrees of dark blocks and contrast inconsistency. In contrast, D4 leads to a decrease in overall brightness, resulting in loss of details in darker areas. Under these conditions, DGUN produces relatively beautiful results but loses significant local details, affecting the overall visual quality. It is worth noting that PSD achieves higher brightness but suffers from severe oversaturation. CORUN+ effectively removes haze while preserving image details by generating clear images, natural colors, and better contrast, consistently outperforming other methods.
[0123] Comparison of downstream task effects
[0124] Table 2: Results of object detection on the RTTS dataset
[0125]
[0126] The performance of high-level vision tasks, such as object detection and semantic segmentation, is greatly affected by image quality, and severely degraded images often lead to erroneous results. To address this performance degradation, some methods use image restoration as a preprocessing step for high-level vision tasks. In order to verify the effectiveness of the proposed method for high-level vision, the pre-trained YOLOv3 was used and tested on the RTTS dataset, and the mean average precision (mAP) metric was used to evaluate the results. As shown in Table 2 and Figure 6 As shown, the method of the present invention is significantly better than the existing methods, which verifies the effectiveness of the present invention in promoting high-level visual understanding.
[0127] User survey results comparison
[0128] Table 3: User survey results
[0129]
[0130] The inventors conducted a user study to evaluate the human subjective visual perception of the proposed method relative to other methods. Five experts with image processing background and 16 ordinary observers were invited as testers. These testers were asked to focus on three main aspects: (i) fog density compared with the original foggy image, (ii) clarity of details in the defogged image, and (iii) color and aesthetic quality of the defogged image. For each method, the results were presented anonymously to the testers along with the corresponding foggy image. They scored each method based on a scale of 1 (worst) to 10 (best). The foggy images were randomly selected, with a total of 225 images and 54 images from the RTTS and Fattal datasets. The scores of the user study are reported in Table 3, showing that the method of the present invention obtained the highest average score.
[0131] The following is a comparison of the performance of different solutions, using only some of the components that were tried during the design process.
[0132] Table 4: Generalization and the impact of Colabator
[0133]
[0134] Generalization and the Impact of Colabator
[0135] The performance and impact of the proposed Colabator framework under different metrics are evaluated. As shown in Table 4, removing the fine-tuning stage of Colabator leads to significant performance degradation, highlighting its key role in the dehazing process. To evaluate the generalization ability of Colabator, additional experiments are performed to replace CORUN of the present invention with DGUN while keeping the same training settings. Figure 1 As shown in Table 4, the CORUN method of the present invention better restores the details contaminated by fog. In addition, the techniques optimized by the Colabator framework of the present invention, marked with a "+" suffix, show strong generalization capabilities in fog removal and color correction. Figure 1 The results in show that Colabator significantly improves the performance of DGUN, demonstrating its strong generalization ability as a plug-and-play paradigm.
[0136] Table 5: Effects of the Colabator module of the present invention
[0137]
[0138] The Impact of Colabator
[0139] The effect of the Colabator of the present invention is verified. In Table 5, key components, such as iterative mean teacher (IMD), trusted weights, and optimal label pool, are systematically removed from the model architecture. The results show that the performance degrades when these components are removed, highlighting their key role in the system.
[0140] Table 6: Effect of the number of stages.
[0141]
[0142]
[0143] Analysis on the number of stages
[0144] The number of stages in a deep unfolded network significantly affects its efficiency and performance. To investigate this, we tried different numbers of stages for CORUN+, specifically choosing values of k from the set {1,2,4,6}. The results detailed in Table 6 show that CORUN+ achieves high-quality dehazing results with 4 stages. It is worth noting that increasing the number of stages does not necessarily improve the results. Too many stages may increase the complexity of the network, hinder convergence, and may introduce errors in the results.
[0145] In summary, the present invention proposes an innovative image defogging method, which effectively improves the performance of real-world image defogging by combining the advantages of deep learning and physical models. The innovative points of the embodiments of the present invention include at least:
[0146] The dehazing method using cooperative unfolding network (CORUN) is based on the atmospheric scattering model (ASM) for function derivation, which collaboratively models the atmospheric scattering and image scene. CORUN effectively integrates physical information into the deep network by introducing transmission and scene gradient descent modules at each stage to simulate the iterative process of traditional optimization algorithms.
[0147] Iterative Mean Teacher Framework (Colabator): This is the first iterative mean teacher framework designed for dehazing tasks to generate high-quality pseudo labels. Colabator uses a pre-trained teacher network to generate dehazed images on an unlabeled real-world dataset and dynamically updates these images to the label pool to provide pseudo labels for the training of the student network.
[0148] Composite image quality assessment strategy: A strategy for evaluating the global consistency of dehazed images is designed, and images with high visual appeal and no distortion are selected into the label pool, which enhances the student network's ability for dehazing and color correction.
[0149] Patch-level trust weights: Encourage the network to focus on well-recovered regions of pseudo-labels, effectively constraining the local consistency between the outputs of the student model and the teacher model.
[0150] Global consistency loss: To prevent overfitting, a global consistency loss is introduced, which ensures that the dehazing process follows the laws of physics while reducing constraints on intermediate layers and improving the quality of restoration of dehazing details.
[0151] The advantages of the present invention are:
[0152] It solves the problem of color distortion in real-world image dehazing in existing methods and significantly improves the color and detail quality of dehazed images by more accurately modeling the complex distribution of fog.
[0153] Through the Colabator framework, the problem of insufficient paired data in real-world environments is effectively solved, the dependence on synthetic data is reduced, the domain differences are reduced, and the generalization ability of the model is enhanced.
[0154] A large number of experiments on real-world dehazing tasks have demonstrated that the method of the present invention outperforms the existing technology in performance and demonstrates advanced dehazing effects.
[0155] The method of the present invention not only improves the defogging performance, but also has a strong generalization ability, and can be used as a plug-and-play tool and combined with other methods to bring substantial performance gains.
[0156] In general, the present invention effectively solves the limitations of existing image defogging methods and provides a solution with excellent performance and broad application prospects.
[0157] The real-world image defogging method of the present invention has broad application prospects, and its application scenarios include but are not limited to:
[0158] Computer Vision and Image Processing: Dehazing techniques can be used to increase the clarity and quality of images, helping to improve the performance of computer vision tasks such as object detection, recognition, and tracking.
[0159] Autonomous driving and drone navigation: In unmanned systems such as self-driving cars and drones, clear vision is essential for accurately perceiving the surrounding environment. Defogging technology can help improve the quality of images captured by sensors, thereby improving the performance and safety of these systems.
[0160] Security monitoring: Security monitoring systems often need to obtain clear images in adverse weather conditions for accurate monitoring and identification. Defogging technology can help improve the quality of images captured by surveillance cameras, thereby enhancing security monitoring capabilities.
[0161] Aerospace: In aerospace applications such as aircraft navigation, remote sensing, and geographic information systems (GIS), clear images are essential for accurate identification of terrain and objects. Dehazing technology can help improve the quality of images acquired by aerospace systems.
[0162] Medical imaging: In medical imaging diagnosis, clear images are essential for accurate diagnosis and treatment. Dehazing technology can help improve the clarity of medical images, thereby improving the accuracy of diagnosis.
[0163] Remote sensing: Remote sensing can help collect information about surface or atmospheric conditions in fields such as agriculture, environmental monitoring, and meteorology. Dehazing technology can improve the quality of remote sensing images, making analysis and predictions more accurate.
[0164] An embodiment of the present invention further provides a storage medium for storing a computer program, which at least performs the above method when executed.
[0165] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A real-world image defogging method, characterized in that: include: Constructing a Colabator framework, which is an iterative mean teacher framework, including a teacher network and a student network using a cooperative unfolding network CORUN architecture or a deep gradient unfolding network DGUN architecture; the CORUN is a deep unfolding network combined with an atmospheric scattering model; Pre-training the teacher network using a synthetic dataset, wherein the teacher network is used to generate dehazed images on a real-world unlabeled dataset during a training phase, and the dehazed images are used as pseudo labels to train the student network; The student network and the teacher network are used for training. The pseudo labels generated by the teacher network guide the training of the student network. The student network uses the pseudo labels generated by the teacher network for learning and adjusts its own weights according to the pseudo labels to learn how to effectively remove haze from the image. The training process optimizes the dehazing process of the student network through multiple stages of iterative optimization. In each iteration of the training, the weight of the student network is updated according to the result of the loss function to minimize the difference between the output and the target haze-free image. The trained student network is further fine-tuned on real-world datasets in order to use the student network for real-world image dehazing.
2. The real-world image defogging method according to claim 1, characterized in that: The CORUN includes multiple stages, each of which includes a transmission and scene gradient descent module T&SGDM and a paired cooperative proximal mapping module T&S-CPMM; the T&SGDM and T&S-CPMM work together to model the atmospheric scattering model ASM and image scene features to adaptively capture and recover the global composite features in the scene.
3. The real-world image defogging method according to claim 2, characterized in that: The implementation method of CORUN includes: given a foggy image, initializing a transmittance map, simplifying the calculation of atmospheric light in gradient descent, and making implicit estimates so as to focus on the detailed representation of the scene and the relationship between volumetric fog and the scene; defining a cooperative defogging energy function based on the atmospheric scattering model formula, introducing a regularization term to simulate prior knowledge, and adding auxiliary variables to approximate the transmittance map and the defogging image; in the transmittance optimization stage, updating the transmittance map according to the defogging image and transmittance map of the previous iteration, and constructing a proximal mapping between the auxiliary variables and the transmittance map using a neural network with an encoder-decoder structure; in the scene optimization stage, updating the defogging image according to the updated auxiliary variables and the transmittance map, using a proximal mapping module with a similar structure but different inputs; through iterative updating, using the learned parameters to adaptively control the update of the network during the iteration process until a stop condition is met or a predetermined number of iterations is reached.
4. The real-world image defogging method according to claim 2 or 3, characterized in that: The paired cooperative proximal mapping module T&S-CPMM includes a transmission and scene T-CPMM and a scene S-CPMM, both of which share the same structure, which is based on an improved multi-scale transmission MST algorithm; Each CPMM block uses a 4-channel convolution to embed the transmittance map T and the dehazed image J into a 30-dimensional feature map to enhance the feature expression capability; T-CPMM generates a 1-channel result dedicated to predicting a transmittance map that matches the scene; while S-CPMM generates a 3-channel RGB image, which enables it to learn additional scene feature information, such as atmospheric light and blur, thereby improving the quality and details of the dehazing results; Each CPMM consists of 3 layers, each layer contains a [1,1,1][1,1,1] convolutional block, and the feature dimension is doubled as needed when the network depth increases.
5. The real-world image defogging method according to any one of claims 1 to 4, characterized in that: The Colabator framework is a plug-in consistent label generator. The weights of the teacher network are shared with the student network through the exponential moving average EMA. The mean teacher strategy is used to generate high-quality pseudo labels through a trust weighted process and an optimal label pool.
6. The real-world image defogging method according to any one of claims 1 to 5, characterized in that: The processing operations of the Colabator framework include: calculating the trust weight of the pseudo dehazed image using a pre-trained CLIP model and a no-reference image quality evaluator; selecting the best pseudo label based on the calculated trust weight and image quality evaluation and storing it in the optimal label pool; during the training process, continuously comparing the newly generated pseudo labels with the existing labels in the label pool, and updating the label pool to maintain the optimal state; through the iterative process, the quality of the pseudo labels generated by the teacher network is gradually improved, providing a more reliable learning signal for the student network.
7. The real-world image defogging method according to any one of claims 1 to 6, characterized in that: Using the iterative mean teacher method, the process of training using the student network and the teacher network includes: The teacher network uses an unenhanced real foggy image as input and generates a high-quality dehazed image as a pseudo label; The student network uses the foggy image processed with data enhancement as input to generate a dehazed image; Comparing the difference between the pseudo labels generated by the teacher network and the dehazed images generated by the student network to evaluate the performance of the student network; The student network adjusts its own weights according to the comparison results with the pseudo labels generated by the teacher network, and performs back propagation through the loss function to minimize the difference between the output and the target haze-free image; In each iteration of training, the weights of the student network are updated according to the result of the loss function; The weight of the teacher network is shared with the student network through an exponential moving average EMA to maintain consistency and stability of the two; Introducing patch-level trust weights to encourage the student network to focus on well-recovered regions of pseudo labels and enhance the local consistency between the outputs of the student model and the teacher model; The best labels are selected based on visual fidelity and dehazing performance, and these labels are stored in a label pool to guide the subsequent training process.
8. The real-world image defogging method according to any one of claims 1 to 7, characterized in that: During the training process, the pseudo dehazed images generated by the teacher network are used for label trust-weighted model supervision, including: The teacher network is used to process the unenhanced real foggy image to generate a pseudo-dehazed image, which is regarded as a pseudo-label; Divide the pseudo-dehazed image into multiple small blocks to form a sequence for easy local quality assessment; The haze estimator based on the pre-trained CLIP model and fixed text features is used to evaluate the haze of each image block. Use a no-reference image quality assessor to score the quality of each image patch; Combining the results of haze assessment and image quality assessment, a trust weight is calculated for each image block to form a trust-weighted label; Normalize the scores obtained from the evaluation; The normalized scores are combined and resized to match the size of the original pseudo-dehazed image to generate the final trust weight image; The pseudo-dehazed images, i.e., pseudo-labels, generated by the teacher network are weighted using the generated trust weights to better supervise the student network during model training.
9. The real-world image defogging method according to any one of claims 1 to 8, characterized in that: Maintain the optimal pseudo-label state during training, including: Create an optimal label pool to store the optimal pseudo labels so that the best pseudo labels can be used during training; For each foggy image, the teacher network generates a pseudo dehazed image and calculates its trust weight; The generated pseudo dehazed image and its trust weight are compared with the pseudo labels in the optimal label pool. If the newly generated pseudo dehazed image is better than the existing pseudo labels in the optimal label pool in quality, the content in the optimal label pool is updated with the new pseudo dehazed image. The weights of the teacher network are updated by the exponential moving average EMA of the student network weights to aggregate previously learned weights and ensure the stability of the update; After each weight update, the trust weight of the pseudo-label is recalculated, and through continuous comparison and updating, the pseudo-labels in the optimal label pool are always kept in the optimal state.
10. The real-world image defogging method according to any one of claims 1 to 9, characterized in that: Through the reconstruction loss based on L1 norm ∥·∥1, the reconstruction results are kept consistent with the true values at different levels of features; Contrast and conventional perceptual regularization is used to enhance visual perception through contrast and conventional perceptual losses, and the hidden layer features and weight coefficients of the pre-trained VGG-19 network are used for calculation; Through global coherence loss, CORUN can integrate physical information into the deep network and promote the recovery of physically consistent details; The model is scored and the dehazing process is constrained in the semantic domain via a density loss based on a haze evaluator; The pre-training phase uses contrast-aware loss, global coherence loss, and density loss for end-to-end optimization. The fine-tuning stage uses both synthetic and real-world data for training. The overall loss in the fine-tuning stage includes contrast perception loss, conventional perception loss, global coherence loss, and density loss. During the pre-training and fine-tuning stages, trade-off weights are introduced to balance the impact of different loss functions on the overall performance.
Citation Information
Patent Citations
Course learning and teacher-student learning combined image defogging method
CN115358942A
Pipeline video defogging method based on multi-scale dense feature fusion convolutional network
CN116228592A
Image dehazing method and system based on cyclegan
US20220414838A1
Method for removing cloud and haze on basis of depth channel sensing
WO2022095253A1
Cited By
Microorganism experiment bacterial colony image processing method
CN119809959A
Iterative defogging method and system for real world image
CN119809979A
Intelligent clothing pattern generation method and system based on designer acceptance
CN120823280A
