Gesture Recognition Toolkit

The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, C++ machine learning library designed for real-time gesture recognition.


//Setup a custom recognition pipeline
GestureRecognitionPipeline pipeline;

//Add a moving average filter pre-processing module
pipeline << MovingAverageFilter( 5 );

//Add some feature extraction
pipeline << FFT( 512 );
pipeline << MyCustomFeatureAlgorithm();

//Add an AdaBoost classifier
pipeline << Adaboost( DecisionStump() );

//Add a class label filter
pipeline << ClassLabelTimeoutFilter( 1000 );

//Load a labeled data set from a CSV file and train a classification model
ClassificationData trainingData;

trainingData.load( "TrainingData.csv" );

//Train a model using the custom pipeline
bool success = pipeline.train( trainingData );

//The following lines would be called each time the user gets a new sample
VectorFloat sample = getDataFromSenor(); //Custom user function

if( pipeline.predict( sample ) ){
  //Get the results
  unsigned int predictedClassLabel = pipeline.getPredictedClassLabel();
  Float maxLikelihood = pipeline.getMaximumLikelihood(); 
}