Universal multi-weather degraded image restoration method

By using the denoising diffusion probability model and interleaved stacked DiT blocks in multi-weather degraded image restoration, combined with the cascade context fusion attention mechanism, the problem of insufficient generalization ability and clarity in the existing technology is solved, and the problem of different Efficient restoration of dimensional and degraded form images.

CN118644424AActive Publication Date: 2024-09-13HENAN UNIVERSITY OF TECHNOLOGY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410738948.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-13
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing general-purpose multi-weather-degraded image restoration methods based on DDPM have deficiencies in generalization capabilities and image clarity, especially when dealing with weather-degraded images of different sizes and degradation forms.

Method used

Using a denoising diffusion probability model, multiple image blocks are obtained by segmenting the image to be processed, and multiple interleaved and stacked basic DiT blocks and optimized DiT blocks are used for noise estimation, combined with the cascade context fusion attention mechanism to generate and react Sampling implicitly to recover the image.

Benefits of technology

Significantly improves the generalization ability of the model, can effectively handle weather degradation images of any size, generate high-definition restored images, and enhances the capture of global and local features through the cascade context fusion attention mechanism, improving the performance of various weather conditions. Restoration performance of degraded images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644424A
    Figure CN118644424A
Patent Text Reader

Abstract

A universal multi-weather degraded image restoration method comprises the steps that a weather degraded image to be processed is segmented to obtain a plurality of image blocks, and an overlapping area exists between every two adjacent image blocks; forward diffusion is carried out by adding noise to the image block for multiple times, and a noise block is obtained; taking the existing weather degradation image as a condition, and inputting the existing weather degradation image and the reverse time step into the noise estimation network; generating an estimated noise corresponding to the noise block using a noise estimation network, and calculating an average estimated noise based on the estimated noise of the overlapping region; smoothing the average estimation noise, and performing reverse implicit sampling on the noise block based on the smoothed average estimation noise; and the noise block is subjected to multiple times of reverse implicit sampling to obtain a recovery block which is recombined, and a recovered weather degradation image is obtained. The universal multi-weather degraded image restoration method provided by the invention is strong in generalization ability, and the restored image is good in definition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of weather-degraded image restoration, and in particular to a universal multi-weather-degraded image restoration method. Background Art

[0002] Rainy weather can cause serious interference to camera imaging, resulting in adverse factors such as rain fog and rain streaks in the image, which can significantly reduce the performance of subsequent high-level visual tasks. Therefore, image deraining and image dehazing are important tasks in the field of image processing and computer vision.

[0003] For the image deraining task, existing methods can be divided into two basic categories, traditional methods and deep learning-based methods. Traditional methods include methods based on filters, priors, and models. However, traditional methods are not capable of handling complex backgrounds, and they rely heavily on manual design, with insufficient overall efficiency and versatility. Deep learning-based methods are significantly better than traditional methods in performance. The models they generate have excellent image background modeling capabilities, with less manual involvement, and the overall efficiency has been greatly improved.

[0004] For the problem of multi-weather degraded image restoration, deep learning-based methods can currently be roughly divided into three main categories: specialized, integrated, and general. Specialized methods tailor unique network structures for different tasks, resulting in different model architectures and parameters, which are difficult to cope with the restoration of various weather-degraded images. Integrated methods provide a unified network framework for various tasks. Although the model structures are similar, there are differences in parameter settings, so the restoration effect is still poor. General methods build image restoration networks that can adapt to various severe weather conditions based on the commonalities of various weather deterioration conditions. Compared with specialized and integrated methods, they can be applied to the restoration of various weather-degraded images.

[0005] In the prior art, the generative models used by the more mainstream general methods mainly include generative adversarial networks (GANs), variational autoencoders, flow-based models, and denoising diffusion probability models (DDPMs). Among them, GANs have the defects of unstable training and mode collapse; the samples generated by VAEs are of low quality and may be blurred and distorted; both flow-based models and diffusion models map data distribution to Gaussian noise, but flow-based models map in a certain way by learning a reversible and differentiable function, resulting in additional constraints on the network structure; DDPM has a learnable forward and reverse process, so its training is relatively more stable and has better scalability.

[0006] However, in the existing general-purpose multi-weather degraded image restoration methods based on DDPM, the noise estimation network mostly adopts the U-net architecture with CNN as the core. In practical applications, it is found that there are still many shortcomings, mainly manifested in poor generalization ability. When restoring weather-degraded images of various sizes and degradation forms, the performance is very limited. Summary of the invention

[0007] In order to solve the deficiencies in the prior art, the present invention provides a universal multi-weather degraded image restoration method with strong generalization ability and good clarity of the restored image.

[0008] In order to achieve the above object, the specific scheme adopted by the present invention is:

[0009] A general multi-weather degraded image restoration method comprises the following steps: The weather-degraded image to be processed is segmented to obtain a plurality of image blocks, and there is an overlapping area between two adjacent image blocks; By adding noise to the image block multiple times for forward diffusion, a noise block is obtained; The existing weather-degraded image is used as a condition and is input into the noise estimation network together with the reverse time step. The noise estimation network includes multiple basic DiT blocks and optimized DiT blocks stacked in an interlaced manner. The optimized DiT block is obtained by introducing cascaded context fusion attention based on the basic DiT block. generating estimated noise corresponding to the noise block using a noise estimation network, and calculating an average estimated noise based on the estimated noise of the overlapping area; Smoothing the average estimated noise, and performing reverse implicit sampling on the noise block based on the smoothed average estimated noise; The restored blocks obtained after multiple reverse implicit sampling of the noise blocks are reassembled to obtain the restored weather-degraded image.

[0010] As a further optimization of the above-mentioned general multi-weather degraded image restoration method: a specific method of segmenting the weather-degraded image to be processed to obtain multiple image blocks includes: Taking one of the vertices of the weather-degraded image to be processed as the starting point, a grid with a size of r×r is determined; The grid is gradually moved with r as the action step until the weather-degraded image to be processed is decomposed into multiple grids; The weather-degraded image to be processed is segmented based on grids to form a plurality of image blocks, and there is at least one overlapping grid between two adjacent image blocks.

[0011] As a further optimization of the above-mentioned general multi-weather degraded image restoration method: the method of adding noise to the image block multiple times is: Among them, x0 is the image block, t is the forward time step, α t is a predefined noise sequence, and ò is the noise sampled from a standard normal distribution.

[0012] As a further optimization of the above-mentioned general multi-weather degraded image restoration method: the specific method of generating estimated noise using the noise estimation network includes: The existing weather-degraded images used as conditions are converted into Token vectors of number T and dimension D. The size of the Token vector is N×T×D, where N is the batch size, D is the length of the Token vector, and T = (H×W) / p 2 , p is a hyperparameter; embed the reverse time step t' into all Tokens; The basic DiT block and the optimized DiT block are used to process the tokens one by one to generate estimated noise.

[0013] As a further optimization of the above-mentioned general multi-weather degraded image restoration method: the generation method of the optimized DiT block includes: The attention heads of the multi-head self-attention block in the basic DiT block are divided into multiple groups, and the multiple groups of attention heads are distributed sequentially; Introduce a contextual attention mechanism between two adjacent groups of attention heads; Based on the contextual attention mechanism, multiple groups of attention heads are cascaded to obtain a cascaded contextual fusion attention block; The optimized DiT block is obtained by replacing the multi-head self-attention block in the basic DiT block with the cascaded context fusion attention block.

[0014] As a further optimization of the above general multi-weather degraded image restoration method: the operation process of the cascaded context fusion attention block includes: Split the input feature X in tensor form into H feature heads in the feature dimension Feats_in=split(X,H)∈R H×B×N×(D / H) ,in N is the batch size, T is the sequence length, and D is the feature dimension; Perform CFA operation and cascade operation on each feature head i Feat i =CFA(Feat i ); Reassemble the feature heads after operation X_out=concat(Feat0,Feat1,...,Feat H-1)∈R N×T×D ; Fusion of all reassembled feature heads X-out=Fusion(X-out)∈R N×T×D .

[0015] As a further optimization of the above-mentioned general multi-weather degraded image restoration method: the specific process of CFA operation includes: Accepts input data in the form of tensors Where B is the batch size, N is the sequence length, and C is the feature dimension; Calculate Query (Q), Key matrix K1, and Value (V), and the calculation results are all in matrix form: Concatenate K1 with the input tensor X on the feature dimension: Fuse the concatenated matrix Y1 to the original dimension: Calculate the attention weights: Calculate the new Key matrix K2: Compute the output matrix:

