- Linux or macOS
- Python 3
- CPU or NVIDIA GPU + CUDA CuDNN
Install PyTorch and torchvision.
- For pip users, please type the command
pip install -r requirements.txt
.
The data we used in the paper is in ./dataset
.
The 2048 x 1024 images in our dataset are pairs of
You can train a model as the following instruction:
python train.py --dataroot ./dataset --name Ha2Mag_pix2pix --model pix2pix
Models are saved to ./checkpoints/
.
See opt
in files(base_options.py and train_options.py) for additional training options.
You can test the model as the following instruction:
python test.py --dataroot ./dataset --name Ha2Mag_pix2pix --model pix2pix
See opt
in files(base_options.py and test_options.py) for additional testing options.
Testing results are saved in ./results/
.
Code borrows heavily from pytorch-CycleGAN-and-pix2pix