# Multi-Class Strategies for Joint Building Footprint and Road Detection in Remote Sensing
## 3 Experimental Framework
### Training Details  
All the models are trained for 100,000 iterations using the Adam [51] optimizer with a fixed learning rate of \(1\times 10^{-3}\). A batch size of 14 is used, considering the maximum number of samples that fits into memory. The experiments are run on a NVIDIA RTX 2080 Ti with 11 GB of RAM.  
Regarding the loss function, a combination of the cross-entropy and dice loss is considered. This approach, known as combo loss, is widely used in the remote sensing semantic segmentation literature [52]. In summary, the cross-entropy is used for curve smoothing, while the dice loss is used to control the trade-off between false positives and false negatives. These losses are computed as follows. Let \(C\) denote the set of all classes and \(I\) the set of pixels in an image. The cross-entropy and dice loss functions expressed in terms of the ground truth one-hot encoded mask \(y\) and the output probabilities \(\hat{y}\) are presented in Equations (1) and (2), respectively.  
\[L_{CE}(y,\hat{y})=-\underset{c\in C}{\sum}\underset{i\in I}{\sum}y_{i,c}\log( \hat{y}_{i,c}) \tag{1}\]  
\[L_{DL}(y,\hat{y})=\frac{2\sum_{i\in I}\sum_{c\in C}y_{i,c}\hat{y}_{i,c}+1}{ \sum_{c\in C}\sum_{i\in I}y_{i,c}+\hat{y}_{i,c}+1} \tag{2}\]  
Considering that no validation set is used, the last epoch's model is taken as the final model. To prevent overfitting [53] the dihedral data augmentation technique is used, that is, the data are augmented by applying horizontal and vertical flips, as well as 90 degree rotations, giving rise to 8 different combinations. The same data augmentation techniques  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Train** & \\ \hline
**City** & **Dimensions** \\ \hline A coruña & 704 \(\times\) 576 \\ Albacete & 1280 \(\times\) 1152 \\ Alicante & 1216 \(\times\) 1472 \\ Barakaldo & 1088 \(\times\) 896 \\ Barcelona N. & 1152 \(\times\) 1728 \\ Castellon & 1024 \(\times\) 1024 \\ Cordoba & 1088 \(\times\) 1792 \\ Logroño & 768 \(\times\) 960 \\ Madrid N. & 1920 \(\times\) 2688 \\ Pamplona & 1600 \(\times\) 1536 \\ Ponterevedra & 384 \(\times\) 512 \\ Rivas-vacía & 1088 \(\times\) 1088 \\ Salamanca & 832 \(\times\) 960 \\ Santander & 1152 \(\times\) 1216 \\ Sevilla & 2176 \(\times\) 2368 \\ Valladolid & 1408 \(\times\) 1408 \\ Vitoria & 576 \(\times\) 896 \\ Zaragoza & 2304 \(\times\) 2752 \\ \hline
**Test** & \\ \hline
**City** & **Dimensions** & **Valid Extension (km2)** \\ \cline{2-3}  & **Building** & **Road** \\ \hline Bilbao & 576 \(\times\) 832 & 3172 & 4956 \\ Granada & 1664 \(\times\) 1600 & 16,879 & 74,333 \\ Leon & 1216 \(\times\) 768 & 1151 & 18,934 \\ Lugo & 768 \(\times\) 576 & 80 & 983 \\ Madrid S. & 1280 \(\times\) 2624 & 84,797 & 246,651 \\ Oviedo & 960 \(\times\) 896 & 9588 & 17,892 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Summary of the dataset. Overall, the training set is composed of 18 cities (75%), whereas the testing set consists of 6 cities (25%).  
are used at testing time. Accordingly, the final prediction is obtained as the aggregation of predictions across transformed versions of a test input.