## 2 Materials and Methods
### WRPM: Weather-Robust Preprocessing Module
#### 2.4.4 Defogging Process  
For the processing pipeline of streetscape data affected by adverse weather conditions, the WRPM module employs a collaborative mechanism of dual-path parallel processing and adaptive feature fusion. The input hazy image undergoes feature extraction through a dual-branch structure, which involves two specific processes: dual-branch feature extraction and module feature fusion.  
**Step 1: Dual-branch feature extraction.** The input image is simultaneously fed into two branches: the dense fog processing branch and the light fog processing branch. In the dense fog branch, FFA-Net constructs a deep feature extractor through cascaded residual blocks. Each residual block integrates \(CA_{\text{ffa}}\) and \(PA_{\text{ffa}}\) in an embedded manner, enabling dynamic weight allocation for feature channels and pixel-level spatial focus. The light fogprocessing branch adopts an LS-UNet network with a symmetric structure. The feature representation capability is enhanced using the method described in Equation (9).  
\[F_{\text{middle}}=PA_{\text{ffa}}(CA_{\text{ffa}}(\text{DoubleConv}(F_{\text{enc} }))) \tag{9}\]  
Among them, \(F_{\text{enc}}\) is the feature output by the encoder. \(CA_{\text{ffa}}\) and \(PA_{\text{ffa}}\) adopt the channel attention and pixel attention mechanisms in FFA-Net. \(DoubleConv\) represents two consecutive \(Conv\) operations. In the decoding stage, transposed convolution is used for the upsampling operation, and the feature of the corresponding encoding layer is concatenated in channels through skip connection. This structure retains high-frequency details. At the same time, through multiscale feature fusion, it enhances the texture restoration ability of the hazy area.  
After the dual-branch feature extraction, we obtain the feature maps \(F_{\text{ffa}}\in\mathbb{R}^{C\times H\times W}\) and \(F_{\text{unet}}\in\mathbb{R}^{C\times H\times W}\) from the corresponding dual-branch of image output. These feature maps are then input into the FIM. This module performs feature integration through a three-stage attention mechanism, ultimately generating the output. The module first generates the base fused features by element-wise addition, as shown in Equation (10), where \(\oplus\) denotes element-wise addition.  
\[F_{\text{base}}=F_{\text{ffa}}\oplus F_{\text{unet}} \tag{10}\]  
**Step 2: Module feature fusion.** After generating the base fused features, we optimize the features using a dual attention mechanism. First, channel attention is applied by performing global average pooling on the base fused features, followed by two convolutional layers and nonlinear activation functions to generate channel weights \(W_{c}\), which capture the importance of each channel. Then, spatial attention is applied by performing max pooling and average pooling on the base fused features, concatenating the two pooling results, and using a convolutional layer to generate spatial weights \(W_{s}\), which focus on critical spatial regions. Finally, through the process in Equation (11), the base fused features are combined with the channel weights and spatial weights. Through convolution and activation functions, pixel-level fusion weights \(W_{p}\) are generated, enabling adaptive pixel-level fusion to obtain \(F_{\text{fusion}}\).  
\[F_{\text{fusion}}=F_{\text{base}}\oplus(W_{p}\odot F_{\text{ffa}})\oplus((1-W_ {p})\odot F_{\text{unet}}) \tag{11}\]  
The final output is corrected through convolution to obtain \(F_{\text{output}}\), as shown in Equation (12).  
\[F_{\text{output}}=\text{Conv}(F_{\text{fusion}}) \tag{12}\]  
The streetscape data, formatted as \(S_{size\times size}^{(k_{1},\ k_{2},\ldots,k_{n})}\), undergoes processing through the WRPM method. Upon completion of the dehazing process, the resulting data is obtained in the form of \(Sw_{size\times size}^{(k_{1},\ k_{2},\ldots,k_{n})}\), representing the state of the image after haze removal.