## 2 Materials and Methods
### Details Structure of LightExNet
#### 2.2.2 Channel Attention Module  
In convolutional neural networks, each channel in the feature map functions can be regarded as a specialized feature detector. It is possible to give them a weight, giving more attention to the important channels and less to the relatively useless channels, which can improve the feature extraction capability of the network. In order to efficiently compute channel attention, the global spatial information within each channel needs to be compressed into a single channel descriptor. Traditional methods usually use only average pooling to compress spatial information, and study [40] demonstrates that a combination of tied pooling and maximum pooling can be used to infer channel attention in a more fine-grained way. Additionally, most of the current channel attention modules summarize the spatial information by violent encoding, i.e., the size of the feature map is compressed directly from \(C\times H\times W\) (where \(C\) denotes the number of channels of the feature map, \(H\) denotes the height, \(W\) denotes the width) to \(C\times 1\times 1\), which has the advantage of simplicity, but also inevitably loses more information. To address this limitation, we proposes a novel channel attention module based on the two-step method, which can encode the spatial features more finely, and insert them into the deep and shallow feature fusion, in order to pay attention to those channels with larger gains and suppress irrelevant features.  
The proposed channel attention module is shown in Figure 5. Unlike existing methods, this method aggregates spatial information in two steps. The spatial information of the feature maps is first aggregated by average pooling and maximum pooling to different dimensions to retain more spatial information. The feature maps are first compressed to \(C\times 3\times 3\) and \(C\times 1\times 1\) size by average pooling, and similarly compressed to \(C\times 3\times 3\) and \(C\times 1\times 1\) size by maximum pooling, in which the spatial information retained by average pooling and maximum pooling to feature maps with the size of \(C\times 3\times 3\) is 9 times more than that of the feature maps with the size of \(C\times 1\times 1\), so as to facilitate further learning of spatial features. Then the two types of feature maps with the size of \(C\times 3\times 3\) are convolved with 3 \(\times\) 3 depth-separable convolution to generate two \(C\times 1\times 1\) feature maps, and the four \(C\times 1\times 1\) feature maps are summed element by element. In order to reduce the number of parameters, the convolution kernel of the \(3\times 3\) depth-separable convolution is shared for each feature map. The merged feature maps are subsequently normalized through sigmoid activation, and each channel descriptor is compressed to the range of 0 to 1, that is, the channel attention map is obtained. The channel attention is calculated as Formula (2):  
\[\begin{array}{l}M_{C}=\sigma(\mathbf{k}_{3\times 3}*AvgPool(\mathbf{F})_{3\times 3}+ AvgPool(\mathbf{F})_{1\times 1}+\\ k_{3\times 3}*MaxPool(\mathbf{F})_{3\times 3}+MaxPool(\mathbf{F})_{1\times 1})\end{array} \tag{2}\]  
where: \(\mathbf{K}_{n\times n}\) denotes the \(n\times n\) depth-separable convolutional kernel. \(\mathbf{F}\) denotes the input feature map; \(\sigma\) denotes the activation function. Finally, we need to multiply the input feature map \(\mathbf{F}\in\mathbf{R}^{C\times H\times W}\) with the obtained channel attention map \(M_{C}\) to get the weighted feature map, which is calculated as follows Formula (3):  
\[\begin{array}{l}\mathbf{F}_{\text{out}}^{C}=\mathbf{M_{C}}\otimes\mathbf{F}\end{array} \tag{3}\]  
In the Formula (3) \(\otimes\) denotes element-by-element multiplication.