Skip to content

A Tensorflow implementation of the paper 'A Neural Algorithm of Artistic Style' by Gatys, et al. Uses a pre-trained VGG-19 model.

Notifications You must be signed in to change notification settings

sarahwolf32/Neural-Style-Transfer

Repository files navigation

Neural Style Transfer

This is an implementation of the paper A Neural Algorithm of Artistic Style by Gatys, et al.

Results

Below is an example of art generated by this code. It combines the style of a lovely painting by Megan Ducanson with a photograph of a tree in a field. Full disclosure: some of the results I did not post were quite terrible looking, so do not be discouraged if your first few attempts do not come out as you had hoped. I recommend experimenting a bit to get a feel for what works well and what doesn't. The same style image can have a very different effect on different content images, or with different hyperparameters.

Create your own

To use:

  1. Download a pretrained VGG19 model here, and place it in the project directory.
  2. Replace images/content.jpg with a photo of your choice (600x600).
  3. Replace images/style.jpg with an art image of your choice (600x600).
  4. Navigate into the project directory in terminal
  5. Type python neural_style_transfer.py
  6. That's it! Training will take several hours. Intermediate images will be generated at regular intervals.
  7. Check the output folder for results.

Acknowledgements

In developing this code I drew on the following implementations:

About

A Tensorflow implementation of the paper 'A Neural Algorithm of Artistic Style' by Gatys, et al. Uses a pre-trained VGG-19 model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages