Skip to content

Code for "Stable and Controllable Neural Texture Synthesis and Style Transfer Using Histogram Losses"

Notifications You must be signed in to change notification settings

pierre-wilmot/NeuralTextureSynthesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralTextureSynthesis

Code for "Stable and Controllable Neural Texture Synthesis and Style Transfer Using Histogram Losses"

Notes:

  • The histogram functionality relies on a custom cuda module, so you'll need a cuda GPU to run the code.
  • Tested on GTX1080, top VRAM usage is just under 2700MB, runtime is 10 mins per image.
  • Code differs from the paper as the loss balancing is done with "magic numbers" rather than using the gradient clipping described in the paper.
  • Code doesn't implement the TV loss (total variation), as results didn't appear to have high frequency noise.

Usage:

The code contains a custom C++/Cuda module that gets compiled on the fly, in order to do that you need to use the same compiller as the one used to compile your release of PyTorch. On my machine, that's g++.

To launch the program : CXX=g++ python main.py src/*

This will run all images in src folder with and without histogram and generate a results.html page.

Sample results:

https://pierre-wilmot.github.io/NeuralTextureSynthesis/

About

Code for "Stable and Controllable Neural Texture Synthesis and Style Transfer Using Histogram Losses"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published