Skip to content

CVPR '21: In the light of feature distributions: Moment matching for Neural Style Transfer

Notifications You must be signed in to change notification settings

prometixX/cmd_styletransfer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In the light of feature distributions: Moment matching for Neural Style Transfer (CVPR 2021)

This repository provides code to recreate results presented in In the light of feature distributions: Moment matching for Neural Style Transfer.

For more information, please see the project website and make sure to check out our medium blog post here


Contact

If you have any questions, please let me know

Instructions

Running neural style transfer with Central Moment Discrepancy is as easy as running

python main.py --c_img ./path/to/content.jpg --s_img ./path/to/style.jpg

You have the following command line arguments to change to your needs:

  --c_img         The content image that is being stylized.
  --s_img         The style image
  --epsilon       Iterative optimization is stopped if delta value of 
                  moving average loss is smaller than this value.
  --max_iter      Maximum iterations if epsilon is not surpassed
  --alpha         Convex interpolation of style and content loss 
                  (should be set high > 0.9 since we start with content as target)
  --lr            Learning rate of Adam optimizer
  --im_size       Output image size. Can either be single integer for keeping aspect ratio or tuple.

Citations

@article{kalischek2021light,
      title={In the light of feature distributions: moment matching for Neural Style Transfer}, 
      author={Nikolai Kalischek and Jan Dirk Wegner and Konrad Schindler},
      year={2021},
      eprint={2103.07208},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

About

CVPR '21: In the light of feature distributions: Moment matching for Neural Style Transfer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%