[0016] As a further optimization of the above-mentioned general multi-weather degraded image restoration method: a specific method for calculating the average estimated noise based on the estimated noise of the overlapping area includes: Construct a matrix of the same size as the weather-degraded image to be processed, and superimpose the estimated noise corresponding to the pixels in the overlapping area as elements; Calculate the cumulative sum of all matrices to get The number of estimated noises corresponding to the pixels in each overlapping area is Normalization is performed to obtain the average estimated noise.

[0017] Beneficial effects: The present invention is based on a denoising diffusion probability model, and uses existing weather-degraded images as conditions to guide the expansion and reverse sampling process to generate a clear background image; by dividing the image blocks, the present invention can meet the restoration needs of weather-degraded images of any size, and improves the generalization ability; by introducing cascaded context fusion attention in a cascade manner to calculate the context fusion attention mechanism of different heads, it can fully capture global and local feature information, and further improve the generalization ability of the model on various weather-degraded images. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is an overall schematic diagram of the present invention; Figure 2 It is a schematic diagram of the structure of the noise estimation network; Figure 3 This is a schematic diagram of the Token generation process; Figure 4 It is a schematic diagram of the generation method of the optimized DiT block; Figure 5 This is a schematic diagram of the CFA calculation process. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] See also Figure 1 and 2 A general multi-weather degraded image restoration method is based on Denoising Diffusion Probabilistic Models (DDPM) and realizes the restoration of weather-degraded images through forward diffusion and reverse sampling. The specific process includes S1 to S6.

[0021] S1. Segment the weather-degraded image to be processed to obtain a plurality of image blocks, and there are overlapping areas between two adjacent image blocks.

[0022] In S1 , the specific method of segmenting the weather-degraded image to be processed to obtain a plurality of image blocks includes S11 to S13 .

[0023] S11, taking one of the vertices of the weather-degraded image to be processed as a starting point, determining a grid of size r×r. In this embodiment, preferably, the upper left corner vertex of the weather-degraded image is taken as the starting point.

[0024] S12, gradually moving the grid with r as the action step length until the weather-degraded image to be processed is decomposed into multiple grids.

[0025] S13, segmenting the weather-degraded image to be processed based on grids to form a plurality of image blocks, wherein at least one overlapping grid exists between two adjacent image blocks. The size of the image block is denoted as c×c, and r<c.

[0026] Through S1, any size of the weather-degraded image to be processed can be segmented into image blocks of the same size for subsequent processing, thereby effectively improving the generalization ability of the present invention.

[0027] S2. Add noise to the image block multiple times for forward diffusion to obtain a noise block. The method of adding noise to the image block multiple times is: Among them, x0 is the image block, t is the forward time step, α t is a predefined noise sequence, and ò is the noise sampled from a standard normal distribution.

[0028] S3. The existing weather-degraded image is used as a condition and is input into the noise estimation network together with the reverse time step. The noise estimation network includes multiple basic DiT blocks and optimized DiT blocks that are stacked in an interlaced manner. The optimized DiT block is obtained by introducing cascaded context fusion attention based on the basic DiT block.

[0029] The basic DiT block mainly includes modules such as Multi-Head Self-Attention, Layer Normalization, Residual Connection, Pointwise Feedforward and Adaptive layer norm (adaLN-Zero). Among them, Pointwise Feedforward enhances the representation ability of the model, helps the model to better distinguish different types of weather-degraded images, and provides richer feature information for the restoration process. The adaLN-Zero module can adaptively adjust its parameters under different conditions, so that the model can automatically adjust parameters according to different weather conditions. adaLN-Zero uses a small neural network (usually MLP) to generate the scaling factor γ, offset factor β and dimension scale parameter α of LayerNormalization based on the provided time step embedding as a condition, applies γ and β to the Block to achieve modulation, and applies α before any residual connection in the Block. The structure and working principle of the basic DiT block are the existing technology in the field and will not be repeated here.

