Recurrent Squeeze-and-Excitation Context Aggregation Net for Single Image Deraining

07/16/2018 ∙ by Xia Li, et al. ∙ Peking University 2

Rain streaks can severely degrade the visibility, which causes many current computer vision algorithms fail to work. So it is necessary to remove the rain from images. We propose a novel deep network architecture based on deep convolutional and recurrent neural networks for single image deraining. As contextual information is very important for rain removal, we first adopt the dilated convolutional neural network to acquire large receptive field. To better fit the rain removal task, we also modify the network. In heavy rain, rain streaks have various directions and shapes, which can be regarded as the accumulation of multiple rain streak layers. We assign different alpha-values to various rain streak layers according to the intensity and transparency by incorporating the squeeze-and-excitation block. Since rain streak layers overlap with each other, it is not easy to remove the rain in one stage. So we further decompose the rain removal into multiple stages. Recurrent neural network is incorporated to preserve the useful information in previous stages and benefit the rain removal in later stages. We conduct extensive experiments on both synthetic and real-world datasets. Our proposed method outperforms the state-of-the-art approaches under all evaluation metrics. Codes and supplementary material are available at our project webpage: https://xialipku.github.io/RESCAN .

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 8

page 11

page 13

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Rain is a very common weather in actual life. However, it can affect the visibility. Especially in heavy rain, rain streaks from various directions accumulate and make the background scene misty, which will seriously influence the accuracy of many computer vision systems, including video surveillance, object detection and tracking in autonomous driving, etc. Therefore, it is an important task to remove the rain and recover the background from rain images.

Image deraining has attracted much attention in the past decade. Many methods have been proposed to solve this problem. Existing methods can be divided into two categories, including video based approaches and single image based approaches. As video based methods can utilize the relationship between frames, it is relatively easy to remove rain from videos [1, 2, 3, 4]. However, single image deraining is more challenging, and we focus on this task in this paper. For single image deraining, traditional methods, such as discriminative sparse coding [5], low rank representation [6]

, and the Gaussian mixture model 

[7]

, have been applied to this task and they work quite well . Recently, deep learning based deraining methods 

[8, 9] receive extensive attention due to its powerful ability of feature representation. All these related approaches achieve good performance, but there is still much space to improve.

There are mainly two limitations of existing approaches. On the one hand, according to [10, 11, 12], spatial contextual information is very useful for deraining. However, many current methods remove rain streaks based on image patches, which neglect the contextual information in large regions. On the other hand, as rain steaks in heavy rain have various directions and shapes, they blur the scene in different ways. It is a common way [9, 13] to decompose the overall rain removal problem into multiple stages, so that we can remove rain streaks iteratively. Since these different stages work together to remove rain streaks, the information of deraining in previous stages is useful to guide and benefit the rain removal in later stages. However, existing methods treat these rain streak removal stages independently and do not consider their correlations.

Motivated by addressing the above two issues, we propose a novel deep network for single image deraining. The pipeline of our proposed network is shown in Fig. 2. We remove rain streaks stage by stage. At each stage, we use the context aggregation network with multiple full-convolutional layers to remove rain streaks. As rain streaks have various directions and shapes, each channel in our network corresponds to one kind of rain streak. Squeeze-and-Excitation (SE) blocks are used to assign different alpha-values to various channels according to their interdependencies in each convolution layer. Benefited from the exponentially increasing convolution dilations, our network has a large reception field with low depth, which can help us to acquire more contextual information. To better utilize the useful information for rain removal in previous stages, we further incorporate the Recurrent Neural Network (RNN) architecture with three kinds of recurrent units to guide the deraining in later stages. We name the proposed deep network as REcurrent SE Context Aggregation Net (RESCAN).

Main contributions of this paper are listed as follows:

  1. We propose a novel unified deep network for single image deraining, by which we remove the rain stage by stage. Specifically, at each stage, we use the contextual dilated network to remove the rain. SE blocks are used to assign different alpha-values to various rain streak layers according to their properties.

  2. To the best of our knowledge, this is the first paper to consider the correlations between different stages of rain removal. By incorporating RNN architecture with three kinds of recurrent units, the useful information for rain removal in previous stages can be incorporated to guide the deraining in later stages. Our network is suitable for recovering rain images with complex rain streaks, especially in heavy rain.

  3. Our deep network achieves superior performance compared with the state-of-the-art methods on various datasets.

2 Related Works

During the past decade, many methods have been proposed to separate rain streaks and background scene from rain images. We briefly review these related methods as follows.

2.0.1 Video Based Methods

As video based methods can leverage the temporal information by analyzing the difference between adjacent frames, it is relatively easy to remove the rain from videos [14, 3]. Garg and Nayar [15, 16, 2] propose an appearance model to describe rain streaks based on photometric properties and temporal dynamics. Meanwhile, Zhang et al. [1] exploit temporal and chromatic properties of rain in videos. Bossu et al. [17] detect the rain based on the histogram of orientation of rain streaks. In [4], Tripathi et al. provide a review of video-based deraining methods proposed in recent years.

2.0.2 Single Image Based Methods

Compared with video deraining, single image deraining is much more challenging, since there is no temporal information in images. For this task, traditional methods, including dictionary learning [18], Gaussian mixture models (GMMs) [19], and low-rank representation [20], have been widely applied. Based on dictionary learning, Kang et al. [21] decompose high frequency parts of rain images into rain and nonrain components. Wang et al. [22] define a 3-layer hierarchical scheme. Luo et al. [5] propose a discriminative sparse coding framework based on image patches. Gu et al. [23] integrate analysis sparse representation (ASR) and synthesis sparse representation (SSR) to solve a variety of image decomposition problems. In [7], GMM works as a prior to decompose a rain image into background and rain streaks layer. Chang et al. [6] leverage the low-rank property of rain streaks to separate two layers. Zhu et al. [24] combine three different kinds of image priors.

Recently, several deep learning based deraining methods achieve promising performance. Fu et al. [25, 8] first introduce deep learning methods to the deraining problem. Similar to [21], they also decompose rain images into low- and high-frequency parts, and then map high-frequency part to the rain streaks layer using a deep residual network. Yang et al. [26, 9] design a deep recurrent dilated network to jointly detect and remove rain streaks. Zhang et al. [27] use the generative adversarial network (GAN) to prevent the degeneration of background image when it is extracted from rain image, and utilize the perceptual loss to further ensure better visual quality. Li et al. [13] design a novel multi-stage convolutional neural network that consists of several parallel sub-networks, each of which is made aware of different scales of rain streaks.

3 Rain Models

It is a commonly used rain model to decompose the observed rain image into the linear combination of the rain-free background scene and the rain streak layer :

(1)

By removing the rain streaks layer from the observed image , we can obtain the rain-free scene .

Based on the rain model in Eq. (1), many rain removal algorithms assume that rain steaks should be sparse and have similar characters in falling directions and shapes. However, in reality, raindrops in the air have various appearances, and occur in different distances from the camera, which leads to an irregular distribution of rain streaks. In this case, a single rain streak layer is not enough to well simulate this complex situation.

To reduce the complexity, we regard rain streaks with similar shape or depth as one layer. Then we can divide the captured rainy scene into the combination of several rain streak layers and an unpolluted background. Based on this, the rain model can be reformulated as follows:

(2)

where represents the -th rain streak layer that consists of one kind of rain streaks and is the total number of different rain streak layers.

According to [28], things in reality might be even worse, especially in the heavy rain situation. Accumulation of multiple rain streaks in the air may cause attenuation and scattering, which further increases the diversity of rain streaks’ brightness. For camera or eye visualization, the scattering causes haze or frog effects. This further pollutes the observed image . For camera imaging, due to the limitation of pixel number, far away rain streaks cannot occupy full pixels. When mixed with other things, the image will be blurry. To handle the issues above, we further take the global atmospheric light into consideration and assign different alpha-values to various rain streak layers according to their intensities transparencies. We further generalize the rain model to:

(3)

where is the global atmospheric light, is the scene transmission,   indicates the brightness of a rain streak layer or a haze layer.

4 Deraining Method

Instead of using decomposition methods with artificial priors to solve the problem in Eq. (3), we intend to learn a function that directly maps observed rain image to rain streak layer , since is sparser than and has simpler texture. Then we can subtract from to get the rain-free scene . The function

