style-transfer-master

所属分类:Linux/Unix编程
开发工具:Python
文件大小:4106KB
下载次数:3
上传日期:2017-05-23 15:42:13
上 传 者酷酷酷
说明:  基于Gatys在CVPR上发表的Image Style Transfer Using Convolution Neural Networks那篇文章的风格转移代码,需要在caffe框架下运行
( U57FA u4283 u7281 uFF0C u9700 u8981 u7284 U6846 u67B6 u4E0B u8FD0 u884C)

文件列表:
demo.py (2776, 2016-07-03)
images (0, 2016-07-03)
images\content (0, 2016-07-03)
images\content\johannesburg.jpg (204343, 2016-07-03)
images\content\nanjing.jpg (149277, 2016-07-03)
images\content\sanfrancisco.jpg (148466, 2016-07-03)
images\results (0, 2016-07-03)
images\results\starry_johannesburg.jpg (65244, 2016-07-03)
images\results\starry_nanjing.jpg (70281, 2016-07-03)
images\results\starry_sanfrancisco.jpg (67485, 2016-07-03)
images\style (0, 2016-07-03)
images\style\starry_night.jpg (224988, 2016-07-03)
models (0, 2016-07-03)
models\caffenet (0, 2016-07-03)
models\caffenet\deploy.prototxt (2027, 2016-07-03)
models\caffenet\ilsvrc_2012_mean.npy (1572944, 2016-07-03)
models\googlenet (0, 2016-07-03)
models\googlenet\deploy.prototxt (22434, 2016-07-03)
models\googlenet\ilsvrc_2012_mean.npy (1572944, 2016-07-03)
models\stylenet (0, 2016-07-03)
models\stylenet\ilsvrc_2012_mean.npy (1572944, 2016-07-03)
models\vgg16 (0, 2016-07-03)
models\vgg16\VGG_ILSVRC_16_layers_deploy.prototxt (4006, 2016-07-03)
models\vgg16\ilsvrc_2012_mean.npy (1572944, 2016-07-03)
models\vgg19 (0, 2016-07-03)
models\vgg19\VGG_ILSVRC_19_layers_deploy.prototxt (4736, 2016-07-03)
models\vgg19\ilsvrc_2012_mean.npy (1572944, 2016-07-03)
outputs (0, 2016-07-03)
requirements.txt (64, 2016-07-03)
scripts (0, 2016-07-03)
scripts\download_models.sh (765, 2016-07-03)
style.py (19430, 2016-07-03)

# style-transfer ## Introduction This repository contains a pyCaffe-based implementation of "A Neural Algorithm of Artistic Style" by L. Gatys, A. Ecker, and M. Bethge, which presents a method for transferring the artistic style of one input image onto another. You can read the paper here: http://arxiv.org/abs/1508.06576. Neural net operations are handled by Caffe, while loss minimization and other miscellaneous matrix operations are performed using numpy and scipy. L-BFGS is used for minimization. ## Requirements - Python >= 2.7 - CUDA >= 6.5 (highly recommended) - Caffe CUDA will enable GPU-based computation in Caffe. ## Download To run the code, you must have Caffe installed and the appropriate Python bindings in your `PYTHONPATH` environment variable. Detailed installation instructions for Caffe can be found [here](http://caffe.berkeleyvision.org/installation.html). All of the necessary code is contained in the file `style.py`. You can try it on your own style and content image by running the following command: ``` python style.py -s -c -m -g 0 ``` The prototxts which come with the vanilla Caffe install aren't quite compatible with this code - working ones have already been added to this repository as a result of this. To get the pretrained models, simply run: ``` bash scripts/download_models.sh ``` This will grab the convnet models from the links provided in the [Caffe Model Zoo](https://github.com/BVLC/caffe/wiki/Model-Zoo). You may also specify the exact model you'd like to download by running: ``` bash scripts/download_models.sh ``` Here, `` must be one of `vgg16`, `vgg19`, `googlenet`, or `caffenet`. ## Sample Original images: [San Francisco](https://www.flickr.com/photos/anhgemus-photography/15377047497) by Anh Dinh, [Nanjing in winter snow, 2008](https://www.flickr.com/photos/emmajg/3199018106) by Emma Gawen, and [Blade Runner's Johannesburg](https://www.flickr.com/photos/andryn2006/1911401***82) by Andrew Moore. All images were released under the Creative Comments license. Each output image was initialized with the content image, and 500 BFGS iterations under the VGG model were performed in each instance.

These results can also be found in the `images` folder in the repository root. A more in-depth set of examples can be found [here](http://frankzliu.com/artistic-style-transfer/).

近期下载者

相关文件


收藏者