This project follows the implmentation of neural style by Anish Athalye. I reuse their pretrain VGG model, and code vgg.py for building VGG-19 model. The main file trainer.py is implemented purely by myself, with reference to their code stylize.py and neural_style.py.
python3 trainer.py --content <content file> --style <style file> --output <output file> --iterations <number of iterations>
This example image is provided by Anish Athalye.
python3 trainer.py --content examples/1-content.jpg --style examples/1-style.jpg --output result.jpg --iterations 2000 --reshape
Same as example 1 with dimension reduction on channels before calculating Gram matrix.
python3 trainer.py --content examples/1-content.jpg --style examples/1-style.jpg --output result.jpg --iterations 2000 --reshape --pca
- python3
- TensorFlow
- NumPy
- SciPy
- Pillow
- Pre-trained VGG network (MD5
8ee3263992981a1d26e73b3ca028a123
), put it in the top level of this repository
Copyright (c) 2015-2016 Dingfeng, Liu. Released under GPLv3. See LICENSE.txt for details.