# Boundary-Aware Transformer for Optic Cup and Disc Segmentation in Fundus Images
## 3 Proposed Method  
### Data Augmentation: Truncated Gaussian, Colormap  
To enhance the performance of deep learning-based segmentation models, a sufficient amount of training data is essential. Consequently, the field of computer vision has actively explored data augmentation techniques, including geometric transformations such as rotation, translation, scaling, and brightness adjustment, as well as methods using generative models like Generative Adversarial Networks (GANs) [19] and Variational Autoencoders (VAEs) [20]. In medical imaging, the availability of training data is often constrained by ethical and privacy regulations. Furthermore, ensuring the structural fidelity of medical images is critical for reliable diagnosis. Several studies have indicated that augmentations based on generative models may compromise anatomical integrity, thereby elevating the risk of diagnostic errors. Therefore, it is essential to prioritize augmentation techniques that not only increase data diversity but also preserve anatomical structures and sharpen boundary features. To meet these demands, this study applies a data augmentation technique combining truncated Gaussian sampling with colormap transformations. Truncated Gaussian sampling balances the emphasis between central regions (e.g., around the optic disc) and boundary regions (e.g., vascular and tissue boundaries), enabling the generation of diverse local variations without distorting the original structural properties of the images. Meanwhile, colormap transformations adjust brightness and contrast while preserving the global color distribution of the original images, contributing to improved boundary recognition performance. Through these methods, we enhanced data diversity while preserving vascular and tissue structures, thereby effectively improving the generalization performance of the segmentation model. \[z\sim\mathcal{TN}(0,1;-\tau,\tau),\quad\tau\ll 1 \tag{1}\]  
To address this issue, we propose a VAE-based data augmentation method incorporating truncated Gaussian sampling. While conventional VAEs generate new data by sampling randomly from the latent space, our approach samples from a standard normal distribution \(N(0,1)\) but restricts it within a truncated range of \([-\tau,\tau]\). Here, \(\tau\ll 1\) is set as a threshold to preserve the structural characteristics of the original data, guiding the generation of samples that closely resemble the originals. This approach minimizes distortion of the OD and OC boundaries, thereby enhancing both the stability and accuracy of network training. A visual comparison is presented in Figure 2. Without applying truncated Gaussian sampling (c), significant structural distortion and deformation are observed compared to the original image (a), whereas the proposed method (b) successfully preserves the boundary structures of the original. To further enhance the structural features of fundus images, we additionally applied a variety of color mapping techniques. In retinal fundus imaging, the low color contrast between the OD and OC often leads to ambiguous boundaries. By transforming the color space, these boundaries can be accentuated, improving both human interpretability and model performance. In consultation with clinical experts, we selected color mapping methods that are both diagnostically relevant and practically applicable. First, the Red-Free conversion removes the red channel, thereby enhancing the visibility of vascular structures and improving the distinction between the OD and OC regions. Second, the Grayscale conversion eliminates color information and focuses solely on luminance, which helps emphasize structural intensity differences and contributes to better segmentation performance. Third, the Jet colormap applies a high-contrast color scale that amplifies boundary distinctions, enabling clearer identification of the OD and OC shapes.