Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Style Transfer App

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

What Does It Do?

It uses a deep learning model based on VGG19 to generate an output image that looks like:

Content Image:

TAL-florence-ITCITIES0924-6aada9377bca4896a4338ab8950cca39

Style Image:

istockphoto-543465140-612x612

Output Image:

output (2)


How It Works:

  1. Extracts features from both content and style images using VGG19.
  2. Computes a content loss (how different the output is from the content).
  3. Computes a style loss (difference in textures/brush strokes using Gram matrices).
  4. Minimizes the total loss to generate a stylized image.

Running Locally (Recommended)

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

About

Transferring the style of an Image to another using PyTorch Neural Networks

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages