# Single Image Reflection Removal Based on Residual Attention Mechanism
## 3 Proposed Method  
### Network Architecture  
The RABRRN proposed by us is an iterative network based on ConvLSTM, whose architecture is shown in Figure 1. It is a dual-stream network consisting of one encoder and two decoders as two branches. Additionally, there are skip connections between some layers of the encoder and the corresponding layers of the two decoders to avoid ambiguous results. Furthermore, a ConvLSTM is added between the decoder and the two branches. One branch is used to predict the transmission layer T, while another branch is utilized to predict the reflection layer R. As shown in Figure 1, for the encoder, there are 11 convolutional layers, and a ResCbamBlock is added after the first, the third, and the sixth layers, respectively. There are 8 convolutional layers in each decoder and the two decoders share the same structure. Both the encoder and the decoders use a ReLU activation function behind each layer. A Sigmoid activation function and a Tanh activation function are used in the ConvLSTM. The discriminator in our model has a 6-layer network, which will be described in detail below. The role of the discriminator is to receive the generated images and identify the authenticity of the images. It is well known that attention exerts a remarkable impact in human perception. One of the most fundamental characteristics of the human visual system is that there is no need to process an entire scene at once. Instead, humans deliberately focus on some important sections of the image through a series of partial glimpses to better capture the visual structure. Therefore, we argue that reflection removal is an issue of spatial variational occlusion removal sensitive to both spatial and channel factors, rather than just a problem of basic picture layer separation. CBAM is a type of attention mechanism that adaptively refines features in channel and space, which are two separated dimensions. Before the residual network [30] was proposed, the problem of vanishing gradient occurred as a result of increased depth in deep neural networks. The training set loss gradually lowers as the amount of network layers grows, and then the loss tends to become saturated. If the network depth increases continuously, the training loss will decline step by step. With the residual block (ResBlock) introduced, which is the fundamental block of the residual network, the neural network can reach a much greater depth, and the performance will also be better. In this paper, we combined CBAM and ResNet into a residual attention network module (ResCQamBlock), which increases the depth of the network and enhances the channel and spatial representation, thus improving the feature extraction ability of the network. The structure of the ResCQamBlock is illustrated in Figure 2. The input of the ResCQamBlock is feature map x. Additionally, after two convolutions, the refined feature map x\({}^{\prime\prime}\) can be acquired from x. Then, in the channel attention block, two pooling operations (max-pooling and average-pooling) are added to x\({}^{\prime\prime}\) to extract two vectors. These two vectors are input into the shared network (SN), then merged with the output feature vectors using element-wise summation to obtain the channel attention map (Mc(x\({}^{\prime\prime}\))). The SN consists of a multi-layer perceptron (MLP) and a hidden layer. The feature map x\({}^{\prime\prime\prime}\) with enhanced channel features is obtained by multiplying Mc(x\({}^{\prime\prime}\)) and x\({}^{\prime\prime}\) in an element-wise manner. Subsequently, in the spatial attention block, two pooling operations are used to generate two 2D maps representing the mean-pooling and max-pooling features of the entire channel, respectively. The two maps are connected with each other, and then,  
Figure 1: The framework of RABRRN. Where the symbol \(\oplus\) denotes the feature stitching of the image. \(\otimes\) denotes the combination of the transmitting and reflecting layers.