Style Transfer as Optimal Transport - Paper and Tensorflow Implementation
(I'm not able to provide a open-source license because the original author did not provide a license, and I used some of his code in this implementation.)
- This project is currently tested against
pytorch-nightly-1.0.0.dev20181008
(Pytorch 1.0.0 Preview) from conda pytorch channel andtorchvision
from Github master branch. - A Dockerfile is also provided.
- It uses CUDA by default.
You'll need to install nvidia-docker for GPU acceleration.
Build the Docker Image with the accompanied Dockerfile, and use docker run
to start a container.
An example (assuming the image name is pytorch_nightly:latset
and the working directory is the root of the project.):
docker run --runtime=nvidia -ti -v (pwd):/home/docker --rm pytorch_nightly:latest bash
Please refer to the conda and pip installation commands in the Dockerfile to replicate the Python environment.
You'll have to build the latest PyTorch from source or use an older PyTorch version. I cannot guarantee it will work, though.
python cli.py --subject content_images/wave_small.jpg --style style_images/kngwa_small.jpg --output wave_kngwa.jpg --steps 100 --log_interval 10