# Haze-Aware Attention Network for Single-Image Dehazing
## 3 Method
### Haze-Aware Attention Module  
We introduce a new Haze-Aware Attention Module(HAAM), which cleverly applies physical models at the feature level to guide the model in feature extraction, thus pulling out a lot of potentially important features. Empirical evidence demonstrates that this module not only provides good interpretability but also significantly improves performance metrics. Impressively, it is likely that the introduction of the physical model makes our module more robust and adaptable for processing real images. As shown in the Figure 2, especially for the restoration of sky areas, it significantly outperformed other state-of-the-art methods, thus making the enhanced images more visually appealing. Next, we will delve into the principles of the model. Initially, leveraging the atmospheric scattering model, the generation of a hazy image can be described as follows:  
\[I(x)=J(x)t(x)+A(1-t(x)), \tag{1}\]  
Figure 1: The overview of our Haze-Aware Attention Network architecture. We give details of the structure and configurations in Section 3. SKFusion [45] is a feature fusion method. where \(I\) symbolizes the hazy image, \(J\) represents the GT image, and \(A\) denotes the atmospheric light, and the scattering of atmospheric light can lead to a reduction in image contrast and visibility. \(T\) is the transmission map, which reflects the proportion of light that travels from a point in the scene to the camera without scattering. \(X\) indicates the pixel location. The transmission map is expressed as \(t=e^{-\beta d(x)}\), wherein \(\beta\) signifies the atmospheric scattering coefficient, and \(d\) signifies the depth of the scene. As the scene depth increases, the amount of light that reaches the camera decreases exponentially. This is because the light encounters more scattering as it passes through the atmosphere. To streamline the process for convolution operations, we reconfigure the equation and reformulate it in a matrix representation as follows:  
\[JT=I-A(1-T), \tag{2}\]  
where \(J\), \(T\), \(I\), and \(A\) denote the matrix-vector representations of \(J\), \(t\), \(I\), and \(A\), respectively. Based on the equations presented above, we constructed the Haze-Aware Attention Module in an intuitive and effective manner. We assumed that the atmospheric light is uniform and derived \(A\) by transforming the global contextual information of the entire image captured through Global Average Pooling (GAP). \[A=\sigma\Big{(}\text{Conv}^{(\frac{N}{8},N)}\Big{(}\text{ReLU}\Big{(}\text{ Conv}^{(N,\frac{N}{8})}(\text{GAP}(X))\Big{)}\Big{)}\Big{)}. \tag{3}\]  
Here, \(X\) represents the input feature map, \(\text{GAP}(\cdot)\) signifies global average pooling, \(\text{Conv}^{(N,\frac{N}{8})}(\cdot)\) refers to a convolution layer with \(N\) input channels and \(\frac{N}{8}\) output channels, \(\sigma\) denotes the Sigmoid activation function, and \(N\) is set to 64. In obtaining A, we use a process that first reduces dimensions and then increases them, which improves computational efficiency. Given that \(\text{GAP}(\cdot)\) captures global information, thus neglecting local details and textures, we employed a \(3\times 3\) convolution layer to extract features for \(T\). By introducing physical priors, this approach balances global and local features, thereby facilitating a more effective restoration of hazy images. \[T=\sigma\Big{(}\text{Conv}^{(\frac{N}{8},N)}\Big{(}\text{ReLU}\Big{(}\text{ Conv}^{(N,\frac{N}{8})}\Big{(}\text{Conv}^{(N,N)}(X)\Big{)}\Big{)}\Big{)}\Big{)}. \tag{4}\]  
Subsequently, we performed elementwise multiplication between \(A\) and \((1-T)\). \(JT\) was obtained via \(X-A(1-T)\). Given that division might lead to training instability, we approximated \(T^{\prime}\), representing \(\frac{1}{T}\), using the following formula:  
\[T^{\prime}=\sigma\Big{(}\text{Conv}^{(\frac{N}{8},N)}\Big{(}\text{ReLU}\Big{(} \text{Conv}^{(N,\frac{N}{8})}\Big{(}\text{Conv}^{(N,N)}(X)\Big{)}\Big{)}\Big{)} \Big{)}. \tag{5}\]  
Finally, \(J\) was acquired through \(J=X-A(1-T)\cdot T^{\prime}\).