# neural-style-tf
This is a TensorFlow implementation of several techniques described in the papers:
* [Image Style Transfer Using Convolutional Neural Networks](http://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Gatys_Image_Style_Transfer_CVPR_2016_paper.pdf)
by Leon A. Gatys, Alexander S. Ecker, Matthias Bethge
* [Artistic style transfer for videos](https://arxiv.org/abs/1604.08610)
by Manuel Ruder, Alexey Dosovitskiy, Thomas Brox
* [Preserving Color in Neural Artistic Style Transfer](https://arxiv.org/abs/1606.05897)
by Leon A. Gatys, Matthias Bethge, Aaron Hertzmann, Eli Shechtman
Additionally, techniques are presented for semantic segmentation and multiple style transfer.
The Neural Style algorithm synthesizes a [pastiche](https://en.wikipedia.org/wiki/Pastiche) by separating and combining the content of one image with the style of another image using convolutional neural networks (CNN). Below is an example of transferring the artistic style of [The Starry Night](https://en.wikipedia.org/wiki/The_Starry_Night) onto a photograph of an African lion:
<p align="center">
<img src="examples/lions/42_output.png" width="512"/>
<img src="examples/lions/content_style.png" width="290"/>
</p>
Transferring the style of various artworks to the same content image produces qualitatively convincing results:
<p align="center">
<img src="examples/lions/32_output.png" width="192">
<img src="examples/lions/styles/matisse_crop.jpg" width="192"/>
<img src="examples/lions/33_output.png" width="192"/>
<img src="examples/lions/styles/water_lilies_crop.jpg" width="192"/>
<img src="examples/lions/wave_output.png" width="192"/>
<img src="examples/lions/styles/wave_crop.jpg" width="192"/>
<img src="examples/lions/basquiat_output.png" width="192"/>
<img src="examples/lions/styles/basquiat_crop.jpg" width="192"/>
<img src="examples/lions/calliefink_output.png" width="192"/>
<img src="examples/lions/styles/calliefink_crop.jpg" width="192"/>
<img src="examples/lions/giger_output.png" width="192"/>
<img src="examples/lions/styles/giger_crop.jpg" width="192"/>
</p>
Here we reproduce Figure 3 from the first paper, which renders a photograph of the Neckarfront in Tübingen, Germany in the style of 5 different iconic paintings [The Shipwreck of the Minotaur](http://www.artble.com/artists/joseph_mallord_william_turner/paintings/the_shipwreck_of_the_minotaur), [The Starry Night](https://www.wikiart.org/en/vincent-van-gogh/the-starry-night-1889), [Composition VII](https://www.wikiart.org/en/wassily-kandinsky/composition-vii-1913), [The Scream](https://www.wikiart.org/en/edvard-munch/the-scream-1893), [Seated Nude](http://www.pablopicasso.org/seated-nude.jsp):
<p align="center">
<img src="examples/gatys_figure/tubingen.png" height="192px">
<img src="examples/gatys_figure/tubingen_shipwreck.png" height="192px">
<img src="examples/initialization/init_style.png" height="192px">
<img src="examples/gatys_figure/tubingen_picasso.png" height="192px">
<img src="examples/gatys_figure/tubingen_scream.png" height="192px">
<img src="examples/gatys_figure/tubingen_kandinsky.png" height="192px">
</p>
### Content / Style Tradeoff
The relative weight of the style and content can be controlled.
Here we render with an increasing style weight applied to [Red Canna](http://www.georgiaokeeffe.net/red-canna.jsp):
<p align="center">
<img src="examples/style_content_tradeoff/okeffe.jpg" height="160px">
<img src="examples/style_content_tradeoff/okeffe_10.png" width="160px">
<img src="examples/style_content_tradeoff/okeffe_100.png" width="160px">
<img src="examples/style_content_tradeoff/okeffe_10000.png" width="160px">
<img src="examples/style_content_tradeoff/output_1000000.png" width="160px">
</p>
### Multiple Style Images
More than one style image can be used to blend multiple artistic styles.
<p align="center">
<img src="examples/multiple_styles/tubingen_starry_scream.png" height="192px">
<img src="examples/multiple_styles/tubingen_scream_kandinsky.png" height="192px">
<img src="examples/multiple_styles/tubingen_starry_seated.png" height="192px">
<img src="examples/multiple_styles/tubingen_seated_kandinsky.png.png" height="192px">
<img src="examples/multiple_styles/tubingen_afremov_grey.png" height="192px">
<img src="examples/multiple_styles/tubingen_basquiat_nielly.png" height="192px">
</p>
*Top row (left to right)*: [The Starry Night](https://www.wikiart.org/en/vincent-van-gogh/the-starry-night-1889) + [The Scream](https://www.wikiart.org/en/edvard-munch/the-scream-1893), [The Scream](https://www.wikiart.org/en/edvard-munch/the-scream-1893) + [Composition VII](https://www.wikiart.org/en/wassily-kandinsky/composition-vii-1913), [Seated Nude](http://www.pablopicasso.org/seated-nude.jsp) + [Composition VII](https://www.wikiart.org/en/wassily-kandinsky/composition-vii-1913)
*Bottom row (left to right)*: [Seated Nude](http://www.pablopicasso.org/seated-nude.jsp) + [The Starry Night](https://www.wikiart.org/en/vincent-van-gogh/the-starry-night-1889), [Oversoul](http://alexgrey.com/art/paintings/soul/oversoul/) + [Freshness of Cold](https://afremov.com/FRESHNESS-OF-COLD-PALETTE-KNIFE-Oil-Painting-On-Canvas-By-Leonid-Afremov-Size-30-x40.html), [David Bowie](http://www.francoise-nielly.com/index.php/galerie/index/56) + [Skull](https://www.wikiart.org/en/jean-michel-basquiat/head)
### Style Interpolation
When using multiple style images, the degree of blending between the images can be controlled.
<p align="center">
<img src="image_input/taj_mahal.jpg" height="178px">
<img src="examples/style_interpolation/taj_mahal_scream_2_starry_8.png" height="178px">
<img src="examples/style_interpolation/taj_mahal_scream_8_starry_2.png" height="178px">
<img src="examples/style_interpolation/taj_mahal_afremov_grey_8_2.png" height="178px">
<img src="examples/style_interpolation/taj_mahal_afremov_grey_5_5.png" height="178px">
<img src="examples/style_interpolation/taj_mahal_afremov_grey_2_8.png" height="178px">
</p>
*Top row (left to right)*: content image, .2 [The Starry Night](https://www.wikiart.org/en/vincent-van-gogh/the-starry-night-1889) + .8 [The Scream](https://www.wikiart.org/en/edvard-munch/the-scream-1893), .8 [The Starry Night](https://www.wikiart.org/en/vincent-van-gogh/the-starry-night-1889) + .2 [The Scream](https://www.wikiart.org/en/edvard-munch/the-scream-1893)
*Bottom row (left to right)*: .2 [Oversoul](http://alexgrey.com/art/paintings/soul/oversoul/) + .8 [Freshness of Cold](https://afremov.com/FRESHNESS-OF-COLD-PALETTE-KNIFE-Oil-Painting-On-Canvas-By-Leonid-Afremov-Size-30-x40.html), .5 [Oversoul](http://alexgrey.com/art/paintings/soul/oversoul/) + .5 [Freshness of Cold](https://afremov.com/FRESHNESS-OF-COLD-PALETTE-KNIFE-Oil-Painting-On-Canvas-By-Leonid-Afremov-Size-30-x40.html), .8 [Oversoul](http://alexgrey.com/art/paintings/soul/oversoul/) + .2 [Freshness of Cold](https://afremov.com/FRESHNESS-OF-COLD-PALETTE-KNIFE-Oil-Painting-On-Canvas-By-Leonid-Afremov-Size-30-x40.html)
### Transfer style but not color
The color scheme of the original image can be preserved by including the flag `--original_colors`. Colors are transferred using either the [YUV](https://en.wikipedia.org/wiki/YUV), [YCrCb](https://en.wikipedia.org/wiki/YCbCr), [CIE L\*a\*b\*](https://en.wikipedia.org/wiki/Lab_color_space), or [CIE L\*u\*v\*](https://en.wikipedia.org/wiki/CIELUV) color spaces.
Here we reproduce Figure 1 and Figure 2 in the third paper using luminance-only transfer:
<p align="center">
<img src="examples/original_colors/new_york.png" height="165px">
<img src="examples/original_colors/stylized.png" height="165px">
<img src="examples/original_colors/stylized_original_colors.png" height="165px">
<img src="examples/original_colors/garden.png" height="165px">
<img src="examples/original_colors/garden_starry.png" height="165px">
<img src="examples/original_colors/garden_starry_yuv.png" height="165px">
</p>
*Left to right*: content image, stylized image, stylized image with the or
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
TensorFlow_(Python_API)_implementation_of_Neural_S (160个子文件)
consistencyChecker 73KB
consistencyChecker.cpp 4KB
deepflow2-static 1.55MB
deepmatching-static 3.13MB
output.gif 3.49MB
input.gif 2.51MB
opt_flow.gif 1.04MB
weights.gif 484KB
taj_mahal.jpg 1.07MB
lion.jpg 602KB
giger_crop.jpg 445KB
tubingen.jpg 397KB
the_scream.jpg 212KB
starry-night.jpg 201KB
kandinsky.jpg 198KB
okeffe.jpg 144KB
shipwreck.jpg 141KB
golden_gate.jpg 100KB
seated-nude.jpg 100KB
woman-with-hat-matisse.jpg 99KB
wave_crop.jpg 97KB
calliefink_crop.jpg 95KB
face.jpg 82KB
02270.jpg 78KB
00110.jpg 73KB
00768.jpg 58KB
00017.jpg 51KB
02390.jpg 50KB
kandinsky_crop.jpg 28KB
oil_crop.jpg 25KB
basquiat_crop.jpg 24KB
flowers_crop.jpg 22KB
water_lilies_crop.jpg 19KB
matisse_crop.jpg 19KB
LICENSE 34KB
README.md 25KB
garden.png 1.54MB
garden_starry.png 1.5MB
garden_starry_yuv.png 1.47MB
02270_output.png 1.03MB
02390_output.png 1.02MB
basquiat.png 991KB
00110_output.png 978KB
00768_output.png 932KB
frida.png 861KB
00017_output.png 845KB
02630_output.png 795KB
okeffe_iris.png 766KB
calliefink_output.png 654KB
okeffe_red_canna.png 652KB
giger_output.png 625KB
basquiat_output.png 620KB
oil_output.png 615KB
33_output.png 614KB
kandinsky_output.png 594KB
42_output.png 592KB
ben_giles_output.png 591KB
wave_output.png 589KB
ben_giles.png 575KB
okeffe_10.png 575KB
flowers_output.png 574KB
32_output.png 571KB
output_100000.png 531KB
dark_matter_output.png 530KB
output_1000000.png 525KB
okeffe_100.png 521KB
okeffe_1000.png 515KB
okeffe_10000.png 511KB
conv1_1_1e2.png 509KB
conv2_1_1e2.png 508KB
conv3_1_1e2.png 505KB
conv1_1_1e3.png 504KB
relu1_1_1e2.png 503KB
relu2_1_1e2.png 502KB
relu3_1_1e2.png 501KB
conv1_1_1e4.png 498KB
relu1_1_1e3.png 497KB
relu1_1_1e5.png 496KB
conv2_1_1e3.png 496KB
relu1_1_1e4.png 494KB
conv1_1_1e5.png 494KB
conv3_1_1e3.png 492KB
relu2_1_1e3.png 492KB
relu3_1_1e3.png 490KB
relu3_1_1e4.png 484KB
relu5_1_1e2.png 483KB
relu4_1_1e2.png 483KB
relu5_1_1e3.png 482KB
relu4_1_1e3.png 482KB
relu4_1_1e4.png 482KB
relu5_1_1e5.png 482KB
relu5_1_1e4.png 482KB
relu3_1_1e5.png 482KB
relu4_1_1e5.png 482KB
relu2_1_1e4.png 482KB
conv5_1_1e4.png 481KB
conv4_1_1e3.png 481KB
conv4_1_1e4.png 481KB
conv5_1_1e5.png 481KB
conv4_1_1e5.png 481KB
共 160 条
- 1
- 2
资源评论
好家伙VCC
- 粉丝: 2485
- 资源: 9138
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- [整站程序]Wap Portal Server v1.21 (PHP+MYSQL的WAP整站)_wap.rar
- [整站程序]创佳迷你全站系统 v1.0_mtv.rar
- 利用KNN算法进行多输入单输出拟合预测建模详解(MATLAB实现及数据替换指南),利用KNN算法做多输入单输出拟合预测建模 程序内有注释,直接替数据就可以用,可以免费指导如何替数据 程序是MATL
- 2007-2023上市企业制度性交易成本(非生产性成本).dta
- 原始数据-工具变量-上市公司企业非生产性成本及非生产性支出数据.xlsx
- [整站程序]杭州家教网_jj0571.rar
- [整站程序]华旭商务网_huaxu.rar
- Lumerical-FDTD软件脚本语言编写实践:一维与二维光子晶体的微环谐振器及其他光子器件的逆向设计与优化算法,Lumerical-FDTD软件使用,脚本语言编写 光子晶体(一维,二维)微环谐振
- [整站程序]东方自助网站系统v3.0_dfautov30.rar
- [整站程序]迷魂记 第二版(粉色迷魂)_ver3.rar
- 基于MATLAB的SOC蓄电池双向DC-DC充放电Buck-Boost控制仿真模型:双闭环控制与充放电自动切换,考虑SOC蓄电池 双向DC DC 充放电控制 matlab仿真模型 buck boost
- [整站程序]极度迅雷影视整站_09959.rar
- [整站程序]情感家园站 v3.0 For 个人版_qgweb30fp.rar
- 基于滑模位置观测器的无速度传感器永磁同步电机转速控制设计与Simulink仿真研究,基于无速度传感器的永磁同步电机转速控制 使用滑模位置观测器设计 simulink仿真 无位置传感器算法可指定或者更
- [整站程序]漂亮的全站程序-JOYS的小窝_free5.rar
- [整站程序]数字中国全站系统 v1.3.1_dbchinav131.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功