Skip to content

A tensorflow v2 implementation of fast style transfer method.

Notifications You must be signed in to change notification settings

DreamAndDead/fast-style-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast style transfer in tf v2

A tensorflow v2 implementation of fast style transfer method.

udnie style

wave style

styled video (click to play video)

stylish

prequisite

download the pretrained models and save in ./model/.

each model contains

  • model weights
  • generated test images
  • loss logs for tensorboard

stylish image

$ python evaluate.py --type image --weight model/udnie/weights.h5 --content input/udnie/chicago.jpg --output output/udnie/chicago.jpg

stylish video

$ python evaluate.py --type video --weight model/udnie/weights.h5 --content input/video/fox.mp4 --output output/udnie/fox.avi

develop

prequisite

download coco2014 dataset in ./data dir.

data/
└── train2014/
    ├── *.jpg
    ├── .....
    ├── .....
    ├── .....
    └── *.jpg

train

e.g. train model using udnie style, chicago as test image, output model in model/udnie dir.

$ python train.py --style-image input/style/udnie.jpg --test-image input/content/chicago.jpg --output model/udnie

loss visualization

launch tensorboard to check the training losses.

$ tensorboard --logdir ./model --bind_all

refs

this project borrows the code from project lengstrom/fast-style-transfer but uses tf v2 and keras model.

this implementation is based on

also, Tensorflow official site and Justin's ppt in cs20si help a lot.

About

A tensorflow v2 implementation of fast style transfer method.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages