Skip to content

This is an implementation of neural style transfer algorithm in pytorch.

Notifications You must be signed in to change notification settings

yMayanand/neural-style-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Style Transfer 🚀

This repository contains a pytorch implementation of an algorithm for artistic style transfer. The algorithm can be used to mix the content of an image with the style of another image. For example, here is a photograph of a door arch rendered in the style of a stained glass painting.

Requirements

The program is written in Python, and uses pytorch, numpy, opencv. A GPU is not necessary, but can provide a significant speed up especially for training a new model. Regular sized images can be styled on a laptop or desktop using saved models.

Usage

Stylize image

python neural-style-transfer/train.py  --data_dir <path/to/directory> --content_image <content image name> --style_image <style image name> --output_image <output image name> 
  • --data_dir: path to directory where your images are saved.
  • --content_image: name content image you want to stylize.
  • --style_image: name of style image from which you want to extract style
  • --output_image: path for saving the output image.

Note: Use of gpu is recommended because it will run very fast as compared to cpu and default parameters give decent results on almost all images but if results are not that good than feel free to tweak them according to your needs.

About

This is an implementation of neural style transfer algorithm in pytorch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages