博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Neural Style学习1——简介
阅读量:4882 次
发布时间:2019-06-11

本文共 1951 字,大约阅读时间需要 6 分钟。

该项目是Github上面的一个开源项目,其利用卷积神经网络的理论,参照论文A Neural Algorithm of Artistic Style,可以实现一种效果:两张图片,一张取其内容,另一张取其风格,然后将两张融合到一起。

This is a torch implementation of the paper

by Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge.

The paper presents an algorithm for combining the content of one image with the style of another image using

convolutional neural networks. Here's an example that maps the artistic style of
onto a night-time photograph of the Stanford campus:

starry_night_google.jpg

hoovertowernight.jpg
starry_stanford_bigger.png

Applying the style of different images to the same content image gives interesting results.

Here we reproduce Figure 2 from the paper, which renders a photograph of the Tubingen in Germany in a
variety of styles:

tubingen.jpg

tubingen_shipwreck.png

tubingen_starry.png

tubingen_scream.png

tubingen_seated_nude.png

tubingen_composition_vii.png

Here are the results of applying the style of various pieces of artwork to this photograph of the

golden gate bridge:

golden_gate.jpg

frida_kahlo.jpg

golden_gate_kahlo.png
escher_sphere.jpg
golden_gate_escher.png

woman-with-hat-matisse.jpg

golden_gate_matisse.png
the_scream.jpg
golden_gate_scream.png

starry_night_crop.png

golden_gate_starry.png
seated-nude.jpg
golden_gate_seated.png

Content / Style Tradeoff

The algorithm allows the user to trade-off the relative weight of the style and content reconstruction terms,

as shown in this example where we port the style of onto Brad Pitt:

picasso_selfport1907.jpg

brad_pitt.jpg

pitt_picasso_content_5_style_10.png

pitt_picasso_content_1_style_10.png
pitt_picasso_content_01_style_10.png
pitt_picasso_content_0025_style_10.png

Style Scale

By resizing the style image before extracting style features, we can control the types of artistic

features that are transfered from the style image; you can control this behavior with the -style_scale flag.
Below we see three examples of rendering the Golden Gate Bridge in the style of The Starry Night.
From left to right, -style_scale is 2.0, 1.0, and 0.5.

golden_gate_starry_scale2.png

golden_gate_starry_scale1.png
golden_gate_starry_scale05.png

Multiple Style Images

You can use more than one style image to blend multiple artistic styles.

Clockwise from upper left: "The Starry Night" + "The Scream", "The Scream" + "Composition VII",

"Seated Nude" + "Composition VII", and "Seated Nude" + "The Starry Night"

tubingen_starry_scream.png

tubingen_scream_composition_vii.png

tubingen_starry_seated.png

tubingen_seated_nude_composition_vii.png

Style Interpolation

When using multiple style images, you can control the degree to which they are blended:

golden_gate_starry_scream_3_7.png

golden_gate_starry_scream_5_5.png
golden_gate_starry_scream_7_3.png

Transfer style but not color

If you add the flag -original_colors 1 then the output image will retain the colors of the original image;

this is similar to .

tubingen_starry.png

tubingen_scream.png
tubingen_composition_vii.png

tubingen_starry.png

tubingen_scream.png
tubingen_composition_vii.png

转载于:https://www.cnblogs.com/DarrenChan/p/6211512.html

你可能感兴趣的文章
linux系统灵活运用灯[android课程3]
查看>>
Android 通用Dialog中设置RecyclerView
查看>>
利用 Android Studio 和 Gradle 打包多版本APK
查看>>
Android 自定义标题栏
查看>>
Android 如何把一个 RelativeLayout或ImageView背景设为透明
查看>>
tomcat优化方向
查看>>
http
查看>>
8-1-组队赛
查看>>
codility: CountTriangles
查看>>
赛斯说
查看>>
python 中的pipe
查看>>
(SQL Analyzer services)定义链接维度
查看>>
squid
查看>>
系统开发管理、架构与设计步步谈随笔索引
查看>>
Java的时间空间复杂度详解
查看>>
有效防止SQL注入漏洞
查看>>
Linux chown命令
查看>>
十、I/O流——4-输入、输出流体系
查看>>
十二、网络编程——4-基于UDP协议的网络编程
查看>>
异常处理与调试6 - 零基础入门学习Delphi55(完)
查看>>