** Step 1 **
Install ffmpeg with the vidstab plugin.
- OSX: Install via Homebrew -
brew install ffmpeg --with-libvidstab
- Linux: download binaries here (vidstab included)
- Windows: download binaries here (vidstab included)
{0: 'tench, Tinca tinca', | |
1: 'goldfish, Carassius auratus', | |
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
3: 'tiger shark, Galeocerdo cuvieri', | |
4: 'hammerhead, hammerhead shark', | |
5: 'electric ray, crampfish, numbfish, torpedo', | |
6: 'stingray', | |
7: 'cock', | |
8: 'hen', | |
9: 'ostrich, Struthio camelus', |
n02119789 1 kit_fox | |
n02100735 2 English_setter | |
n02110185 3 Siberian_husky | |
n02096294 4 Australian_terrier | |
n02102040 5 English_springer | |
n02066245 6 grey_whale | |
n02509815 7 lesser_panda | |
n02124075 8 Egyptian_cat | |
n02417914 9 ibex | |
n02123394 10 Persian_cat |
/** | |
* [TF2] Jungle Inferno Equipment | |
*/ | |
#pragma semicolon 1 | |
#include <sourcemod> | |
#include <tf2_stocks> | |
#include <clientprefs> | |
#include <sdkhooks> |
""" | |
The Annotated Transformer | |
http://nlp.seas.harvard.edu/2018/04/03/attention.html | |
Note: Only includes basic example, not real world example or multi-GPU training | |
""" | |
import numpy as np | |
import torch | |
import torch.nn as nn |
** Step 1 **
Install ffmpeg with the vidstab plugin.
brew install ffmpeg --with-libvidstab
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
rpca_gpu | |
implementations of RPCA on the GPU (leveraging pytorch) | |
for low-rank and sparse matrix decomposition as well as | |
a nuclear-norm minimization routine via singular value | |
thresholding for matrix completion |
# ported from https://github.com/pvigier/perlin-numpy/blob/master/perlin2d.py | |
import torch | |
import math | |
def rand_perlin_2d(shape, res, fade = lambda t: 6*t**5 - 15*t**4 + 10*t**3): | |
delta = (res[0] / shape[0], res[1] / shape[1]) | |
d = (shape[0] // res[0], shape[1] // res[1]) | |
grid = torch.stack(torch.meshgrid(torch.arange(0, res[0], delta[0]), torch.arange(0, res[1], delta[1])), dim = -1) % 1 |
# git clone https://github.com/NVlabs/stylegan2 | |
import os | |
import numpy as np | |
from scipy.interpolate import interp1d | |
from scipy.io import wavfile | |
import matplotlib.pyplot as plt | |
import PIL.Image | |
import moviepy.editor | |
import dnnlib |
import numpy as np | |
def rotation(v1, v2): | |
""" | |
Compute a matrix R that rotates v1 to align with v2. | |
v1 and v2 must be length-3 1d numpy arrays. | |
""" | |
# unit vectors | |
u = v1 / np.linalg.norm(v1) | |
Ru = v2 / np.linalg.norm(v2) |