Code Monkey home page Code Monkey logo

slowfast-keras's Introduction

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

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.