Skip to content

xiaohai0520/Real-Time-Action-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real Time Action Recognition

A practice program for real time action recognition on C3D

watch video

Content

Deployment

The program depends on Pytorch,OpenCV,PyQt and so on.

Usage

  1. Install dependency: For PyTorch dependency, see pytorch.org for more details.

    For custom dependencies:

    conda install opencv
    pip install tqdm scikit-learn tensorboardX
    pip install pyqt5
  2. Download pretrained model from BaiduYun or GoogleDrive.

  3. Configure your dataset and pretrained model path.

  4. Train the Model.

    python train.py
  5. Run the GUI to test on camera.

    python GUI.py
    

Datasets:

Dataset directory tree is shown below

  • UCF101 Make sure to put the files as the following structure:
    UCF-101
    ├── ApplyEyeMakeup
    │   ├── v_ApplyEyeMakeup_g01_c01.avi
    │   └── ...
    ├── ApplyLipstick
    │   ├── v_ApplyLipstick_g01_c01.avi
    │   └── ...
    └── Archery
    │   ├── v_Archery_g01_c01.avi
    │   └── ...
    

After pre-processing, the output dir's structure is as follows:

ucf101
├── ApplyEyeMakeup
│   ├── v_ApplyEyeMakeup_g01_c01
│   │   ├── 00001.jpg
│   │   └── ...
│   └── ...
├── ApplyLipstick
│   ├── v_ApplyLipstick_g01_c01
│   │   ├── 00001.jpg
│   │   └── ...
│   └── ...
└── Archery
│   ├── v_Archery_g01_c01
│   │   ├── 00001.jpg
│   │   └── ...
│   └── ...

Experiments

These models were trained in machine with NVIDIA TITAN X 12gb GPU. Note that I splited train/val/test data for each dataset using sklearn. If you want to train models using official train/val/test data, you can look in dataset.py, and modify it to your needs.

  • UCF101

Reference

The paper: "Learning Spatiotemporal Features with 3D Convolutional Networks" by Du Tran1,2 , Lubomir Bourdev1 , Rob Fergus1 , Lorenzo Torresani2 , Manohar Paluri1.

About

A project for action recognition on C3D

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages