## 3 Methods
### Knowledge Distillation  
In this study, knowledge distillation was employed to learn generalization knowledge from the teacher network trained on a large dataset. The specific process of knowledge distillation is illustrated in Figure 6. The input images are passed through the HRNet feature extractors of both the teacher network and the student network, resulting in image features denoted as \(F^{T}\) and \(F^{S}\), respectively. For \(F^{T}\) in the teacher network, it is separately inputted into the Mask Branch, Line Branch, and Vertex Branch. The feature \(F^{T}\) in each branch undergoes three consecutive processing units, where each unit consists of a 3 \(\times\) 3 convolutional layer, a batch normalization (BN) layer, and a rectified linear unit (ReLU) activation layer. The output of the last processing unit in each branch is, respectively, the semantic mask feature \(F^{T}_{seg}\), the line feature \(F^{T}_{line}\), and the vertex feature \(F^{T}_{ver}\). Similarly in the student network, the feature \(F^{S}\) is separately inputted into the Mask Branch, Line Branch, and Vertex Branch to obtain the semantic mask feature \(F^{S}_{seg}\), the line feature \(F^{S}_{line}\), and the vertex feature \(F^{S}_{ver}\) in the student network. Due to the well-trained teacher network on the WHU-Mix dataset, it possesses the ability and knowledge to extract structurally diverse building polygons, including the features of building semantic masks, building lines, and building vertices. Therefore, we employed the CWD (Channel-wise Knowledge Distillation) [43] to distill these capabilities of the teacher network regarding building outlines into the student network. Taking the semantic mask feature as an example, we aligned the feature distributions of each channel in \(F^{S}_{seg}\) from the student network with the corresponding channel in \(F^{T}_{seg}\) from the teacher network. Similarly, both \(F^{S}_{line}\) and \(F^{S}_{ver}\) need to be aligned with \(F^{T}_{line}\) and \(F^{T}_{ver}\) in the same manner as described for \(F^{S}_{seg}\). CWD, as it distills knowledge in the channel dimension, can effectively utilize the knowledge contained in each channel, making it suitable for dense prediction tasks such as building polygon prediction in this paper. Figure 6: The way of knowledge distillation. \(F^{T}\) and \(F^{S}\) denote the image features from HRNet of the teacher network and the student network, respectively. \(F^{T}_{seg}\), \(F^{T}_{line}\), and \(F^{T}_{ver}\) represent the features map from the Mask Branch, Line Branch, and Vertex Branch of the teacher network, respectively. \(F^{S}_{seg}\), \(F^{S}_{line}\), and \(F^{S}_{ver}\) represent the features map from the Mask Branch, Line Branch, and Vertex Branch of the student network, respectively. CWD minimizes the asymmetry Kullback-Leibler (KL) divergence between the channel-wise soft probability maps of the teacher and student networks to align the feature distributions of each channel. Therefore, the distillation loss can be defined as follows:  
\[L_{d}(T)=\frac{T^{2}}{C}\sum_{c=1}^{C}\sum_{i=1}^{W.H}\phi\left(F_{c,i}^{T} \right)\cdot log\left[\frac{\phi\left(F_{c,i}^{T}\right)}{\phi\left(F_{c,i}^{S} \right)}\right] \tag{5}\]  
where \(c=1,2,\ldots,C\) indexes the channel; and \(i\) indexes the spatial location of a channel. \(W\) and \(H\) are the width and height of the feature map respectively. \(T\) is a hyperparameter. \(F^{T}\) denotes the feature map from the teacher network and \(F^{S}\) denotes the feature map from the student network. \(\phi(\cdot)\) is used to convert the activation values into a probability distribution as below:  
\[\phi(T)=\frac{exp\left(\frac{F_{c,i}}{T}\right)}{\sum_{i=1}^{W.H}exp\left( \frac{F_{c,i}}{T}\right)} \tag{6}\]  
where \(c=1,2,\ldots,C\) indexes the channel; and \(i\) indexes the spatial location of a channel. \(W\) and \(H\) are the width and height of the feature map respectively. \(T\) is the temperature hyper-parameter.