# SnowMamba: Achieving More Precise Snow Removal with Mamba
## 2 Methods
### SEBlock  
To enable the network to better differentiate snowflake particles and enhance the learning of global snowflake features, this paper introduces the SEBlock [25] to help the network to more accurately identify snowflakes and background information. In this work, SEBlock is employed to strengthen the model's channel modeling and improve its perception of snowflake features, allowing the network to more precisely distinguish and identify the relationships between snowflakes and the background in images. As shown in the network architecture diagram (Figure 2), SEBlock adaptively weights the features of different channels. This enables the network to focus more precisely on features related to snowflake details in diverse image desnowing scenarios, reducing the influence of background and other irrelevant information on snowflake recognition, thereby improving the overall desnowing performance. Specifically, during the squeeze phase, SEBlock aggregates global information from the input feature map by fusing each channel's global features through global average pooling, achieving global perception for each channel. In the excitation phase, to enable the network to learn more smooth and detailed information and improve its capacity for capturing complex features, this paper sets the activation function in SEBlock to GeLU. The SEBlock generates a weight coefficient for each channel via a fully connected layer followed by the GeLU activation function. These weight coefficients reflect the importance of each channel. The network then adjusts the features of different channels based on these weights, enabling it to more accurately capture the intricate details of snowflake features and further enhance these relevant details during the desnowing process. Therefore, the SE module provides the network with more refined feature representations, ultimately making the image desnowing process more precise and efficient. The following describes the implementation process of squeeze and excitation in the SE module. **Squeeze:** The spatial dimensions (height and width) of the input snowflake feature map are transformed into channel descriptors through Global-Average Pooling. Suppose that the input feature map is a tensor with the shape \(H\)WC, where H and W are the height and width of the feature map, and C is the number of channels. After Global-Average Pooling, the average value for each channel is obtained:  
\[z_{c}=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}x_{ijc} \tag{1}\]  
Here, \(x_{ijc}\) represents the activation value of the \(c\)-th channel at position \((i,j)\), and \(z_{c}\) represents the squeezed result of the \(c\)-th channel. **Excitation:** The compressed channel descriptors are excited through a fully connected layer to generate inter-channel dependencies. This process generates the weights for each channel using a two-layer fully connected network. First, the feature descriptors pass through a fully connected layer:  
\[s_{c}=\sigma(W_{2}\delta(W_{1}z)) \tag{2}\]  
where \(W_{1}\) and \(W_{2}\) are the weight matrices of the fully connected layers, \(\delta\) is the ReLU activation function, and \(\sigma\) is the Sigmoid activation function, used to map the output to the range [0, 1]. The final generated \(s_{c}\) is the excitation coefficient for each channel. **Re-weighting Operation:** Each channel of the original feature map is weighted according to the computed excitation coefficients. This can be described as  
\[\hat{x}_{ijc}=x_{ijc}\cdot s_{c} \tag{3}\]  
where \(x_{ijc}\) is the weighted feature map, and \(s_{c}\) is the excitation coefficient for that channel. In this paper, the image dataset is relatively large, and the network depth is broad. To make the SE module more suitable for the image desnowing task, the ReLU activation function is replaced with the smoother and better-performing GELU activation function.