above can be represented as a deep neural network and be learned by optimizing the loss function

.

Based on the motivation above, we propose the REcurrent SE Context Aggregation Net (RESCAN) for image deraining. The framework of our network is presented in Fig. 2. We remove rain streaks stage by stage. At each stage, we use the context aggregation network with SE blocks to remove rain streaks. Our network can deal with rain streaks of various directions and shapes, and each feature map in the network corresponds to one kind of rain streak. Dilated convolution used in our network can help us have a large reception field and acquire more contextual information. By using SE blocks, we can assign different alpha-values to various feature maps according to their interdependencies in each convolution layer. As we remove the rain in multiple stages, useful information for rain removal in previous stages can guide the learning in later stages. So we incorporate the RNN architecture with memory unit to make full use of the useful information in previous stages.

In the following, we first describe the baseline model, and then define the recurrent structure, which lifts the model’s capacity by iteratively decomposing rain streaks with different characteristics.

Figure 1: The architecture of SE Context Aggregation Network (SCAN).

4.1 SE Context Aggregation Net

The base model of RESCAN is a forward network without recurrence. We implement it by extending Context Aggregation Net (CAN) [11, 12] with Squeeze-and-Excitation (SE) blocks [29], and name it as SE Context Aggregation Net (SCAN).

Here we provide an illustration and a further specialization of SCAN. We schematically illustrate SCAN in Fig. 1, which is a full-convolution network. In Fig. 1, we set the depth . Since a large receptive field is very helpful to acquire much contextual information, dilation is adopted in our network. For layers to , the dilation increases from 1 to 4 exponentially, which leads to the exponential growth in receptive field of every elements. As we treat the first layer as an encoder to transform an image to feature maps, and the last two layers as a decoder to map reversely, we do not apply dilation for layers , and . Moreover, we use convolution for all layers before . To recover RGB channels of a color image, or gray channel for a gray scale image, we adopt the convolution for the last layer . Every convolution operation except the last one is followed by a nonlinear operation. The detailed architecture of SCAN is summarized in Table 1. Generally, for a SCAN with depth , the receptive field of elements in the output image equals to .

Layer 0 1 2
Convolution
Dilation 1 1 2 1 1
NonLinear Yes Yes Yes Yes Yes Yes No
SE block Yes Yes Yes Yes Yes Yes No
Receptive field
Table 1: The detailed architecture of SCAN. is the depth of network.

For feature maps, we regard each channel of them as the embedding of a rain streak layer . Recall in Eq. (3), we assign different alpha-values to different rain steak layers . Instead of setting fixed alpha-values for each rain layer, we update the alpha-values for embeddings of rain streak layers in each network layer. Although the convolution operation implicitly introduces weights for every channel, these implicit weights are not specialized for every image. To explicitly import weight on each network layer for each image, we extend each basic convolution layer with Squeeze-and-Excitation (SE) block [29], which computes normalized alpha-value for every channel of each item. By multiplying alpha-values learned by SE block, feature maps computed by convolution are re-weighted explicitly.

An obvious difference between SCAN and former models [8, 27]

is that SCAN has no batch normalization (BN) 

[30]

layers. BN is widely used in training deep neural network, as it can reduce internal covariate shift of feature maps. By applying BN, each scalar feature is normalized and has zero mean and unit variance. These features are independent with each other and have the same distribution. However, in Eq. (

2) rain streaks in different layers have different distributions in directions, colors and shapes, which is also true for each scalar feature of different rain streak layers. Therefore, BN contradicts with the characteristics of our proposed rain model. Thus, we remove BN from our model. Experimental results in Section 5 show that this simple modification can substantially improve the performance. Furthermore, since BN layers keep a normalized copy of feature maps in GPU, removing it can greatly reduce the demand on GPU memory. For SCAN, we can save approximately of memory usage during training without BN. Consequently, we can build a larger model with larger capacity, or increase the mini-batch size to stabilize the training process.

4.2 Recurrent SE Context Aggregation Net

As there are many different rain streak layers and they overlap with each other, it is not easy to remove all rain streaks in one stage. So we incorporate the recurrent structure to decompose the rain removal into multiple stages. This process can be formulated as:

