# Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images
## 1 Introduction  
Glaucoma is one of the leading causes of blindness worldwide, often progressing without noticeable symptoms in its early stages, making it difficult for patients to detect any abnormalities. As the disease advances, it gradually narrows the visual field and can eventually lead to complete blindness. Due to these characteristics, glaucoma is often referred to as the \"Silent Thief of Sight\", emphasizing the critical importance of early detection, continuous monitoring, and appropriate treatment. Major risk factors includeoptic nerve damage caused by elevated intraocular pressure (IOP), along with various environmental factors such as age, gender, genetic predisposition, and ethnicity [1]. Traditionally, glaucoma diagnosis has relied on methods such as visual field testing, intraocular pressure measurement, and direct examination of the optic nerve head. However, these techniques depend heavily on the expertise of medical professionals and face limitations when applied to large patient populations due to factors such as examiner fatigue and the high costs associated with repeated testing. Consequently, there has been growing research interest in automated glaucoma diagnosis methods based on retinal fundus images. Among these, the Cup-to-Disc Ratio (CDR) is widely recognized as a key quantitative indicator for assessing glaucoma risk. The CDR is defined as the ratio of the diameter of the OC to that of the OD, with a larger CDR generally indicating a higher risk of glaucoma. Figure 1 provides a visual illustration of the CDR concept and the spatial relationship between the OD and OC. Previous research [2] focused on classifying glaucoma presence using multiple visual representations and ensemble classification models, without performing structural segmentation. However, for accurate glaucoma diagnosis, it is essential to first achieve precise segmentation of the OD and OC boundaries. Therefore, this study redefines the problem with a focus on fine-grained segmentation, aiming to establish a foundation for improving structure-based diagnostic accuracy. Nevertheless, segmenting the OD and OC boundaries remains technically challenging. The two structures exhibit low boundary contrast and high morphological similarity within fundus images, making them difficult to distinguish. Moreover, variations caused by disease progression, lighting conditions, and interpatient differences further complicate the task. Although various deep learning-based segmentation studies have been actively pursued, most have struggled to clearly  
Figure 1: Illustration of OD, OC, and macula in fundus images. The vertical CDR is calculated as the ratio between the vertical cup diameter (VCD) and the vertical disc diameter (VDD). A higher CDR (e.g., 0.6) indicates a larger optic cup relative to the disc, which is a key indicator in glaucoma diagnosis. capture the structural inclusion relationship between the OD and OC or have suffered from insufficient boundary awareness. To address these challenges, we propose a novel segmentation model designed to precisely delineate the structures of the OD and OC, which has the following three key contributions:  
1. 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. 2. 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. 3.