Nueral Style Transfer

Pytorch implementation of Nueral style transfer algorithm , it is used to apply artistic styles to content images. Content is the layout or the sketch and Style being the painting or the colors.

Examples

68747470733a2f2f6f626a65637473746f726167652e61702d6879646572616261642d312e6f7261636c65636c6f75642e636f6d2f6e2f6178396b6574733468356c642f622f6769746875622f6f2f6578616d706c65312e706e67

68747470733a2f2f6f626a65637473746f726167652e61702d6879646572616261642d312e6f7261636c65636c6f75642e636f6d2f6e2f6178396b6574733468356c642f622f6769746875622f6f2f6578616d706c65322e706e67

Getting Started

Prerequisite

  • Python 3+ (tested on python 3.9)
  • pytorch
  • Nvidia Gpu(not necessary but it will significantly boost your training speed)

Installation

  1. Clone the repo

    git clone https://github.com/abhinav-TB/Neural-Style-Transfer.git
    
  2. Install python packages

    pip install -r requirements.txt
    

Training

Command line Arguments

Parameter Type Description
-s string Required. path to style image
-c string Required. path to content image
-e string Required. Number of training loops
-o string Output folder path

start training

python main.py

Example

python main.py -s ./style/style5.jpg -c ./content/trees.jpg -e 2500 

GitHub

https://github.com/abhinav-TB/Neural-Style-Transfer