Getting started with applying Artistic Style on images / videos
Paper:
Signup at https://www.paperspace.com and obtain an ubuntu machine with GPU
sudo apt update && sudo apt -y install python3-pip nvidia-cuda-devFollow setup on https://gist.github.com/sketchytechky/f05e443ea74abd86c08c64c715ca839f
See https://github.com/anishathalye/neural-style
git clone https://github.com/anishathalye/neural-style.git
cd neural-style
# obtain pre-trained network
wget http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat
pip3 install -r requirements.txt
# (Optional - running in screen for long task)
# https://stackoverflow.com/questions/44135177/tensorflow-import-error-only-when-being-in-a-linux-screen-sessionlibcublas-so-8
#export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64
screen -S longtask
# Run example tests
python3 neural_style.py --content examples/1-content.jpg \
--styles examples/1-style.jpg \
--output test-1-output.jpgSee https://github.com/lengstrom/fast-style-transfer
sudo apt -y install ffmpeg
git clone https://github.com/lengstrom/fast-style-transfer.git
cd fast-style-transfer
mkdir checkpoint_folder
mkdir test_dir
mkdir data
pushd data; wget http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat; popd
./setup.py
# see https://github.com/lengstrom/fast-style-transfer#stylizing-video
python3 style.py --style examples/style/la_muse.jpg \
--checkpoint-dir checkpoint_folder \
--train-path data/train2014 \
--test examples/content/chicago.jpg \
--test-dir `pwd`/test_dir \
--content-weight 1.5e1 \
--checkpoint-iterations 1000 \
--batch-size 20
# transfering style
python3 transform_video.py --in-path `pwd`/examples/content/fox.mp4 \
--checkpoint checkpoint_folder \
--out-path fox-processed.mp4 \
--batch-size 4