NS之VGG(Keras):基于Keras的VGG16实现之《复仇者联盟3》灭霸图像风格迁移设计(A Neural Algorithm of Artistic Style)
生活随笔
收集整理的這篇文章主要介紹了
NS之VGG(Keras):基于Keras的VGG16实现之《复仇者联盟3》灭霸图像风格迁移设计(A Neural Algorithm of Artistic Style)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
NS之VGG(Keras):基于Keras的VGG16實現之《復仇者聯盟3》滅霸圖像風格遷移設計(A Neural Algorithm of Artistic Style)
?
導讀
通過代碼設計,基于Keras的VGG16實現A Neural Algorithm of Artistic Style之滅霸風格遷移設計
?
?
目錄
輸出結果實現
核心代碼
?
?
?
輸出結果實現
滅霸風格素材
?
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 22、其他風格遷移設計
?
核心代碼
#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總結
以上是生活随笔為你收集整理的NS之VGG(Keras):基于Keras的VGG16实现之《复仇者联盟3》灭霸图像风格迁移设计(A Neural Algorithm of Artistic Style)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Competition——ML/DL:机
- 下一篇: DL之RNN:基于RNN实现模仿贴吧留言