• Stars
    star
    498
  • Rank 88,091 (Top 2 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Video Preprocessing

This repository provides tools for preprocessing videos for TaiChi, VoxCeleb and UvaNemo dataset used in paper.

Dowloading videos and cropping according to precomputed bounding boxes

  1. Instal requirments:
pip install -r requirements.txt
  1. Load youtube-dl:
wget https://yt-dl.org/downloads/latest/youtube-dl -O youtube-dl
chmod a+rx youtube-dl
  1. Run script to download videos, there are 2 formats that can be used for storing videos one is .mp4 and another is folder with .png images. While .png images occupy significantly more space, the format is loss-less and have better i/o performance when training.

Taichi

python load_videos.py --metadata taichi-metadata.csv --format .mp4 --out_folder taichi --workers 8

select number of workers based on number of cpu avaliable. Note .png format take aproximatly 80GB.

VoxCeleb

python load_videos.py --metadata vox-metadata.csv --format .mp4 --out_folder vox --workers 8

Note .png format take aproximatly 300GB.

UvaNemo Since videos is not avaliable on youtube you have to download videos from official website, and run:

python load_videos.py --metadata nemo-metadata.csv --format .mp4 --out_folder nemo --workers 8 --video_folder path/to/original/videos

Note .png format take aproximatly 18GB.

Preprocessing VoxCeleb dataset

If you need to change cropping strategy for VoxCeleb dataset or produce new bounding box annotations folow these steps:

  1. Load vox-celeb1(vox-celeb2) annotations:
wget www.robots.ox.ac.uk/~vgg/data/voxceleb/data/vox1_test_txt.zip
unzip vox1_test_txt.zip

wget www.robots.ox.ac.uk/~vgg/data/voxceleb/data/vox1_dev_txt.zip
unzip vox1_dev_txt.zip
wget www.robots.ox.ac.uk/~vgg/data/voxceleb/data/vox2_test_txt.zip
unzip vox2_test_txt.zip

wget www.robots.ox.ac.uk/~vgg/data/voxceleb/data/vox2_dev_txt.zip
unzip vox2_dev_txt.zip
  1. Load youtube-dl:
wget https://yt-dl.org/downloads/latest/youtube-dl -O youtube-dl
chmod a+rx youtube-dl
  1. Install face-alignment library:
git clone https://github.com/1adrianb/face-alignment
cd face-alignment
pip install -r requirements.txt
python setup.py install
  1. Install ffmpeg
sudo apt-get install ffmpeg
  1. Run preprocessing (assuming 8 gpu, and 5 workers per gpu).
python crop_vox.py --workers 40 --device_ids 0,1,2,3,4,5,6,7 --format .mp4 --dataset_version 2
python crop_vox.py --workers 40 --device_ids 0,1,2,3,4,5,6,7 --format .mp4 --dataset_version 1 --data_range 10000-11252

Preprocessing TaiChi dataset

If you need to change cropping strategy for TaiChi dataset or produce new bounding box annotations folow these steps:

  1. Download videos based on annotations:
python load_videos.py --metadata taichi-metadata.csv --format .mp4 --out_folder taichi --workers 8 --video_folder youtube-taichi --no_crop
  1. Install mask-rcnn benchmark. Follow the instalation guide https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/INSTALL.md

  2. Load youtube-dl:

wget https://yt-dl.org/downloads/latest/youtube-dl -O youtube-dl
chmod a+rx youtube-dl
  1. Run preprocessing (assuming 8 gpu, and 5 workers per gpu).
python crop_taichi.py --workers 40 --device_ids 0,1,2,3,4,5,6,7 --format .mp4

Preprocessing Nemo dataset

If you need to change cropping strategy for Nemo dataset or produce new bounding box annotations folow these steps:

  1. Install face-alignment library:
git clone https://github.com/1adrianb/face-alignment
cd face-alignment
pip install -r requirements.txt
python setup.py install
  1. Download videos from official website, and run:
python crop_nemo.py --in_folder /path/to/videos --out_folder nemo --device_ids 0,1 --workers 8 --format .mp4

Additional notes

Citation:

@InProceedings{Siarohin_2019_NeurIPS,
  author={Siarohin, Aliaksandr and Lathuilière, Stéphane and Tulyakov, Sergey and Ricci, Elisa and Sebe, Nicu},
  title={First Order Motion Model for Image Animation},
  booktitle = {Conference on Neural Information Processing Systems (NeurIPS)},
  month = {December},
  year = {2019}
}

More Repositories

1

first-order-model

This repository contains the source code for the paper First Order Motion Model for Image Animation
Jupyter Notebook
14,344
star
2

motion-cosegmentation

Reference code for "Motion-supervised Co-Part Segmentation" paper
Jupyter Notebook
653
star
3

monkey-net

Animating Arbitrary Objects via Deep Motion Transfer
Python
467
star
4

pose-gan

Python
383
star
5

cuda-gridsample-grad2

Cuda implementation for gridsample with second derivative support
Python
75
star
6

pose-evaluation

Metrics for evaluation pose-guided image generation
Python
72
star
7

wc-gan

Whitening and Coloring transform for GANs
Python
35
star
8

mem-transfer

Deep learning models for transfering image memorability
Python
10
star
9

BAE

Bayesian Style Generation for Enhancing Perceptual Attributes
Python
7
star
10

cycle-gan

Python
6
star
11

first-order-model-website

Project website for first order model
HTML
6
star
12

aliaksandr-siarohin-website

aliaksandr-siarohin-website
CSS
4
star
13

H4IG

How important is invariance in GAN?
Python
3
star
14

AppliedRobotics

Repository for applied robotics course
HTML
3
star
15

mim-gan

Python
2
star
16

vitvin_genes

Vitis vinifera pathway expansion
Jupyter Notebook
2
star
17

GarchModels

R
2
star
18

video_da_baseline

Python
2
star
19

mem-optimization

Optimizing memorability of images using NN
Python
2
star
20

sentence-compressor

Jupyter Notebook
2
star
21

gan

Gan implimentation in keras
Python
2
star
22

eq-inv

Python
2
star
23

tic-tac-toe

Jupyter Notebook
1
star
24

manga-color

Coloring of manga using deep learning
Python
1
star
25

reflections

1
star
26

SHAD_ALGORITHMS

C++
1
star
27

rt_simulator

Simulator of real time taskset
C++
1
star
28

cv-sender

Send a cv to all emails
Python
1
star
29

zwitter_metrics

This is a repository for the first asssigment in bigdatashad-2016.
Python
1
star
30

SHAD_CPP

C++
1
star