Skip to content

thomktz/style-transfer

Repository files navigation

A Neural Style Transfer implementation

Python, torch

NST principle

Inputs : content image C, style image S

A generated image (tensor G) is created from either a copy of content or from random noise. This tensor is the only trained parameter.
A pretrained VGG model, or a pretrained Resnet151 model is used to extract features from all three tensors. The features are stored at multiple steps during any forward pass in the model, L times

The content and style losses are defined as such :

And the final loss to backpropagate is

Results

Starry Night by Van Gogh, and a town

starrytown ezgif com-gif-maker (5) 0059

The Scream, by Edvard Munch and the Windows background image

images2 ezgif com-gif-maker (5) 0030

Tableau I, 1921, by Piet Mondrian and a picture of the London skyline

skylinemandrian ezgif com-gif-maker (2) 01980 (1)

Emergence of Orange, by Koola Adams and a Tokyo street

koolatokyo ezgif com-gif-maker (3) 02100

Emergence of Orange, by Koola Adams and a city skyline

koolaskyline ezgif com-gif-maker (4) 02015

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages