Abstract
BACKGROUND AND PURPOSE: Accurate segmentation of organs-at-risk is critical for adaptive Magnetic Resonance guided radiotherapy (MRgRT) in upper gastrointestinal (GI) treatments. Large anatomical variations pose challenges for automated segmentation methods, requiring considerable manual editing. Our goal was to develop and evaluate the effectiveness of patient-specific (PS) fine-tuning of a pretrained transformer model for segmenting upper GI structures. MATERIALS AND METHODS: A PS fine-tuning approach was implemented by adapting a pretrained transformer model called Self-distilled Masked Image Transformer (SMIT). SMIT was trained using T2-weighted MR images from 30 patients with pancreatic cancers who underwent MRgRT to create a general model (GM). This GM was subsequently adapted to each new individual patient using data from their first treatment fraction, producing a PS model. Its performance was evaluated across the subsequent treatment fractions in 10 patients using Dice similarity coefficient (DSC), Hausdorff distance (HD95), and added path length (APL) by comparing against expert delineations. RESULTS: PS model outperformed the GM across all structures, with the largest improvements for duodenum-stomach (DSC: 0.84 to 0.90, HD95: 15.9 to 4.9 mm). This approach reduced potential contour editing efforts, decreasing median APL by 4%, 7% and 26% for large bowel, small bowel, and duodenum-stomach. CONCLUSION: PS fine-tuning was most effective for scans with low soft-tissue contrast and challenging anatomy. This method provides a practical, computationally feasible approach to enhance online adaptive workflow by improving segmentation accuracy and potentially reducing the need for manual editing that overall improves on-table treatment times.