Skip to content

This project utilizes the original paper of Neural Style Transfer "A Neural Algorithm of Artistic Style" by Leon Gatys et al. We used the VGG-19 model and made changes in the implementation which have resulted in better results. Streamlit was used to deploy this app.

License

Notifications You must be signed in to change notification settings

Sidhupaji-2004/Neural-Style-Transfer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Style Transfer using PyTorch (GPU version)

Neural Style Transfer Created By: Swastika Kar & Siddharth Sen

Try the web app on this link https://nst-v01.streamlit.app/

Table of Contents

Introduction

This project is based on the Neural-Style algorithm developed by Leon A. Gatys, Alexander S. Ecker and Matthias Bethge. Neural-Style, or Neural-Transfer, allows you to take an image and reproduce it with a new artistic style. The algorithm takes three images, an input image, a content-image, and a style-image, and changes the input to resemble the content of the content-image and the artistic style of the style-image.

Example1

We have referred to the paper Gatys_Image_Style_Transfer_CVPR_2016_paper.pdf for understanding the underlying principles.

Example Screenshots

Here are a few examples of the style transfer in action:

Examples

Example1 Example2 Example3 Example3

Features

  • Apply the style of famous artworks to your photos.
  • Adjustable style strength.
  • Supports multiple image formats.
  • Easy to use command-line interface.

Installation

Prerequisites

  • Python 3.6 or higher
  • Git
  • Virtual environment (optional but recommended)

Steps

  1. Clone the repository:

    git clone https://github.com/swas-kar/Neural_Style_Transfer.git
    cd Neural_Style_Transfer
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate   # On Windows use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt

Arguments

  • --content: Path to the content image.
  • --style: Path to the style image.
  • --output: Path to save the output image.
  • --iterations: Number of iterations to run (default: 500).
  • --style-weight: Weight of the style (default: 1e6).
  • --content-weight: Weight of the content (default: 1).

Contributing

We welcome contributions! If you find a bug or want to add a new feature, feel free to open an issue or submit a pull request. Please follow the guidelines below:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new pull request.

License

This project is licensed under the MIT License - see the MIT LICENSE file for details.

About

This project utilizes the original paper of Neural Style Transfer "A Neural Algorithm of Artistic Style" by Leon Gatys et al. We used the VGG-19 model and made changes in the implementation which have resulted in better results. Streamlit was used to deploy this app.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.3%
  • Python 0.7%