# Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images
## 5 Results and Analysis  
### Performance Analysis on Different Datasets  
Table 2 and Figures 7-16 present a comprehensive comparison of the segmentation performance between the proposed BAT-based segmentation network and several existing models across five public fundus image datasets: DRIONS-DB, Drishti-GS, REFUGE, G1020, and ORIGA. The proposed model consistently achieved the highest IoU and Dice scores across all datasets, with the most notable performance improvements observed in the OC region, which is particularly challenging due to its smaller size and lower contrast with surrounding tissues. To provide a more intuitive understanding of the model's effectiveness, Figures 7-16 visualize the segmentation results on both the entire fundus image and the region of interest (ROI). These visual comparisons allow for detailed analysis of whether the proposed model maintains spatial consistency across full images and how precisely it distinguishes the boundaries within localized regions. The baseline models used for comparison include the U-Net, a widely adopted encoder-decoder architecture known for robust local feature extraction; the Attention U-Net, which extends U-Net with attention gates to suppress irrelevant background features; DeepLabV3, which utilizes Atrous Spatial Pyramid Pooling (ASPP) to capture multi-scale contextual information; TransUNet, a hybrid architecture combining CNN-based U-Net encoders with Transformer modules to improve global context modeling; and Swin-UNet, which leverages hierarchical self-attention to effectively integrate multi-resolution features. Together, these quantitative and qualitative results demonstrate that the proposed BAT-based segmentation network significantly outperformed existing methods, particularly in challenging anatomical regions, by providing more accurate and consistent boundary delineation through the integration of global contextual reasoning and boundary-aware attention. The BAT-based model proposed in this study has a computational complexity of approximately 130 GFLOPs for an input resolution of 512 \(\times\) 512, with an average inference time of about 22 ms on an NVIDIA RTX 4090. While this represents a slight increase in computation compared to U-Net (90 GFLOPs) and Attention U-Net (110 GFLOPs), it remains relatively lightweight compared to more recent segmentation models such as DeepLabV3+ (210 GFLOPs), TransUNet (430 GFLOPs), and Swin-UNet (330 GFLOPs). Since the primary objective was to improve the accuracy through enhanced boundary recognition and structural preservation rather than to achieve real-time processing, this modest increase in computational load is considered acceptable. \begin{table}
\begin{tabular}{l c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**DRIONS-DB**} & \multicolumn{2}{c}{**Drishti-GS (OD)**} & \multicolumn{2}{c}{**Drishti-GS (OC)**} & \multicolumn{2}{c}{**REFUGE**} & \multicolumn{2}{c}{**G1020**} & \multicolumn{2}{c}{**ORIGA**} \\ \cline{2-13}  & **IoU** & **Dice** & **IoU** & **Dice** & **IoU** & **Dice** & **IoU** & **Dice** & **IoU** & **Dice** & **IoU** & **Dice** \\ \hline U-Net [3] & 0.926 & 0.9324 & 0.9253 & 0.9555 & 0.7869 & 0.8848 & 0.9186 & 0.9292 & 0.9096 & 0.9183 & 0.9158 & 0.9276 \\ Attention U-Net [4] & 0.9459 & 0.9712 & 0.9454 & 0.9664 & 0.8137 & 0.8987 & 0.9328 & 0.9473 & 0.9345 & 0.9575 & 0.9239 & 0.9539 \\ DeepLabV3+ [18] & 0.9508 & 0.9627 & 0.9506 & 0.9533 & 0.8155 & 0.8877 & 0.9536 & 0.9642 & 0.9446 & 0.9534 & 0.9510 & 0.9629 \\ TransUNet [14] & 0.9359 & 0.9471 & 0.9454 & 0.9654 & 0.8047 & 0.8941 & 0.9297 & 0.9387 & 0.9196 & 0.9556 & 0.9239 & 0.9629 \\ Swin-UNet [17] & 0.9631 & 0.9677 & 0.9556 & 0.9603 & 0.8305 & 0.9027 & 0.9613 & 0.9725 & 0.9503 & 0.9613 & 0.9600 & 0.9719 \\ Proposed & 0.9758 & 0.9877 & 0.9756 & 0.9783 & 0.8405 & 0.9127 & 0.9786 & 0.9892 & 0.9696 & 0.9783 & 0.9760 & 0.9879 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Segmentation performance comparison on various datasets.