An implementation of A neural algorithm of artistic style in TensorFlow.
- Pre-trained VGG network - insert the model in the parent directory or specify the path using the
--network
option.
python neural_graph.py --content <content file> --styles <style file> --output <output file>
Run python neural_graph.py --help
to view a list of all options.
Use --checkpoint-output
and --checkpoint-iterations
to save checkpoint images.
Use --iterations
to change the number of iterations (default 1000). For a 512×512 pixel content file, 1000 iterations take 60 seconds on a GTX 1080 Ti, 90 seconds on a Maxwell Titan X, or 60 minutes on an Intel Core i7-5930K. Using a GPU is highly recommended due to the huge speedup.
Running it for 500-2000 iterations seems to produce nice results. With certain
images or output sizes, you might need some hyperparameter tuning (especially
--content-weight
, --style-weight
, and --learning-rate
).
LICENSE for details.