Inspiration

Honestly, I was inspired by a speech from Dr. Mark Gooding (one of many speakers from the McMedHacks workshops). His speech focused on how we can deliver our knowledge and specialties into a specific area such as healthcare. Besides, I have always been inspired by the human brain and its capacity. Thus, I decided to apply my deep learning skills to work on the brain MRI segmentation dataset to provide some meaningful stories and values to the McMedHacks community.

What it does

In essence, my model uses object detection to detect and segment a brain tumor mask from a brain MRI image. This model might facilitate a diagnosis process since it can predict whether a tumor is present or not within seconds.

How I built it

First, I started looking for an exciting yet challenging dataset. Then, I researched some architecture backbones to build my model for a semantic segmentation task. Throughout exploring different model architectures, I discovered that combining a UNet (a well-known architecture in medical images) with pre-trained residual blocks from a ResNet50 (another famous architecture in classification task) had all the advantages I needed. Then, I implemented it from scratch.

Challenges I ran into

The most challenging problem I faced was defining an appropriate custom loss function for my model. First, I used the default binary cross-entropy (BCE) loss function from pytorch. However, it somehow gave me real big negative values while training my model. I took plenty of time to fix it. Even though, I normalized brain images and their masks before feeding them into the model, the BCE loss still gave me negative values. Then I searched and found that an appropriate loss function for a segmentation task is to subtract BCE Loss with dice coefficient loss.

Accomplishments that I'm proud of

  • Making my model work on segmenting a tumor mask out of a brain MRI image.
  • Achieving a mean IoU score of 90% on my model
  • Preparing for my presentation even though I'm really nervous about it
  • Putting it all together and finishing my project

I'm very proud that I've accomplished these milestones.

What I learned

Throughout this McMedHacks hackathon, I learned how to scrap datasets from different resources and build a complete deep learning model from scratch. Then, I learned how to apply the machine learning/ deep learning workflow to my project. And based on the challenge I experienced, an unforgettable lesson I learned is to always remind myself the type of problem I'm solving to define an appropriate loss function for it . Most of all, I realized that the only way to improve yourself is to challenge it as if you're in a hackathon.

What's next for Brain Tumor Segmentation Using ResUNet

I'm going to fine-tune the model for higher accuracy, then use it as a pre-trained model on a larger dataset. I will probably combine this ResUNet architecture into a multimodality model to predict a patient's overall survival rate. Finally, I will deploy this model on Heroku to provide a more interactive environment.

Built With

Share this project:

Updates