Skip to content

Using SwinUNETR for Binary lesion Segmentation #1460

@burhr2

Description

@burhr2

Hello, has anyone tried to train SwinUNETR from scratch for binary segmentation? I have tried from my side and after more than 1500 epochs I still ended with the model predicting background class only. The validation loss seemed to have been dropping but with strange behaviour i.e. it's kinda stuck oscillating in a local minimal then sudden sharp drop then stuck again. First time working with Transformers hence I may have missed some important info to consider for training. I used a default setup as suggested in this tutorial and only changed the in_channels=1 and out_channels=2 as I am working on binary segmentation. In advance, thanks for the suggestions.

unet = SwinUNETR(
            img_size=(128, 128, 128),
            in_channels=1,
            out_channels=2,
            feature_size=48,
            drop_rate=0.0,
            attn_drop_rate=0.0,
            dropout_path_rate=0.0,
            use_checkpoint=False,
        )
model = Model(unet, loss_function, config)

context:
We are working on MS lesion segmentation from Spinal cord MRI. The most noticeable challenge is the imbalance btn foreground and background voxels. We have existing Unet solutions which work well but we thought to try transformer architectures as they are reported to outperform conv-only UNets. We are using Torchio + PyTorch lighting frameworks. The dataset is small (62 training subjects) but using patching strategy to improve the sample size. More details on our task can be on our recent published work.

references

  1. tutorial link: https://github.com/Project-MONAI/tutorials/blob/main/3d_segmentation/swin_unetr_brats21_segmentation_3d.ipynb
  2. https://inria.hal.science/hal-03865212/

I have posted a similar question on Q&A Discord channels. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions