% This code performs action recognition using HOD
%
% Author: Mohammad A. Gowayyed - m.gowayyed@gmail.com or m.gowayyed@alexu.edu.eg
% Feel free to send emails with your question


This is a light version of the hod code. You need to prepare the data:

Follow the following instructions:

1. Download the MSR-Action3D from http://research.microsoft.com/en-us/um/people/zliu/actionrecorsrc/MSRAction3DSkeleton(20joints).rar.
2. Paste the skeleton files into 'hod_code_ijcai_light\data_source\MSR_Action3D\data'.
3. Select the actionset by editing: 'hod_code_ijcai_light\data_source\MSR_Action3D\createDataFiles.m'.
4. Run 'hod_code_ijcai_light\data_source\MSR_Action3D\createDataFiles.m'.
5. A mat file should be created (You should create mat file for each actionset).
6. Copy it to 'hod_code_ijcai_light\data\MSRAction3D'.
7. Edit 'prepareData.m' to create the descriptor, should be straightforward:
	a) Edit >>> config.actionset = 3; % to select the appropriate actionset
	b) Edit >>> save MSRAction3D_AS3_HOD_16_2 % to indicate the name of the file to save; which you will load afterwards in 'main.m'
	c) You can also the configurations of the descriptors: number of bins, number of levels, and so on.
8. Edit 'main.m' to load the descriptors file that you saved.
9. Run 'main.m'

--

If you will use this code, please cite the following paper:

Mohammad A. Gowayyed, Marwan Torki, Mohamed E. Hussein, and Motaz El-Saban
Histogram of Oriented Displacements (HOD): Describing Trajectories of Human Joints for Action Recognition
23rd International Joint Conference on Artificial Intelligence (IJCAI), 2013.

--

Following are the results that you should reproduce.
It is slightly better that what we report because we added soft-binning.
We reported 91.26% average accuracy.

AS1: Accuracy = 90.2174% (83/92) (classification)
AS2: Accuracy = 93.75% (105/112) (classification)
AS3: Accuracy = 92.381% (97/105) (classification)

Average: (83 + 105 + 97) / (92 + 112 + 105) = 92.23

