程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

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

发布于2019-08-22 16:45     阅读(629)     评论(0)     点赞(19)     收藏(5)


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

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

 

输出结果实现

灭霸风格素材


 

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



2、其他风格迁移设计



 

核心代码

  1. #Keras:基于Keras的VGG16实现A Neural Algorithm of Artistic Style
  2. from keras.preprocessing.image import load_img, img_to_array
  3. import numpy as np
  4. from scipy.misc import imsave
  5. from scipy.optimize import fmin_l_bfgs_b
  6. import time
  7. from keras.applications.vgg16 import VGG16
  8. from keras.applications.vgg16 import preprocess_input
  9. from keras import backend as K
  10. import os
  11. # References
  12. - [A Neural Algorithm of Artistic Style](http://arxiv.org/abs/1508.06576)
  13. '''
  14. base_image_path=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\content\20180214(21).jpg'
  15. style_reference_image_path=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\style\mieba02.jpg'
  16. result_prefix=r'F:\File_Python\Python_example\fast_style_transfer_master\examples\results'
  17. iterations=10
  18. content_weight=0.025
  19. style_weight=1.0
  20. total_variation_weight=1.0

 



所属网站分类: 技术文章 > 博客

作者:就是这么自信

链接:https://www.pythonheidong.com/blog/article/53010/67f2e96ce63b1b5a5833/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

19 0
收藏该文
已收藏

评论内容:(最多支持255个字符)