# A Semi-Supervised Deep Learning Framework for Change Detection in Open-Pit Mines Using SAR Imagery
## 3 Method  
Change detection is the process of identifying changes in a scene between two or more co-registered acquisitions. We defined change detection as a binary segmentation task carried out on pair of SAR images of the same area. The goal is to generate a binary map \(y\in\{0,1\}^{H\times W}\) such that \(y(i,j)=1\) when there is a change in location \((i,j)\) and \(y(i,j)=0\) when there is not. Our change detection model employs a U-Net [36], a standard encoder-decoder CNN used for semantic segmentation. The small number of training patches available was the primary motivation behind utilizing the U-Net architecture. As previously mentioned, to achieve a well-balanced training dataset with approximately 50% of the patches containing at least one change pixel, we applied a random subsampling technique to discard patches without changes. By reducing the number of negative samples in the training data, we ensured a more stable and effective training procedure, mitigating the impact of the small number of training patches on the model's performance. This approach allowed us to maximize the utility of the available training data and optimize the change detection capabilities of our model. By utilizing the U-Net architecture, we tried to optimize the performance of our change detection model, despite the challenges posed by the small dimensions of our dataset, and to effectively capture and leverage contextual information while minimizing the risk of overfitting. Despite that, in the Appendix A, we compare three different change detection models taken from the literature. As we will show, the results confirm U-Net's ability to perform well with few training data. Indeed, the comparison of architectures showed a negative impact on open-pit mine change detection performance due to limited training patches. The scarcity of data restricts the models' ability to adapt to variations and complexities in the open-pit mine environment, necessitating a large and variegated training dataset to achieve accurate change detection results. Figure 1: Example of SAR amplitudes, coherence, and ground truth patches extracted from our SAR change detection training dataset. Higher coherence values (red pixels equal to 1) indicate a high degree of similarity between the radar returns. Lower coherence values (blue pixels equal to 0) indicate a low degree of similarity between the radar returns. Denoting with \(z_{before}\in\mathbb{C}^{H\times W}\) and \(z_{after}\in\mathbb{C}^{H\times W}\) the two SAR complex images, let us define \(x_{before}\) and \(x_{after}\) as their amplitude and \(\rho\) as an estimation [35] of their coherence:  
\[ \begin{split}& x_{before}=||z_{before}||\in\mathbb{R}^{H\times W}\\ & x_{after}=||z_{after}||\in\mathbb{R}^{H\times W}\\ &\rho=C(z_{before},z_{after})\in\mathbb{R}^{H\times W}\end{split}  \tag{1}\]  
The range of the amplitude values of real SAR images can be extremely broad, varying across different target sites and radar sensors. This distribution variability can greatly influence the training of deep learning models and, for this reason, we had to normalize the original SAR amplitudes. In this work, we adopted the same modified z-score, followed by a non linear normalization to the range [0-1] used in [35]. First, for the amplitude image \(x_{i}\), we calculate the median absolute deviation (MAD) value using the following equation:  
\[MAD=median(|x_{i}-x_{dataset}|) \tag{2}\]  
Here, \(x_{dataset}\) represents the median amplitude computed over the entire dataset. Next, we transform the data into the modified \(Z\)-score domain by applying the following equation:  
\[x_{i}^{mz}=\frac{0.6745\times(x_{i}-x_{dataset})}{MAD} \tag{3}\]  
In this equation, \(x_{i}^{mz}\) represents the pixel-wise modified \(Z\) score. The fixed constant 0.6745, derived from [37], approximates the standard deviation. This transformation effectively shifts any potential outliers far from zero.