/Brain-MRI

Primary LanguageJupyter Notebook

Brain-MRI

Data Source

Brain MRI segmentation : Brain MRI images together with manual FLAIR abnormality segmentation masks This dataset contains brain MR images together with manual FLAIR abnormality segmentation masks. The images were obtained from The Cancer Imaging Archive (TCIA). They correspond to 110 patients included in The Cancer Genome Atlas (TCGA) lower-grade glioma collection with at least fluid-attenuated inversion recovery (FLAIR) sequence and genomic cluster data available.

Data

MRI Scan

Mask

Pre-processing steps

  • Both Scanned Images and Masks were converted from int tensor (0-255) to float tensor (0-1)
  • Transfroms to Images and mask :
    • flip
    • rotate
    • zoom
    • warp
    • lighting effects
  • Both Scanned Images and Masks were normalized using imagenet stats .

Training

Model: UNET with Resnet-34 (pertained on cifar-10 imagenet model) as a backbone.

The U-Net is convolutional network architecture for fast and precise segmentation of images. It is an encoder-decoder style network.
Using a U-Net with a pretrained resnet encoder means that the encoder part of the U-Net will be replaced by the resnet pretrained weights. It's a concept of transfer learning, i.e we don't need to train the model from scratch.

Optimizer: ADAM

Adaptive Moment Estimation (Adam) is an optimizer that computes adaptive learning rates for each parameter. In addition to storing an exponentially decaying average of past squared gradients vt like RMSprop, Adam also keeps an exponentially decaying average of past gradients mt, similar to momentum.

  • gt = Gradient Calculated
  • mt = Momentum
  • vt = RMSprop

  • Scheduler: One Cycle Policy

    The 1cycle policy has three steps: We progressively increase our learning rate from base_lr to lr_max and at the same time we progressively decrease our momentum from mom_max to mom_min.

    We do the exact opposite: we progressively decrease our learning rate from lr_max to lr_max/div_factor and at the same time we progressively increase our momentum from mom_min to mom_max.

    We further decrease our learning rate from lr_max/div_factor to lr_max/(div_factor x 100) and we keep momentum steady at mom_max.

    Training :

    Segmentation Training

    Validation Set Dice score : 86%

    Predictions