Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images
Abstract
:1. Introduction
- Advanced Data Augmentation for Enhanced Generalization: We introduce a data augmentation method based on truncated Gaussian sampling and colormap transformations to preserve boundary information while capturing diverse imaging conditions and patient characteristics. This approach enhances the structural features of the fundus, which are often difficult to observe in original images, and improves OD and OC segmentation performance through minimally distorted data augmentation.
- Boundary-aware Transformer Attention (BAT): To explicitly model the anatomical inclusion relationship between the OD and OC, we designed the BAT module. The BAT module is incorporated into the skip connections of the U-Net architecture, enhancing boundary recognition capability by leveraging multi-resolution contextual features.
- Geometry-aware Loss Function: Conventional Dice Loss and IoU Loss are effective for pixel-level accuracy but have limitations in improving boundary precision. This study introduces a Geometry-aware Loss by incorporating a normalized Hausdorff Distance to reduce boundary shape distortions and quantitatively correct structure-based errors.
2. Related Work
3. Proposed Method
3.1. Data Augmentation: Truncated Gaussian, Colormap
3.2. Boundary-Aware Transformer Attention
3.3. Loss Function: Geometry-Aware Loss
3.4. Proposed Architecture
4. Experiment Implementation
4.1. Experiment Setup
4.2. Evaluation Metrics
5. Results and Analysis
5.1. Performance Analysis on Different Datasets
5.2. Ablation Study
5.3. State-of-the-Art Comparison
6. Discussion
7. Limitation and Future Work
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
OD | Optic Disc |
OC | Optic Cup |
CDR | Cup-to-Disc Ratio |
ROI | Region of Interest |
BAT | Boundary-aware Transformer Attention |
ViT | Vision Transformer |
CCNet | Criss-Cross Network |
OCT | Optical Coherence Tomography |
CNN | Convolutional Neural Network |
IoU | Intersection over Union |
mIoU | Mean Intersection over Union |
GT | Ground Truth |
FFN | Feedforward Network |
MHSA | Multi-Head Self-Attention |
HD | Hausdorff Distance |
VAE | Variational Autoencoder |
SOTA | State-of-the-Art |
References
- Yamamoto, T.; Kitazawa, Y. Vascular pathogenesis of normal-tension glaucoma: A possible pathogenetic factor, other than intraocular pressure, of glaucomatous optic neuropathy. Prog. Retin. Eye Res. 1998, 17, 127–143. [Google Scholar] [CrossRef] [PubMed]
- Wang, S.; Kim, B.; Kang, J.; Eom, D.-S. Precision Diagnosis of Glaucoma with VLLM Ensemble Deep Learning. Appl. Sci. 2024, 14, 4588. [Google Scholar] [CrossRef]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), Munich, Germany, 5–9 October 2015; pp. 234–241. [Google Scholar] [CrossRef]
- Oktay, O.; Schlemper, J.; Folgoc, L.L.; Lee, M.; Heinrich, M.; Misawa, K.; Mori, K.; McDonagh, S.; Hammerla, N.Y.; Kainz, B.; et al. Attention U-Net: Learning Where to Look for the Pancreas. arXiv 2018, arXiv:1804.03999. [Google Scholar]
- Zhou, P.; Yang, X.L.; Wang, X.G.; Hu, B.; Zhang, L.; Zhang, W.; Si, H.R.; Zhu, Y.; Li, B.; Huang, C.L.; et al. A pneumonia outbreak associated with a new coronavirus of probable bat origin. Nature 2020, 579, 270–273. [Google Scholar] [CrossRef] [PubMed]
- Long, J.; Shelhamer, E.; Darrell, T. Fully Convolutional Networks for Semantic Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 3431–3440. [Google Scholar] [CrossRef]
- Zilly, J.; Buhmann, J.M.; Mahapatra, D. Glaucoma Detection Using Entropy Sampling and Ensemble Learning for Automatic Optic Cup and Disc Segmentation. Comput. Med. Imaging Graph. 2017, 55, 28–41. [Google Scholar] [CrossRef]
- Sevastopolsky, A. Optic Disc and Cup Segmentation Methods for Glaucoma Detection with Modification of U-Net Convolutional Neural Network. Pattern Recognit. Image Anal. 2017, 27, 618–624. [Google Scholar] [CrossRef]
- Feng, Y.; Yu, P.; Li, J.; Cao, Y.; Zhang, J. Phosphatidylinositol 4-kinase B is required for the ciliogenesis of zebrafish otic vesicle. J. Genet. Genom. 2020, 47, 627–636. [Google Scholar] [CrossRef]
- Zhu, Q.; Chen, X.; Meng, Q.; Song, J.; Luo, G.; Wang, M.; Shi, F.; Chen, Z.; Xiang, D.; Pan, L.; et al. GDCSeg-Net: General Optic Disc and Cup Segmentation Network for Multi-Device Fundus Images. Biomed. Opt. Express 2021, 12, 6529–6544. [Google Scholar] [CrossRef]
- Gu, Z.; Cheng, J.; Fu, H.; Zhou, K.; Hao, H.; Zhao, Y.; Zhang, T.; Gao, S.; Liu, J. CE-Net: Context Encoder Network for 2D Medical Image Segmentation. IEEE Trans. Med. Imaging 2019, 38, 2281–2292. [Google Scholar] [CrossRef]
- He, J.; Ma, Y.; Yang, M.; Yang, W.; Wu, C.; Chen, S. TAC-UNet: Transformer-Assisted Convolutional Neural Network for Medical Image Segmentation. Quant. Imaging Med. Surg. 2024, 14, 8824. [Google Scholar] [CrossRef]
- Heidari, M.; Kazerouni, A.; Soltany, M.; Azad, R.; Aghdam, E.K.; Cohen-Adad, J.; Merhof, D. HiFormer: Hierarchical Multi-scale Representations Using Transformers for Medical Image Segmentation Supplementary Material. In Proceedings of the 2023 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, HI, USA, 2–7 January 2023. [Google Scholar] [CrossRef]
- Chen, J.; Lu, Y.; Yu, Q.; Luo, X.; Adeli, E.; Wang, Y.; Lu, L.; Yuille, A.L.; Zhou, Y. TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation. arXiv 2021, arXiv:2102.04306. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16×16 Words: Transformers for Image Recognition at Scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- Huang, Z.; Wang, X.; Huang, L.; Huang, C.; Wei, Y.; Liu, W. CCNet: Criss-Cross Attention for Semantic Segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 603–612. [Google Scholar] [CrossRef]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021; pp. 10012–10022. [Google Scholar] [CrossRef]
- Chen, L.C.; Zhu, Y.; Papandreou, G.; Schroff, F.; Adam, H. Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 833–851. [Google Scholar] [CrossRef]
- Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative Adversarial Networks. arXiv 2014, arXiv:1406.2661. [Google Scholar]
- Kingma, D.P.; Welling, M. Auto-Encoding Variational Bayes. arXiv 2013, arXiv:1312.6114. [Google Scholar]
- Fan, Z.; Rong, Y.; Cai, X. Optic Disk Detection in Fundus Image Based on Structured Learning. IEEE J. Biomed. Health Inform. 2017, 22, 224–234. [Google Scholar] [CrossRef]
- Abdullah, M.; Fraz, M.M.; Barman, S.A. Localization and Segmentation of Optic Disc in Retinal Images Using Circular Hough Transform and Grow-Cut Algorithm. PeerJ 2016, 4, e2003. [Google Scholar] [CrossRef]
- Zahoor, M.N.; Fraz, M.M. Fast Optic Disc Segmentation in Retina Using Polar Transform. IEEE Access 2017, 5, 12293–12300. [Google Scholar] [CrossRef]
- Yi, Y.; Jiang, Y.; Zhou, B.; Zhang, N.; Dai, J.; Huang, X.; Zeng, Q.; Zhou, W. C2FTFNet: Coarse-to-Fine Transformer Network for Joint Optic Disc and Cup Segmentation. Comput. Biol. Med. 2023, 164, 107215. [Google Scholar] [CrossRef]
- Joshi, A.; Sharma, K.K. Graph Deep Network for Optic Disc and Optic Cup Segmentation for Glaucoma Disease Using Retinal Imaging. Comput. Biol. Med. 2022, 148, 105800. [Google Scholar] [CrossRef]
- Bhattacharya, R.; Hussain, R.; Chatterjee, A.; Paul, D.; Chatterjee, S.; Dey, D. PY-net: Rethinking Segmentation Frameworks with Dense Pyramidal Operations for Optic Disc and Cup Segmentation from Retinal Fundus Images. Biomed. Signal Process. Control. 2023, 85, 104895. [Google Scholar] [CrossRef]
- Vangaveti, V.; Kumar, M.P.; Mitra, K. Glaucoma Identification Using Convolutional Neural Networks Ensemble for Optic Disc and Cup Segmentation. In Proceedings of the IEEE International Conference on Image Processing (ICIP), Singapore, 20–23 October 2024; pp. 2720–2724. [Google Scholar] [CrossRef]
- Orlando, J.I.; Fu, H.; Breda, J.B.; Van Keer, K.; Bathula, D.R.; Diaz-Pinto, A.; Bogunović, H. Refuge Challenge: A Unified Framework for Evaluating Automated Methods for Glaucoma Assessment from Fundus Photographs. Med. Image Anal. 2020, 59, 101570. [Google Scholar] [CrossRef] [PubMed]
- Liu, B.; Pan, D.; Song, H. Joint Optic Disc and Cup Segmentation Based on Densely Connected Depthwise Separable Convolution Deep Network. BMC Med. Imaging 2021, 21, 6. [Google Scholar] [CrossRef] [PubMed]
- Zhou, W.; Ji, J.; Jiang, Y.; Wang, J.; Qi, Q.; Yi, Y. EARDS: EfficientNet and Attention-Based Residual Depthwise Separable Convolution for Joint OD and OC Segmentation. Front. Neurosci. 2023, 17, 1139181. [Google Scholar] [CrossRef] [PubMed]
- Almubarak, H.; Bazi, Y.; Alajlan, N. Two-Stage Mask-RCNN Approach for Detecting and Segmenting the Optic Nerve Head, Optic Disc, and Optic Cup in Fundus Images. Appl. Sci. 2020, 10, 3833. [Google Scholar] [CrossRef]
Database | Healthy (Normal) | Glaucoma (Abnormal) | Resolution |
---|---|---|---|
DRIONS-DB | 84 | 26 | 600 × 400 |
Drishti-GS | 70 | 31 | 2896 × 1944 |
REFUGE | 1440 | 160 | 2124 × 2056 (train), 1634 × 1634 (test) |
ORIGA | 482 | 165 | 3072 × 2048 |
G1020 | 625 | 296 | 3004 × 2423 |
Model | DRIONS-DB | Drishti-GS (OD) | Drishti-GS (OC) | REFUGE | G1020 | ORIGA | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
IoU | Dice | IoU | Dice | IoU | Dice | IoU | Dice | IoU | Dice | IoU | Dice | |
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 |
Model | Aug | Geo. Loss | BAT | REFUGE | G1020 | ORIGA | |||
---|---|---|---|---|---|---|---|---|---|
IoU | Dice | IoU | Dice | IoU | Dice | ||||
Baseline | - | - | - | 0.9171 | 0.9177 | 0.9097 | 0.9068 | 0.9045 | 0.9164 |
Baseline + | √ | - | - | 0.9247 | 0.9353 | 0.9157 | 0.9244 | 0.9221 | 0.9340 |
- | √ | - | 0.9302 | 0.9396 | 0.9237 | 0.9389 | 0.9368 | 0.9415 | |
- | - | √ | 0.9468 | 0.9574 | 0.9378 | 0.9465 | 0.9442 | 0.9561 | |
√ | √ | - | 0.9365 | 0.9471 | 0.9275 | 0.9362 | 0.9339 | 0.9458 | |
- | √ | √ | 0.9651 | 0.9673 | 0.9478 | 0.9564 | 0.9541 | 0.9660 | |
√ | - | √ | 0.9567 | 0.9681 | 0.9581 | 0.9691 | 0.9672 | 0.9784 | |
Proposed | √ | √ | √ | 0.9786 | 0.9892 | 0.9696 | 0.9783 | 0.9760 | 0.9879 |
Database | Author | OD | OC | ||
---|---|---|---|---|---|
IoU | Dice | IoU | Dice | ||
DRIONS-DB | Fan et al. [21] | 0.8473 | 0.9137 | - | - |
Abdullah et al. [22] | 0.8510 | 0.9102 | - | - | |
Zahoor et al. [23] | 0.8862 | 0.9378 | - | - | |
Sevastopolsky et al. [8] | 0.8900 | 0.9400 | - | - | |
Yi et al. [24] | 0.9363 | 0.9679 | - | - | |
Joshi et al. [25] | 0.9474 | 0.9768 | - | - | |
Proposed | 0.9758 | 0.9877 | |||
Drishti-GS | R.Bhattacharya et al. [26] | 0.944 | 0.971 | - | 0.876 |
Sevastopolsky et al. [8] | 0.9444 | 0.9739 | 0.8050 | 0.8910 | |
Zhu et al. [10] | 0.9501 | 0.9743 | 0.8334 | 0.9083 | |
Gu et al. [11] | 0.9506 | 0.9746 | 0.8213 | 0.8992 | |
Yi et al. [24] | 0.9531 | 0.9768 | 0.8538 | 0.9195 | |
Vangaveti et al. [27] | 0.950 | 0.974 | 0.845 | 0.916 | |
Proposed | 0.9756 | 0.9783 | 0.8405 | 0.9127 | |
REFUGE | Mammoth [28] | - | 0.9361 | - | 0.8667 |
SDSAIRC [28] | - | 0.9436 | - | 0.8315 | |
NKSG [29] | - | 0.9488 | - | 0.8643 | |
VRT [28] | - | 0.9532 | - | 0.8600 | |
CUHKMED [28] | - | 0.9602 | - | 0.8826 | |
Zhou et al. [30] | 0.915 | 0.955 | 0.802 | 0.887 | |
Almubarak et al. [31] | - | 0.9504 | - | 0.8546 | |
Yi et al. [24] | - | 0.9693 | - | 0.9082 | |
Vangaveti et al. [27] | 0.925 | 0.961 | 0.808 | 0.894 | |
Liu et al. [29] | - | 0.9601 | - | 0.8903 | |
Proposed | 0.9786 | 0.9892 | 0.8798 | 0.9014 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, S.; Kim, B.; Eom, D.-S. Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images. Appl. Sci. 2025, 15, 5165. https://doi.org/10.3390/app15095165
Wang S, Kim B, Eom D-S. Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images. Applied Sciences. 2025; 15(9):5165. https://doi.org/10.3390/app15095165
Chicago/Turabian StyleWang, Soohyun, Byoungkug Kim, and Doo-Seop Eom. 2025. "Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images" Applied Sciences 15, no. 9: 5165. https://doi.org/10.3390/app15095165
APA StyleWang, S., Kim, B., & Eom, D.-S. (2025). Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images. Applied Sciences, 15(9), 5165. https://doi.org/10.3390/app15095165