Practical overview
When it fits
Use it when you have two MRI image domains organized for training and testing and want to explore model-based translation between them.
Who it is for
- MRI researchers exploring synthetic cross-contrast image translation.
- Practitioners comparing CycleGAN and UNIT workflows on multi-contrast MR image datasets.
Documented uses
- Organize two MRI contrast domains into training and test sets.
- Start CycleGAN or UNIT training on a prepared dataset.
- Generate synthetic images using the model-specific instructions.
- Compare generated examples with ground-truth scans.
Requirements & limits
The public repository is open source under the GPL-3.0 license.
- The repository supports two documented model choices: CycleGAN and UNIT.
- Dataset folders and the
image_folderparameter must be prepared as described before training. - Image generation has separate instructions in each model’s
generate_imagesdirectory. - The repository includes example comparisons with ground-truth images; these examples do not establish clinical suitability.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare MRI domains and start model training
Arrange two MRI image domains for training and testing, then launch either CycleGAN or UNIT training.
Before you start
- A local dataset for two image domains.
- The Gan Mri repository and Python environment; the README documents Python scripts but does not specify environment setup.
Steps
Place the dataset under the
datadirectory inside the CycleGAN or UNIT folder.Create
data/Dataset-name/trainA,trainB,testA, andtestBdirectories.Set the dataset name as the
image_folderparameter in the model initialization function.From the relevant model folder, run the command below or the command below.
python CycleGAN.pypython UNIT.py
Expected outcome
The selected model’s training process is started on the prepared dataset.
Guide limitations
- Synthetic image generation is described separately in
CycleGAN/generate_images/ReadMe.mdorUNIT/generate_images/ReadMe.md; this guide does not cover that stage.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 28 November 2026
- Original website title
- simontomaskarlsson/GAN-MRI · Official homepage title · retained in its source language

