Static Posture Recognition System
The goal of this project is to develop a system that can classify six static postures for adults (eventually in real-time). These postures are: sitting upright, leaning forward, leaning left, leaning right, leaning backward, and slouching. This system will act as one method for a robot-computer to gain insight (which could mean anything) into its user or learn new tasks by imitating posture.
The database used is the static posture database compiled by Lynne Slivovsky and Professor Hong Tan (http://shay.ecn.purdue.edu/HIRL/projects_database.html) which includes 1500 sitting pressure distribution maps. Each pressure distribution map is an 84 by 48 8-bit array of pressure distribution data that has been captured by their Sensing Chair (same chair that is used in the Affective Computing Group). The database includes labeled pressure distribution maps for training and testing 10 postures coming from 30 subjects (15 female, 15 male) with 150 samples per posture. This project used 900 total pressure distribution maps in raw .pgm (portable graymap file format) focusing on only six of the postures in the database. These postures were upright, leaning forward, leaning left, leaning right, leaning back, and slumping.
A smoothing filter was applied to the samples before saving to the database.
Example of one pressure distribution map in the database.
Took each 84 x 48 8-bit array of pressure distributions and reduced each sample to a 4032 x 1 double array normalized to the highest pressure level. Training matrix consisted of 600 samples (20 subjects with 5 samples/posture) leading to a 4032 x 600 double array used as input for classification. Test matrix consisted of 300 samples (10 new subjects with 5 samples/posture) leading to a 4032 x 300 double array. Following examples are of four different pressure distribution maps plotted as contours and as 3d mesh plots.
In order to try to exploit the geometric property of posture pressure patterns, a Gaussian mixture model was used to model the sufficient statistics for eight different Gaussian components. Each component was randomly initialized, then the expectation maximization algorithm was performed to update and find the final parameters. Since EM finds a local maximum, it is important to have a good initialization of parameters. Thus, EM is first performed on the sample to find the 2-dimensional mu's, sigma's and mixing weights for each component and then these units are used to find better initialization parameters for the 3-dimensional mixing components .
.Methods & Results.
I. Principal Component Analysis
II. Neural Networks
III. Support Vector Machines
pca_chair.m, gmm_chair.m, nn_chair.m, svm_chair.m, svm_mix.m, saveChairData.m, fixdata.m, calculateEM.m, pc_evectors.m, atv.m
download here (svm files need osu_svm toolbox to run)