Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kautenja committed Apr 27, 2018
1 parent 970920b commit a4f2c04
Show file tree
Hide file tree
Showing 98 changed files with 31 additions and 3,512 deletions.
42 changes: 3 additions & 39 deletions Makefile
Expand Up @@ -2,14 +2,8 @@
PYTHON=python3
# the directory the main framework exists in
MAIN=neural_stylization
# the directory with the dataset
DATASET=${MAIN}/dataset
# the build directory
BUILD=build
# the pointer to the pdflatex binary
PDFLATEX=pdflatex
# the pointer to the bibilography engine (bibtex)
BIBTEX=bibtex
# the number of frames of interpolation to use in videos
INTER_FRAMES=3

Expand All @@ -26,36 +20,6 @@ build:
delete_tex_garbage:
cd tex && rm -f *.aux *.nav *.log *.out *.snm *.toc *.bbl *.blg *.brf *.swp *.nlo

# make the presentation
presentation: build delete_tex_garbage
cd tex && ${PDFLATEX} -halt-on-error presentation | grep -a3 "^!" || true
cp tex/presentation.pdf ${BUILD}
@make delete_tex_garbage

# make the presentation using bibtex to compile references
presentation_w_ref: build delete_tex_garbage
cd tex && ${PDFLATEX} -halt-on-error presentation | grep -a3 "^!" || true
cd tex && ${BIBTEX} presentation
cd tex && ${PDFLATEX} -halt-on-error presentation | grep -a3 "^!" || true
cd tex && ${PDFLATEX} -halt-on-error presentation | grep -a3 "^!" || true
cp tex/presentation.pdf ${BUILD}
@make delete_tex_garbage

# make the review without references
review: build delete_tex_garbage
cd tex && ${PDFLATEX} review | grep -a3 "^!" || true
cp tex/review.pdf ${BUILD}
@make delete_tex_garbage

# make the review using bibtex to compile references
review_w_ref: build delete_tex_garbage
cd tex && ${PDFLATEX} -halt-on-error review | grep -a3 "^!" || true
cd tex && ${BIBTEX} review | grep -a3 "^!" || true
cd tex && ${PDFLATEX} -halt-on-error review | grep -a3 "^!" || true
cd tex && ${PDFLATEX} -halt-on-error review | grep -a3 "^!" || true
cp tex/review.pdf ${BUILD}
@make delete_tex_garbage

# Convert the frames in a given directory to a video of the directories name
# in its parent directory.
# Args:
Expand All @@ -65,7 +29,7 @@ define frames_to_video
endef

# make all the content reconstruction videos
content_videos:
content_videos: build
$(call frames_to_video,content/block1_conv1)
$(call frames_to_video,content/block2_conv1)
$(call frames_to_video,content/block3_conv1)
Expand All @@ -74,15 +38,15 @@ content_videos:
$(call frames_to_video,content/block4_conv2)

# make all the style reconstruction videos
style_videos:
style_videos: build
$(call frames_to_video,style/block1_conv1)
$(call frames_to_video,style/block2_conv1)
$(call frames_to_video,style/block3_conv1)
$(call frames_to_video,style/block4_conv1)
$(call frames_to_video,style/block5_conv1)

# make all the style transfer videos
transfer_videos:
transfer_videos: build
$(call frames_to_video,transfer/seated-nude)
$(call frames_to_video,transfer/the-starry-night)
$(call frames_to_video,transfer/the-scream)
Expand Down
36 changes: 18 additions & 18 deletions README.md
Expand Up @@ -2,57 +2,57 @@

