# DCS-TransUperNet: Road Segmentation Network Based on CSwin Transformer with Dual Resolution
## 4 Experiment
### Result on Massachusetts Roads Dataset  
In order to evaluate the performance of our proposed model, we conduct adequate comparative experiments. We select many SOTA segmentation networks as a reference, including D-LinkNet [24], ELU-SegNet [40], GL-Dense-U-Net [41], ResUnet [22] and D-ResUnet [42].  
The visual comparison results are shown in Figure 4. On the whole, DCS-TransUperNet is significantly improved, such as the highlighted place in the green boxes. Specifically, our model has a more powerful ability to extract small roads in the first image. The second image we select is a scene with a large amount of vegetation occlusion. DCS-TransUperNet and D-ResUnet overcome the problem of vegetation cover to a certain extent, but DCS-TransUperNet has better continuity, as shown in the blue box. The last image represents a dense scene, which shows that our recall has increased significantly.  
Table 2 shows the quantitative comparison results of different methods. DCS-TransUperNet with mixed loss achieved superior performance in precision (82.44), recall (78.43), F1-score (80.39) and IoU (65.36). The experimental results show that the proposed DCS-TransUperNet has superior performance in road extraction. However, the disadvantage is that the inference speed is slower compared with the method based on CNN.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Methods**} & \multirow{2}{*}{**Hidden Size**} & **Layer** & **Head** & **Window** & **Size** & **Param** \\  & & **Number** & **Number** & **Number** & **Size** & **Param** \\ \hline CSwin-T & 64 & [1,2,21,1] & [2,4,8,16] & [1,2,7,7] & 23M \\ CSwin-B & 96 & [2,4,32,2] & [2,4,8,16] & [1,2,7,7] & 78M \\ CSwin-L & 144 & [2,4,32,2] & [6,12,24,48] & [1,2,7,7] & 173M \\ \hline \hline \end{tabular}
\end{table}
Table 1: Hyperparameters of CSwin Transformer model variants.  
In order to prove the effectiveness of Dual-scales, we design a comparative experiment between CSwin TransUperNet and DCS-TransUperNet. Note that the former does not add Dual-scales, while the latter adds it. The experimental results are shown in Table 3. The IoU of road extraction is increased from 64.53 to 65.36 by adding the Dual-scales module. The visual comparison results are shown in Figure 5. The robustness and recall of the road segmentation are superior in DCS-TransUperNet. Therefore, the effectiveness of the Dual-scales and FFM is further verified. In addition, our model also makes comparative experiments on the selection of encoder backbone and decoder.  
From Table 3, we find that the performance in road segmentation of CSwin Transformer is better than Swin Transformer, and the UperNet decoder is better than U-Net. In Tables 2 and 3, we find that the Transformer-based model is generally better than the CNNs-based model in IoU, while the inference is slower. As shown in Table 4, we design different variants of DCS-TransUperNet, and DCS-TransUperNet-L has better performance in the F1-score and IoU but also has higher parameters and slower inference speed.  
In order to evaluate the effects of the hyperparameter \(\lambda\) in the mixed loss function We set the \(\lambda\) to [0, 0.001, 0.01, 0.1, 1, 10], respectively, to perform the experiments as shown in Figure 6; when \(\lambda=0\), the score of F1-score and IoU are the lowest, 78.01% and 64.07%, respectively. In this case, the mixed loss function has degenerated to the binary cross-entropy loss. With the increase in \(\lambda\), the score is gradually improving. When \(\lambda=1\), the score of the F1-score and IoU reaches its maximum (80.39% and 65.36%) and then decreases rapidly. Therefore, the \(\lambda\) is set to 1 in our experiments.