# Semi-Supervised Drivable Road Segmentation with Expanded Feature Cross-Consistency
## 3 Methodology
### Perturbations  
As mentioned in Section 3.1, in the training stage, perturbations are used both on the input unlabeled data and the encoder's output. In our implementation, nine types of perturbations are used:  
VAT Perturbations: They are used to push data distribution to be isotropically smooth around each data point based on virtual adversarial training, the process of which can be regarded as a kind of noise \(n_{adv}\) with the greatest impact against the gradient. We apply them in both aux-encoders and aux-decoders, formulated as \(\tilde{t}=t+n_{adv}\). \(t\) represents the input tensor, \(\tilde{t}\) represents the perturbed tensor, and \(n_{adv}\) represents the VAT perturbations.  
Dropout Perturbations: They randomly choose some positions with probability \(p\) and zero the elements in them.  
Feature Noise Perturbations: They first generate a noise tensor \(N\sim\mathcal{U}(-0.3,0.3)\) and add on the input tensor, formulated as \(\tilde{t}=(t\odot N)+t\), where \(\odot\) represents element-wise multiplication.  
Feature Drop Perturbations: They first generate a threshold \(\gamma\sim\mathcal{U}(0.7,0.9)\) and create a mask \(M=\{\tilde{t}<\gamma\}_{1}\), where \(\tilde{t}\) is the batch-level maximum of the mean value of each dimension. Finally, we obtains perturbed tensors by performing element-wise multiplication, formulated as \(\tilde{t}=M\odot t\).  
Cutout Perturbations: They are used to reduce the feature dependency on certain continuous elements of the input tensor, by randomly setting values of a cropped area as zero based on the predictions of the main modules \(\tilde{y}^{ul}\).  
Figure 2: The overall algorithm can be divided into four stages. Stage 1: supervised training is illustrated as black lines. Stage 2: the predictions on unlabeled data \(\hat{y}^{ul}\) are used to ensure consistency between the perturbed prediction yielded from stages 3 and 4 by MSE loss, shown as gray lines. Stage 3: unlabeled data are reconstructed by aux-encoders generating perturbed tensors, and then those tensor are transferred to main decoder for prediction, shown as light blue lines. Stage 4: main encoder transforms the unlabeled data into feature maps and then distributes them to aux-decoders with different perturbations to make the prediction.  
Masking Perturbations: Masking perturbations contain two null-one mask matrices, a none-road mask \(M_{nr}\) to confine background relationships and a road mask \(M_{r}\) to limit road area [43], where \(M_{nr}=1-M_{r}\). Each of the masks performs preliminary screening by utilizing the predictions of the main-modules \(\hat{y}^{ul}\).  
Salt Noise Perturbations: They aim at simulating the effect of black and white noise in low-res pictures. Some positions are randomly set to the maximum value of \(t\), and some are set to the minimum with random sampling rate 0.3, which is achieved through element-wise multiplication of mask \(M_{s}\) with \(t\). This process is formulated as \(\tilde{t}=M_{s}\odot t\).  
Color Jittering Perturbations: They consist of three types of transformation: brightness \(B\), contrast \(C\), and saturation \(S\). In our implementation, they are used sequentially to perturb the input tensor, formulated as \(\tilde{t}=f_{B,M,C}(t)\).  
Lighting Perturbations: After transforming images to tensors, the eigenvalues and eigenvectors of all channels are concatenated together. Then, a matrix \(L\) of the same size as \(t\) is generated based on them. Finally, we obtain perturbed tensors by adding two matrices in an element-wise manner: \(\tilde{t}=L\oplus t\).