您当前的位置: 首页 >  ar
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

NS之VGG(Keras):基于Keras的VGG16实现之《复仇者联盟3》灭霸图像风格迁移设计(A Neural Algorithm of Artistic Style)

一个处女座的程序猿 发布时间:2018-08-30 19:53:02 ,浏览量:0

CV之NS之VGG16:基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用

导读 通过代码设计,基于Keras的VGG16实现A Neural Algorithm of Artistic Style之灭霸风格迁移设计

目录

基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用

输出结果实现

灭霸风格素材

1、对我的偶像,下手……

2、其他风格迁移设计

核心代码

基于Keras框架利用VGG16算法实现图像风格迁移设计(以设计《复仇者联盟3》灭霸图像风格迁移为例)案例应用 输出结果实现 灭霸风格素材

 

1、对我的偶像,下手……
22044672/58889256 [==========>...................] - ETA: 1:53
22077440/58889256 [==========>...................] - ETA: 1:53
22093824/58889256 [==========>...................] - ETA: 1:53
22126592/58889256 [==========>...................] - ETA: 1:52
22142976/58889256 [==========>...................] - ETA: 1:52
22183936/58889256 [==========>...................] - ETA: 1:52
……
58826752/58889256 [============================>.] - ETA: 0s
58859520/58889256 [============================>.] - ETA: 0s
58875904/58889256 [============================>.] - ETA: 0s
58892288/58889256 [==============================] - 250s 4us/step
Model loaded.

Start of iteration 0
Current loss value: 2254528800.0
Image saved as F:\File_Python\Python_example\fast_style_transfer_master\examples\results_at_iteration_0.png
Iteration 0 completed in 252s
Start of iteration 1
Current loss value: 1771042400.0
Image saved as F:\File_Python\Python_example\fast_style_transfer_master\examples\results_at_iteration_1.png
Iteration 1 completed in 238s
Start of iteration 2

2、其他风格迁移设计

核心代码
#Keras:基于Keras的VGG16实现A Neural Algorithm of Artistic Style
from keras.preprocessing.image import load_img, img_to_array
import numpy as np
from scipy.misc import imsave
from scipy.optimize import fmin_l_bfgs_b
import time
from keras.applications.vgg16 import VGG16
from keras.applications.vgg16 import preprocess_input
from keras import backend as K
import os

# References
    - [A Neural Algorithm of Artistic Style](http://arxiv.org/abs/1508.06576)
'''

base_image_path=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\content\20180214(21).jpg'
style_reference_image_path=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\style\mieba02.jpg'
result_prefix=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\results'

iterations=10
content_weight=0.025
style_weight=1.0
total_variation_weight=1.0
关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0436s