Skip to content

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

License

Notifications You must be signed in to change notification settings

sukhijapiyush/Style-transfer-MRI-using-cyclegan

Repository files navigation

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.

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published