• Stars
    star
    117
  • Rank 300,121 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Keras implementation of "A Neural Algorithm of Artistic Style"

A Neural Algorithm of Artistic Style (Keras Implementation)

An implementation of the arXiv preprint A Neural Algorithm of Artistic Style [1] & paper Image Style Transfer Using Convolutional Neural Networks [2].

Supports TensorFlow 2.4.1.

Style Transfer

style-transfer.ipynb describes the style transfer process between a white noise image x, a content image p, and a style representation a. Performing gradient descent of the content loss and style loss with respect to x impressions the content of p into x, bearing local styles, and colors from a.

Original Photograph Tubingen, Germany
Claude Monet Houses of Parliament
Pablo Picasso Seated Nude
Edvard Munch The Scream
Vincent van Gogh The Starry Night
William Turner The Shipwreck of The Minotaur
Wassily Kandinsky Composition VII

Content Reconstruction

content-reconstruction.ipynb describes the content reconstruction process from white noise. Performing gradient descent of the content loss on a white noise input x for a given content p yields a representation of the networks activation for a given layer l.

Layer Result
block1_conv1
block2_conv1
block3_conv1
block4_conv1
block4_conv2
block5_conv1

Style Reconstruction

style-reconstruction.ipynb describes the style reconstruction process on Wassily Kandinsky's Composition VII from white noise. Performing gradient descent of the style loss on a white noise input x for a given artwork a yields a representation of the networks activation for a given set of layers L.

Layer Result
block1_conv1
block1_conv1, block2_conv1
block1_conv1, block2_conv1, block3_conv1
block1_conv1, block2_conv1, block3_conv1, block4_conv1
block1_conv1, block2_conv1, block3_conv1, block4_conv1, block5_conv1

Content Layer

content-layer.ipynb visualizes how the style transfer is affected by using different layers for content loss.

Layer Result
block1_conv1
block2_conv1
block3_conv1
block4_conv1
block5_conv1

Style Layers

style-layers.ipynb visualizes how the style transfer is affected by using different sets of layers for style loss.

Layers Result
block1_conv1
block1_conv1, block2_conv1
block1_conv1, block2_conv1, block3_conv1
block1_conv1, block2_conv1, block3_conv1, block4_conv1
block1_conv1, block2_conv1, block3_conv1, block4_conv1, block5_conv1

Optimizers

optimizers.ipynb employs gradient descent, adam, and L-BFGS to understand the effect of different black-box optimizers. Gatys et. al use L-BFGS, but Adam appears to produce comparable results without as much overhead.

Gradient Descent Adam L-BFGS

TV Loss

tv-loss.ipynb introduces total-variation loss to reduce impulse noise in the images.

TV Loss Scale Factor Result
0
1
10
100
1000

Photo-Realistic Style Transfer

photo-realistic-style-transfer.ipynb describes the photo-realistic style transfer process. Opposed to transferring style from an artwork, this notebook explores transferring a nighttime style from a picture of Piedmont Park at night to a daytime picture of Piedmont Park.

Content Style Result

References

[1] L. A. Gatys, A. S. Ecker, and M. Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015.

[2] L. A. Gatys, A. S. Ecker, and M. Bethge. Image style transfer using convolutional neural networks. In Computer Vision and Pattern Recognition (CVPR), 2016 IEEE Conference on, pages 2414–2423. IEEE, 2016.

More Repositories

1

gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Python
676
star
2

nes-py

A Python3 NES emulator and OpenAI Gym interface
C++
233
star
3

limit-order-book

A C++ and Python implementation of the limit order book.
C++
230
star
4

RackNES

A Nintendo Entertainment System (NES) emulator module for VCV Rack.
C++
97
star
5

playing-mario-with-deep-reinforcement-learning

An implementation of (Double/Dueling) Deep-Q Learning to play Super Mario Bros.
Jupyter Notebook
68
star
6

rosbag-tools

Tools and scripts for working with ROS bag files.
Python
51
star
7

gym-tetris

An OpenAI Gym interface to Tetris on the NES.
Python
46
star
8

PotatoChips

Eurorack modules based on programmable sound chip emulation.
C++
45
star
9

gym-zelda-1

An OpenAI Gym interface to The Legend of Zelda on the NES.
Python
24
star
10

ios-semantic-segmentation

An example of semantic segmentation on iOS using CoreML and Keras.
Swift
17
star
11

MIMS

MIMS (Medical Informatics Management System) is an iOS solution to Medical Informatics
Swift
6
star
12

semantic-segmentation-baselines

Baseline implementation of deep learning semantic segmentation models.
Jupyter Notebook
6
star
13

nes-iOS

An NES emulator for iOS based on the nes-py emulation system
C++
5
star
14

very-good-semantic-segmentation-labeling-app

A Python app for labeling semantic segmentations in images.
Python
5
star
15

keras-pyramid-pooling-module

An implementation of the Pyramid Pooling Module as a Keras layer.
Jupyter Notebook
4
star
16

parse-server-boilerplate

boilerplate code for starting Parse Server projects in node.js
JavaScript
4
star
17

gotorch

Tensors and Dynamic neural networks in Golang
Go
4
star
18

object-pool

A simple template implementation of an object pool in C++.
C++
3
star
19

financial-analysis

A python package with basic financial analysis functions
Python
3
star
20

UIPopupDatePicker

a simple PopupDialog for selecting a datetime
Swift
2
star
21

ntsc-py

a CTypes interface to Blargg's NTSC shaders for Python
Jupyter Notebook
2
star
22

robust-graph-convolutional-networks-against-adversarial-attacks-implementation

A Keras implementation of the paper "Robust Graph Convolutional Networks Against Adversarial Attacks"
Jupyter Notebook
2
star
23

parse-server-mock

mock elements to make unit testing parse-server cloud code easier
JavaScript
1
star
24

UIXibView

a UIView subclass for easily building IBDesignable views without boilerplate
Swift
1
star
25

UIBankPayoutFlow

an iOS UI flow for applications that require payout information to a bank account
Swift
1
star
26

csv

a C++ implementation of a CSV reader / writer
C++
1
star
27

gotorch-example

An example usage of GoTorch
Go
1
star