(4)
(5)
(6)
(7)

where is the number of stages, is the output of the -th stage, and is the intermediate rain-free image after the -th stage.

The above model for deraining has been used in [9, 13]. However, recurrent structure used in their methods [9, 13] can only be regarded as the simple cascade of the same network. They just use the output images of last stage as the input of current stage and do not consider feature connection among these stages. As these different stages work together to remove the rain, input images of different stages can be regarded as a temporal sequence of rain images with decreasing levels of rain streaks interference. It is more meaningful to investigate the recurrent connections between features of different stages rather than only using the recurrent structure. So we incorporate recurrent neural network (RNN) [31] with memory unit to better make use of information in previous stages and guide feature learning in later stages.

In our framework, Eq. (5) can be further reformulated as:

(8)

where is the decomposed -th rain streak layer of the -th stage and is the hidden state of the ()-th stage. Consistent with the rain model in Eq. (3), is computed by summing with different alpha-values.

Figure 2: The unfolded architecture of RESCAN. K is the convolution kernel size, DF indicates the dilation factor, and S represents the number of stages.

For the deraining task, we further explore three different recurrent unit variants, including ConvRNN, ConvGRU [32], and ConvLSTM [33]. Due to the space limitation, we only present the details of ConvGRU [32] in the following. For other two kinds of recurrent units, please refer to the supplement materials on our webpage.

4.2.1 ConvGRU

Gated Recurrent Units (GRU) [32] is a very popular recurrent unit in sequential models. Its convolutional version ConvGRU is adopted in our model. Denote as the feature map of the -th layer in the -th stage, and it can be computed based on the  (feature map in the same layer of the previous stage) and  (feature map in the previous layer of the same stage):

(9)
(10)
(11)
(12)

where

is the sigmoid function

and denotes element-wise multiplication. is the dilated convolutional kernel, and is an ordinary kernel with a size or . Compared with a convolutional unit, ConvRNN, ConvGRU and ConvLSTM units will have twice, three times and four times parameters, respectively.

4.3 Recurrent Frameworks

We further examine two frameworks to infer the final output. Both of them use and previous states as input for the -th stage, but they output different images. In the following, we describe the additive prediction and the full prediction in detail, together with their corresponding loss functions.

4.3.1 Additive Prediction

The additive prediction is widely used in image processing. In each stage, the network only predicts the residual between previous predictions and the ground truth. It incorporates previous feature maps and predictions as inputs, which can be formulated as:

(13)
(14)

where represents previous states as in Eq. (12). For this framework, the loss functions are chosen as follows:

(15)

where represents the network’s parameters.

4.3.2 Full Prediction

The full prediction means that in each stage, we predict the whole rain streaks . This approach can be formulated as:

(16)
(17)

where represents the predicted full rain streaks in the -th stage, and equals to plus remaining rain streaks. The corresponding loss function is:

(18)

5 Experiments

In this section, we present details of experimental settings and quality measures used to evaluate the proposed SCAN and RESCAN models. We compare the performance of our proposed methods with the state-of-the-art methods on both synthetic and real-world datasets.

5.1 Experiment Settings

5.1.1 Synthetic Dataset

Since it is hard to obtain a large dataset of clean/rainy image pairs from real-world data, we first use synthesized rainy datasets to train the network. Zhang et al. [27] synthesize 800 rain images (Rain800) from randomly selected outdoor images, and split them into testing set of 100 images and training set of 700 images. Yang et al. [9] collect and synthesize 3 datasets, Rain12, Rain100L and Rain100H. We select the most difficult one, Rain100H, to test our model. It is synthesized with the combination of five streak directions, which makes it hard to effectively remove all rain streaks. There are synthetic image pairs in Rain100H, and pairs are selected as the testing set.

5.1.2 Real-world Dataset

Zhang et al. [27] and Yang et al. [9] also provide many real-world rain images. These images are diverse in terms of content as well as intensity and orientation of rain streaks. We use these datasets for objective evaluation.

5.1.3 Training Settings

In the training process, we randomly generate patch pairs with a size of

from every training image pairs. The entire network is trained on an Nvidia 1080Ti GPU based on Pytorch. We use a batch size of

and set the depth of SCAN as with the receptive field size

