## 3 Methods
### Encoder  
#### 3.2.1 Pseudo-Siamese Fusion Encoding Network  
During the encoding process, most building area segmentation methods for SAR images use a single CNN to extract building area features. Although the encoding method performs well in terms of computational efficiency, the influence of speckle noise and geometric distortions in SAR images hinders the extraction of deep-level features of building areas using a single CNN. Pseudo-Siamese networks adopt certain concepts from Siamese  
Figure 1: The structure overview of PSANet.  
networks, allowing input data to be processed through distinct networks to extract different features from the same data [23]. Motivated by the architecture, we designed an encoding network based on the Pseudo-Siamese structure that fuses features extracted by different networks during the encoding phase, aiming to produce richer feature representations that enable PSANet to segment building areas from SAR images more accurately.  
To efficiently extract features of building areas while reducing the computational cost, we employed the residual neural networks ResNet18 and ResNet34 [24]. The ResNet18 and ResNet34 networks used in our study were modified by removing the global pooling and fully connected layers. The modified models retain the first convolutional layer and four residual modules, totaling five components. The features output by these components are denoted as \(F^{1}_{18}\), \(F^{2}_{18}\), \(F^{4}_{18}\), \(F^{4}_{18}\), and \(F^{5}_{18}\) for the ResNet18 network, and \(F^{1}_{34}\), \(F^{2}_{34}\), \(F^{3}_{34}\), and \(F^{5}_{34}\) for the ResNet34 network. The computational processes of the first convolutional layer and the residual modules are outlined below:  
\[F^{1}_{18}=ReLU(BN(f^{3\times 3}(input))) \tag{1}\]  
\[F^{i}_{18}=ReLU(BN\ (f^{3\times 3}(ReLU\ (BN(f^{3\times 3}(F^{i-1}_{18})))))+f ^{1\times 1}(F^{i-1}_{18})),\ i=2,3,4,5 \tag{2}\]  
where \(BN(\cdot)\) denotes the batch normalization, \(ReLU(\cdot)\) denotes the \(ReLU\) function, \(f^{1\times 1}(\cdot)\) denotes the computation using a \(1\times 1\) convolution kernel, and \(f^{3\times 3}(\cdot)\) denotes the computation using a \(3\times 3\) convolution kernel.  
During the fusion of the two groups of features extracted from ResNet-18 and ResNet-34, a fusion encoding algorithm was designed, as presented in Figure 2.  
First, the features \(F^{1}_{18}\) and \(F^{1}_{34}\) extracted from ResNet18 and ResNet34 were concatenated. Next, the concatenated features were padded with zeros on both sides, followed by a convolution operation that reduced the channel number by half. Meanwhile, a batch normalization layer (BN) and ReLU activation function were sequentially applied after each convolution operation. Finally, to prevent gradient loss, a similar operation was applied again, but the channel count remained unchanged, resulting in the fused feature \(F^{1}_{18,34}\). Differently, for each subsequently generated fusion feature \(F^{n}_{18,34}\), where \(n=2\), \(3\), \(4\), \(5\) correspond to the four features generated by fusing the residual modules in ResNet-18 and ResNet-34, we concatenated the previous fusion feature in the fusion algorithm. Their calculation formulas are as follows:  
\[F^{1}_{18,34}=ReLU(BN(f^{3\times 3}(ReLU(BN(f^{3\times 3}(C(F^{1}_{34},F^{1}_{18})))))) \tag{3}\]  
\[F^{n}_{18,34}=ReLU(BN(f^{3\times 3}(ReLU(BN(f^{3\times 3}(C(F^{n}_{34},F^{n}_{18 },F^{n-1}_{18,34})))))) \tag{4}\]  
where \(C(\cdot)\) denotes the concatenation function.  
Figure 2: The structure of fusion encoding algorithm.