Implementation of image style transfer in PyTorch. The paper outlining the transfer method can be found here.
You can install the required packages to run this notebook by running:
pip install -r requirements.txt
This notebook works on both CPU and GPU.
style_pathto the respective images you want to use.
style_weightsto change the effect of each style layer on the output (lower weights for later layers is preferrable).
style_weightdetermines the trade-off between content and style of the image(lower ratio facilitates high rates of style transfer).
| Content Image | Style image | Style transferred image | | ------------- | ------------- | ------------- | | | | |
If you can't run the notebook on your device's GPU manually set the
device varaible to