Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryushinn/texture-synthesis-sliced-wasserstein
An unofficial JAX implementation of "A Sliced Wasserstein Loss for Neural Texture Synthesis" (CVPR 2021).
https://github.com/ryushinn/texture-synthesis-sliced-wasserstein
jax sliced-wasserstein-distance texture-synthesis
Last synced: about 1 month ago
JSON representation
An unofficial JAX implementation of "A Sliced Wasserstein Loss for Neural Texture Synthesis" (CVPR 2021).
- Host: GitHub
- URL: https://github.com/ryushinn/texture-synthesis-sliced-wasserstein
- Owner: ryushinn
- Created: 2024-08-02T13:07:59.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-03T18:01:33.000Z (5 months ago)
- Last Synced: 2024-08-04T11:59:08.541Z (5 months ago)
- Topics: jax, sliced-wasserstein-distance, texture-synthesis
- Language: Python
- Homepage:
- Size: 38.5 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Sliced Wasserstein Loss for Neural Texture Synthesis
> This is an unofficial [**JAX**](https://github.com/google/jax) implementation for [A Sliced Wasserstein Loss for Neural Texture Synthesis (CVPR'21)](https://arxiv.org/abs/2006.07229).
Please see [here](https://github.com/tchambon/A-Sliced-Wasserstein-Loss-for-Neural-Texture-Synthesis) for the author's repository and cite them:
```bib
@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:
```bash
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
```bash
python texsyn.py --exemplar_path data/input.png --loss_type sw
```## Results
Input | Output (Slice) | Output (Gram)
---------|----------|---------
![alt text](data/input.png) | ![alt text](data/result_sw.png) | ![alt text](data/result_gram.png)## 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.