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.
- Python 3.6 or higher
- TensorFlow
- TensorFlow Hub
- Flask
- Flask-WTF
- Matplotlib
- Numpy
-
Clone the Repository
git clone https://github.com/koushik2k3/Neural-Style-Transfer.git cd Neural-Style-Transfer -
Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the Required Packages
pip install tensorflow tensorflow-hub flask flask-wtf matplotlib numpy
-
Start the Flask Application
python app.py
The Flask app will start on
http://127.0.0.1:3000/. -
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.
-
View the Result
- The processed stylized image will be displayed on the page.
- The stylized image will also be saved to the
static/outputdirectory.
app.py: Main Flask application script.templates/: Contains the HTML templates.static/: Contains static files including uploaded images and output images.

