Skip to content

Latest commit

 

History

54 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

GI Tract Image Segmentation

header

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 + Focal Loss) for segmentation + Focal Loss for presence head
  • Input : Used 2.5D images (5 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)

  • Trained on full training data

    • Private score : 0.86701 (~ 51% of test data)
    • Public score : 0.87427 (~ 49% of test data)
  • Trained on 80-20 train-validation split of full training data
    (ensuring equal proportion of empty segmentation mask and non-overlapping case ids across train and validation data splits)

    • Private score : 0.86324
    • Public score : 0.86994
    • Validation score : 0.87303
      • 3D Hausdorff Distance : 0.04574
      • Dice Score : 0.75118

Main contents


The notebook provided here can be directly accessed and run from :

About

Semantic segmentation of GI tract organs in MRI scan slices using SegFormer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages