This the demo of img style transfer of paper :perceptual loss
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0eb04a7 Feb 6, 2018
Permalink
Failed to load latest commit information.
img test commit Feb 2, 2018
model_saved Add files via upload Feb 6, 2018
vlib test commit Feb 2, 2018
README.md Update README.md Feb 2, 2018
dog-transfer.png Add files via upload Feb 2, 2018
dog.jpg test commit Feb 2, 2018
model.py test commit Feb 2, 2018
scene-transfer.png Add files via upload Feb 2, 2018
scene.jpg test commit Feb 2, 2018
train.py test commit Feb 2, 2018
vgg_simple.py test commit Feb 2, 2018

README.md

style_transfer-perceptual_loss

This a funny demo of style transfer of paper :Perceptual Losses for Real-Time Style Transfer and Super-Resolution

the detail information about this code is in my CSDN blog

usage:

train:

python train.py -is_training=True -vgg_model='your vgg model path' -train_data_path='your train dataset' -style_data_path='your style img path' -style_w=100 

forexample:

python train.py -is_training=True  -vgg_model='vgg16.ckpt' -train_data_path='/train2014' -style_data_path='img/wave.jpg' -style_w=100

you can download the vgg16.ckpt model from the url

note : you can change the degree of style transfer by changing style_w value, and you can also modify the code to set the args papameter as default

test

python train -is_training=False -test_data_path='your test img' -new_img_name='transfer.jpg' -transfer_model='your saved model after train'

forexample:

python train.py -is_training=False  -test_data_path='dog.jpg'  -new_img_name='transfer.jpg' -transfer_model='model_saved/wave.ckpt'

results

note

if you find it is useful for you, please leave your star, thanks. =_=