[0030] Because there is a head redundancy problem in the multi-head self-attention block in the basic DiT block, the model may fall into the dilemma of being only applicable to restoring degraded images under specific weather conditions, and cannot be applied to restoring degraded images across multiple weather conditions. Therefore, the present invention adopts cascaded contextual fusion attention (CCFA, Cascaded Contextual Fusion Attention module) to generate optimized DiT blocks. On the basis of the basic DiT block, the generation method of the optimized DiT block includes: dividing the attention heads of the multi-head self-attention block in the basic DiT block into multiple groups, and the multiple groups of attention heads are distributed in sequence; introducing a contextual attention mechanism between two adjacent groups of attention heads; cascading multiple groups of attention heads based on the contextual attention mechanism to obtain a cascaded contextual fusion attention block; and replacing the multi-head self-attention block in the basic DiT block with the cascaded contextual fusion attention block to obtain an optimized DiT block. By optimizing the basic DiT block, in the obtained optimized DiT block, different segmentation features are provided for each attention head, so that a variety of attention maps can be generated, and the generalization performance of the model in processing various degraded weather images is enhanced.

[0031] S4. Generate estimated noise corresponding to the noise block using a noise estimation network, and calculate an average estimated noise based on the estimated noise of the overlapping area.

[0032] See also Figure 3-5 The specific method of generating estimated noise using the noise estimation network includes S41 to S43.

[0033] S41. Convert the existing weather-degraded image as a condition into a Token vector with a number T and a dimension D. The size of the Token vector is N×T×D, where N is the batch size, D is the length of the Token vector, and T=(H×W) / p 2 , p is a hyperparameter. In this embodiment, p is set to 2, and H×W is the size of the noise block.

[0034] S42. Embed the reverse time step t' into all Tokens.

[0035] S43, using the basic DiT block and the optimized DiT block to process the Token one by one to generate estimated noise.

[0036] The operation process of the cascaded context fusion attention block includes S431 to S434.

[0037] S431. Split the input feature X in the form of a tensor into H feature heads in the feature dimension: Feats_in=split(X,H)∈R H×B×N×(D / H) ,in N is the batch size, T is the sequence length, and D is the feature dimension.

[0038] S432, perform CFA operation and cascade operation on each feature head i: Feat i =CFA(Feat i ).

[0039] The specific process of CFA operation includes S4321 to S432

[0040] S4321. Receive input data in tensor form Where B is the batch size, N is the sequence length, and C is the feature dimension.

[0041] S4322. Calculate Query (Q), Key matrix K1, and Value (V), and the calculation results are all in matrix form:

[0042] S4323. Concatenate K1 and the input tensor X in the feature dimension:

[0043] S4324. Fuse the concatenated matrix Y1 to the original dimension:

[0044] S4325. Calculate attention weight:

[0045] S4326. Calculate the new Key matrix K2:

[0046] S4327, calculate the output matrix:

[0047] S433, recombining the feature heads after operation: X_out=concat(Feat0,Feat1,...,Feat H-1 )∈R N×T×D .

[0048] S434, fusion of all reassembled feature heads: X_out=Fusion(X_out)∈R N×T×D .

[0049] The CFA operation fuses key information with the input vector and adds contextual information when calculating the attention weight, enabling the model to better capture the dependencies between local and global features and improve the accuracy of noise prediction for various weather-degraded images.

[0050] The specific method of calculating the average estimated noise based on the estimated noise of the overlapping area includes S435 to S437.

[0051] S435, constructing a matrix with the same size as the weather-degraded image to be processed, and superimposing the estimated noise corresponding to the pixels in the overlapping area as elements.

[0052] S436, calculate the cumulative sum of all matrices to obtain

[0053] S437, according to the number of estimated noises corresponding to the pixels in each overlapping area, Normalization is performed to obtain the average estimated noise.

[0054] S5. Smoothing the average estimated noise, and performing reverse implicit sampling on the noise block based on the smoothed average estimated noise.

[0055] S6. Recombining the restored blocks obtained after multiple reverse implicit sampling of the noise blocks to obtain a restored weather-degraded image.

[0056] By merging all noise blocks based on the average estimated noise, it is possible to input weather-degraded images of any size and ensure high-quality restoration effects, fully guaranteeing the generalization ability of the present invention; and, by guiding the reverse sampling process through the average estimated noise, smoothing between adjacent noise blocks is achieved, avoiding the presence of artifacts between two adjacent noise blocks after the reverse sampling is completed, fully guaranteeing the clarity of the finally restored image.

[0057] In order to verify the effect of the present invention, the following experiment was conducted.

