# Multi-Scale Aggregation Residual Channel Attention Fusion Network for Single Image Deraining
## 3 Multi-Scale Aggregation Residual Channel Attention Fusion Network
### Architecture of Model  
Figure 1 presents an overview of the proposed MARCAFNet, which uses a convolutional layer to extract features followed by three consecutive coding structure (CS) blocks of different dilation sizes [37] to recover the input image. The three blocks are aligned in ascending order according to their dilation rate. Features of various scales are captured by adopting dilation rates of 2 and 3. When a kernel of size \(3\times 3\) is coupled with a dilation rate of 2, the block obtains a receptive field of 5 \(\times\) 5 with the same parameter size as \(3\times 3\). By including a dilated convolutional layer, it is possible to obtain a larger receptive field using fewer resources. By adjusting the size of the receptive field among the three CS blocks, it is possible to learn and recover details on different scales. The recovered feature map of each block is annotated as \(F_{s}\) (dilation rate = 1), \(F_{M}\) (dilation rate = 2), and \(F_{L}\) (dilation rate = 3), where \(F_{s}\) obtains the micro-features because of the smaller dilation rate, \(F_{M}\) obtains the structural feature of the image because of the larger dilation rate, and \(F_{L}\) obtains the rain streak feature of the largest area of the image because the dilation rate is the largest. To increase the reusability of feature maps and prevent the vanishing of gradients within individual CS blocks, each encoding-decoding step is connected using densely connected convolutional layers. Features collected within each block are shared with the subsequent blocks through the CSFF block. Thereby, the next CS block can obtain the features of the previous CS block to facilitate learning via feature fusion. We use a combination of Conv2d-BN with LeakyReLU [38] for modeling using a residual channel attention block, which is a modified version of the Squeeze-and-Excitation (SE) block [39]. \(F_{s}\), \(F_{M}\), and \(F_{L}\) are subsequently fused via channel concatenation and to the SB block, which  
is responsible for modeling the correlation between \(F_{s}\), \(F_{M}\), and \(F_{L}\). The output is split into three chunks and annotated individually as \(A_{s}\), \(A_{M}\), and \(A_{L}\). \(A_{s}\), \(A_{M}\), and \(A_{L}\) record the output from \(F_{s}\), \(F_{M}\), and \(F_{L}\), respectively. These blended feature maps are then multiplied with their corresponding features to generate the outputs \(\widetilde{F}_{s}\), \(\widetilde{F}_{M}\), and \(\widetilde{F}_{L}\). Finally, they are fused via channel-wise summation and the result is activated using the sigmoid function to obtain the recovered image \(\widetilde{B}\).  
The proposed MARCAFNet was tested using two images with heavy and light rain streaking, the results of which are shown in Figure 2. In both scenarios, three sets of results are obtained based on a 3 \(\times\) 3 convolution with various dilation rates, as follows: \(F_{s}\) (dilation rate = 1), \(F_{M}\) (dilation rate = 2), and \(F_{L}\) (dilation rate = 3). A receptive field of 3 \(\times\) 3 allowed for the capture of details on the micro-scale. A receptive field of 5 \(\times\) 5 allowed for the capture of structural features. A receptive field of 7 \(\times\) 7 focused the capture of information related to features in larger areas, such as those associated with rain streaks.