Skip to content

A machine learning method to transfer style of artwork.

Notifications You must be signed in to change notification settings

pjohnst5/StyleTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

StyleTransfer

A machine learning method to transfer style of artwork.

Overview

This project takes one image's style and transfers it to another image's content. For example:

Style image

Content image

Transferred image

Given an academic paper I created a machine learning process to ask the user for two images, one for content the other for style. I then fed these images into a pretrained VGG network, saving certain layer outputs depending if the input image was the style or content image. I then took a fresh content image, fed it through a vgg network which cached all the network layer outputs, and used these saved layer outputs to minimize with the previously saved style and content layer outputs. By minimizing the style and content layer losses, the fresh content image slowly approached a hybrid of these two images, making the style more and more like the style image and the content more and more like the content image. In order to save specified layer outputs from the VGG netwokr I had to create a custom VGG wrapper which received as input a list of layers to track and returned a vgg network which would produce a cache system of the layers specified.

Methods

See StyleTransfer.ipynb.

About

A machine learning method to transfer style of artwork.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published