Skip to content

CycleGANs-PyTorch applied on Young to Old image converter.

License

Notifications You must be signed in to change notification settings

abhishekyana/CycleGANs-PyTorch

Repository files navigation

CycleGANs-PyTorch applied on Young to Old image converter.

Py-Torch implementation of CycleGANs Paper.

  • You can find more about this project in my blog here.

CycleGAN Block Diagram:

BD

RESULTS FIRST: Young to Old converter

img1.jpg img2.jpg img3.jpg img4.jpg

IF you want to replicate these results may be on different dataset. Read More..

  1. Clone the repository:
git clone https://github.com/abhishekyana/CycleGANs-PyTorch.git
cd CycleGANs-PyTorch
# As this is a huge project, I'd suggest to make a conda environment and then run the training and all.
  1. Install all the requirements from requirements.txt file:
  2. Download the dataset, It can be grabbed from here.
  3. Unzip and Move the dataset folder into this project's root directory.
  4. Adjust the configure.py file according to your flavour, these parameters affect the training.
  5. Run the python train.py file and see the training happen for yourself.
  • The models will be saved to and loaded from ./outputs as default.
  • The model trained for around 4 hours on GTX1080 and i7 system.

If you want to test the mode, then you can download the pretrained model from here. Sorry the link is broken I'll fix it..

  • Download the dataset.
  • Download the pretrained model. Only Generator model is enough.
  • Copy these folders into appropriate directories as mentioned above.
  • Run python test.py, After the provess is done, you can see the Juxtaposed results in ./outputs/A and ./outputs/B.
  • If you want to run this on your own images, Copy your image into a directory in ./directory/A if you want to make your picture old or into ./directory/B if you want your picture to be Young. Then edit the ./directory in testoptions in configure.py and run the code again. Now, you can see the your image in the outputs directory.

Please Feel Free to Fork it, Clone it and whatever you want.

  • Not only this data, A CycleGAN can map from any unpaired domains, as this application si trending now, I've chosen this to code.

With Love on Open Source

Thank you

This project is inspired from Aitor Ruano and I would like to thank him for providing such a beautiful code which I used to clarify my doubts during the implementation.

Releases

No releases published

Packages

No packages published

Languages