# A Semi-Supervised Deep Learning Framework for Change Detection in Open-Pit Mines Using SAR Imagery
## 3 Method
### Pseudo Labeling  
To further improve the performance of our model, we also tested a pseudo-labeling pipeline whose patch selection mechanism was extracted from two existing methodologies in the literature [38; 39]. Pseudo-labeling techniques use the network's output as labels for additional training data. This allows the network to use unlabeled data, which can be particularly useful when annotated data are scarce or expensive to obtain. The two categories of pseudo-label techniques are online and offline methods. Online generation creates pseudo-labels iteratively during the training process. On the other hand, offline generation generates pseudo-labels only once during training. The benefit of offline learning is that the pseudo-label does not change with each iteration, and the more iterations we train before the generations, the higher the quality of the pseudo-label. Instead, the online generation approach requires a consistent quality of pseudo-label during the training process. Unfortunately, in the SAR domain, the amplitude distributions acquired in different areas are not always comparable. As a result, introducing pseudo-labels online makes training unstable. We, therefore, opted to generate labels offline and retrain the network from scratch using the expanded training set. For a binary classification task, let  
Figure 2: Early fusion U-Net model. \[D=\{(x_{i},y_{i}):i\in(1,\ldots,N)\} \tag{10}\]  
be the labeled set with N samples, where \(y_{i}\) is the ground truth of the \(i\)th sample and \(x_{i}\) its corresponding feature image, as defined in Equation (5). Let define  
\[U=\{u_{i}:i\in(1,\ldots,M)\} \tag{11}\]  
as an unlabeled set with M samples, where \(u_{i}\) is the feature image of the \(i\)th sample. We first train the CNN on the labeled training set \(D\), \(\mathcal{M}_{D}\). Once the network is trained on the initial labeled training set \(D\), we then used this to predict the labels for the unlabeled set \(U\). In particular, we use the model trained using \(D\) to generate the predictions for the unlabeled set \(U\). We then identify the patches, as in [39], where we are confident in the change or no change classification for at least 90% of pixels within the patch. \[\hat{I}=\left\{i\Biggm{|}\Biggm{(}\sum_{ \begin{subarray}{c}w=1,\ldots,W\\ h=1,\ldots,H\end{subarray} }\mathbb{1}((\mathcal{M}_{D}(u_{i}))(w,h)>c)\Biggm{)} >(q\cdot H\cdot W)\quad\forall i\in\{1,\ldots,M\}\Biggm{\}}\right\} \tag{12}\]  
where \(c=0.85\) is the confidence threshold, \(q=0.9\) is the pixel proportion threshold, \(\mathbb{1}\) is the identity matrix, and \(h\) and \(w\) are the dimensions (height and width) of the image. Finally, we add these predicted labels to the training, selecting a maximum number of them to be at most equal to the number of the original training set, as  
\[I\subseteq\hat{I}\,s.t.\ |I|\leq N\] \[\hat{D}=D\cup\{(u_{i},1(\mathcal{M}_{D}(u_{i})>0.5))|i\in I\} \tag{13}\]  
We retrain the network on this new expanded set, using the same loss function as before, Equation (8). Algorithm 1 illustrates the pseudo-code, and Figure 3 shows a schematic view of our pseudo-labeling. In the experiments presented in the next section, we show that the semi-supervised strategy improved the classification performance. ```
0: Labeled set \(D=\{(x_{i},y_{i}):i\in\{1,\ldots,N\}\}\), unlabeled set \(U=\{u_{i}:i\in\{1,\ldots,M\}\}\), confidence threshold \(c\), pixel proportion thresholds \(q\)
1: Train a model on \(D\) for K epochs and save the model \(\mathcal{M}_{D}\)
2: Generate the predictions on the unlabeled set \(U\) identifying the patches with high-confidence predictions: \[\hat{I}=\left\{i\Biggm{|}\Biggm{(}\sum_{ \begin{subarray}{c}w=1,\ldots,W\\ h=1,\ldots,H\end{subarray}