Neural Style

From GoBlueMich Wiki
Jump to navigation Jump to search


Ubuntu 14.04

Basic Tools

apt-get install lua5.2
apt-get install luarocks
apt-get install luajit


curl -s | bash
luajit -ltorch

Exit that interface

apt-get install libprotobuf-dev protobuf-compiler
luarocks install loadcaffe

Double Check Dependencies

luarocks install image
luarocks install nn

Deep Style

mkdir ~/DeepStyle
cd ~/DeepStyle
git clone

This might take a bit....

cd neural-style
sh models/

Use Deep Style/Neural Style

Get Images

cd ~/DeepStyle/neural-style
wget image.jpg
wget image2.jpg

Start it up!

th neural_style.lua -style_image YOURPAINTINGHERE.jpg - content_image YOURPHOTOHERE.jpg -gpu -1 -output_image NEWPHOTO.jpg -print_iter 10 -save_iter 100 

(Obviously, you’ll need to replace the chunks in ALL CAPS with the names of your files).