[0058] First, the Allweather dataset, which is composed of the existing Raindrop, Outdoor-Rain and Snow100K datasets, is used for training. Evaluation is performed on the synthetic test sets Raindrop-A, Test1, Snow100K-L, Snow100K-M, Snow100K-S and the real test sets RainDS and Snow100K-Real. Among them, the Allweather dataset includes 18069 pairs of images; the Raindrop dataset focuses on the raindrop effect in the image, especially the raindrops formed on surfaces such as glass windows; Raindrop contains 861 pairs of training images and two test sets with 58 and 249 image pairs respectively. The Outdoor-Rain dataset contains both rain and fog. It uses a physically based generative model to simulate dense synthetic raindrops. It contains 9,000 pairs of images. A subset named Test1 is used as the test set, and the number of test set image pairs is 750. Snow100K focuses on evaluating snow removal models. Its training set contains 50,000 pairs of images. The test set consists of three datasets: Snow100K-L, Snow100K-M, and Snow100K-S, representing different degrees of snowfall. During the test, Raindrop-A with 58 images was used as the test set. During the evaluation process, RainDS and Snow100K-Real were used. RainDS contains 97 real test images, and Snow100K-Real contains natural weather-degraded images collected from the real world, which contains 1,329 real test images.

[0059] Furthermore, image blocks of size 64×64 and 128×128 are used, and the sampling time steps are 10 and 25 respectively. In the 64×64 diffusion model training, the model samples 16 images from the training set, and 16 64×64 image blocks are randomly cropped from each of them. In the 128×128 diffusion model training, the model samples 8 images from the training set, and 8 128×128 image blocks are randomly cropped from each of them. The number of training iterations is set to 2500000 times. For the Raindrop specific dataset, the Raindrop dataset is used for training 2000000 times. In addition, the training process uses the AdamW optimizer, with a fixed learning rate of 0.00002 and no weight decay.

[0060] The above data sets and training parameters are common knowledge in the field and will not be described in detail here.

[0061] After the training is completed, the existing methods such as Uformer, Transweather and WeatherDiff are used for experiments and comparison. The model generated by the present invention is recorded as MDIR-UCDM, and the quantitative comparison is shown in Table 1, where the bold and single underlined data represent the results of the best general model and integrated model.

[0062] Table 1 Quantitative comparison of experimental results

[0063] It can be seen from Table 1 that the image restoration quality of the present invention is higher than that of the comparison method. 64 Compared with Transweather, it improves by 0.99dB on the Snow100K-L test set, 1.24dB on the Test1 dataset, and 1.19dB on the Raindrop-A dataset. Uformer performs worst in the OutdoorRain test set Test1, indicating that the existing integrated model cannot be simply applied to the restoration task of multi-weather degraded images.

[0064] Furthermore, experiments were conducted using a single scene dataset, specifically the Raindrop dataset. The quantitative comparison results of the experimental results are shown in Table 2.

[0065] Table 2 Quantitative comparison of experimental results of single scene dataset

[0066] As can be seen from Table 2, compared with the model specifically used for raindrop removal, the present invention can still achieve excellent performance. Specifically, compared with the existing algorithm, the present invention is 0.14-4.55dB higher on the Raindropo-A test set on average. Therefore, the present invention can not only be used as a general model for multi-weather degraded image restoration, but also as a specialized model for specific weather degraded image restoration, and has good performance in both cases.

[0067] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A general multi-weather degraded image restoration method, characterized in that: The steps include: The weather-degraded image to be processed is segmented to obtain a plurality of image blocks, and there is an overlapping area between two adjacent image blocks; By adding noise to the image block multiple times for forward diffusion, a noise block is obtained; The existing weather-degraded image is used as a condition and is input into the noise estimation network together with the reverse time step. The noise estimation network includes multiple basic DiT blocks and optimized DiT blocks stacked in an interlaced manner. The optimized DiT block is obtained by introducing cascaded context fusion attention based on the basic DiT block. generating estimated noise corresponding to the noise block using a noise estimation network, and calculating an average estimated noise based on the estimated noise of the overlapping area; Smoothing the average estimated noise, and performing reverse implicit sampling on the noise block based on the smoothed average estimated noise; The restored blocks obtained after multiple reverse implicit sampling of the noise blocks are reassembled to obtain the restored weather-degraded image.

