Coder Social home page Coder Social logo

sukhijapiyush / style-transfer-mri-using-cyclegan Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 48.52 MB

MRI style transfer from T1 to T2 and vice versa using CycleGAN(TensorFlow Implementation)

License: MIT License

Jupyter Notebook 100.00%
cyclegan discriminator generator mri-images style-transfer tensorflow unet unet-keras

style-transfer-mri-using-cyclegan's Introduction

Style-transfer-MRI-using-cyclegan

In this project, we use a cycleGan to do style transfer of MRI images type from T1 to T2 and vice versa. This is done to reduce the time taken to acquire images of both types. The CycleGAN has been created in tensorflow and keras.

Table of Contents

General Information

Algorithms Used

CycleGAN

Problem Statement

Misdiagnosis in the medical field is a very serious issue but it’s also uncomfortably common to occur. Imaging procedures in the medical field requires an expert radiologist’s opinion since interpreting them is not a simple binary process ( Normal or Abnormal). Even so, one radiologist may see something that another does not. This can lead to conflicting reports and make it difficult to effectively recommend treatment options to the patient.

One of the complicated tasks in medical imaging is to diagnose MRI(Magnetic Resonance Imaging). Sometimes to interpret the scan, the radiologist needs different variations of the imaging which can drastically enhance the accuracy of diagnosis by providing practitioners with a more comprehensive understanding.

Dataset Information

The data containes unpaired images of T1 and T2 MRI images which are used to train the model.

Steps Involved

  • Data Loading
  • Data Visualization
  • Data Preprocessing(Resizing, Normalization, Augmentation)
  • Data Batching
  • Creating Generator and Discriminator
  • Defining Loss Functions
  • Defining Optimizers
  • Creating CycleGAN
  • Defining Callbacks
  • Model Training
  • Model Evaluation

Results

Output After 300 Epochs:

drawing

Loss Visualization:

drawing

Epochs GIF to show the progress of the model:

drawing

Predictions for T1 to T2:

drawing

Predictions for T2 to T1:

drawing

Conclusion

The model is capable of generating images of T1 type from T2 and vice versa. The model can be used to reduce the time taken to acquire images of both types which can be used for further analysis. This also reduces the cost of acquiring them as well delay in diagnosis.

Technologies Used

  • Python
  • Tensorflow
  • Keras
  • Augmentor
  • Matplotlib
  • NumPy

Contact

Created by [@sukhijapiyush] - feel free to contact me!

License

This project is open source and available under the MIT License.

style-transfer-mri-using-cyclegan's People

Contributors

sukhijapiyush avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

ans-research

style-transfer-mri-using-cyclegan's Issues

Published Weights

Hi there,

I'm trying to use the trained CycleGAN for a school project. I unfortunately do not have any GPUs to train the model with. Would you be able to kindly release the weights of your trained model?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.