Skip to content

A web app that uses TensorFlow and Flask to apply neural style transfer, combining content and style images into a stylized output.

Notifications You must be signed in to change notification settings

koushik2k3/Neural-Style-Transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Style Transfer with Flask

image

image

This project demonstrates a neural style transfer application using TensorFlow and Flask. The application allows users to upload content and style images and produces a stylized image that combines the content of the content image with the style of the style image.

Prerequisites

  • Python 3.6 or higher
  • TensorFlow
  • TensorFlow Hub
  • Flask
  • Flask-WTF
  • Matplotlib
  • Numpy

Installation

  1. Clone the Repository

    git clone https://github.com/koushik2k3/Neural-Style-Transfer.git
    cd Neural-Style-Transfer
  2. Create and Activate a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the Required Packages

    pip install tensorflow tensorflow-hub flask flask-wtf matplotlib numpy

Usage

  1. Start the Flask Application

    python app.py

    The Flask app will start on http://127.0.0.1:3000/.

  2. Upload Images

    • Navigate to the root URL of the Flask app.
    • Use the form to upload a content image and a style image.
    • Submit the form to process the images.
  3. View the Result

    • The processed stylized image will be displayed on the page.
    • The stylized image will also be saved to the static/output directory.

Project Structure

  • app.py: Main Flask application script.
  • templates/: Contains the HTML templates.
  • static/: Contains static files including uploaded images and output images.

About

A web app that uses TensorFlow and Flask to apply neural style transfer, combining content and style images into a stylized output.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published