Skip to content

🌅 Neural Style Transfer Streamlit app with Keras & Tensorflow

License

Notifications You must be signed in to change notification settings

anomam/neural-style-transfer-tensorflow

Repository files navigation

🌅 Neural Style Transfer app

License: MIT

This repository provides a Python implementation of Neural Style Transfer (by Gatys et al. (2015)) using Keras and the Tensorflow Adam optimizer.

The implementation comes with a streamlit application to provide a user-friendly interface that allows an easy selection of the training parameters as well as a convenient way to load input images, train, and explore the results.

Here is an example of running the app to transfer artistic features from the Starry Night to a picture of the Tokyo Tower.

Some of the obtained results:

Contents

Requirements

You have the option to run this implementation on either CPU or GPU, but in both cases using Python 3.6. It is recommended to use the GPU option for more speedy results.

Running on CPU

This is the easiest approach to run the app.

  • Install the python requirements using pip, preferrably in a virtual environment: pip install -r requirements.txt
  • CMake: if you don't already have it, you'll need this to run the Makefile recipies

You can make sure that the installation is working by running the tests with

make cpu-test-run

Running on GPU

This will train a lot faster than using CPUs.

  • nvidia-docker2: nvidia-docker2 will allow to build a container with all the GPU requirements for training
  • CMake: if you don't already have it, you'll need this to run the Makefile recipies

You can make sure that the installation is working by running the tests with

make gpu-test-run

Usage

In order to start the app, you just need to run a single command line from the root folder of this repository as follows:

  • for running on CPU
make cpu-app
  • for running on GPU
make gpu-app

License

See LICENSE for details.

About

🌅 Neural Style Transfer Streamlit app with Keras & Tensorflow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published