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.
CycleGAN
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.
The data containes unpaired images of T1 and T2 MRI images which are used to train the model.
- 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
Output After 300 Epochs:
Loss Visualization:
Epochs GIF to show the progress of the model:
Predictions for T1 to T2:
Predictions for T2 to T1:
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.
- Python
- Tensorflow
- Keras
- Augmentor
- Matplotlib
- NumPy
Created by [@sukhijapiyush] - feel free to contact me!
This project is open source and available under the MIT License.