Giter Site home page Giter Site logo

slowfastnetworks's Introduction

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

slowfastnetworks's People

Contributors

alexkim-gh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.