An **implementation** of the arXiv preprint
[_A Neural Algorithm of Artistic Style [1]_](#references)
& paper
& paper
[_Image Style Transfer Using Convolutional Neural Networks [2]_](#references).

## Original Photograph: _Tubingen, Germany_

<p float="left" align="center">
<img src="img/content/tubingen.jpg" width="375"/>
<img src="img/content/tubingen.jpg" width="375"/>
</p>

-----

## Claude Monet's _Houses of Parliament_

<p float="left" align="center">
<img src="img/styles/houses-of-parliament.jpg" width="375"/>
<img src="tex/img/transfer/houses-of-parliament-tv-1e0.png" width="425"/>
<img src="img/styles/houses-of-parliament.jpg" width="375"/>
<img src="img/transfer/houses-of-parliament-tv-1e0.png" width="425"/>
</p>

## Pablo Picasso's _Seated Nude_

<p float="left" align="center">
<img src="img/styles/seated-nude.jpg" width="245"/>
<img src="tex/img/transfer/seated-nude.png" width="425"/>
<img src="img/styles/seated-nude.jpg" width="245"/>
<img src="img/transfer/seated-nude.png" width="425"/>
</p>

## Edvard Munch's _The Scream_

<p float="left" align="center">
<img src="img/styles/the-scream.jpg" width="250"/>
<img src="tex/img/transfer/the-scream.png" width="425"/>
<img src="img/styles/the-scream.jpg" width="250"/>
<img src="img/transfer/the-scream.png" width="425"/>
</p>

## Vincent van Gogh's _The Starry Night_

<p float="left" align="center">
<img src="img/styles/the-starry-night.jpg" width="400"/>
<img src="tex/img/transfer/the-starry-night.png" width="425"/>
<img src="img/styles/the-starry-night.jpg" width="400"/>
<img src="img/transfer/the-starry-night.png" width="425"/>
</p>

## William Turner's _The Shipwreck of The Minotaur_

<p float="left" align="center">
<img src="img/styles/the-shipwreck-of-the-minotaur.jpg" width="425"/>
<img src="tex/img/transfer/the-shipwreck-of-the-minotaur.png" width="400"/>
<img src="img/styles/the-shipwreck-of-the-minotaur.jpg" width="425"/>
<img src="img/transfer/the-shipwreck-of-the-minotaur.png" width="400"/>
</p>

## Wassily Kandinsky's _Composition VII_

<p float="left" align="center">
<img src="img/styles/composition-vii.jpg" width="425"/>
<img src="tex/img/transfer/composition-vii.png" width="425"/>
<img src="img/styles/composition-vii.jpg" width="425"/>
<img src="img/transfer/composition-vii.png" width="425"/>
</p>

# Getting Started
Expand Down Expand Up @@ -125,11 +125,11 @@ and colors from **a**.

[style-transfer.ipynb]: style-transfer.ipynb

## Photo-Realistic Style Transfer
## Photo-Realistic Style Transfer

[photo-realistic-style-transfer.ipynb][] describes the photo-realistic style
transfer process. Opposed to transfering style from an artwork, this notebook
explores transfering a nighttime theme from a picture of one city to a
transfer process. Opposed to transfering style from an artwork, this notebook
explores transfering a nighttime theme from a picture of one city to a
daytime picture of another city with mixed results.

[photo-realistic-style-transfer.ipynb]: photo-realistic-style-transfer.ipynb
Expand All @@ -150,7 +150,7 @@ by using different sets of layers for style loss.

## Optimizers

[optimizers.ipynb][] employs _gradient descent_, _adam_, and _L-BFGS_ to
[optimizers.ipynb][] employs _gradient descent_, _adam_, and _L-BFGS_ to
understand the affect of different blackbox optimizers. Gatys et. al use
L-BFGS, but Adam appears to produce competetive results too.

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed papers/a-neural-algorithm-of-artistic-style.pdf
Binary file not shown.
Binary file removed papers/extra/Artistic style transfer for videos.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
20 changes: 10 additions & 10 deletions requirements.txt
@@ -1,10 +1,10 @@
keras
numpy
image
tensorflow
h5py
jupyter
tqdm
IPython
ipywidgets
scipy
Keras==2.1.3
numpy==1.14.2
image==1.5.20
Pillow==5.0.0
tensorflow==1.6.0
h5py==2.7.1
jupyter==1.0.0
tqdm==4.19.5
ipywidgets==6.0.0
scipy==0.19.1
Binary file removed tex/img/artworks/composition-vii.jpg
Binary file not shown.
Binary file removed tex/img/artworks/houses-of-parliament.jpg
Binary file not shown.
Binary file removed tex/img/artworks/seated-nude.jpg
Binary file not shown.
Binary file removed tex/img/artworks/the-scream.jpg
Binary file not shown.
Binary file removed tex/img/artworks/the-shipwreck-of-the-minotaur.jpg
Binary file not shown.
Binary file removed tex/img/artworks/the-starry-night.jpg
Binary file not shown.
Binary file removed tex/img/content-layer-selection/block1_conv1.png
Binary file not shown.
Binary file removed tex/img/content-layer-selection/block2_conv1.png
Binary file not shown.
Binary file removed tex/img/content-layer-selection/block3_conv1.png
Binary file not shown.
Binary file removed tex/img/content-layer-selection/block4_conv1.png
Binary file not shown.
Binary file removed tex/img/content-layer-selection/block5_conv1.png
Binary file not shown.
Binary file removed tex/img/content/block1_conv1.png
Binary file not shown.
Binary file removed tex/img/content/block2_conv1.png
Binary file not shown.
Binary file removed tex/img/content/block3_conv1.png
Binary file not shown.
Binary file removed tex/img/content/block4_conv1.png
Binary file not shown.
Binary file removed tex/img/content/block4_conv2.png
Binary file not shown.
Binary file removed tex/img/content/block5_conv1.png
Binary file not shown.
Binary file removed tex/img/content/noise.jpg
Diff not rendered.
Binary file removed tex/img/content/samford-sign.jpg
Diff not rendered.
Binary file removed tex/img/content/tubingen.jpg
Diff not rendered.
Binary file removed tex/img/deep-dream.jpg
Diff not rendered.
Binary file removed tex/img/discoGanI.png
Diff not rendered.
Binary file removed tex/img/discoGanII.png
Diff not rendered.
Binary file removed tex/img/fast-neural-style/chicago.jpg
Diff not rendered.
Binary file removed tex/img/fast-neural-style/chicago_mosaic.jpg
Diff not rendered.
Binary file removed tex/img/fast-neural-style/chicago_scream.jpg
Diff not rendered.
Binary file removed tex/img/fast-neural-style/chicago_starry_night.jpg
Diff not rendered.
Binary file removed tex/img/levels.jpg
Diff not rendered.
Binary file removed tex/img/loss/Adam.png
Diff not rendered.
Binary file removed tex/img/loss/L_BFGS.png
Diff not rendered.
Binary file removed tex/img/loss/SGD.png
Diff not rendered.
Binary file removed tex/img/loss/plot.png
Diff not rendered.
Binary file removed tex/img/other-models/alex-net-a.png
Diff not rendered.
Binary file removed tex/img/other-models/alex-net-p.png
Diff not rendered.
Binary file removed tex/img/other-models/alex-net-x.png
Diff not rendered.
Binary file removed tex/img/photo-transfer/a.png
Diff not rendered.
Binary file removed tex/img/photo-transfer/p.png
Diff not rendered.
Binary file removed tex/img/photo-transfer/x.png
Diff not rendered.
Binary file removed tex/img/previous_worksII_content.png
Diff not rendered.
Binary file removed tex/img/previous_worksII_style.png
Diff not rendered.
Binary file removed tex/img/previous_worksII_transfer.png
Diff not rendered.
Binary file removed tex/img/previous_works_content.png
Diff not rendered.
Binary file removed tex/img/previous_works_style.png
Diff not rendered.
Binary file removed tex/img/previous_works_transfer.png
Diff not rendered.
Binary file removed tex/img/style-layer-selection/block1_conv1.png
Diff not rendered.
Binary file removed tex/img/style-layer-selection/block2_conv1.png
Diff not rendered.
Binary file removed tex/img/style-layer-selection/block3_conv1.png
Diff not rendered.
Binary file removed tex/img/style-layer-selection/block4_conv1.png
Diff not rendered.
Binary file removed tex/img/style-layer-selection/block5_conv1.png
Diff not rendered.
Binary file removed tex/img/style-transfer.png
Diff not rendered.
Binary file removed tex/img/style/block1_conv1.png
Diff not rendered.
Binary file removed tex/img/style/block2_conv1.png
Diff not rendered.
Binary file removed tex/img/style/block3_conv1.png
Diff not rendered.
Binary file removed tex/img/style/block4_conv1.png
Diff not rendered.
Binary file removed tex/img/style/block5_conv1.png
Diff not rendered.
Binary file removed tex/img/style/noise.jpg
Diff not rendered.
Binary file removed tex/img/style/the-starry-night.jpg
Diff not rendered.
Binary file removed tex/img/vgg19/classification.png
Diff not rendered.
Binary file removed tex/img/vgg19/content/block1_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/content/block2_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/content/block3_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/content/block4_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/content/block5_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/feature-extraction.png
Diff not rendered.
Binary file removed tex/img/vgg19/style/block1_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/style/block2_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/style/block3_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/style/block4_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/style/block5_conv1.png
Diff not rendered.
Binary file removed tex/img/vgg19/synthesis.png
Diff not rendered.
Binary file removed tex/img/vgg19/transfer/layers.png
Diff not rendered.

0 comments on commit a4f2c04

Please sign in to comment.