A tensorflow implementation for Perceptual Losses for Real-Time Style Transfer and Super-Resolution. In this project, I build a model with Tensorflow and slim for image style transfer.
| sample | origin |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- download VGG16 model from Tensorflow Slim. Extract the file vgg_16.ckpt. Then copy it to the folder pretrained/
- download COCO dataset. Please unzip it.
- convert the COCO images to tfrecord file by follow command:
python data_loader/dataset_create.py
It will create a image.tfrecord file placed at folder datasets
python transfer.py -c conf/candy.yml
tensorboard --logdir logs/candy
saved at models/candy
python evaluate.py -c conf/candy.yml -i img/test.jpg
A style transfered image named {style_name}_styled_test.jpg will be created and placed at the same folder as the input image.
If you add the flag --origin_color then the output image will retain the colors of the original image











