Skip to content

A implementation of "SlowFast Networks for Video Recognition" with tf.keras

Notifications You must be signed in to change notification settings

uname0x96/slowfast-keras

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slowfast-keras

A implementation of SlowFast Networks for Video Recognition with tf.keras This code use half-period cosine schedule of learning rate decaying and warm-up strategy, but I don't kown if it's the same as the paper.

Requirements

tensorflow >= 1.12
pillow>=5.1.0

##Get code

git clone https://github.com/xuzheyuan624/slowfast-keras.git
cd slowfast-keras

Train

1. Download the dataset

You can use UCF101 or other datasets, which should be orgnized as :

  • UCF101
    • ApplyEyeMakeUp
    • ApplyLipstick
    • Archery
    • ......
  • ucfTrainTestlist
    • classInd.txt
    • trainlist01.txt
    • testlist01.txt
    • ......

2. Prepare dataset for training

convert video to jpgs with:

python utils/ucf_hmdb51_frames.py UCF101 UCF101_jpg

calculate the video's frames

python utils/ucf_hmdb51_frames.py UCF101_jpg

3. Change settings and Train

You must change the root_path, video_path, name_path or others in train.sh for your own. See details in opts.py
For example: root_pathis path to slowfast-keras
video_pathispath to UCF101_jpg
name_pathis path to classInd.txt
......
Then you can train with:

bash train.sh

Code Reference

[1] SlowFastNetworks
[2] 3D-ResNets-Pytorch
[3] SGDR

About

A implementation of "SlowFast Networks for Video Recognition" with tf.keras

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.9%
  • Shell 1.1%