#neural-style Installation
This guide will walk you through the setup for neural-style on AWS.
First we need to install torch, following the installation instructions here:
#neural-style Installation
This guide will walk you through the setup for neural-style on AWS.
First we need to install torch, following the installation instructions here:
| # "Colorizing B/W Movies with Neural Nets", | |
| # Network/Code Created by Ryan Dahl, hacked by samim.io to work with movies | |
| # BACKGROUND: http://tinyclouds.org/colorize/ | |
| # DEMO: https://www.youtube.com/watch?v=_MJU8VK2PI4 | |
| # USAGE: | |
| # 1. Download TensorFlow model from: http://tinyclouds.org/colorize/ | |
| # 2. Use FFMPEG or such to extract frames from video. | |
| # 3. Make sure your images are 224x224 pixels dimension. You can use imagemagicks "mogrify", here some useful commands: | |
| # mogrify -resize 224x224 *.jpg | |
| # mogrify -gravity center -background black -extent 224x224 *.jpg |
| #!/usr/bin/env python3 | |
| # | |
| # A pre-commit hook to verify PEP8 conformity using flake8 | |
| # and to run all available unit tests | |
| import subprocess | |
| import sys | |
| import os | |
| import glob |
g2.2xlarge or better
https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-ffba7b94
| Start a g2.2xlarge or better (GPU instance) with https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-ffba7b94 | |
| Login, username is ubuntu | |
| Update a bunch of stuff and make sure cudnn R2 is used: | |
| luarocks install image | |
| luarocks install loadcaffe | |
| luarocks install torch | |
| export LD_LIBRARY_PATH=/home/ubuntu/torch-distro/install/lib:/home/ubuntu/torch-distro/install/lib:/home/ubuntu/cudnn-6.5-linux-x64-v2-rc2 |
Table of Contents generated with DocToc
A brief description of streaming protocols and formats here
| var io = require('socket.io-client')("http://localhost:3001") | |
| var Promise = require("bluebird") | |
| io.emitAsync = Promise.promisify(io.emit) | |
| io.emitAsync("report", { | |
| "name": "thomas" | |
| }).then(function(data){ | |
| console.log(data) | |
| }).catch(function(e){ | |
| console.log(e.message) |