Skip to content

ishan-gupt/StyleTransfer-Pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleTransfer-PyTorch

Implementation of image style transfer in PyTorch. The paper outlining the transfer method can be found here.

Setting up the environment

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.

Using custom images

  • Put the images you want to use for style transfer in the images folder.
  • Change the content_path and style_path to the respective images you want to use.
  • The output images will get exported to the output folder.

Tweaking the model

  • Change the style_weights to change the effect of each style layer on the output (lower weights for later layers is preferrable).
  • The ratio of content_weight and style_weight determines the trade-off between content and style of the image(lower ratio facilitates high rates of style transfer).

Sample Output

Content Image Style image Style transferred image
alt text alt text alt text

Common errors

If you can't run the notebook on your device's GPU manually set the device varaible to cpu.

About

Implementation of image style transfer in PyTorch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published