GitXplorerGitXplorer
S

INF634

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
a36fa16e2539f3bae7882e2021d01d9d2e951087

Update README.md

VVeronikaShilova committed 2 years ago
Verified
fb5e75bb5feff0565af2b199a43a61e8cf0e2622

Add CycleGAN notebook

VVeronikaShilova committed 2 years ago
Verified
7b95b9e85618e31341d7508bbf46c5b248cf6ccb

Update README.md

VVeronikaShilova committed 2 years ago
Verified
b0438d762060192bc0aaf00dfbce3b36824e5684

Update README.md

VVeronikaShilova committed 2 years ago
Verified
7282c317cf407c2277ca1d143b32017d763aca30

Update README.md

VVeronikaShilova committed 2 years ago
Verified
44d5d096d440c9e6a7c5c8892b7d5714c6985009

Update README.md

VVeronikaShilova committed 2 years ago

README

The README file for this repository.

INF634 Adding and removing masks to/from people using GANs

Setup

  1. Downloading and preparing data.

    1. Download data from here
    2. Unpack it and move it to the root of the project
    3. Rename "archive" folder into "data" folder
    4. Create "data_transformed" folder
    5. Create "mask_to_no_mask", "no_mask_to_mask" and "cycle_transform" folders inside "data_transformed" folder
    6. With pretrained Cycle GAN create normal-LFW and put it in the "mask_to_no_mask" folder
    7. With pretrained Cycle GAN create masked-LFW and put it in the "no_mask_to_mask" folder
    8. 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

  2. Installing required modules

    pip install -r requirements.txt
    

Launch

Test checkpoint:

  1. Name it last.ckpt
  2. Put it into checkpoints folder
  3. Run test script
    python -m src.train_test_identification
    

Train & test model:

python -m src.train_test_identification --train

Train, test and evaluate CycleGAN

  1. Clone the repository
  2. Run
mv INF634/* .
  1. Download data (achieve.zip) from here
  2. Put achieve.zip in the same directory where CycleGAN.ipynb resides
  3. 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).