Skip to content

Germinari1/StylizeIt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StylizeIt

An implementation of Neural Style Transfer with PyTorch. It allows users to use command line arguments to stylize their own images easily and optionally set hyperparameters different from the default values.

Content Image Style Image
Content Image Style Image

Result
Result Image

Quick Start and requirements

  1. Clone (or download) this repository:
git clone https://github.com/Germinari1/StylizeIt.git
  1. Install the requirements for this project with:
pip install -r requirements.txt

There are some other important components for this project, which also need to be installed:

  • Python 3
  • Pip
  • CUDA is recommended for GPU acceleration Now you`re ready to go!

How to use StylizeIt

Command-line arguments are used to control the program and stylize your images. Here's the simplest way to generate a stylized image:

python exec.py <path to content image> <path to style image> <path for output>

For example:

python exec.py "images/content_imgs/figures.jpg" "images/style_imgs/wave_crop.jpg" "images/stylized_imgs/output1.jpg"

Besides creating images, it is possible to change the hyperparameters of the model by using the corresponding flags. For instance:

python exec.py "images/content_imgs/figures.jpg" "images/style_imgs/wave_crop.jpg" "images/stylized_imgs/output1.jpg" --num_iterations 1000 --learning_rate 0.01

Here's the complete list of parameters you can manipulate from the command line:

  • content_weight
  • style_weight
  • total_variation_weight
  • learning_rate
  • num_iterations
  • content_layer_weights
  • style_layer_weights
  • use_random_init
  • max_image_size
  • checkpoint_interval

About

A implementation of Neural Style Transfer with PyTorch. It allows users to use command line arguments to stylize their own images easily.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages