Giter VIP home page Giter VIP logo

3d_quant_action_recognition's Introduction

Analysis of Uniform Quantization for Action Recognition

PyTorch implementation of uniform quantization on 3D CNN architectures for action recognition using UCF-101 dataset.

Requirements

  • PyTorch
  • OpenCV
  • FFmpeg, FFprobe
  • Python 3

Available models:

  • 3D Resnet
  • 3D SqueezeNet
  • 3D MobileNetv2

Downloading UCF-101 Dataset

  • Download videos and train/test splits here.
  • Convert from avi to jpg files using util_scripts/generate_video_jpgs.py
python -m scripts.generate_video_jpgs avi_video_dir_path jpg_video_dir_path ucf101
  • Generate annotation file in json format similar to ActivityNet using util_scripts/ucf101_json.py
    • annotation_dir_path includes classInd.txt, trainlist0{1, 2, 3}.txt, testlist0{1, 2, 3}.txt
python -m scripts.ucf101_json annotation_dir_path jpg_video_dir_path dst_json_path

Running the code

The primary function of the code is available from the main file. Use the following command:

python main.py --mode <option>

The available modes are:

  • train - train 3D networks
  • post_train_quant - post training quantization
  • quant_aware - quantization aware training
  • test - test 3D networks

Please follow the command with --help to check a detailed description of every available parameter.

Execution Examples

Example for every usecase can be found in the script folder.

Acknowledgement

The code was built on top of the works from Hara et al. and Kopuklu et al..

3d_quant_action_recognition's People

Contributors

afonso-sousa avatar

Watchers

 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.