# A Semantic Segmentation Dataset and Real-Time Localization Model for Anti-UAV Applications
## 5 Experiments
### Model Performance Comparison
#### 5.3.2 Qualitative Results  
In this section, we present the predicted segmentation masks generated by each model and compare them with the original input images and the corresponding ground truth masks. Figure 7 illustrates the qualitative comparison results on an RGB image sampled from the test dataset--images that were not seen by the models during training. From Figure 7, it can be observed that the proposed ThinDyUNet, as well as UNet, PAN, TransUNet, and PSPNet, can generate reasonable segmentation masks. Although the shapes of the predicted masks do not perfectly align with the ground truth, the general position and size of the masks are similar and correctly located. For the RGB images in the test set, all models seem to be able to generate a proper segmentation mask. Although the metrics for metrics vary for each model, all models are still able to produce segmentation masks that are similar to the ground truth. Notably, the proposed ThinDyUNet, despite having a smaller number of parameters, was still able to learn effectively and produce accurate segmentation results. Figure 8 shows the prediction results on an IR image randomly sampled from the test dataset. In this case, the overall model performance degraded when applied to IR images. Although the metrics are quite decent in the test set and able to generate masks correctly for RGB input, the UNet model generates a wrong mask for the IR input. The UNet model generate two mask objects as shown in Figure 8d and a mask with a hole as shown in Figure 8k,r. This suggests that the model may have overfitted to the RGB images and failed to generalize to IR inputs. The TransUNet model fails to generate a proper segmentation image by generating a largely different object mask compared to the ground truth. This also suggests the metrics reduce between the validation and test set of the TransUNet model. The PAN model is also facing a similar issue where the metrics are decreasing in the test set, causing the model to not be able to generate a proper segmentation mask for IR images. The PSPNet model, on the other hand, successfully predicted a single object in the mask, accurately identifying its position. However, the size and shape of the predicted mask did not precisely match the ground truth. The proposed ThinDyUNet outperformed the other models in IR segmentation. It successfully generated a mask that closely matched the position of the ground truth. While the shape and size of the predicted mask were slightly different from the ground truth, the proportions were more accurate than those produced by PSPNet. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model Name** & **Model Parameters (M)** & **Inference Time (ms)** \\ \hline UNet & 24.4 & 4.33 \\ PAN & 21.4 & 6.01 \\ PSPNet & 21.4 & 4.18 \\ TransUNet & 4.2 & 4.41 \\ ThinDyUNet (proposed) & **1.3** & **2.45** \\ \hline \hline \end{tabular} \({}^{\text{s}}\)The best value is in bold.  
\end{table} 
Table 5: Model size and inference time comparison. The presented mask comparison in Figures 7 and 8 is small, and readers might not be able to see clearly and find distinction between them. Hence, in Figures 9 and 10, we show only the original images, ground truth segmentation mask, generated mask by ThinDyUNet, and UNet model, which have the best performance metrics in the test set. By selecting fewer images, the generated mask size can be larger and the difference between masks is clearer. We select only the images from the middle row from Figures 7 and 8. In both Figures 9 and 10, the ThinDyUNet and UNet are able to generate a mask properly. For the RGB images, the mask generated by the ThinDyUNet model is more similar to the ground truth mask in terms of size and shape. Compared with the mask from the UNet model, it is smaller in size, and the shape is not as similar to the ground truth mask. Meanwhile, for the IR images, the mask shape of the UNet model is more similar in size and shape compared to the mask generated by the ThinDyUNet model.