Skip to content

philippe-heitzmann/Neural_Style_Transfer_VGG19

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Style Transfer with VGG-19

A Python implementation of neural style transfer using two distinct approaches to compare performance and output quality.

Overview

This repository implements neural style transfer algorithms using two different methodologies:

  1. Custom Implementation: Building the algorithm from scratch using TensorFlow's linear algebra functions, following Gatys et al.'s original approach with VGG-19 convolutional layers
  2. Pre-trained Model: Using TensorFlow Hub's pre-trained neural artistic stylization network proposed by Ghiasi et al.

The project compares the outputs and performance of both implementations to evaluate their effectiveness.

Sample Output

vgg_transform_bow_bridge_trim2

Project Structure

├── images/
│   ├── content/          # Content images for style transfer
│   ├── style/            # Style reference images
│   └── stylized_output/  # Generated stylized images
├── notebooks/
│   └── Neural_Style_Transfer_Base_Implementation.ipynb
└── README.md

Getting Started

Prerequisites

  • Python 3.7+
  • TensorFlow 2.x
  • Jupyter Notebook
  • GPU support recommended for faster processing

Installation

  1. Clone the repository:
git clone https://github.com/your-username/Neural_Style_Transfer_VGG19.git
cd Neural_Style_Transfer_VGG19
  1. Install required dependencies:
pip install tensorflow tensorflow-hub jupyter matplotlib numpy pillow

Docker Usage

Note: Currently, no Dockerfile is present in this repository. To run this project with Docker, you would need to:

  1. Create a Dockerfile with the appropriate Python environment and dependencies
  2. Build the Docker image
  3. Run the container with volume mounts for the images directory

If you have a Dockerfile, you can run:

# Build the image
docker build -t neural-style-transfer .

# Run the container
docker run -it -v $(pwd)/images:/app/images neural-style-transfer

Usage

  1. Open the Jupyter notebook:
jupyter notebook notebooks/Neural_Style_Transfer_Base_Implementation.ipynb
  1. Follow the step-by-step instructions in the notebook

  2. Explore the generated stylized images in the /images/stylized_output/ folder

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published