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.
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.
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.