Image source: UW-Madison GI Tract Image Segmentation Competition
📝 Task : Predict semantic segmentation masks for large bowel, small bowel and stomach across multiple MRI scan slices — identified by case, day, and slice ids.
📊 Evaluation metric : Combined metric = 0.6 * (1 - 3D Hausdorff Distance) + 0.4 * Dice Score
ℹ️ Please refer to https://www.kaggle.com/competitions/uw-madison-gi-tract-image-segmentation for more details
🧠 Methodology
- Model Architecture : SegFormer with mit-b4 encoder
- Classification (presence) head to handle empty masks
- Loss : (Dice + SoftBCE) for segmentation + BCE for presence head
- Input : Used 2.5D image slices to obtain inter-slice context
- Data coherence : Ensured that all slices from the same case-day receive identical augmentations to maintain 3D consistency
- Optimization : Layer-wise learning rate decay (LLRD) applied across SegFormer encoder blocks, decoder and task heads
- Stabilization : EMA (Exponential Moving Average) weights for final evaluation
🔨 Implementation : Built in Python mainly using PyTorch, Segmentation Models PyTorch (SMP), OpenCV
📈 Best Score (Combined metric)
- Private score : 0.86248 (~ 51% of test data)
- Public score : 0.87178 (~ 49% of test data)
- Validation score : 0.87192 (validation data obtained using 80-20 split of train data ensuring equal proportion of empty segmentation mask and non-overlapping case ids)
- 3D Hausdorff Distance : 0.046
- Dice Score : 0.748
Main contents
- GI Tract Image Segmentation notebook (The ipython notebook contains images and other details, so please reload in case it does not render properly. Alternatively view the code on Kaggle in the link below)
- Scores of all runs
The notebook provided here can be directly accessed and run from :
