/fast-style-youtube-vr

Fast Neural Style Transfer for Youtube 360 VR Videos

Primary LanguagePythonMIT LicenseMIT

Fast Style Youtube VR ⚡ 🎨 📹 😎

Step inside a virtual world painted by your favorite artist. Simple proof of concept script to download Youtube VR videos, transfer style using fast style, add metadata, and reupload to Youtube for viewing. Requires a good GPU to finish in reasonable amount of time.

(Click to go to video. Make sure to use a compatible browser.)

Venice Scream

Venice Rain Princess

Playlist of short example videos

Playlist of longer example videos

Getting Setup

  1. Get the project
echo "Get the project"
wget https://github.com/themcaffee/fast-style-youtube-vr/archive/master.zip
unzip master.zip
rm master.zip
cd fast-style-youtube-vr-master
  1. Install python 2.7 and pip
sudo apt-get install -y python-pip python-dev libcurl4-openssl-dev
  1. Run setup script
cd fast-style-youtube-vr-master
./setup.sh
  1. Get JSON file of youtube credentials by following youtube-upload's guide. Put the downloaded json file into ~/fast_style_youtube_vr/youtube.json.

  2. Install Tensorflow, CUDA, and cuDNN. If you have a Nvidia GPU, you should also make sure to install the drivers from Nvidia themselves.

  3. Download the pre-generated models. Move the models into ~/.fast_style_youtube_vr/models/.

Example Usage

Download and style the video with the scream model that's located in ~/.fast_style_youtube_vr/models/scream.ckpt. This will take a long time and depends heavily on your gpu power.

python run.py --video https://www.youtube.com/watch?v=T_KXSWiPL-4 --model scream --start-time 00:00:30 --duration 30

Give the final youtube title and description

python run.py --video https://www.youtube.com/watch?v=T_KXSWiPL-4 --model scream --start-time 00:00:30 --duration 30

All available options

--video (required): The full Youtube URL of the video to download.

--model (required): The name of the model file to use to style.

--start-time (required): When to start the cut of the file. Expect format: 00:00:00.

--duration (required): The duration of the cut video in seconds.

--video-title (optional): The title of the uploaded video on Youtube.

--video-description (optional): The description of the uploaded video on Youtube.

Credits

Thanks to Logan Engstrom (fast-style-transfer) for the awesome stylization implementation. (And of course all of the other libraries utilized in this project).