-
Downloading and preparing data.
- Download data from here
- Unpack it and move it to the root of the project
- Rename "archive" folder into "data" folder
- Create "data_transformed" folder
- Create "mask_to_no_mask", "no_mask_to_mask" and "cycle_transform" folders inside "data_transformed" folder
- With pretrained Cycle GAN create normal-LFW and put it in the "mask_to_no_mask" folder
- With pretrained Cycle GAN create masked-LFW and put it in the "no_mask_to_mask" folder
- With pretrained Cycle GAN create cycle-LFW and put it in the "cycle_transform" folder Note the structure should be "data_transformed/A/images/*_fake.png" where A in {"cycle_transform", "mask_to_no_mask", "no_mask_to_mask"}
** normal-LFW, masked-LFW, cycle-LFW can be also downloaded here
-
Installing required modules
pip install -r requirements.txt
Test checkpoint:
- Name it last.ckpt
- Put it into checkpoints folder
- Run test script
python -m src.train_test_identification
Train & test model:
python -m src.train_test_identification --train
- Clone the repository
- Run
mv INF634/* .
- Download data (achieve.zip) from here
- Put achieve.zip in the same directory where CycleGAN.ipynb resides
- Run CycleGAN.ipynb to train, test and evaluate CycleGAN (once you ran the notebook, you will get normal-LFW, masked-LFW, cycle-LFW datasets in the folder pytorch-CycleGAN-and-pix2pix).