Skip to content

alex000kim/SlowFastNetworks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlowFastNetworks

PyTorch implementation of "SlowFast Networks for Video Recognition".

Setup

Environment

conda env create -f environment.yml

Download UCF 101

wget https://www.crcv.ucf.edu/data/UCF101/UCF101.rar
export DATA_DIR=<YOUR_DATA_DIR>
unrar x UCF101.rar $DATA_DIR

Split into train/validation

export N_valid=30 # number of videos in the validatation set per class
mv $DATA_DIR/UCF-101/ $DATA_DIR/train
mkdir $DATA_DIR/validation
for dir in $(ls $DATA_DIR/train); do mkdir $DATA_DIR/validation/$dir; shuf -zn$N_valid -e $DATA_DIR/train/$dir/*.avi | xargs -0 -I{} mv -v {} $DATA_DIR/validation/$dir; done

After running the last command, the dataset will be organized in the following way

<YOUR_DATA_DIR>
│    │ train
│    │    │ ApplyEyeMakeup
│    │    │ ApplyLipstick
│    │    │ ...
│    │ validation
│    │    │ ApplyEyeMakeup
│    │    │ ApplyLipstick
│    │    │ ...
  1. Modify the params in config.py (i.e. set params['dataset'] to <YOUR_DATA_DIR> )

Train model

conda activate slowfastnet
python train.py

Code Reference:

[1] https://github.com/Guocode/SlowFast-Networks/

[2] https://github.com/jfzhang95/pytorch-video-recognition

[3] https://github.com/irhumshafkat/R2Plus1D-PyTorch

About

PyTorch implementation of "SlowFast Networks for Video Recognition".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%