Project for IANNwTF Course WiSe 21/22 Cognitive Science at University Osnabrück
This project is part of the 'Introduction to Artificial Neural Networks with Tensorflow' course at the University Osnabrück.
In our project we generate pictures to which the art style of a chosen artist is transmitted while keeping the pictures content complete.
For this we implemented 2 different approaches, on the one hand CycleGAN ( Link to the CycleGAN Paper ) and on the other hand Neural Style Transfer ( Link to the Neural Style Transfer Paper ), with the use of TensorFlow.
.
├── images
├── src
│ ├──── Configs # Here you can find all the configs
│ │ ├── Config.py
│ │ ├── ConfigCycleGAN.py
│ │ └── ConfigNeuralStyleTransfer.py
│ │
│ ├──── Data # Here you can find downloaded/unpacked Datasets and Data Utilities
│ │ ├── Downloads
│ │ ├── DataPipeline.py
│ │ ├── DatasetDownloader.py
│ │ └── Data_Utilities.py
│ │
│ ├──── Logs # Here you can find generated images and Tensorboard Logs
│ │
│ ├──── Models # Here you can find all used Models
│ │ ├── BaseModel.py
│ │ ├── CycleGAN.py
│ │ ├── NeuralStyleTransfer.py
│ │ └── PatchGAN.py
│ │
│ ├──── Utilities # Here you can find general Utilities
│ │ ├── Callbacks # Here you can find custom Callbacks
│ │ └── Visualizer.py
│ │
│ ├──── wandb
│ ├─ main_CycleGAN.py # Run this main for CycleGAN
│ └─ main_NeuralStyleTransfer.py # Run this main for NeuralStyleTransfer
│
│── .gitignore
│── LICENSE
│── main_all_colab.ipynb
│── main_CycleGAN_colab.ipynb
│── main_NeuralStyleTransfer_colab.ipynb
│── README.md
└── requirements.txt
Paris before Style Transfer | Paris after Style Transfer |
---|---|
Dog before Style Transfer | Dog after Style Transfer |
---|---|
The only thing you need to do, is to install all the requirements that are listed in requirements.txt. Feel free to use following command inside "IANNwTF" Project.
pip install -r requirements.txt
In this Project "Weights & Biases"(short wandb) is utilized. You can disable it in src/Configs/Config_(CycleGAN | NeuralStyleTransfer) under config>settings>use_wandb.
Otherwise you need to create a wandb account and get your API Key. I can fully recommend it! Besides that we have also included the option to use Tensorboard.
Alternatively you can use the provided Jupyter Notebooks main_*_colab.ipynb to instantly start using our project, without any hassle.
Feel also free to use this Online Colab Version: Colab Link
Run main_(CycleGAN | NeuralStyleTransfer).py
with "IANNwTF/src/" as Working Directory.
You can change the most important settings and hyperparameters in the Configs section.
- Erik Bossow
- Julia Fülling
- Lena Kagoshima
- Peter Keffer
- Linda Ariel Ventura di Lorenzo Lopes
- Jan-Eric Wiemann
Extensively used resources besides Original-Papers:
https://keras.io/examples/generative/neural_style_transfer/
https://machinelearningmastery.com/cyclegan-tutorial-with-keras/
Tools: