• Stars
    star
    208
  • Rank 187,980 (Top 4 %)
  • Language
    Python
  • Created over 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is the demo of image style transfer using perceptual loss.

style_transfer-perceptual_loss

This is 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. =_=