Hybrid degraded image restoration method based on joint conditional diffusion model
Through a two-stage method that combines the conditional diffusion model and the uncertainty estimation network, the image restoration problem under unknown or complex severe weather conditions is solved, achieving robust and accurate image restoration, reducing information loss and improving the restoration effect.
Patent Information
- Application Number
- CN202410827420.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-29
AI Technical Summary
Existing image restoration methods are difficult to effectively restore images under unknown or complex and diverse severe weather conditions, and rely on a priori estimates of degradation types or fail to provide sufficient guidance, resulting in reduced restoration performance and information loss.
A two-stage method based on the joint conditional diffusion model is adopted. First, the degraded image is generated through the atmospheric scattering model and predicted using the degradation mask as a conditional guide for the diffusion model. Then, the image detail recovery is enhanced through the fine-tuning restoration stage of the uncertainty estimation network.
Achieve robust and accurate image restoration performance in the case of unknown or complex degradation types, reduce a priori assumptions and information loss about degradation types, and significantly improve the effect of image restoration.
Smart Images

Figure CN118864291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image restoration, and in particular to a mixed degraded image restoration method based on a joint conditional diffusion model. Background Art
[0002] Bad weather, such as heavy rain, haze, and heavy snow, seriously reduces the quality of images and directly affects the performance of downstream visual tasks. Therefore, image restoration, as the underlying task of computer vision, has received widespread attention from scholars. At present, image restoration models for a single known degradation type are mainly divided into independent models and unified models. Among them, the former requires the design of a corresponding network structure for each degradation type; the latter achieves the restoration of multiple degradation types of images by establishing a unified network structure. Although it reduces the redundancy of training, the network can only handle one type of degradation at a time. Due to the complexity and diversity of degradation factors under unknown bad weather conditions, the above image restoration model that is only applicable to a single degradation type is difficult to effectively restore the image. Therefore, some researchers relax the prior assumptions about the degradation type and use the blind source image decomposition method or conditional diffusion model to construct an image restoration method based on mixed degradation types to further improve the quality of the restored image.
[0003] Existing methods rely heavily on prior estimates of degradation types, and their restoration performance will degrade when faced with scenes with unknown degradation types. Although methods based on blind source image decomposition attempt to use multiple decoders to decompose various degradation factors and further restore the image, this method relies on accurate estimation of the degradation mask, otherwise it will affect the effectiveness of the image restoration task. Although methods based on conditional diffusion models can achieve higher resolution image restoration, due to the strong generation ability of the diffusion model, new content that is unrelated to the original image may be generated, especially when dealing with severely degraded images, which usually leads to loss of texture and detail information. In addition, relying solely on degraded images as conditions for the diffusion model may not provide sufficient guidance.
[0004] Therefore, there is an urgent need to design an image restoration method for mixed degradation, which can still achieve robust and accurate image restoration performance when the degradation type is unknown and complex and diverse. Summary of the invention
[0005] In view of this, the present invention provides a mixed degraded image restoration method based on a joint conditional diffusion model, which can achieve robust and accurate image restoration performance even when the degradation type is unknown and complex and diverse.
[0006] To achieve the above-mentioned purpose, the technical solution of the present invention includes a pre-restoration stage based on a joint conditional diffusion model and a fine-tuning restoration stage based on an uncertainty estimation network;
[0007] The pre-recovery phase includes the following steps:
[0008] A1: Degraded images are randomly generated through a unified physical degradation model based on the atmospheric scattering model.
[0009] A2: Use the degradation mask prediction network to predict the degradation mask of the image to obtain a predicted mask.
[0010] A3: The degraded image and the predicted mask are concatenated channel by channel, which serves as the joint condition of the diffusion model to guide the image denoising process. By setting the total number of iterations, the denoising process is iteratively executed to obtain a preliminarily restored image.
[0011] The fine-tuning recovery phase includes the following steps:
[0012] The image details are restored by fine-tuning the network, and the accidental uncertainty and cognitive uncertainty of the preliminary restored image are calculated using the uncertainty estimation network. The uncertainty is further used to enhance the representation of the features in the fine-tuning network. After feature enhancement, the final restored image is obtained.
[0013] Furthermore, A1 is specifically:
[0014] The unified physical degradation model based on the atmospheric scattering model is:
[0015] I(x)=ζ n (τ(J(x),t(x)),M(x))
[0016] Where M(x) represents the binary mask of physical degradation caused by weather type, x represents pixel, t(x) represents transmittance; N = 0, 1, 2, 3 represents the number of degradation types; function and τ(·,·) function and τ(·,·) combine the input image with the global atmospheric light A, specifically as follows:
[0017]
[0018] τ(a,b)=a⊙b+A⊙(1-b)
[0019] Where a and b are the input images.
[0020] Furthermore, M(x) contains the binary mask M corresponding to the snow position r (x), the binary mask M corresponding to the position of the raindrop d (x) and the binary mask M corresponding to the rain line s (x).
[0021] Furthermore, the degradation mask of the image is predicted using the degradation mask prediction network to obtain a degraded binary mask. The degradation mask prediction network consists of 3 CBR blocks, 2 1×1 convolution blocks, 6 ResBlock blocks, 1 DCBR block and 1 Sigmoid block.
[0022] The three CBR blocks are CBR#1, CBR#2 and CBR#3; the CBR block is composed of a convolutional layer, a batch normalization layer and an activation function layer connected in sequence.
[0023] The two 1×1 convolution blocks are 1×1 convolution block #1 and 1×1 convolution block #2.
[0024] The 6 ResBlock blocks are ResBlock#1 to ResBlock#6. The ResBlock block contains a three-layer structure with three repeated connections and an adder, where the input of the adder is the output of the last three-layer structure and the original input. The three-layer structure consists of a batch normalization layer, an activation function layer, and a convolution layer.
[0025] The DCBR block consists of a deconvolution layer, a batch normalization layer, and an activation function layer connected sequentially.
[0026] Among them, CBR#1, CBR#2, 1×1 convolution block #1, ResBlock1~ResBlock6, 1×1 convolution block #2, CBR#3, DCBR, and Sigmoid block are linked in sequence to form a degradation mask prediction network.
[0027] Furthermore, the specific process of A3 is as follows:
[0028] The degraded image and the degraded binary mask are channel-concatenated and input into the joint degradation condition diffusion model as a joint condition, wherein the diffusion model includes a forward process and a reverse process.
[0029] The forward process is the diffusion process, which is a fixed Markov chain. 1 ,...,β T Gradually add noise to corrupt the initial image J(x), where the initial data distribution can be regarded as J 0 ~q(J 0 ), after adding noise T times, the data distribution J T ~q(J T ) is approximately normally distributed, and the forward diffusion process is modeled as:
[0030]
[0031]
[0032] where β1 ,...,β T are the noise variances from time 1 to time T, J 0 ~J T are the data distributions from time 0 to time T, I is the standard vector, q(J t |J t-1 ) is the probability function, J 1:T is the combination of all data distributions from time 1 to T, and N(;) is a normal distribution.
[0033] For the forward process, for any hidden variable J 1 ,...,J T Perform closed sampling, that is, by using α t =1-β t and The forward diffusion process modeling is deformed, and the known initial image J 0 The image at any time t is modeled as:
[0034]
[0035] The reverse process is the denoising process. According to the prior q(J T )=N(J T ; 0,I) gradually denoise, thereby restoring the desired data distribution of the disturbed image; joint distribution p θ (J 0:T ) is expressed in mathematical model as follows:
[0036]
[0037] p θ (J t-1 |J t )=N(J t-1 ;μ θ (J t ,t),Σ θ (J t ,t));
[0038] The joint conditional degraded image I(x) and the predicted mask m(x) are introduced into the learning model, and the conditional denoising process is converted as follows:
[0039]
[0040] In order to guide the conditional denoising process to transition to the expected output, the training process optimizes the function approximator ∈ θ (J t ,I(x),m(x),t), and the mean μ is obtained by this approximator. θ , and apply stochastic gradient descent to adjust ∈ θ; The training objective function L of the denoising process is as follows:
[0041]
[0042] Where E represents the expectation, ∈ θ Represents the neural network Unet for noise prediction, and the predicted noise label is ∈ t , so the reverse process is cycled step by step, and we can get the image J at time t t Estimate the image J at time t-1 t-1 , which is derived from the following Bayesian formula:
[0043]
[0044] After gradual denoising, the preliminary restored image is obtained.
[0045] Furthermore, fine-tune the recovery phase, specifically:
[0046] The fine-tuning network is used to restore the image details, and the uncertainty estimation network is introduced to model the two types of noise. First, the input features are transmitted to two different branches including the top branch and the bottom branch after passing through the convolution layer. On the one hand, the top branch further processes the feature mapping through an additional convolution layer and a Sigmoid activation function layer, which is responsible for estimating the accidental uncertainty U A On the other hand, the bottom branch includes multiple sampling of the input features; in each sampling, a certain proportion of channels are randomly masked; the sampling results of each branch pass through a shared convolutional layer and a Tanh activation function, and then the average prediction is obtained by averaging these results as the recovery result J a (x); epistemic uncertainty U E Then, by calculating the variance, the prediction uncertainty of each pixel is approximately obtained by adding the accidental uncertainty and the epistemic uncertainty: U≈U A +U E .
[0047] Then, the uncertainty estimation network is used to enhance the extracted features. Specifically, assuming that in the feature extraction stage of the i-th scale of the fine-tuning network, the input feature is recorded as The extracted features are recorded as The uncertainty map of the input feature is estimated using the uncertainty estimation network as U i .
[0048] Then the enhanced feature of the i-th scale is It is expressed as:
[0049]
[0050] After feature enhancement, the final restored image J is obtained f (x).
[0051] Furthermore, training is performed for the pre-restoration stage and the fine-tuning restoration stage, and the total loss function of the training stage is set as follows:
[0052] Use the mean variance loss function L 1 Compare the clear image J(x) and the restored image J f (x) Difference in pixel space, reconstruction loss Defined as:
[0053] Uncertainty-aware loss in fine-tuning recovery phase It is expressed as: Among them J a (x) is the approximate recovery result, It is formed in the uncertain estimation process and is expressed as: Where N is the number of pixels, and α and β are weight factors.
[0054] M is the total number of scales, μ x , μ y and σ x , σ y are the mean and standard deviation of X and Y respectively, and the parameter β m and γ m Indicates the relative importance of the two components in each scale. In addition, C 1 and C 2 are two constants.
[0055] By combining the reconstruction loss and uncertainty perception loss The total loss function during the training phase is expressed as: λ is the corresponding coefficient.
[0056] Beneficial effects:
[0057] 1. The present invention provides a mixed degraded image restoration method based on a joint conditional diffusion model, which is a two-stage mixed degraded image restoration method, including a pre-restoration stage based on a joint conditional diffusion model and a fine-tuning restoration stage based on an uncertainty estimation network. Based on the physical atmospheric scattering model, a mixed weather degradation model is established, which can be used as a basic model for generating mixed weather degradation. In the preliminary restoration stage, a joint conditional diffusion model based on physical constraints is constructed, which introduces degraded images and degradation masks as conditions to guide the image restoration process. In the fine-tuning restoration stage, an uncertainty estimation module is used to enhance the restoration of image color and details. Compared with image restoration methods for a single known degradation type, this method does not need to make a priori assumptions about the degradation type; and compared with the blind source image decomposition method, this method does not need to explicitly identify or separate a single degradation factor, which effectively solves the image restoration problem when the degradation type is unknown and mixed and diverse.
[0058] 2. Compared with the image restoration method constructed using the conditional diffusion model, this method introduces physical constraints as joint conditions to guide and enhance the restoration process. By introducing the degraded binary mask, the diffusion model can pay more attention to the specific degraded areas of the image, significantly improving the performance of image restoration. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a framework diagram of a mixed degraded image restoration method based on a joint conditional diffusion model;
[0060] Figure 2 Network structure diagram for degradation mask prediction;
[0061] Figure 3 Network structure diagram for uncertainty estimation. DETAILED DESCRIPTION
[0062] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0063] The present invention provides an image restoration method for mixed degradation, which can still achieve robust and accurate image restoration performance when the degradation type is unknown and complex. The specific method framework is as follows Figure 1 shown.
[0064] The hybrid degraded image restoration method of the present invention mainly includes two stages: a pre-restoration stage based on a joint conditional diffusion model and a fine-tuning restoration stage based on an uncertainty estimation network.
[0065] In the pre-restoration stage, first, a degraded image is randomly generated through a unified physical degradation model based on an atmospheric scattering model. Secondly, the degradation mask of the image is predicted using a degradation mask prediction network to obtain a degraded binary mask. Next, the degraded image and the predicted mask are channel-joined, which serves as a joint condition of the diffusion model to guide the image denoising process. Finally, by setting the total number of iterations, the noise is gradually removed with each step, and the image after preliminary restoration is obtained.
[0066] In the fine-tuning restoration stage, the fine-tuning network is used to restore more details of the image to obtain the final restored image. The uncertainty estimation network is used to calculate the accidental uncertainty and cognitive uncertainty of the initial restored image, and the uncertainty is further used to enhance the representation of features in the fine-tuning network.
[0067] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with specific implementation cases.
[0068] The pre-recovery phase includes the following steps:
[0069] Step A1: Under severe weather conditions, captured images may be corrupted by various types of degradation. For example, rainstorm images may contain rain lines, raindrops, and mist caused by the rain curtain effect. However, existing studies widely use a single type of physical degradation model, which is difficult to characterize multiple weather types. Therefore, it is necessary to construct a unified physical degradation model based on the atmospheric scattering model to provide a more realistic dataset for model training.
[0070] Among them, the commonly used rain line image model is an additive composite model, which can be expressed as follows:
[0071]
[0072] Where I(x) represents the observed degraded image, and J(x) is the corresponding clear image. t Indicates rain line layers with the same stripe direction. The index t indicates the number of rain line layers, and s indicates the maximum number of rain line layers.
[0073] The common raindrop image model can be expressed by the following formula:
[0074] I(x)=J(x)⊙(1-M d (x))+R(x) (2)
[0075] Where ⊙ represents the element-by-element product, M d (x) is a binary mask, indicating the location of the raindrop. In the mask, M d(x) = 1 indicates that pixel x is part of the snow region, otherwise it is part of the background region. R(x) represents the blurred pixels formed by the light reflected by the raindrops from the environment.
[0076] Images captured when snowing are often expressed in the following formula:
[0077] I(x)=J(x)⊙(1-M s (x))+A⊙M s (x) (3)
[0078] Where M s (x) is a binary mask indicating the location of snow, and A represents the global atmospheric light value.
[0079] Based on the atmospheric scattering theory, the mathematical modeling of haze images is as follows:
[0080] I(x)=J(x)⊙t(x)+A⊙(1-t(x)) (4)
[0081] t(x)=e -βd(x) (5)
[0082] Where t(x) represents the transmittance, which is exponentially related to the scene depth d(x) and the scattering coefficient β reflecting the haze density.
[0083] According to the atmospheric scattering model, the atmospheric light value will decrease accordingly under severe weather conditions. Therefore, we can further reconstruct the rainfall degradation model.
[0084] For the rain line image model, a binary mask M is used r (x) is used to represent the rain line, then equation (1) can be further modeled as:
[0085] I(x)=J(x)⊙(1-M r (x))+A⊙M r (x) (6)
[0086] For the raindrop image model, R(x) can be further expressed as R(x) = A⊙M d (x). Then formula (2) can be further modeled as:
[0087] I(x)=J(x)⊙(1-M d (x))+A⊙M d (x) (7)
[0088] Therefore, the physical degradation model of random mixed multiple degradation can be expressed as:
[0089]
[0090] Where M(x) represents the binary mask of physical degradation, including M r (x), M d (x) and M s (x), t(x) represents the transmittance. N = 0, 1, 2, 3 represents the number of degradation types. Function and τ(·,·) are functions defined as:
[0091]
[0092] τ(a,b)=a⊙b+A⊙(1-b) (10)
[0093] Where a and b are the input images, and the function combines them with the global atmospheric light A.
[0094] Based on the constructed unified physical degradation model, for a given clear image, the generated degraded image can be obtained by randomly combining it with the degraded elements.
[0095] Step A2: Perform mask prediction on the degraded image generated by A1 to generate a prediction mask to provide physical constraints for the conditional diffusion model to indicate the degraded area of the image. The degradation mask prediction network structure is shown in the figure Figure 2 shown.
[0096] Step A3: Concatenate the channels of the degraded image generated by A1 and the mask image predicted by A2, and input them into the joint degradation condition diffusion model as joint conditions. The diffusion model mainly includes the forward process and the reverse process.
[0097] The forward process is the diffusion process, which can be regarded as a fixed Markov chain. 1 ,...,β T Gradually add noise to destroy the initial image J(x). The initial data distribution can be regarded as J 0 ~q(J 0 ). After adding noise T times, the data distribution J T ~q(J T ) is approximately normally distributed, and the forward diffusion process can be modeled as:
[0098]
[0099]
[0100] For the forward process, it is worth noting that any hidden variable J can be 1 ,...,J T Perform closed sampling, that is, by using α t =1-β t and By transforming equations (11) and (12), we can 0 The image at any time t is modeled as:
[0101]
[0102] The reverse process is the denoising process, which can be done based on the prior q(J T )=N(J T ; 0,I) gradually denoises, thereby restoring the desired data distribution of the disturbed image. Since it is difficult to estimate q(J t-1 |J t ), generally using a learning model with KL divergence p θ To approximate the conditional probability, we construct a neural network Unet model with parameterized θ to approximate the joint distribution p θ (J 0:T ) can be expressed by mathematical model as follows:
[0103]
[0104] p θ (J t-1 |J t )=N(J t-1 ;μ θ (J t ,t),Σ θ (J t ,t)) (15)
[0105] Furthermore, the joint conditional degraded image I(x) and the predicted mask m(x) are introduced into the learning model to retain more features of the degraded image I(x) and use the information of the predicted mask m(x) to better remove weather interference. The conditional denoising process obtained by transforming formula (14) is:
[0106]
[0107] In order to guide the conditional denoising process to transition to the expected output, the training process optimizes the function approximator ∈ θ (J t ,I(x),m(x),t), through which the mean μ can be obtained θ , and apply stochastic gradient descent to adjust ∈ θ The training objective function of the denoising process is as follows:
[0108]
[0109] Where E represents expectation, ∈ θ Represents the neural network Unet for noise prediction, and the predicted noise label is ∈t In this way, the reverse process is cycled step by step, and the image J at time t can be obtained. t Estimate the image J at time t-1 t-1 , which is derived from the following Bayesian formula:
[0110]
[0111] After gradual denoising, a preliminarily restored image can be obtained.
[0112] After the pre-recovery phase, the fine-tuning recovery phase begins. The fine-tuning recovery phase specifically performs the following steps:
[0113] The fine-tuning network is used to restore more color and texture details of the image. In the embodiment of the present invention, the fine-tuning network adopts a deep learning model. Since there are cognitive uncertainty and accidental uncertainty in the deep learning model, the former describes the uncertainty of model prediction, while the latter is related to the inherent noise in the observation, an uncertainty estimation network is introduced to model these two types of noise. Its structure diagram is shown in FIG. Figure 3 As shown in Figure 1, the input features are first transmitted to two different branches after passing through the convolution layer. On the one hand, the top branch further processes the feature mapping through an additional convolution layer and a Sigmoid activation function layer, which is responsible for estimating the accidental uncertainty U A On the other hand, the bottom branch consists of sampling the input features multiple times. In each sampling, we randomly mask a certain proportion of the channels. This random masking process introduces diversity and helps capture different potential representations of the input. After the sampling results of each branch pass through a shared convolutional layer and a Tanh activation function, the average prediction is obtained by averaging these results as the approximate recovery result J a (x). And epistemic uncertainty U E Then, by calculating the variance, the prediction uncertainty of each pixel can be approximated by adding the accidental uncertainty and the epistemic uncertainty:
[0114] U≈U A +U E (19)
[0115] Figure 3 Uncertainty estimation network structure diagram.
[0116] Then, the uncertainty estimation network is used to enhance the extracted features. Specifically, assuming that in the feature extraction stage of the i-th scale of the fine-tuning network, the input feature is recorded as The extracted features are recorded as The uncertainty map of the input feature is estimated using the uncertainty estimation network as U i . Then the enhanced feature of the i-th scale is It can be expressed as:
[0117]
[0118] After feature enhancement, the final restored image J is obtained f (x). And the fine-tuning network can reduce the uncertainty of the image, thereby improving the quality of the restored image.
[0119] Use the mean variance loss function L 1 Compare the clear image J(x) and the restored image J f (x) Difference in pixel space, reconstruction loss It can be defined as:
[0120]
[0121] In addition, the uncertainty-aware loss in the fine-tuning recovery phase It can be expressed as:
[0122]
[0123] Where J a (x) is the approximate recovery result, It is formed in the uncertain estimation process and can be expressed as:
[0124]
[0125] Where N is the number of pixels, and α and β are weight factors.
[0126] In formula (6), M is the total number of scales, μ x , μ y and σ x , σ y are the mean and standard deviation of X and Y respectively. Parameter β m and γ m Indicates the relative importance of the two components in each scale. In addition, C 1 and C 2 are two constants to avoid division by zero instability.
[0127] By combining the reconstruction loss and uncertainty perception loss The total loss function during the training phase can be expressed as:
[0128]
[0129] Among them, λ is the corresponding coefficient.
[0130] Comparing the image restoration effects achieved by this method and other methods on different degraded data sets, it can be seen that the model of this method can make full use of physical conditions to constrain the generation process, and pay more attention to specific degraded areas of the image during training, reducing the distortion of image information, and thus obtaining higher quality restored images.
[0131] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A hybrid degraded image restoration method based on a joint conditional diffusion model. It is characterized in that It includes a pre-restoration stage based on a joint conditional diffusion model and a fine-tuning restoration stage based on an uncertainty estimation network; The pre-recovery stage includes the following steps: A1: Randomly generate degraded images through a unified physical degradation model based on the atmospheric scattering model; A2: Use the degradation mask prediction network to predict the degradation mask of the image and obtain the predicted mask; A3: performing channel splicing on the degraded image and the prediction mask, which is used as a joint condition of the diffusion model to guide the denoising process of the image, and iteratively executing the denoising process by setting the total number of iteration steps to obtain a preliminarily restored image; The fine-tuning recovery phase includes the following steps: The image details are restored by fine-tuning the network, and the accidental uncertainty and cognitive uncertainty of the preliminary restored image are calculated using the uncertainty estimation network. The features in the fine-tuning network are further characterized using uncertainty enhancement. After feature enhancement, the final restored image is obtained.
2. The mixed degraded image restoration method based on the joint conditional diffusion model as claimed in claim 1, It is characterized in that The A1 is specifically: The unified physical degradation model based on the atmospheric scattering model is: Where M(x) represents the binary mask of physical degradation caused by weather type, x represents pixel, t(x) represents transmittance; N = 0, 1, 2, 3 represents the number of degradation types; function and τ(·,·) function and τ(·,·) combine the input image with the global atmospheric light A, specifically as follows: τ(a,b)=a⊙b+A⊙(1-b) Where a and b are the input images.
3. The mixed degraded image restoration method based on the joint conditional diffusion model as claimed in claim 1, It is characterized in that The M(x) contains the binary mask M corresponding to the snow position r (x), the binary mask M corresponding to the position of the raindrop d (x) and the binary mask M corresponding to the rain line s (x).
4. The mixed degraded image restoration method based on the joint conditional diffusion model as claimed in claim 1, It is characterized in that The degradation mask of the image is predicted by using a degradation mask prediction network to obtain a degradation binary mask, wherein the degradation mask prediction network consists of 3 CBR blocks, 2 1×1 convolution blocks, 6 ResBlock blocks, 1 DCBR block and 1 Sigmoid block; The three CBR blocks are CBR#1, CBR#2 and CBR#3. The CBR block is composed of a convolutional layer, a batch normalization layer and an activation function layer connected in sequence. The two 1×1 convolution blocks are 1×1 convolution block #1 and 1×1 convolution block #2; The 6 ResBlock blocks are ResBlock#1 to ResBlock#6; the ResBlock block includes a three-layer structure with three repeated connections and an adder, wherein the input of the adder is the output of the last three-layer structure and the original input, and the three-layer structure consists of a batch normalization layer, an activation function layer, and a convolution layer; The DCBR block consists of a deconvolution layer, a batch normalization layer, and an activation function layer connected sequentially; Among them, CBR#1, CBR#2, 1×1 convolution block #1, ResBlock1~ResBlock6, 1×1 convolution block #2, CBR#3, DCBR, and Sigmoid block are linked in sequence to form the degradation mask prediction network.
5. The mixed degraded image restoration method based on the joint conditional diffusion model according to any one of claims 1 to 4, It is characterized in that The specific process of A3 is as follows: The degraded image and the degraded binary mask are concatenated and input into the joint degradation condition diffusion model as joint conditions, wherein the diffusion model includes a forward process and a reverse process; The forward process is the diffusion process, which is a fixed Markov chain. 1 ,...,β T Gradually add noise to corrupt the initial image J(x), where the initial data distribution can be regarded as J 0 ~q(J 0 ), after adding noise T times, the data distribution J T ~q(J T ) is approximately normally distributed, and the forward diffusion process is modeled as: where β 1 ,...,β T are the noise variances from time 1 to time T, J 0 ~J T are the data distributions from time 0 to time T, I is the standard vector, q(J t |J t-1 ) is the probability function, J 1:T is the combination of all data distributions from time 1 to T, N(;) is a normal distribution; For the forward process, for any hidden variable J 1 ,...,J T Perform closed sampling, that is, by using α t =1-β t and The forward diffusion process modeling is deformed, and the known initial image J 0 The image at any time t is modeled as: The reverse process is the denoising process. According to the prior q(J T )=N(J T ; 0,I) gradually denoise, thereby restoring the desired data distribution of the disturbed image; joint distribution p θ (J 0:T ) is expressed in mathematical model as follows: p θ (J t-1 |J t )=N(J t-1 ;μ θ (J t ,t),Σ θ (J t ,t)); The joint conditional degraded image I(x) and the predicted mask m(x) are introduced into the learning model, and the conditional denoising process is converted as follows: In order to guide the conditional denoising process to transition to the expected output, the training process optimizes the function approximator ∈ θ (J t ,I(x),m(x),t), and the mean μ is obtained by this approximator. θ , and apply stochastic gradient descent to adjust ∈ θ ; The training objective function L of the denoising process is as follows: Where E represents the expectation, ∈ θ Represents the neural network Unet for noise prediction, and the predicted noise label is ∈ t , so the reverse process is cycled step by step, and we can get the image J at time t t Estimate the image J at time t-1 t-1 , which is derived from the following Bayesian formula: After gradual denoising, the preliminary restored image is obtained.
6. The mixed degraded image restoration method based on the joint conditional diffusion model as claimed in claim 5, It is characterized in that The fine-tuning and restoration stage is specifically as follows: The fine-tuning network is used to restore the image details, and the uncertainty estimation network is introduced to model the two types of noise. First, the input features are transmitted to two different branches including the top branch and the bottom branch after passing through the convolution layer. On the one hand, the top branch further processes the feature mapping through an additional convolution layer and a Sigmoid activation function layer, which is responsible for estimating the accidental uncertainty U A ;On the other hand, the bottom branch involves multiple sampling of the input features; In each sampling, a certain proportion of channels are randomly blocked; the sampling results of each branch pass through a shared convolutional layer and a Tanh activation function, and then the average of these results is taken to obtain the average prediction as the recovery result J a (x); epistemic uncertainty U E Then, by calculating the variance, the prediction uncertainty of each pixel is approximately obtained by adding the accidental uncertainty and the epistemic uncertainty: U≈U A +U E ; Then, the uncertainty estimation network is used to enhance the extracted features. Specifically, assuming that in the feature extraction stage of the i-th scale of the fine-tuning network, the input feature is recorded as The extracted features are recorded as The uncertainty map of the input feature is estimated using the uncertainty estimation network as U i ; Then the enhanced feature of the i-th scale is It is expressed as: After feature enhancement, the final restored image J is obtained f (x).
7. The mixed degraded image restoration method based on the joint conditional diffusion model as claimed in claim 6, It is characterized in that For the pre-restoration stage and the fine-tuning restoration stage, the total loss function of the training stage is set as follows: Use the mean variance loss function L 1 Compare the clear image J(x) and the restored image J f (x) Difference in pixel space, reconstruction loss Defined as: Uncertainty-aware loss in fine-tuning recovery phase It is expressed as: Among them J a (x) is the approximate recovery result, It is formed in the uncertain estimation process and is expressed as: Where N is the number of pixels, α and β are weight factors; M is the total number of scales, μ x , μ y and σ x , σ y are the mean and standard deviation of X and Y respectively, and the parameter β m and γ m Indicates the relative importance of the two components in each scale. In addition, C 1 and C 2 are two constants; By combining the reconstruction loss and uncertainty perception loss The total loss function during the training phase is expressed as: λ is the corresponding coefficient.
Citation Information
Cited By
Multi-degraded image restoration method based on self-adaptive prompt
CN119515734A
Model training method, image recognition method, equipment and storage medium
CN119723235A
Multi-restoration task unification method based on granularity perception image degradation estimation
CN119741223A
DiT condition guidance-based multi-label weather image data expansion method
CN120219873A
Infrared-guided image restoration method under interference of non-uniform scattering medium
CN120765508A
