# An Enhanced Aircraft Carrier Runway Detection Method Based on Image Dehazing
## 3 Materials and Methods
### Dehaze Implementation
#### 3.1.2 MixAttention Module  
In hazed images, compared to clears, there are primarily two differences: decreased image contrast and loss of edge and texture information. To address these issues, we believe that appropriate attention modules should be employed to enable the network to selectively focus on specific information in the image. Inspired by recent advances in attention mechanisms in machine learning, we propose the MixAttention module. The module integrates both simple spatial attention (SPA), simple channel attention (SCA) mechanisms and feed-forward network (FFN), and fuses the feature information from these two attention modules through a linear mapping layer. The simple spatial attention mechanism primarily calculates cross-pixel attention weights for multi-dimensional features, emphasizing edges, textures, and dense blurry regions within the image. Meanwhile, the channel attention mechanism computes cross-channel attention weights for multi-dimensional features, focusing on color distribution characteristics within the image. The input of the MixAttention module undergoes Layer Normalization followed by re  
Figure 2: Network architecture of the proposed model. The model is a modified 5-stage U-shape Net. The input shape is H \(\times W\times C\) and the feature maps in each stage are shown below every block.  
spective processing through pixel-wise convolutional layers and depth-wise convolutional layers. Subsequently, after non-linear activation, the features are passed through SCA and SPA to obtain cross-channel and cross-pixel fusion feature information. After attention fusion, the FFN increases the dimensionality of the feature maps obtained through attention operations, applies non-linear activation functions, and then reduces the dimensionality to enhance feature representation capacity. The MixAttention model is shown in Figure 3.  
The implementation details of SPA and SCA can be found in Figure 4. From the figure, it can be observed that the attention computation of SPA and SCA are both divided into two branches. After element-wise multiplication, attention-weighted calculation output is obtained. The difference lies in the fact that when the feature map \(F_{non}\in\mathbb{R}^{H\times W\times C}\) undergoes the non-linear branch of SCA, the shape of the feature map changes to \(\mathbb{R}^{C}\), in contrast, SPA does not reshape. The SPA and SCA can be individually formulated as:  
\[F_{spa}[h,w,k]=\sigma(\sum_{c=1}^{C}w(c)F_{non}[:,:,c+k])\times\sum_{i=1}^{H} \sum_{j=1}^{W}\sum_{c=1}^{C}w[i,j,c]F_{non}[h+i,w+j,c+k], \tag{1}\]  
\[F_{sca}[h,w,k]=\sigma(\sum_{c=1}^{C}w(c)\mathcal{P}(F_{non}[:,:,c+k]))\times F _{non}[h,w,k], \tag{2}\]  
where \(\sigma\) denotes the Sigmoid activation function, \(\times\) means the element-wise multiplication operation, \(w(c)\) and \(w[i,j,c]\) are the attention weights at point \([:,:,c]\) or \([i,j,c]\) of the channel and spatial attention mechanisms, respectively, \(\mathcal{P}\) represents the global average pooling operation, \([h,w,k]\) is the pixel point coordinate of the feature map, and \(F_{non}\) is the input feature map.  
Figure 4: Implementation details of the SPA and SCA module.  
Figure 3: The structure of MixAttention architecture. In the attention fusion part, it consists of two different attention mechanisms: SPA and SCA.