2. A general multi-weather degraded image restoration method as claimed in claim 1, characterized in that: The specific method of segmenting the weather-degraded image to be processed to obtain multiple image blocks includes: Taking one of the vertices of the weather-degraded image to be processed as the starting point, a grid with a size of r×r is determined; The grid is gradually moved with r as the action step until the weather-degraded image to be processed is decomposed into multiple grids; The weather-degraded image to be processed is segmented based on grids to form a plurality of image blocks, and there is at least one overlapping grid between two adjacent image blocks.

3. A general multi-weather degraded image restoration method as claimed in claim 1, characterized in that: The method of adding noise to the image block multiple times is: Among them, x0 is the image block, t is the forward time step, α t is a predefined noise sequence, is the noise sampled from a standard normal distribution.

4. A general multi-weather degraded image restoration method as claimed in claim 1, characterized in that: The specific method of generating estimated noise using the noise estimation network includes: The existing weather-degraded images used as conditions are converted into Token vectors of number T and dimension D. The size of the Token vector is N×T×D, where N is the batch size, D is the length of the Token vector, and T = (H×W) / p 2 , p is a hyperparameter; embed the reverse time step t' into all Tokens; The basic DiT block and the optimized DiT block are used to process the tokens one by one to generate estimated noise.

5. A general multi-weather degraded image restoration method as claimed in claim 1, characterized in that: The generation method of optimized DiT blocks includes: The attention heads of the multi-head self-attention block in the basic DiT block are divided into multiple groups, and the multiple groups of attention heads are distributed sequentially; Introduce a contextual attention mechanism between two adjacent groups of attention heads; Based on the contextual attention mechanism, multiple groups of attention heads are cascaded to obtain a cascaded contextual fusion attention block; The optimized DiT block is obtained by replacing the multi-head self-attention block in the basic DiT block with the cascaded context fusion attention block.

6. A general multi-weather degraded image restoration method as claimed in claim 5, characterized in that: The operation process of the cascaded context fusion attention block includes: Split the input feature X in tensor form into H feature heads in the feature dimension Feats_in=split(X,H)∈R H×B×N×(D / H) , where X∈i N×T×D , N is the batch size, T is the sequence length, and D is the feature dimension; Perform CFA operation and cascade operation on each feature head i Feat i =CFA(Feat i ); Reassemble the feature heads after operation X_out=concat(Feat0,Feat1,...,Feat H-1 )∈R N×T×D ; Fusion of all reassembled feature heads X-out=Fusion(X-out)∈R N×T×D 。 7. A general multi-weather degraded image restoration method as claimed in claim 6, characterized in that: The specific process of CFA calculation includes: Accepts input data X∈i in the form of a tensor N×T×D , where B is the batch size, N is the sequence length, and C is the feature dimension; Calculate Query (Q), Key matrix K1, and Value (V), and the calculation results are all in matrix form: qkv=QKV(X)∈i N×T×3D ; Q,K1,V=split(qkv)∈i N×T×D ; Concatenate K1 with the input tensor X on the feature dimension: Y1=concat(K1,X)∈i N×T×2D ; Fuse the concatenated matrix Y1 to the original dimension: A=Fusion(Y1)∈i B×T×D ; Calculate the attention weights: Calculate the new Key matrix K2: K2=Y2*V∈i N×T×D ; Compute the output matrix: Y=K1+K2∈i N×T×D 。 8. A general multi-weather degraded image restoration method as claimed in claim 1, characterized in that: The specific method of calculating the average estimated noise based on the estimated noise of the overlapping area includes: Construct a matrix of the same size as the weather-degraded image to be processed, and superimpose the estimated noise corresponding to the pixels in the overlapping area as elements; Calculate the cumulative sum of all matrices to get The number of estimated noises corresponding to the pixels in each overlapping area is Normalization is performed to obtain the average estimated noise.

Citation Information

Patent Citations

  • System and method for acoustic echo cancelation using deep multitask recurrent neural networks

    CN111755019A

  • Low-light image defogging method based on context perception attention

    CN115100076A

  • Non-ideal supervision-based severe weather image restoration system

    CN117391969A

  • Diffusion model defogging method fusing parallel multi-convolution attention

    CN117994167A

  • Learning representations using diffusion models and bottleneck latent representations

    GB202318012D0