Skip to content

An unofficial JAX implementation of "A Sliced Wasserstein Loss for Neural Texture Synthesis" (CVPR 2021).

Notifications You must be signed in to change notification settings

ryushinn/texture-synthesis-sliced-wasserstein

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Sliced Wasserstein Loss for Neural Texture Synthesis

This is an unofficial JAX implementation for A Sliced Wasserstein Loss for Neural Texture Synthesis (CVPR'21).

Please see here for the author's repository and cite them:

@InProceedings{Heitz_2021_CVPR,
    author = {Heitz, Eric and Vanhoey, Kenneth and Chambon, Thomas and Belcour, Laurent},
    title = {A Sliced Wasserstein Loss for Neural Texture Synthesis},
    booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2021}
}

Notes

We require these libraries:

pip install -U "jax[cuda]" equinox optax tqdm pillow

The pre-trained VGG weights vgg19.npy is ported from the vgg19.pth file provided in the official repo.

We re-write the VGG network and Slice Wasserstein Loss in JAX code.

Run

python texsyn.py --exemplar_path data/input.png --loss_type sw

Results

Input Output (Slice) Output (Gram)
alt text alt text alt text

Last words

Thanks all efforts put on making all mentioned repositories public.

We appreciate bug reports. I will fix them when I make time around.

About

An unofficial JAX implementation of "A Sliced Wasserstein Loss for Neural Texture Synthesis" (CVPR 2021).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages