# Edge-Guided Hierarchical Network for Building Change Detection in Remote Sensing Images
## 2 Methods
### Edge-Extracted Module  
The low-level features of an image refer to features such as contours, edges, colors, texture shapes, etc., which can provide the exact location of the target features. Although the low-level features contain rich edge detail information, the image scene in the low-level features is more complex, and it is easy to introduce the edges of some non-changing target objects, which interferes with the change detection of the features. Therefore, this algorithm considers using high-level semantic features to assist the low-level features in locating the target object, exclude the interference of non-changing regions, and extract the edge information of changing features. The structure of the edge-extracted module to realize this function is shown in Figure 2.  
Figure 2: Structure of Edge-Extracted Module.  
In the edge-extracted Module, the highest-resolution features and the lowest-resolution features jointly extract the change target edges. As shown in Figure 2, this module contains four inputs, which are two by two for change feature extraction:  
\[F_{1} =\left|F_{t1}^{1}-F_{t2}^{1}\right| \tag{1}\] \[F_{5} =\left|F_{t1}^{5}-F_{t2}^{5}\right|\]  
The edge-extracted module can estimate the edge region in a remote sensing image for each spatial location (\(i\), \(j\)). Specifically, it searches the suitable points within a \(k\times k\) window centered at point (\(ki\), \(kj\)) in feature \(F_{1}\). For each location \(F_{5}(i,j)\in\mathbb{R}^{1\times 1\times C}\), it is sent to the edge-extracting unit together with the corresponding position \(F_{1}(ki,kj)\). For each \(F_{1}(ki,kj)\in\mathbb{R}^{k\times k\times C}\), it is split into \(k^{2}\)th \(1\times 1\times C\) vectors \(V_{1}\) according to its position and then computed with \(F_{5}(i,j)\) in the edge-extracting unit. The edge-extracting unit is used to combine coarse and fine features in order to extract the edge information and get the location feature \(F^{\prime}(i,j)\) at each position. The formula is as follows:  
\[F^{\prime}(i,j)=M(w[V_{1}(ki,kj),F_{5}(i,j)]\forall i\in\{1,2,\ldots,k\},j\in \{1,2,\ldots,k\}) \tag{2}\]  
where \(w\) denotes a parametrically learnable MLP and \(M\) denotes an operation that permute \(1\times 1\times C\) vectors as a \(k\times k\times C\) tensor by its original position. \(k\) denotes the size difference multiple between two features.  
Next, all location features are integrated along their original location by concatenating operation to obtain fusion edge feature \(F^{\prime}\), the process that can be denoted as follows:  
\[F^{\prime}=M(F^{\prime}(i,j)\forall i\in\{1,2,\ldots,H\},j\in\{1,2,\ldots,W\}) \tag{3}\]  
where \(M\) denotes an operation that permutes \(k\times k\times C\) tensors as a \(H\times W\times C\) tensor by its original position. H and W denote the height and width of the feature \(F_{1}\).  
Based on the above fusion feature \(F^{\prime}\), a \(3\times 3\) convolutional layer and a Sigmoid function are used, and finally, the edge feature \(F_{edge}\) is obtained, and this process can be denoted as follows:  
\[F_{edge}=\sigma\big{(}Conv_{3\times 3}(F^{\prime})\big{)} \tag{4}\]  
where \(\sigma\) denotes the sigmoid function, and \(Conv_{3\times 3}\) denote the convolutional layers with convolutional kernel size \(3\times 3\).