## 2 Transmission Line Ice Cover Monitoring System
### Expectation Maximization Dynamic Convolutional Attention Mechanism (EM-DCA)  
The scenes of transmission lines are complex, and insulators are often located in areas with color confusion, which poses a significant challenge for the network in distinguishing between foreground and background. The baseline model has not been optimized for such scenarios, resulting in suboptimal performance; the model struggles to adapt to different scenes or environments, making it difficult to accurately identify and localize insulator targets [14]. Furthermore, the baseline model's features have certain limitations during the information fusion process, as they cannot effectively focus on critical areas or objects. The traditional attention mechanism often employs channel reduction to model cross-channel relationships, which makes it challenging for the network to retain information in each channel, leading to poor model performance and difficulty in achieving the expected results. In light of this, this paper adopts the Expectation Maximization Attention Mechanism to focus on and utilize important information within the input data. This approach helps the model allocate attention more effectively, concentrating on essential targets or scene segments and learning more generalized feature representations. This, in turn, enhances the model's generalization ability and robustness. As shown in the Figure 5, let the input feature be \(F\in R^{C\times H\times W}\), where \(C\) represents the number of input channels, and \(H\) and \(W\) represent the height and width of the input features, respectively. The feature \(F\) is divided into \(G\) sub-features along the channel dimension, where \(G<<C\). Thus, \(F\) can be expressed as:  
\[F=\left[F_{0},F_{i},\cdots,F_{G-1}\right],\ F_{i}\in R^{C//G\times H\times W} \tag{12}\]  
The EM-DCA attention mechanism consists of four branches, with three parallel paths extracting attention weight descriptions for the grouped feature maps. There are two 1 \(\times\) 1 branches and one 3 \(\times\) 3 branch. Two global average pooling operations are used in the 1 \(\times\) 1 branches to encode the channels along two spatial directions, while the 3 \(\times\) 3 branch includes a multi-dimensional dynamic convolution to capture multi-scale feature representations. Two parallel 1D feature encoding vectors share a 1 \(\times\) 1 convolution, allowing the model to capture local cross-channel interactions. The formula for encoding global information along the channel \(C\) at a height \(H\) is given by:  
\[P_{\text{c}}^{H}(H)=\frac{1}{W}\sum_{0\leq i\leq W}x_{c}(H,i) \tag{13}\]  
The formula for the pooling output along channel (\(C\)) at width (\(W\)) is:  
\[P_{\text{c}}^{W}(W)=\frac{1}{H}\sum_{0\leq j\leq H}x_{c}(j,W) \tag{14}\]  
The 3 \(\times\) 3 branch captures local cross-channel interactions through convolution to expand the feature space. It not only encodes information between channels to adjust the importance of different channels but also retains precise spatial structural information within the channels. Figure 5: Expectation Maximization Dynamic Convolutional Attention, EM-DCA. The cross-spatial learning establishes a dependency relationship between channels and space, achieving richer feature aggregation. Using two-dimensional global average pooling, the output in the 1 \(\times\) 1 branch encodes global spatial information, and the output of the minimum branch is transformed to the corresponding dimension shape:  
\[P_{c}=\frac{1}{H\times W}\sum_{j}^{H}\sum_{i}^{W}\left(i,j\right) \tag{15}\]  
Finally, the outputs of each branch are computed as attention weight values, combined with global semantic information to capture key regions. This module helps the model to more effectively capture critical information in the input data and dynamically adjust the attention distribution based on the importance of different features.