FocalUNETR: A Focal Transformer for Boundary-aware Segmentation of CT Images

Chengyin Li, Hassan Bagher-Ebadian, Vikram Goddla, Indrin J. Chetty, Dongxiao Zhu

Precise prostate segmentation is a critical prerequisite for External Beam Radiation Therapy (EBRT). While MRI offers superior soft-tissue contrast, Computed Tomography (CT) remains the standard for treatment planning due to its cost-effectiveness and widespread availability. However, CT-based segmentation faces two significant hurdles: poor soft-tissue contrast leading to "blurry" organ boundaries, and the architectural trade-off between capturing local textures (CNNs) and global context (Transformers).

To address these challenges, researchers have introduced FocalUNETR, a hierarchical transformer-based architecture that integrates a novel focal self-attention mechanism with an auxiliary boundary-prediction task to enhance segmentation accuracy in low-contrast environments.

Methodology: Focal Attention and Boundary Awareness

FocalUNETR adopts a U-shaped design, utilizing a focal transformer encoder and a convolutional decoder connected via skip connections. The model introduces two primary innovations to improve performance and efficiency:

1. Focal Self-Attention (SA)

Standard self-attention mechanisms often suffer from high computational costs or lose fine-grained local details. Focal SA addresses this by being hierarchical: each token attends to its immediate neighbors at high resolution (fine-grained) while attending to more distant regions at a lower resolution (coarse-grained) via sub-window pooling. This allows the model to capture global anatomical dependencies without sacrificing the local precision required for medical imaging.

2. Auxiliary Boundary-Aware Task

To mitigate the "blurry edge" problem, the network includes a secondary "head" dedicated to contour regression. Instead of treating the boundary as a hard binary line, the researchers used a Gaussian kernel to generate a smoothed heatmap (a "Heatsum" function). Training the model to predict this heatmap acts as a powerful regularizer, forcing the encoder to prioritize edge features during the primary segmentation task.

Overview of the FocalUNETR architecture, featuring the focal transformer encoder and dual-head output for segmentation and boundary regression.

Experimental Evaluation

The model was rigorously evaluated on two distinct datasets:

  • Private Clinical Dataset: 400 CT scans representing real-world clinical conditions.
  • AMOS Dataset: A public benchmark of 300 CT scans. This dataset is particularly challenging as it labels both the prostate (male) and uterus (female) under a single category, requiring the model to generalize across significantly different morphologies.

Key Results and Performance

FocalUNETR-B (the base version) demonstrated superior performance over established benchmarks, including U-Net, TransUNet, Swin-UNet, and nnUNet.

On the private dataset, FocalUNETR achieved a Dice Similarity Coefficient (DSC) of 89.23%, a substantial improvement over nnUNet’s 85.86%. More importantly, the Hausdorff Distance (HD)—a metric sensitive to edge errors—dropped from 6.43mm to 4.85mm, validating the effectiveness of the boundary-aware regression head.

Quantitative comparison of FocalUNETR against state-of-the-art models on Private and AMOS datasets.

Beyond accuracy, the model remains computationally efficient. With a parameter count ranging from 27M to 48M, it maintains inference speeds of approximately 4-5 seconds per case, making it viable for clinical workflows.

Conclusion and Future Directions

FocalUNETR successfully bridges the gap between global context and local boundary precision. While the model showed slightly lower performance on the AMOS dataset due to the morphological mixing of male and female anatomy, its success on clinical data is promising. Future work will focus on extending the focal self-attention mechanism into a fully native 3D architecture and testing its generalizability on other organs with challenging boundaries, such as the pancreas.

Summary updated

Abstract

Computed Tomography (CT) based precise prostate segmentation for treatment planning is challenging due to (1) the unclear boundary of the prostate derived from CT's poor soft tissue contrast and (2) the limitation of convolutional neural network-based models in capturing long-range global context. Here we propose a novel focal transformer-based image segmentation architecture to effectively and efficiently extract local visual features and global context from CT images. Additionally, we design an auxiliary boundary-induced label regression task coupled with the main prostate segmentation task to address the unclear boundary issue in CT images. We demonstrate that this design significantly improves the quality of the CT-based prostate segmentation task over other competing methods, resulting in substantially improved performance, i.e., higher Dice Similarity Coefficient, lower Hausdorff Distance, and Average Symmetric Surface Distance, on both private and public CT image datasets. Our code is available at this \href{https://github.com/ChengyinLee/FocalUNETR.git}{link}.
BibTeX
@inproceedings{li2023focalunetr,
  author = {Chengyin Li and Hassan Bagher-Ebadian and Vikram Goddla and Indrin J. Chetty and Dongxiao Zhu},
  title = {{FocalUNETR: A Focal Transformer for Boundary-aware Segmentation of CT Images}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2023},
  doi = {10.1007/978-3-031-43898-1\_57},
}
Figure