Pytorch implementation of Optimal Transport driven CycleGAN for Unsupervised Learning in Inverse Problems [Paper]
python train.py --data_path directory_for_custom_dataset --domain_A subdirctory_for_domain_A \\
--domain_B subdirectory_for_domain_B --extension png
- data_path should contain domain_A and domain_B as its subdirectories.
- extension should be able to open with numpy.load or SimpleITK.ReadImage. If your file extension is not supported by these functions, modify [utils.py].
- noramlize only supports one of minmax, tanh, CT, None. If you want to normalize with different method, modify [utils.py]. CT stands for computed tomography in medical imaging.
- This repository is only implemented with Figure 7 and Table 1(d) of the original Paper. Especially, I only implemented discriminator loss for Equation 3.24.
- With my personal experience, I changed Algorithm 3.1 to train the generator prior to the discriminator. Training generator prior to discriminator makes model more stable.
- If you train model with CT option for normalize configuration, you may want to convert numpy ndarray into DICOM format. It might be helpful referencing this code
- Alert! This is not official implementation.
I only experimented CT image for model training. However, for legal issue - such as privacy of the patient, I cannot upload converted CT image.
In further commits, I would be happy to share other images that have no legal issue.
2021.01.07 : Added skip connection in ConvBlock