This repository contains a Flask web application that performs neural style transfer . The app allows users to upload a content image and a style image, and it generates a new image that combines the content of the first image with the style of the second image.
- Upload content and style images through a web interface.
- Generate a stylized image using neural style transfer.
- Save and display the generated image.
- Git
- Python 3.7+
- Flask
- Torch
- Torchvision
- Pillow
-
Clone the repository:
git clone https://github.com/EMPER0R7/style_transfer_app.git cd style_transfer_app
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Open your browser and go to
http://127.0.0.1:5000/
to access the app.
- Open the application in your web browser.
- Upload a content image and a style image using the provided form.
- Click on the "Submit" button to start the style transfer process.
- Wait for the process to complete. The generated image will be displayed on the result page.
app.py
: The main Flask application file.style_transfer_model.py
: Contains the neural style transfer implementation.templates/
: Directory containing HTML templates.index.html
: The main page for uploading images.result.html
: The page for displaying the generated image.
static/
: Directory for static files (e.g., the generated image).uploads/
: Directory for temporarily storing uploaded images.
- Flask
- Torch
- Torchvision
- Pillow
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.