. For the nonlinear operation, we use leaky ReLU 

[34] with . For optimization, the ADAM algorithm [35] is adopted with a start learning rate . During training, the learning rate is divided by at and iterations.

5.1.4 Quality Measures

To evaluate the performance on synthetic image pairs, we adopt two commonly used metrics, including peak signal to noise ratio (PSNR) [36] and structure similarity index (SSIM) [37]. Since there are no ground truth rain-free images for real-world images, the performance on the real-world dataset can only be evaluated visually. We compare our proposed approach with five state-of-the-art methods, including image decomposition (ID) [21], discriminative sparse coding (DSC) [5], layer priors (LP) [7], DetailsNet [8], and joint rain detection and removal (JORDER) [9].

5.2 Results on Synthetic Data

7.71/0.2334
ID [21]
7.96/0.2568
DSC [5]
8.28/0.2316
LP [7]
8.60/0.2448
DetailsNet [8]
20.23/0.5566
JORDER [9]
19.40/0.5535
JORDER-R [9]
20.19/0.6108
SCAN
21.32/0.6271
RESCAN
23.47/0.7035
Inf/1
9.73/0.1149
ID [21]
10.42/0.2635
DSC [5]
11.87/0.1238
LP [7]
11.26/0.1762
DetailsNet [8]
23.62/0.5223
JORDER [9]
23.87/0.5489
JORDER-R [9]
26.25/0.7972
SCAN
26.24/0.6831
RESCAN
30.78/0.8807
Inf/1
Figure 3: Results of various methods on synthetic images. Best viewed at screen!

Table 2 shows results of different methods on the Rain800 and the Rain100H datasets. We can see that our RESCAN considerably outperforms other methods in terms of both PSNR and SSIM on these two datasets. It is also worth noting that our non-recurrent network SCAN can even outperform JORDER and DetailsNet, and is slightly superior to JORDER-R, the recurrent version of JORDER. This shows the high capacity behind SCAN’s shallow structure. Moreover, by using RNN to gradually recover the full rain streak layer , RESCAN further improves the performance.

Dataset Rain800 Rain100H
Meassure PSNR SSIM PSNR SSIM
ID [21] 18.88 0.5832 14.02 0.5239
DSC [5] 18.56 0.5996 15.66 0.4225
LP [7] 20.46 0.7297 14.26 0.5444
DetailsNet [8] 21.16 0.7320 22.26 0.6928
JORDER [9] 22.24 0.7763 22.15 0.6736
JORDER-R [9] 22.29 0.7922 23.45 0.7490
SCAN 23.45 0.8112 23.56 0.7456
RESCAN 24.09 0.8410 26.45 0.8458
Table 2: Quantitative experiments evaluated on two synthetic datasets. Best results are marked in bold and the second best results are underlined.

To visually demonstrate the improvements obtained by the proposed methods, we present results on several difficult sample images in Fig. 3. Please note that we select difficult sample images to show that our method can outperform others especially in difficult conditions, as we design it to deal with complex conditions. According to Fig. 3, these state-of-the-art methods cannot remove all rain steaks and may blur the image, while our method can remove the majority of rain steaks as well as maintain details of background scene.

ID [21]
DSC [5]
LP [7]
DetailsNet [8]
JORDER-R [9]
SCAN
RESCAN
ID [21]
DSC [5]
LP [7]
DetailsNet [8]
JORDER-R [9]
SCAN
RESCAN
Figure 4: Results of various methods on real-world images. Best viewed at screen!

5.3 Results on Real-world Dataset

To test the practicability of deraining methods, we also evaluate the performance on real-world rainy test images. The predictions for all related methods on four real-world sample rain images are shown in Fig. 4. As observed, LP [7] cannot remove rain steaks efficiently, and DetailsNet [8] tends to add artifacts on derained outputs. We can see that the proposed method can remove most of rain streaks and maintain much texture of background images. To further validate the performance on real-world dataset, we also make a user study. For details, please refer to the supplement material.

5.4 Analysis on SCAN

