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.
tensorflow >= 1.12
pillow>=5.1.0
##Get code
git clone https://github.com/xuzheyuan624/slowfast-keras.git
cd slowfast-keras
You can use UCF101 or other datasets, which should be orgnized as :
- UCF101
- ApplyEyeMakeUp
- ApplyLipstick
- Archery
- ......
- ucfTrainTestlist
- classInd.txt
- trainlist01.txt
- testlist01.txt
- ......
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
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_path
is path to slowfast-keras
video_path
ispath to UCF101_jpg
name_path
is path to classInd.txt
......
Then you can train with:
bash train.sh
[1] SlowFastNetworks
[2] 3D-ResNets-Pytorch
[3] SGDR