## 4 Experimental Results
### Qualitative Results  
A qualitative examination of the different method's performance is undertaken in this section. The segmentation and edge prediction branches' final results are shown in Figures 8-12. In most cases, as illustrated in Figures 8, 9 and 11, the attention-based methods combined with the properties of U-Net can appropriately segregate the pigment regions as compared to the U-Net based methods when used separately. The first row shows the output predictions given an input image, which is a simple scenario because the colour contrast between the foreground and background regions of the input image is  
Figure 7: Example images from ISIC 2018 dataset. high. As a result, the attention-based approaches can accurately detect the pigment region. The input images in the bottom rows have hairs and low contrast and deformed shapes, which can distort the textures of the skin lesions and make learning difficult. Despite this, the attention-based methods (TransUNet and Attention U-Net) succeed in segmenting the pigment regions. To put it another way, the attention-based methods show robust performance to the distortions and exhibit good overall performance. Figure 8: The TransUNet method output visualizations: (**a**) input test image; (**b**) the corresponding ground truth segmentation mask and (**c**) the output probability map of the segmentation prediction. Figure 9: The U-Net output visualizations: (**a**) input test image; (**b**) the corresponding ground truth segmentation mask and (**c**) the output probability map of the segmentation prediction. It can be clearly seen in the output results from U-Net and Attention U-Net that these two methods generate larger segmentation maps with unclear boundaries as compared to the TransUNet method, whereas the Swin-UNet completely fails to segment the lesions, thus depicting the efficacy of the hybrid method for skin lesion segmentation. Figure 10: The V-Net output visualizations: (**a**) input test image; (**b**) the corresponding ground truth segmentation mask and (**c**) the output probability map of the segmentation prediction. To quantitatively evaluate the prediction results, we have used Intersection over Union (_IoU_), Precision (_P_), Recall (_R_) and Accuracy (_ACC_) metrics. The training and testing results are shown in Tables 1 and 2, respectively. The accuracy rate of the TransUNet model reached 50-55% within the 10-12 iterations and the accuracy rates constantly increased up to 120 iterations. From 120 iterations, the accuracy remains almost consistent and reaches 92%. It is due to the fact that the hybrid CNN-transformer, as the hybrid CNN-transformer encoder with long range dependencies, retains the high-level features and passes directly to each stage of decoder and thus results in better output predictions and precise localizations, whereas when compared with other models, it can be seen that there is not much consistency found in terms of accuracy while training the other models (U-Net and Attention U-Net). It can be seen that the accuracy reached 89% and 87% in Attention U-Net and U-Net models,  
Figure 11: The Attention U-Net output visualizations: (**a**) input test image; (**b**) the corresponding ground truth segmentation mask and (**c**) the output probability map of the segmentation prediction. respectively. The results in Tables 1 and 2 summarize the performance of the different benchmarking architectures in terms of (IoU), Precision (P), Recall (R) and Accuracy (ACC) metrics and validates the efficacy of the TransUNet as compared to the other benchmarking architectures. In addition to the evaluation metrics, we also compared the performance of these models on the basis of training time, inference time and dataset size as shown in Table 3. It can be seen in the results that the hybrid architectures take more time to train than the U-Net and V-Net architectures and take more time for the inference as well.