To show that SCAN is the best choice as a base model for deraining task, we conduct experiments on two datasets to compare the performance of SCAN and its related network architectures, including Plain (dilation= for all convolutions), ResNet used in DetailsNet [8] and Encoder-Decoder used in ID-CGAN [27]. For all networks, we set the same depth and width ( channels), so we can keep their numbers of parameters and computations at the same order of magnitude. More specifically, we keep layers , and of them with the same structure, so they only differ in layers to . The results are shown in Table 3. SCAN and CAN achieve the best performance in both datasets, which can be attributed to the fact that receptive fields of these two methods exponentially increase with the growing of depth, while receptive fields of other methods only have linear relationship with depth.

Dataset Meassure Plain ResNet EncDec CAN+BN CAN SCAN+BN SCAN
Rain800 PSNR 22.10 22.10 22.14 22.27 22.45 23.11 23.45
SSIM 0.7816 0.7856 0.7809 0.7871 0.7960 0.7657 0.8112
Rain100H PSNR 21.46 21.51 21.28 22.63 22.93 23.09 23.56
SSIM 0.6921 0.6940 0.6886 0.7256 0.7333 0.7389 0.7456
Table 3: Quantitative comparison between SCAN and base model candidates.

Moreover, the comparison between results of SCAN and CAN indicates that the SE block contributes a lot to the base model, as it can explicitly learn alpha-value for every independent rain streak layer. We also examine the SCAN model with BN. The results clearly verify that removing BN is a good choice in the deraining task, as rain steak layers are independent on each other.

5.5 Analysis on RESCAN

As we list three recurrent units and two recurrent frameworks in Section 4.2, we conduct experiments to compare these different settings, consisting of ConvRNN, ConvLSTM, ConvGRU Additive Prediction (Add), Full Prediction (Full). To compare with the recurrent framework in [9, 13], we also implement the settings in Eq. (5) (Iter), in which previous states are not reserved. In Table 4, we report the results.

Dataset Rain800 Rain100H
Meassure PSNR SSIM PSNR SSIM
SCAN 23.45 0.8112 23.56 0.7456
Iter+Add 23.36 0.8169 22.81 0.7630
ConvRNN+Add 24.09 0.8410 23.34 0.7765
ConvRNN+Full 23.52 0.8269 23.44 0.7643
ConvGRU+Add 23.31 0.8444 24.00 0.7993
ConvGRU+Full 24.18 0.8394 26.45 0.8458
ConvLSTM+Add 22.93 0.8385 25.13 0.8211
ConvLSTM+Full 24.37 0.8384 25.64 0.8334
Table 4: Quantitative comparison between different settings of RESCAN. Iter represents the framework that leaves out states of previous stages as [9, 13]. Add and Full represent the addtive prediction framework and the full prediction framework, respectively.

It is obvious that Iter cannot compete with all RNN structures, and is not better than SCAN, as it leaves out information of previous stages. Moreover, ConvGRU and ConvLSTM outperform ConvRNN, as they maintain more parameters and require more computation. However, it is difficult to pick the best unit between ConvLSTM and ConvGRU as they perform similarly in experiments. For recurrent frameworks, results indicate that Full Prediction is better.

6 Conclusions

We propose the recurrent squeeze-and-excitation based context aggregation network for single image deraining in this paper. We divide the rain removal into multiple stages. In each stage, the context aggregation network is adopted to remove rain streaks. We also modify CAN to better match the rain removal task, including the exponentially increasing dilation and removal of the BN layer. To better characterize intensities of different rain streak layers, we adopt the squeeze-and-excitation block to assign different alpha-values according to their properties. Moreover, RNN is incorporated to better utilize the useful information for rain removal in previous stages and guide the learning in later stages. We also test the performance of different network architectures and recurrent units. We conduct extensive experiments on both synthetic and real-world datasets, which shows that our proposed method outperforms the state-of-the-art approaches under all evaluation metrics.

Acknowledgment.  Zhouchen Lin is supported by National Basic Research Program of China (973 Program) (Grant no. 2015CB352502), National Natural Science Foundation (NSF) of China (Grant nos. 61625301 and 61731018), Qualcomm, and Microsoft Research Asia. Hong Liu is supported by National Natural Science Foundation of China (Grant nos. U1613209 and 61673030). Hongbin Zha is supported by Beijing Municipal Natural Science Foundation (Grant no. 4152006).

References