Image restoration method based on multi-stream aggregation and dual attention dense connection network
Through multi-stream aggregation dual-attention dense connection network, combined with multi-stream detail context aggregation and polarization self-attention module, the problem of high computational cost and lack of versatility of image restoration methods in the existing technology is solved, and the image deraining method is realized. , efficient image restoration effects in haze removal and low-light enhancement tasks.
Patent Information
- Application Number
- CN202210845156.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-07-19
AI Technical Summary
Existing image restoration methods have high computational costs, lack extensive scalability and versatility when processing degraded images, and are difficult to effectively handle tasks such as image rain removal, low-light image enhancement and image defogging at the same time.
An image restoration method based on multi-stream aggregation dual-attention dense connection network is adopted. Through the multi-stream detail context aggregation module, dense connection module, polarization self-attention module and supervised calibration module, an image restoration method is designed that can simultaneously process image de-raining, Neural network model for image dehazing, low-light enhancement, and trained using a hybrid loss function.
It achieves competitive effects in image rain removal, image haze removal, and low-light image restoration tasks, improves image restoration quality, and overcomes the problems of high computational cost and lack of versatility in the existing technology.
Smart Images

Figure CN115082353B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image restoration, and in particular to an image restoration method based on a multi-stream aggregation dual-attention densely connected network. Background Art
[0002] In recent years, the rapid development of computer vision has promoted the rapid progress of artificial intelligence applications, such as semantic segmentation, face recognition, image text extraction, image classification, etc. However, computer vision-based algorithms and applications are generally based on high-quality input images. In real life, the image quality will inevitably be affected by weather conditions and degraded, such as fog, rain, snow, and insufficient light. The image restoration task is to process degraded images and output images in an ideal state, such as image deraining, image defogging, and low-light image enhancement.
[0003] Early image restoration methods were generally based on assumed prior knowledge and constraints. Researchers restored clear images by building physical models, but ignored the complexity of the natural environment, resulting in residual noise or over-smoothing in the restoration results. With the advent of the era of big data and deep learning, researchers have designed a number of data-driven restoration methods using deep convolutional neural networks, which establish a nonlinear mapping relationship between clear images and degraded images through learning from massive data. There have been improvements in processing effects, but many methods are computationally expensive, or require complex iterative optimization to find the optimal solution, or are based on a cyclic, progressive multi-stage design model, and most methods are only targeted at a specific task and lack broad scalability and versatility. Summary of the invention
[0004] The present invention provides an image restoration method based on a multi-stream aggregation dual-attention densely connected network, and solves the technical problem of how to overcome the problems raised by the background technology in the image restoration of three tasks: image deraining, low-illumination image enhancement and image defogging, and effectively improve the restoration effect of degraded images.
[0005] In order to solve the above technical problems, the present invention provides an image restoration method based on a multi-stream aggregation dual-attention dense connection network, comprising the steps of:
[0006] S1. Preprocess the acquired degraded images to obtain three different types of data sets: image deraining data set, image defogging data set and low-light enhancement data set;
[0007] S2. Construct a neural network model based on multi-stream aggregation dual attention dense connection (i.e., multi-stream aggregation dual attention dense connection network);
[0008] The neural network model includes a first channel conversion module, a joint convolution module, a second channel conversion module, and a first addition module connected in sequence, wherein the joint convolution module includes more than two joint convolution units connected in sequence, and the joint convolution unit includes a multi-stream detail context aggregation module, a dense connection module, a polarization self-attention module, and a supervised calibration module connected in sequence;
[0009] The first channel conversion module maps the degraded image into a multi-channel feature map and inputs it into the joint convolution module; the multi-stream detail context aggregation module is used to capture the spatial context information of the input feature map at multiple scales and add it to the input feature map to obtain a new feature map and input it into the dense connection module; the dense connection module uses the feature map output by the first channel conversion module and all the output feature maps of the multi-stream detail context aggregation modules before as additional inputs of this unit through skip connections, and realizes the reuse of feature maps in a splicing manner, and then reduces the dimension of the fused feature map through a 1×1 convolution layer; the polarization self-attention module and the supervised calibration module form a dual attention module to deeply adjust the key features from the channel dimension and the spatial dimension in turn; the second channel conversion module converts the feature map output by the joint convolution module into a color image; the first summation module adds the color image and the degraded image to generate a restored image;
[0010] S3, respectively using the three data sets constructed in step S1, and using the optimized mixed loss function to train the neural network model, updating the model parameters through the back propagation algorithm, and continuously iterating to obtain the final three trained models: a rain removal model, a fog removal model, and a low-light enhancement model;
[0011] S4. Integrate the three models obtained in step S3 into an image restoration system. In addition, input the degraded image to be processed into the image restoration system, use the natural image quality evaluation index to make a judgment, and finally output the restored image with the best effect.
[0012] Furthermore, the multi-stream detail context aggregation module includes a first dilated convolutional splicing layer, a second dilated convolutional splicing layer, and a second summing module connected sequentially, wherein the first dilated convolutional splicing layer and the second dilated convolutional splicing layer are both composed of a multi-stream dilated convolutional layer and a 1×1 convolutional layer with a dilation rate of [1, 2, 5];
[0013] The output of the first dilated convolutional concatenation layer is expressed as:
[0014]
[0015] The output of the second atrous convolutional splicing layer is expressed as:
[0016]
[0017] Among them, X in represents the input of the multi-stream detail context aggregation module, Indicates that the multi-stream dilated convolution layer performs a dilated convolution calculation with a standard convolution kernel of k×k and a dilated rate of i, where k=3, i=1,2,5, Cat(·) indicates concatenation, Conv 1×1 Represents the 1×1 convolution calculation performed by the 1×1 convolution layer;
[0018] The output of the second summing module is expressed as:
[0019] X out =Add[X in ,DCCL 2 ],
[0020] Wherein, Add[·] represents an addition operation.
[0021] Furthermore, the polarized self-attention module is composed of a channel attention module and a spatial attention module in series;
[0022] In the channel attention module, first, the input feature map After q c 、v c These two parallel 1×1 convolution branches perform channel dimensionality reduction, where q c The channel dimension of the feature map in the branch is compressed to C / 2, which is kept at a relatively high level, while v c The channel dimension of the feature map in the branch is completely compressed and then the Softmax function is used for additional information enhancement; then, c and v c The feature maps obtained by the two branches perform matrix multiplication, and the channel dimension is restored through a 1×1 convolution layer; then, the enhanced or suppressed channel weight ratio coefficient is mapped to the range of 0 to 1 using the Sigmoid function; finally, the channel weight ratio coefficient is matrix multiplied with the input feature map X, and the feature map is output to the spatial attention module;
[0023] In the spatial attention module, first, after q s 、v s These two parallel 1×1 convolution branches perform channel dimensionality reduction, where for q s The feature map obtained by the branch maintains a high spatial dimension of H×W, while v s The spatial dimension of the branch feature map is completely compressed after the GAP operation and then the Softmax function is used to calculate v s The branch feature map is further enhanced; then, s、v s The feature maps obtained by the two branches are matrix multiplied, and the spatial dimension is restored using a reconstruction function; then, the enhanced or suppressed spatial information weight coefficient is mapped in the range of 0 to 1 using a Sigmoid function; finally, the spatial information weight coefficient is matrix multiplied with the feature map output by the channel attention module, and the feature map is output to the supervised calibration module.
[0024] Furthermore, the output of the supervised calibration module is expressed as:
[0025]
[0026] Among them, the residual graph X r The calculation expression is:
[0027]
[0028] Input feature map X d Represents a degraded image, Conv 1×1 Indicates the execution of 1×1 convolution calculation, Conv 3×3 Indicates the execution of 3×3 convolution calculation, MaxPool r (·) represents the maximum pooling operation with sampling rate r, Up r (·) represents the upsampling operation, F SG (·) represents the Sigmoid function, represents the addition operation, Represents the product operation.
[0029] Furthermore, in step S3, the hybrid loss function is expressed as:
[0030] L total =L MSE +λL SSIM ,
[0031] Among them, L MSE represents the MSE loss, L SSIM represents the loss composed of the SSIM indicator, λ is the hyperparameter between the MSE loss and the SSIM loss, L SSIM (·) is defined as:
[0032] L SSIM =1-SSIM(f(x input )-x gt ),
[0033] f(x input ) represents the restored image after being processed by the neural network model, x gtrepresents the reference image, and SSIM(·) indicates the SSIM index value.
[0034] Furthermore, in step S1, each image in the three data sets is randomly cropped multiple times with a size of 64×64 to increase the number of images in the training set.
[0035] Preferably, the first channel conversion module and the second channel conversion module are both composed of a 3×3 convolutional layer.
[0036] Furthermore, in step S4, for each degraded image, the image restoration system uses three of the neural network models for parallel processing to obtain three restored images, and calculates the NIQE value of each restored image, and takes the restored image with the smallest NIQE value as the output of the system.
[0037] Preferably, the joint convolution module comprises 8 sequentially connected joint convolution units.
[0038] The present invention provides an image restoration method based on a multi-stream aggregation dual-attention dense connection network. Unlike the current algorithm designed only for a single image restoration task, the present invention uses the same network model to simultaneously process three tasks: image deraining, image defogging, and low-light enhancement. First, in order to fully extract image context information, the present method designs a multi-stream detail context aggregation module, and uses different levels of receptive fields to extract multi-level structured and complementary high-order abstract features. Then, in order to enhance the transmission of information flow in the deep network and alleviate the gradient vanishing problem, the present method introduces a dense connection module to achieve cross-module fusion and reuse of multi-level feature information. Next, the dual attention module composed of a polarized self-attention module and a supervised calibration module adjusts the key features in depth from the channel dimension and the spatial dimension in turn. Through experimental comparison, the method proposed in the present invention can well process degraded images of different degrees and types, and is qualitatively and quantitatively compared with more than 10 image restoration algorithms in the same neighborhood. The present invention shows competitive results in image deraining, image defogging, and low-light image restoration tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of an image restoration method based on a multi-stream aggregation dual-attention dense connection network proposed in an embodiment of the present invention;
[0040] Figure 2 It is a schematic diagram of the overall structure of a neural network model based on multi-stream aggregation and dual attention dense connection proposed in an embodiment of the present invention;
[0041] Figure 3 is a schematic diagram of the structure of a multi-stream detail context aggregation module proposed in an embodiment of the present invention;
[0042] Figure 4 is a schematic diagram of the structure of a dense connection module proposed in an embodiment of the present invention;
[0043] Figure 5 is a schematic diagram of the structure of the polarized self-attention module introduced in an embodiment of the present invention;
[0044] Figure 6 is a schematic diagram of the structure of the supervisory calibration module proposed in an embodiment of the present invention;
[0045] Figure 7 is a comparison diagram of the image restoration effect of the image restoration method proposed in the embodiment of the present invention and other methods on image deraining effect on different data sets;
[0046] Figure 8 is a comparison diagram of the image restoration effect of the image restoration method proposed in the embodiment of the present invention and other methods on the image defogging effect on different data sets;
[0047] Fig. 9 This is a comparison chart of the image restoration effects of the image restoration method proposed in the embodiment of the present invention and other methods on low-illumination image enhancement effects on different data sets. DETAILED DESCRIPTION
[0048] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and cannot be understood as limiting the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0049] In order to overcome the problems of the background technology and effectively enhance the image restoration effect in image deraining, defogging and low-light enhancement, the embodiment of the present invention provides an image restoration method based on a multi-stream aggregation dual-attention dense connection network, referring to Figure 1 The flowchart shown specifically includes the steps:
[0050] S1. Preprocess the acquired degraded images to obtain three different types of data sets: image deraining data set, image defogging data set and low-light enhancement data set;
[0051] S2. Construct a neural network model based on multi-stream aggregation and dual attention dense connection;
[0052] S3, respectively using the three data sets constructed in step S1, and using the optimized mixed loss function to train the neural network model, updating the model parameters through the back propagation algorithm, and continuously iterating to obtain the final three trained models: a rain removal model, a fog removal model, and a low-light enhancement model;
[0053] S4. Integrate the three models obtained in step S3 into an image restoration system. In addition, input the degraded image to be processed into the image restoration system, use the natural image quality evaluation index (NIQE value) to make a judgment, and finally output the restored image with the best effect (the smallest NIQE value).
[0054] In step S1, according to the different types of degraded images, they are divided into three categories: rainy images, foggy images and low-light images; in addition, each image is randomly cropped multiple times to a size of 64×64 to increase the number of images in the training set and avoid overfitting of the network during training.
[0055] In step S2, if Figure 2 As shown, the neural network model (referred to as MADD-NET in this embodiment) includes a first channel conversion module, a joint convolution module, a second channel conversion module, and a first summing module connected in sequence. Specifically, the degraded image is first converted into a feature map through the first channel conversion module, and then rich abstract feature information is learned through multiple joint convolution units, and then the feature map is converted into a color image through the second channel conversion module, and finally the color image and the degraded image are added together through the first summing module to generate a restored image.
[0056] like Figure 2 As shown, the joint convolution module includes more than 2 (preferably 8 in this example) sequentially connected joint convolution units, and the joint convolution unit includes a sequentially connected multi-stream detail context aggregation module, a dense connection module, a polarization self-attention module and a supervised calibration module.
[0057] The first channel conversion module maps the degraded image into a multi-channel feature map and inputs it into the joint convolution module; the multi-stream detail context aggregation module is used to capture the spatial context information of the input feature map at multiple scales and add it to the input feature map to obtain a new feature map and input it into the dense connection module; the dense connection module uses a jump connection to take the feature map output by the first channel conversion module and the output feature maps of all previous multi-stream detail context aggregation modules as additional inputs of this unit, and reuses the feature maps in a splicing manner, and then reduces the dimension of the fused feature map through a 1×1 convolution layer; the polarized self-attention module and the supervised calibration module form a dual attention module to deeply adjust the key features from the channel dimension and the spatial dimension respectively; the second channel conversion module converts the feature map output by the joint convolution module into a color image; the first summation module adds the color image and the degraded image to generate a restored image.
[0058] More specifically, Figure 2The two channel conversion modules have the same structure, both consisting of a 3×3 convolutional layer. The first channel conversion module maps the degraded image into a multi-channel feature map for subsequent processing, and the second channel conversion module reconstructs the high-level abstract feature information extracted by 8 joint convolution units into a restored image.
[0059] More specifically, the spatial resolution of feature maps between different modules of MADD-NET remains unchanged to provide reliable output results of spatial detail information. However, the natural environment is full of complexity and diversity. For example, in the image deraining task, rain streaks have a variety of shapes, densities and sizes, and a single convolution kernel is difficult to cope with the extraction of high-level abstract features of different rain streaks in the rain image. Therefore, exploring rich spatial context information is equally important for image restoration tasks. Figure 3 As shown in the figure, this method designs a multi-stream detail context aggregation module, including a first dilated convolution splicing layer, a second dilated convolution splicing layer, and a second summing module connected sequentially. The first dilated convolution splicing layer and the second dilated convolution splicing layer are both composed of a multi-stream dilated convolution layer and a 1×1 convolution layer with a dilation rate of [1, 2, 5]. The benefit of this design is that it is equivalent to capturing the spatial context information of the image at multiple scales, which can increase the area of the receptive field without increasing the number of model parameters or reducing the spatial resolution of the image. The complementary information of multi-scale features is conducive to improving the model's processing effect on degraded images.
[0060] Assumptions Figure 3 The input of the multi-stream detail context aggregation module shown is X in , the first dilated convolutional concatenation layer (DCCL 1 ) can be expressed as:
[0061]
[0062] Then the output of the second dilated convolution concatenation layer (DCCL2) can be expressed as:
[0063]
[0064] Indicates the multi-stream dilated convolution layer performs a dilated convolution calculation with a standard convolution kernel of k×k and a dilated rate of i, k=3, i=1,2,5, Cat(·) indicates concatenation, Conv 1×1 Represents the 1×1 convolution computation performed by the 1×1 convolutional layer.
[0065] Then, the output of the second summation module (that is, the output of the entire multi-stream detail context aggregation module) is expressed as:
[0066] X out =Add[X in ,DCCL 2 ],
[0067] Wherein, Add[·] represents an addition operation.
[0068] More specifically, in order to enhance the transmission of information flow and gradient flow in deep networks, alleviate the gradient vanishing problem, and improve the expressiveness of the model, the present invention introduces a dense connection design in MADD-NET, such as Figure 4 As shown in the figure. Through skip connections, the output feature maps of the channel conversion module and all previous multi-stream detail context aggregation modules are used as additional inputs of this unit, and the feature maps are reused in a splicing manner. Then, the fused feature maps are dimensionally reduced through a 1×1 convolutional layer to reduce the model's computational burden. The output of the nth dense connection module can be expressed as:
[0069]
[0070] Among them, T 0 represents the output feature map of the first channel conversion module, Represents the output feature map of the n-th multi-stream detail context aggregation module.
[0071] The attention mechanism is widely used in CNN to capture the long-distance dependencies between input and output images, and then applied to highly nonlinear image semantic understanding. This chapter introduces the polarization self-attention module in the design of the MADD-NET model to strengthen the nonlinear mapping function between input and output images at low computational overhead. The design idea of this module is derived from the filtering of light by optical lenses. First, polarization filtering is used to allow light orthogonal to the lateral direction to pass through, but this increases the image contrast while losing the total intensity. Therefore, additional enhancement is required to restore the details of the original scene. Figure 5 The polarized self-attention module is presented in detail, which is mainly composed of the serialization of the channel attention module and the spatial attention module.
[0072] In the channel attention module, first, the input feature map After q c 、v c These two parallel 1×1 convolution branches perform channel dimensionality reduction, where q c The channel dimension of the feature map in the branch is compressed to C / 2, which is kept at a relatively high level, while v c The channel dimension of the feature map in the branch is completely compressed and then the Softmax function is used for additional information enhancement; then, c and v c The feature maps obtained by the two branches perform matrix multiplication and pass z cThe 1×1 convolution layer on the main path restores the channel dimension; then, the Sigmoid function is used to map the enhanced or suppressed channel weight coefficient to the range of 0 to 1; finally, the channel weight coefficient is matrix-multiplied with the input feature map X, and the feature map is output to the spatial attention module. Therefore, the weight calculation formula of the channel attention module can be expressed as:
[0073]
[0074] κ i Indicates q c and v c Tensor reconstruction operation on both branches, F SM (·) represents the Softmax function, F SG (·) represents the Sigmoid function, Represents matrix multiplication.
[0075] In the spatial attention module, first, after q s 、v s These two parallel 1×1 convolution branches perform channel dimensionality reduction, where for q s The feature map obtained by the branch maintains a high spatial dimension of H×W, while v s The spatial dimension of the branch feature map is completely compressed after the GAP operation and then the Softmax function is used to calculate v s The branch feature map is further enhanced; then, s 、v s The feature maps obtained by the two branches are matrix multiplied and z is used s The reconstruction function on the main path restores the spatial dimension; then, the Sigmoid function is used to map the enhanced or suppressed spatial information weight coefficient to the range of 0 to 1; finally, the spatial information weight coefficient is matrix multiplied with the feature map output by the channel attention module, and the feature map is output to the supervised calibration module.
[0076] Therefore, the weight calculation formula of the spatial attention module can be expressed as:
[0077]
[0078] in, κ i Indicates q s and v s Tensor reshaping operation on both branches.
[0079] Finally, the combined output of the channel attention module and the spatial attention module can be written as:
[0080]
[0081] In addition to introducing the polarized self-attention module, the present invention designs a supervised calibration module to form a dual attention mechanism. The specific operation of the supervised calibration module is as follows: Figure 6 As shown in the figure, in the feature extraction and transmission process of each joint convolution module, this module aims to provide a favorable label image supervision signal. Specifically, before the feature map is passed to the next joint convolution module, the role of local supervision calibration is fully utilized, and the local feature map of the current unit is further refined by generating a pixel attention mask, so as to strengthen the feature information that is more important to the restoration result and suppress the unimportant feature information. The operation process is as follows:
[0082] First, input feature map Downsampling calculations are performed to encode rich contextual information and improve the receptive field of each spatial position. Then, 3×3 convolution and bilinear interpolation are used to extract abstract feature information and restore image spatial information, and the output result is added to the input feature map to obtain Next, the residual graph is obtained using the Sigmoid function and 1×1 convolution and with the degraded image X d Add and get the restored image of this unit Calculate X at the same time s The difference between the image and the reference image plays a role in local supervision. Finally, the pixel attention mask X is obtained through 1×1 convolution and Sigmoid function. m , the attention map is obtained by calibrating the input feature map with a mask, and the attention map is added to the identity map. Therefore, the output of the supervised calibration module can be written as:
[0083]
[0084] Among them, X r The calculation expression is:
[0085]
[0086] MaxPool r (·) represents the maximum pooling operation with sampling rate r, Up r (·) represents the upsampling operation, and r=2 is set in this experiment.
[0087] At present, most image restoration algorithms use MSE as a loss function to evaluate the difference between the processed image and the relatively ideal reference image. However, using only MSE as a loss function can easily lead to blurring and over-smoothing of the image's high-frequency texture information. In order to ensure that the model can better cope with image deraining, low-light image enhancement and image defogging tasks, the present invention jointly uses MSE and SSIM as the overall loss function in the proposed MADD-NET image restoration method, and the overall expression is:
[0088] L total =L MSE +λL SSIM ,
[0089] Among them, L MSE represents the MSE loss, L SSIM represents the loss composed of the SSIM index, and λ is a hyperparameter that balances the MSE loss and the SSIM loss. In this embodiment, λ is set to 0.1 to best balance the relationship between the overall structure of the image and the pixel-level similarity. The SSIM value range is [0,1]. The larger the value, the more similar the two images are. Therefore, L SSIM Defined as:
[0090] L SSIM =1-SSIM(f(x input )-x gt ),
[0091] f(x input ) represents the restored image after being processed by the neural network model, x gt represents the reference image, and SSIM(·) indicates the SSIM index value.
[0092] In step S4, for each degraded image, the image restoration system uses three neural network models for parallel processing to obtain three restored images, and calculates the NIQE value of each restored image, and takes the restored image with the smallest NIQE value as the output of the system.
[0093] An embodiment of the present invention provides an image restoration method based on a multi-stream aggregation dual-attention dense connection network. Different from the current algorithms designed only for a single image restoration task, the present invention uses the same network model to simultaneously process three tasks: image deraining, image dehazing, and low-light enhancement. First, in order to fully extract the image context information, the method designs a multi-stream detail context aggregation module, which uses receptive fields of different levels to extract multi-level structured and complementary high-order abstract features. Then, in order to enhance the transmission of information flow in the deep network and alleviate the gradient vanishing problem, the method introduces a dense connection module to achieve cross-module fusion and reuse of multi-level feature information. Next, the dual attention module composed of a polarized self-attention module and a supervised calibration module makes in-depth adjustments to the key features from the channel dimension and the spatial dimension respectively.
[0094] In order to better illustrate the effectiveness of the present invention, three experiments (image deraining, image defogging, and low-light enhancement) are compared with other representative methods.
[0095] Experiment 1: Image deraining
[0096] In the image deraining task, three commonly used datasets in this field are selected for experiments, namely: Rain200L, Rain200H and Rain1200. Rain200H has five heavier rain streaks, and Rain200L has lighter rain streaks. Both datasets contain 1800 pairs of training sets and 200 pairs of test sets. Rain1200 contains three rainfall densities, namely light rain, moderate rain and heavy rain, and each rainfall density consists of 4000 pairs of training sets and 400 pairs of test sets. This embodiment first conducts training and testing on the Rain200L, Rain200H and Rain1200 datasets, and uses the model trained by the Rain200H dataset to conduct experiments on real rain images, and then completes a comparative analysis with a variety of mainstream image deraining methods in terms of quantitative (PSNR and SSIM) and qualitative (visualization) evaluation. The comparison results of quantitative indicators are shown in Table 1, and the compared methods are as follows:
[0097] GMM:Li Y,Tan RT,Guo X,et al.Rain streak removal using layer priors[C] / / Proceedings of the IEEE conference on computer vision and patternrecognition.2016:2736-2744.
[0098] RESCAN:Li
[0099] PReNet:Ren D,Zuo W,Hu Q,et al.Progressive image deraining networks:Abetter and simpler baseline[C] / / Proceedings of the IEEE / CVF Conference onComputer Vision and Pattern Recognition.2019:3937-3946.
[0100] ReHEN:Yang Y,Lu H.Single image deraining via recurrent hierarchyenhancement network[C] / / Proceedings of the 27th ACM International Conference on Multimedia.2019:1814-1822.
[0101] DRD-Net:Deng S, Wei M, Wang J, et al.Detail-recovery image deraining viacontext aggregation networks[C] / / Proceedings of the IEEE / CVF conference oncomputer vision and pattern recognition.2020:14560-14569.
[0102] Table 1 Comparison of quantitative indicators of image deraining methods (black bold fonts are the best results)
[0103]
[0104]
[0105] It can be seen from Table 1 that the various indicators obtained by the method proposed in the present invention on the three data sets are better than those of other methods, which verifies the advanced nature of the present invention in the image deraining task. In addition, this embodiment demonstrates the deraining effects of different methods through intuitive visual comparison. Figure 7 It can be seen that the GMM method cannot effectively remove rain streaks; the rain removal image of the ReHEN method has relatively obvious rain removal traces, and the visual effect is blurred; the RESCAN and PReNet methods basically remove rain streaks, and the generated images are relatively clean, but their texture detail information is lost and the image is over-smoothed; the DRD-Net method obtains a good rain removal effect, but the image has spots, which affects the image quality. In contrast, the image restoration method proposed in the present invention obtains the best visual effect, which can not only realize the accurate recognition and positioning of rain streaks, remove rain streaks without traces, but also retain the texture detail information of the background image and suppress the spots, and the rain removal image has the highest clarity and the best imaging quality.
[0106] Experiment 2: Image Dehazing
[0107] This embodiment uses the RESIDE dataset to verify the effectiveness of the present invention in the image defogging task. This dataset synthesizes foggy images based on the atmospheric scattering model. Among them, the atmospheric illumination value range of the indoor training set (Indoor Training Set, referred to as ITS) is [0.7, 1.0], and the atmospheric scattering coefficient is a random value between [0.6, 1.8]. It contains a total of 1399 relatively ideal reference images and 13990 foggy images, and each reference image synthesizes 10 foggy images. At the same time, 500 pairs of indoor images (Indoor) of the Synthetic Objective Testing Set (SOTS) are selected as the test set.
[0108] In order to verify the dehazing performance of the present invention, this embodiment completes qualitative and quantitative comparative analysis with a variety of classic dehazing methods, including DCP, DehazeNet, AOD-Net, EPDN, and GCANeT. Table 2 shows the average PSNR and SSIM values of different methods on the SOTS (Indoor) test set. The results show that the full reference image quality evaluation result obtained by this method is the best, which verifies the superiority of the present invention in the image dehazing task. Among them, DCP, DehazeNet, AOD-Net, EPDN, and GCANeT are methods in the following literature:
[0109] DCP:He K,Sun J,Tang X.Single image haze removal using dark channel prior[J].IEEE transactions on pattern analysis and machine intelligence,2010,33(12):2341-2353.
[0110] DehazeNet:Cai B,Xu
[0111] AOD-Net:Li B,Peng X,Wang Z,et al.Aod-net:All-in-one dehazing network[C] / / Proceedings of the IEEE international conference on computervision.2017:4770-4778.
[0112] EPDN:Qu Y,Chen Y,Huang J,et al.Enhanced pix2pix dehazing network[C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and PatternRecognition.2019:8160-8168.
[0113] GCANeT:Chen D,He M,Fan Q,et al.Gated context aggregation network for image dehazing and deraining[C] / / 2019IEEE winter conference on applications of computer vision(WACV).IEEE,2019:1375-1383.
[0114] Table 2 Comparison of evaluation indicators on the SOTS (Indoor) dataset (black bold fonts are the best results)
[0115]
[0116] Figure 8 The qualitative comparison results of the method of the present invention and various classic dehazing methods are shown. It can be seen that the DCP method is difficult to accurately estimate the fog concentration, resulting in incomplete dehazing; the dehazed images processed by DehazeNet and AOD-Net are slightly inferior in the restoration of color and texture details, showing serious artifacts; EPDN, GCANeT and the present invention all obtain clear dehazed images, but through local magnification observation, it can be found that the method proposed by the present invention restores the appropriate color level and detailed texture details, and the processing result is closer to the reference image.
[0117] Experiment 3: Low light enhancement
[0118] This embodiment uses the LOL dataset to evaluate the performance of the method proposed in the present invention in the low-light image enhancement task. The dataset contains 500 pairs of low-light images / normal exposure images collected in real scenes and 1000 pairs of synthesized low-light images / normal exposure images. These images are widely used in low-light image enhancement tasks and are representative.
[0119] In order to verify the scalability and versatility of the method proposed in the present invention, this embodiment carries out a large number of experiments in the low-light image enhancement task, and conducts qualitative and quantitative comparisons with various mainstream methods in the same field. Since the LOL data set contains normal exposure images, the PSNR and SSIM indicators are used to evaluate the similarity between the enhanced image and the normal exposure image, and to compare the processing performance of various methods. Table 3 shows the comparison results of different methods on the LOL test set. It can be seen that the method proposed in the present invention achieves the highest values in both indicators, which confirms its advanced nature in the low-light image enhancement task. The compared methods are from the following references:
[0120] RetinexNet:Wei C,Wang W,Yang W,et al.Deep retinex decomposition for low-light enhancement[J].arXiv preprint arXiv:1808.04560,2018.
[0121] MBLLEN:Lv F,Lu F,Wu J,et al.MBLLEN:Low-Light Image / Video
[0122] Enhancement Using CNNs[C] / / BMVC.2018,220(1):4.
[0123] EnlightenGAN: Jiang Y, Gong X, Liu D, et al. Enlightengan: Deep lightenhancement without paired supervision [J]. IEEE Transactions on ImageProcessing, 2021, 30: 2340-2349.
[0124] DeepUPE: Wang R, Zhang Q, Fu CW, et al. Underexposed photo enhancement using deep illumination estimation[C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2019:6849-6857.
[0125] NDANet:Liu M,Tang L,Zhong S,et al.Learning noise-decoupled affinemodels for extreme low-light image enhancement[J].Neurocomputing,2021,448:21-29.
[0126] Table 3 Quantitative index comparison of low-light image enhancement methods (black bold fonts are the best results)
[0127]
[0128] Visual effect is the most intuitive feeling of human eyes to objects. Fig. 9 The comparison results of several competitive methods for enhancing low-light images of different scenes are shown. Fig. 9 It can be seen that RetinexNet has serious noise amplification; EnlightenGAN has low overall enhanced brightness; NDANet achieves richer texture details and suppresses the expansion of noise, but the enhancement results have artifacts and edge smoothing problems; DeepUPE obtains a more natural enhancement result, but the existence of noise can also be observed; MBLLEN restores the overall brightness well, but is accompanied by significant over-smoothing and underexposure in local areas. Compared with these methods, the method proposed in the present invention has achieved satisfactory results in brightness enhancement, noise suppression, and texture detail restoration.
[0129] Through experimental comparison, the method proposed in the present invention can well handle degraded images of different degrees and types, and is qualitatively and quantitatively compared with more than 10 image restoration algorithms in the same neighborhood. The present invention shows competitive results in image deraining, image dehazing, and low-illumination image restoration tasks.
[0130] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. An image restoration method based on a multi-stream aggregation dual-attention dense connection network, characterized in that: Includes steps: S1. Preprocess the acquired degraded images to obtain three different types of data sets: image deraining data set, image defogging data set and low-light enhancement data set; S2. Construct a neural network model based on multi-stream aggregation and dual attention dense connection; The neural network model includes a first channel conversion module, a joint convolution module, a second channel conversion module, and a first addition module connected in sequence, wherein the joint convolution module includes more than two joint convolution units connected in sequence, and the joint convolution unit includes a multi-stream detail context aggregation module, a dense connection module, a polarization self-attention module, and a supervised calibration module connected in sequence; The first channel conversion module maps the degraded image into a multi-channel feature map and inputs it into the joint convolution module; the multi-stream detail context aggregation module is used to capture the spatial context information of the input feature map at multiple scales and add it to the input feature map to obtain a new feature map and input it into the dense connection module; the dense connection module uses the feature map output by the first channel conversion module and all the output feature maps of the multi-stream detail context aggregation modules before as additional inputs of this unit through skip connections, and realizes the reuse of feature maps in a splicing manner, and then reduces the dimension of the fused feature map through a 1×1 convolution layer; the polarization self-attention module and the supervised calibration module form a dual attention module to deeply adjust the key features from the channel dimension and the spatial dimension in turn; the second channel conversion module converts the feature map output by the joint convolution module into a color image; the first summation module adds the color image and the degraded image to generate a restored image; S3, respectively using the three data sets constructed in step S1, and using the optimized mixed loss function to train the neural network model, updating the model parameters through the back propagation algorithm, and continuously iterating to obtain the final three trained models: a rain removal model, a fog removal model, and a low-light enhancement model; S4. Integrate the three models obtained in step S3 into an image restoration system. In addition, input the degraded image to be processed into the image restoration system, use the natural image quality evaluation index to make a judgment, and finally output the restored image with the best effect.
2. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1 is characterized by: The multi-stream detail context aggregation module includes a first dilated convolutional splicing layer, a second dilated convolutional splicing layer, and a second summing module connected in sequence, wherein the first dilated convolutional splicing layer and the second dilated convolutional splicing layer are both composed of a multi-stream dilated convolutional layer and a 1×1 convolutional layer with a dilation rate of [1, 2, 5]; The output of the first dilated convolutional concatenation layer is expressed as: The output of the second atrous convolutional splicing layer is expressed as: Among them, X in represents the input of the multi-stream detail context aggregation module, Indicates that the multi-stream dilated convolution layer performs a dilated convolution calculation with a standard convolution kernel of k×k and a dilated rate of i, where k=3, i=1,2,5, Cat(·) indicates concatenation, Conv 1×1 Represents the 1×1 convolution calculation performed by the 1×1 convolution layer; The output of the second summing module is expressed as: X out =Add[X in ,DCCL2], Wherein, Add[·] represents an addition operation.
3. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1 is characterized by: The polarized self-attention module is composed of a channel attention module and a spatial attention module in series; In the channel attention module, first, the input feature map After q c 、v c These two parallel 1×1 convolution branches perform channel dimensionality reduction, where q c The channel dimension of the feature map in the branch is compressed to C / 2, which is kept at a relatively high level, while v c The channel dimension of the feature map in the branch is completely compressed and then the Softmax function is used for additional information enhancement; then, c and v c The feature maps obtained by the two branches perform matrix multiplication, and the channel dimension is restored through a 1×1 convolution layer; then, the enhanced or suppressed channel weight ratio coefficient is mapped to the range of 0 to 1 using the Sigmoid function; finally, the channel weight ratio coefficient is matrix multiplied with the input feature map X, and the feature map is output to the spatial attention module; In the spatial attention module, first, after q s 、v s These two parallel 1×1 convolution branches perform channel dimensionality reduction, where for q s The feature map obtained by the branch maintains a high spatial dimension of H×W, while v s The spatial dimension of the branch feature map is completely compressed after the GAP operation and then the Softmax function is used to calculate v s The branch feature map is further enhanced; then, s 、v s The feature maps obtained by the two branches are matrix multiplied, and the spatial dimension is restored using a reconstruction function; then, the enhanced or suppressed spatial information weight coefficient is mapped in the range of 0 to 1 using a Sigmoid function; finally, the spatial information weight coefficient is matrix multiplied with the feature map output by the channel attention module, and the feature map is output to the supervised calibration module.
4. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1 is characterized in that: The output of the supervised calibration module is expressed as: Among them, the residual graph X r The calculation expression is: Input feature map X d Represents a degraded image, Conv 1×1 Indicates the execution of 1×1 convolution calculation, Conv 3×3 Indicates the execution of 3×3 convolution calculation, MaxPool r (·) represents the maximum pooling operation with sampling rate r, Up r (·) represents the upsampling operation, F SG (·) represents the Sigmoid function, represents the addition operation, Represents the product operation.
5. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1 is characterized by: In step S3, the hybrid loss function is expressed as: THE total =L MSE +λL SSIM , Among them, L MSE represents the MSE loss, L SSIM represents the loss composed of the SSIM indicator, λ is the hyperparameter between the MSE loss and the SSIM loss, L SSIM (·) is defined as: L SSIM =1-SSIM(f(x input )-x gt ), f(x input ) represents the restored image after being processed by the neural network model, x gt represents the reference image, and SSIM(·) indicates the SSIM index value.
6. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1 is characterized in that: In step S1, each image in the three data sets is randomly cropped multiple times to a size of 64×64 to increase the number of images in the training set.
7. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 2 is characterized by: The first channel conversion module and the second channel conversion module are both composed of a 3×3 convolutional layer.
8. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1 is characterized by: In step S4, for each degraded image, the image restoration system uses the three neural network models to perform parallel processing to obtain three restored images, and calculates the NIQE value of each restored image, and takes the restored image with the smallest NIQE value as the output of the system.
9. The image restoration method based on multi-stream aggregation dual attention dense connection network according to claim 1, characterized in that: The joint convolution module includes 8 sequentially connected joint convolution units.
