Welcome to my Neural Style Transfer App — a Gradio-powered tool where you can blend the content of one image with the artistic style of another in seconds, right from your browser.
Try it live on Hugging Face 👉 Click here
- Upload your content and style images
- Adjust style influence with a slider
- Download the stylized image
It uses a deep learning model based on VGG19 to generate an output image that looks like:
- Extracts features from both content and style images using VGG19.
- Computes a content loss (how different the output is from the content).
- Computes a style loss (difference in textures/brush strokes using Gram matrices).
- Minimizes the total loss to generate a stylized image.
If you want to run it locally:
git clone https://github.com/BROODHONEY/NeuralStyleTransfer.git
cd NeuralStyleTransfer
# Create and activate env
conda create -n style-transfer python=3.10
# Or if you wnat to run it using GPU
conda create -n style-transfer pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
conda activate style-transfer
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.py

