Human Activity Detection Matlab Code
MATLAB Human Activity Recognition Toolbox. Skip to content. Features Business Explore Marketplace Pricing In this repository All GitHub ↵ Jump to ↵ No suggested jump to results; Sign in or Sign up. Watch 4 Star 35 Fork 28 andreas-bulling / ActRecTut. Pull requests 1. Projects 0 Insights Dismiss Join GitHub today. GitHub is home to over 28 million developers working together to host.
#A Tutorial on Human Activity Recognition Using Body-worn Inertial Sensors
- Real time human activity recognition. Learn more about image processing, human activity recognition, single camera.
- I have a shimmer 3D accelerator and software that write x,y,z axis data in dat file.I want to detect, real time activities detection where 128 readings/window (2.56 sec data) and 50% overlap like the dataset for human activity learning.please help me.
MATLAB toolbox for the publication
A Tutorial on Human Activity Recognition Using Body-worn Inertial Sensors
Andreas Bulling, Ulf Blanke and Bernt Schiele
ACM Computing Surveys 46, 3, Article 33 (January 2014), 33 pages
DOI: http://dx.doi.org/10.1145/2499621
If you find the toolbox useful for your research please cite the above paper, thanks!
Version 1.4, 19 August 2014
General Notes
The data should be arranged in a MATLAB matrix with rows denoting the frames (samples) and columnsdenoting the different sensors or axes -> matrix NxM (N: frames, M: sensors/axes)IMPORTANT: make sure the matrix does not contain any timestamp columns as often added by data recordingtoolboxes, such as the Context Recognition Network Toolbox
The ground truth labels should be integers, arranged in a MATLAB vector with rows denoting the frames-> vector Nx1 (N: frames)
The data matrix should be loaded into the variable
data
, the ground truth label vector intothe variablelabels
The NULL class needs to have label 1, the remaining classes labels 2:n
If you want to modify the default parameters of the different classifiershave a look at
setClassifier.m
This toolbox requires the following MATLAB toolboxes:
To compile the different third-party libraries have a look at the documentation Daniel defense modular float rail installation instructions.
How to reproduce the results from the paper
Execute run_experiments_paper.m
in MATLAB
Specific notes on how to create and run your own experiment
Have a look at
settings.m
This file contains all settings available in the toolbox and their defaults. All settings arestored in a MATLAB structSETTINGS
. Set the different fields in this structaccording to the requirements of your planned experiment.Have a look at
Experiments/expTutorial.m
and run the scriptThis file contains a (simple) example structure of an experiment. Note howsettings.m
isexecuted first, followed by modifications to theSETTINGS
fields.optional: Install all third-party libraries you plan to use (see list below).Archives of all supported libraries are provided in the subdirectory 'Libraries'.The libraries should be installed in the same directory. If you prefer to install the librariesin a different path, adapt the library paths in
settings.m
accordingly (line 33 and following)To create your own experiment
Copy
Experiments/expTutorial.m
toExperiments/expOwn.m
Write code in
expOwn.m to
modifySETTINGS
according to your experiment's requirements, in particular:
Change the
EXPERIMENT_NAME
andIDENTIFIER_NAME
variables inexpOwn.m
For example,EXPERIMENT_NAME
could be set to 'kNN' andIDENTIFIER_NAME
to 'k_5' if yourexperiment involves using a kNN classifier with k fixed to 5.Put your data files in subdirectories of 'Data' named according to the scheme: subjectX_Y
- X denotes the index of the subject (
1:SETTINGS.SUBJECT_TOTAL
) - Y denotes the type of dataset (
SETTINGS.DATASET
plus additional ones)For example, the toolbox datasets are stored in the following subdirectories:subject1_walk, subject1_gesture, subject2_walk, subject2_gestureThe data files should be called 'data.mat' and should contain both variablesdata
andlabels
- X denotes the index of the subject (
Run
expOwn.m
and wait for the script to finish.Extracted features will be saved in 'Output/features' whereas the experiment output will be savedin 'Output/experiments/EXPERIMENT_NAME/IDENTIFIER_NAME'
Flow Chart Human Activity Detection
Optional third-party libraries
libSVM
URL: http://www.csie.ntu.edu.tw/~cjlin/libsvm/liblinear
URL: http://www.csie.ntu.edu.tw/~cjlin/liblinear/mRMR
URL: http://penglab.janelia.org/proj/mRMR/SVMlight
URL: http://svmlight.joachims.org/jointboosting by Christian Wojek
URL: noneHMM Toolbox for MATLAB by Kevin Murphy
URL: http://www.cs.ubc.ca/~murphyk/Software/HMM/hmm.htmlPerformance evaluation scripts by Jamie Ward
URL: http://www.jamieward.net/research/performance/
#A Tutorial on Human Activity Recognition Using Body-worn Inertial Sensors
MATLAB toolbox for the publication
A Tutorial on Human Activity Recognition Using Body-worn Inertial Sensors
Andreas Bulling, Ulf Blanke and Bernt Schiele
ACM Computing Surveys 46, 3, Article 33 (January 2014), 33 pages
DOI: http://dx.doi.org/10.1145/2499621
If you find the toolbox useful for your research please cite the above paper, thanks!
Version 1.4, 19 August 2014
General Notes
The data should be arranged in a MATLAB matrix with rows denoting the frames (samples) and columnsdenoting the different sensors or axes -> matrix NxM (N: frames, M: sensors/axes)IMPORTANT: make sure the matrix does not contain any timestamp columns as often added by data recordingtoolboxes, such as the Context Recognition Network Toolbox
The ground truth labels should be integers, arranged in a MATLAB vector with rows denoting the frames-> vector Nx1 (N: frames)
The data matrix should be loaded into the variable
data
, the ground truth label vector intothe variablelabels
The NULL class needs to have label 1, the remaining classes labels 2:n
If you want to modify the default parameters of the different classifiershave a look at
setClassifier.m
This toolbox requires the following MATLAB toolboxes:
To compile the different third-party libraries have a look at the documentation
How to reproduce the results from the paper
Execute run_experiments_paper.m
in MATLAB
Specific notes on how to create and run your own experiment
Have a look at
settings.m
This file contains all settings available in the toolbox and their defaults. All settings arestored in a MATLAB structSETTINGS
. Set the different fields in this structaccording to the requirements of your planned experiment.Have a look at
Experiments/expTutorial.m
and run the scriptThis file contains a (simple) example structure of an experiment. Note howsettings.m
isexecuted first, followed by modifications to theSETTINGS
fields.optional: Install all third-party libraries you plan to use (see list below).Archives of all supported libraries are provided in the subdirectory 'Libraries'.The libraries should be installed in the same directory. If you prefer to install the librariesin a different path, adapt the library paths in
settings.m
accordingly (line 33 and following)To create your own experiment
Copy
Experiments/expTutorial.m
toExperiments/expOwn.m
Write code in
expOwn.m to
modifySETTINGS
according to your experiment's requirements, in particular:
Change the
EXPERIMENT_NAME
andIDENTIFIER_NAME
variables inexpOwn.m
For example,EXPERIMENT_NAME
could be set to 'kNN' andIDENTIFIER_NAME
to 'k_5' if yourexperiment involves using a kNN classifier with k fixed to 5.Put your data files in subdirectories of 'Data' named according to the scheme: subjectX_Y
- X denotes the index of the subject (
1:SETTINGS.SUBJECT_TOTAL
) - Y denotes the type of dataset (
SETTINGS.DATASET
plus additional ones)For example, the toolbox datasets are stored in the following subdirectories:subject1_walk, subject1_gesture, subject2_walk, subject2_gestureThe data files should be called 'data.mat' and should contain both variablesdata
andlabels
- X denotes the index of the subject (
Run
expOwn.m
and wait for the script to finish.Extracted features will be saved in 'Output/features' whereas the experiment output will be savedin 'Output/experiments/EXPERIMENT_NAME/IDENTIFIER_NAME'
Optional third-party libraries
libSVM
URL: http://www.csie.ntu.edu.tw/~cjlin/libsvm/liblinear
URL: http://www.csie.ntu.edu.tw/~cjlin/liblinear/mRMR
URL: http://penglab.janelia.org/proj/mRMR/SVMlight
URL: http://svmlight.joachims.org/jointboosting by Christian Wojek
URL: noneHMM Toolbox for MATLAB by Kevin Murphy
URL: http://www.cs.ubc.ca/~murphyk/Software/HMM/hmm.htmlPerformance evaluation scripts by Jamie Ward
URL: http://www.jamieward.net/research/performance/