Skip to content

troykuang/neural-style

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neural-style

An implementation of neural style in TensorFlow.

This implementation is a lot simpler than a lot of the other ones out there, thanks to TensorFlow's really nice API and automatic differentiation.

The algorithm seems to be working all right, but the results aren't always as good as some of the other implementations. This may be due to the optimization algorithm used - TensorFlow doesn't support L-BFGS, so we use Adam. It may be due to the parameters used. Or it may be a bug in the code... I don't know yet. Any help improving the code would be much appreciated!

Also, TensorFlow seems to be slower than a lot of the other deep learning frameworks out there. I'm sure this implementation could be improved, but it would probably take improvements in TensorFlow itself as well to get it to operate at the same speed as other implementations.

Running

python neural_style.py --content <content file> --style <style file> --output <output file>

(run python neural_style.py --help to see a list of all options)

Example

Running it for 500-2000 iterations seems to produce nice results.

The following example was run for 1000 iterations to produce the result:

output

These were the input images used (me sleeping at a hackathon and Starry Night):

input-content

input-style

Requirements

License

Copyright (c) 2015 Anish Athalye. Released under GPLv3. See LICENSE.md for details.

About

Neural style in TensorFlow!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%