Code Monkey home page Code Monkey logo

computational-imaging-lab-iitm / har-dvs Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 4.0 45.77 MB

This project is a part of our work, "Dynamic Vision Sensors for Human Activity Recognition" accepted at the IEEE 4th IAPR Asian Conference on Pattern Recognition (ACPR), 2017

Home Page: https://arxiv.org/abs/1803.04667

License: Other

MATLAB 42.71% Makefile 4.22% Roff 0.34% C++ 47.77% Python 4.51% Shell 0.45%
human-activity-recognition dynamic-vision-sensing computer-vision machine-learning dense-trajectories optical-flow

har-dvs's Introduction

HAR-DVS

This project is a part of our work, "Dynamic Vision Sensors for Human Activity Recognition" - Stefanie Anna Baby, Bimal Vinod, Chaitanya Chinni, Kaushik Mitra, accepted at the 4th IAPR Asian Conference on Pattern Recognition (ACPR) 2017.

The links to our work can be found at IEEE, arXiv and webpage.

IITM DVS128 Gesture Dataset

The IITM DVS128 Gesture Dataset contains 10 hand gestures by 12 subjects with 10 sets each totalling to a 1200 hand gestures. These gestures are captured using a DVS128 camera.

The aedat dataset and the corresponding converted avi dataset can be downloaded from IITM_DVS_10.

Folder structure

.
├── lib
│   ├── dense_trajectory_release_v1.2
│   │   ├── ...
│   │   └── ...
│   ├── bov_encode.m
│   ├── generate_codebook.m
│   ├── generate_motion_maps.m
│   ├── groupfile_indices.m
│   ├── groupfile_indices_mm.m
│   ├── hidden_indices.m
│   ├── normalize_image.m
│   ├── parsave.m
│   ├── svm_loo.m
│   └── run_dense.sh
├── README.md
├── extract_features.m
├── run_dvs.m
└── startup.m

The lib folder contains a bunch of utility snippets used by the main code files.

The lib/dense_trajectory_release_v1.2 code is taken from http://lear.inrialpes.fr/people/wang/dense_trajectories which was from the work by "Action Recognition by Dense Trajectories" by Wang et al.. More details can be found in the README file associated with it.

Adding the datasets

The data folder should contain all the data in the root directory with the following structure. The extracted DVS data should be put in data/<dataset_name>/original_data with individual folders for each class.

The code expects .avi files and not aedat. All the features (motion-maps and dense-trajectories) are extracted by extract_features.m into the data/<dataset_name>/features_extracted folder.

The run_dvs.m program automatically segregates the test and train data into data/<dataset_name>/encoded_data for K-fold cross-validation.

The same structure is followed for any other dataset. The <dataset_name> can be IITM_DVS_10 or UCF11_DVS etc.

.
├── data
│   ├── IITM_DVS_10
│   │   ├── original_data
│   │   │   ├── comeHere
│   │   │   │   └── *.avi
│   │   │   ├── left_swipe
│   │   │   │   └── *.avi
│   │   │   └── ...
│   │   ├── features_extracted
│   │   │   └── ...
│   │   └── encoded_data
│   │   │   ├── test
│   │   │   └── train
│   ├── UCF11_DVS
│   │   ├── ...
│   │   └── ...
│   └── ...
└── ...

Citation

If you find our work helpful in your publications or projects, please consider citing our paper.

S. A. Baby and B. Vinod and C. Chinni and K. Mitra, "Dynamic Vision Sensors for Human Activity Recognition," 2017 4th IAPR Asian Conference on Pattern Recognition (ACPR), Nanjing, China, 2017.

@inproceedings{sababy:hardvs:2017,
    author={S. A. {Baby} and B. {Vinod} and C. {Chinni} and K. {Mitra}},
    booktitle={2017 4th IAPR Asian Conference on Pattern Recognition (ACPR)},
    title={Dynamic Vision Sensors for Human Activity Recognition},
    year={2017},
    pages={316-321},
    doi={10.1109/ACPR.2017.136},
    ISSN={2327-0985},
    month={Nov}
}

Credits

Thanks to Heng Wang for the dense-trajectories code - http://lear.inrialpes.fr/people/wang/dense_trajectories

har-dvs's People

Contributors

chinnichaitanya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

har-dvs's Issues

confusion_.mat、 summed_confusion_* .mat data means ?

That's what I got the accuracy_.mat about 0.2 only , confusion_.mat about only 0.02(On the diagonal),and summed_confusion_* .mat about only 0.5 (On the diagonal).
What does this three parameter representation mean?

dense_features_*.mat files in code ???

Thank you so much for sharing your code.
I found a missing file( dense_features_*.mat) in the course of running. Is this file to be generated through dense_trajectory_release_v1.2.

X data must have 1500 columns.

During Run the code "run_dvs.m"
in svm_loo.m on line 191:
[pred_xy_xt_yt, score_xy_xt_yt, cost_xy_xt_yt] = predict(svmc_xy_xt_yt, [test_features_MMxy, test_features_MMxt, test_features_MMyt]);

I stop on error

Parallel pool using the 'local' profile is shutting down.
Error using
classreg.learning.classif.CompactClassificationECOC/predictEmptyX
(line 133)
X data must have 1500 columns.

Error in
classreg.learning.classif.CompactClassificationECOC/predict (line
334)
                [varargout{1:max(1,nargout)}] =
                predictEmptyX(this,X);

Error in svm_loo (line 191)
    [pred_xy_xt_yt, score_xy_xt_yt, cost_xy_xt_yt] =
    predict(svmc_xy_xt_yt, [test_features_MMxy,
    test_features_MMxt, test_features_MMyt]);

Error in run_dvs (line 77)
    [accuracy_xy_xt_yt, accuracy_xy_xt_yt_MBHx_MBHy,
    accuracy_xy_xt_yt_HoF, accuracy_HoG, accuracy_HoF,
    accuracy_MBHx_MBHy, accuracy_xy, accuracy_xt, accuracy_yt,
    confusion_xy_xt_yt, confusion_xy_xt_yt_MBHx_MBHy,
    confusion_xy_xt_yt_HoF, confusion_HoG, confusion_HoF,
    confusion_MBHx_MBHy, confusion_xy, confusion_xt,
    confusion_yt] = svm_loo(encoded_data_path, num_classes);
 

Can anyone help me,please?

Thanks for the code,but the results were less than satisfactory

hi,That's what I got the accuracy_.mat about 0.2 only , confusion_.mat about only 0.02(On the diagonal),and summed_confusion_* .mat about only 0.5 (On the diagonal).
1.What does this three parameter representation mean
2.Did I get it wrong? Why did it happen?(IITM_DVS_10)How to check the correct accuracy?

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.