# A Study on the Super Resolution Combining Spatial Attention and Channel Attention
## 3 Proposed Method
### CSBlock  
Existing convolution operation is a method for measuring the similarity between the center pixel value and the kernel pattern, and it outputs a higher value as it is similar to the kernel pattern. However, there is a problem in that patterns of pixels exceeding the size of the kernel cannot be extracted by multiplying the surrounding pixel values by the kernel weight. To solve this problem, pixel features can be extracted by increasing the size of the kernel or by overlapping multiple convolutions. However, many parameters and calculations are required, and the uncertainty of location information means it does not know where the feature that is extracted appears. This is further manifested in a high-frequency feature, which is a part in which a difference between a pixel value at a specific  
Figure 6: Spatial Attention Module: (**a**) Input Feature Map; (**b**) the feature map resulting from the convolution; (**c**) feature map rearranged from the convolution feature map. location and a neighboring pixel value is large. This problem is solved using CSBlock, which emphasizes high-frequency features. Figure 8 shows the structure of CSBlock that combines channel attention and spatial attention. In the first step, the input feature map was reduced through global average pooling (GAP) [24]. The relation and importance between channels was calculated using the fully connected layer [25] for the reduced feature map in the second step, and channel attention was performed through multiplication with the input feature map. In the third step, a feature map was created by calculating the relation and importance between pixels through one-channel convolution. Finally, spatial attention was performed by multiplying the feature map, which calculated the relation and importance between pixels, with the channel attention-progressed feature map. Figure 9 is the channel attention structure of the proposed method. Unlike the existing CBAM, the MAX Pool part was removed and only the average pool was applied. Through this structure, only the strong high frequency was emphasized, and it was calculated as a value between 0 and 1 by sigmoid operation. With this structure, efficient channel attention was possible with the amount of computation. \[H_{GP}(x)=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}x(i,j), \tag{7}\]  
Equation (7) is GAP, which is a process of extracting feature values for each channel to proceed with channel attention. \(H\) and \(W\) mean the height and width of the feature map, respectively. For \(H_{GP}(*)\), one channel of the feature map is averaged with one value and expressed as a representative feature value for each channel. In addition, a large number of operations and parameters are required to calculate feature maps without using GAP. GAP was used to represent a representative feature map including semantic information for each channel while reducing the number of parameters and calculations. \[s(x)=f(W_{d}\times\delta(W_{d/4}\times H_{GP}(x))), \tag{8}\]  
Figure 8: Channel Spatial Block. Figure 7: Proposed Method Architecture. Equation (8) calculates relation between channels and channel importance in the GAP obtained from \(H_{GAP}(*)\) in Equation (7). f and \(\delta\) refer to the sigmoid and ReLU activation functions, respectively, and \(W_{d}\) and \(W_{d/4}\) are the weights of the fully connected layer with \(d\) and \(d/4\) channels in the output feature map, respectively. Relation and importance between channels were calculated through two fully connected layers. Afterwards, the sigmoid activation function was calculated as an attention value between 0 and 1. The amount of computation and the number of parameters are reduced through the fully connected layer, which reduces the number of channels in the middle of the channel of the feature map. \[CA(x)=x\times s, \tag{9}\]  
Equation (9) generates an emphasized feature map by multiplying the channel attention feature map calculated through Equation (8) with the input feature map.