Skip to content

照片风格转换 项目主要参考Anish Athalye的Github项目 该项目是基于TensorFlow进行的视频图像转化,参考neural style这篇文章。

License

Notifications You must be signed in to change notification settings

harry19902002/image-style-transfor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

照片风格转换

项目主要参考Anish Athalye的Github项目

该项目是基于TensorFlow进行的视频图像转化,参考neural style这篇文章。

TensorFlow 并不支持 L-BFGS (论文所用算法), 所以我们使用了 Adam,这样可能需要用更多的参数来获得理想的转换图片.

TensorFlow 可能比其他的深度学习算法稍微慢一些。 我想通过修改tensorFlow的实现方式,算法效率一定会再高一些。 现在,使用TensorFlow实现大概要比Torch工具慢3倍

如何运行

首先在根目录下下载VGG-19网络模型

并在项目根目录下键入:

python neural_style.py --content 原始图片文件名 --styles 风格图片文件名 --out 生成图片文件名

例子

使用 500-2000 迭代次数就可以有一个很不错的结果,通过修改其他参数我们可以得到不同的效果(比如--content-weight,--style-weight,and --learning-rate)。

这是一个迭代了1000次的例子(使用默认参数):

output

原始图片:

input-content

input-style

环境需要

License

Copyright (c) 2015-2016 Anish Athalye. Released under GPLv3. See LICENSE.txt for details.

About

照片风格转换 项目主要参考Anish Athalye的Github项目 该项目是基于TensorFlow进行的视频图像转化,参考neural style这篇文章。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages