Doc

Wii CML

WiiC-ML is the machine learning library of WiiC. The idea is to support WiiC's users in developing applications based on gesture recognition or any other tangible interaction that involves machine learning algorithms. WiiC-ML is based on the machine learning library provided by OpenCV.

wiic-ml

wiic-ml is an application installed with WiiC-ML that provides four functionalities.

Training

It is possible to train a machine learning classifier for gesture recognition, providing as input a set of feature dataset files, one per each gesture category. The syntax of the command is the following:

wiic-ml train <KNN|Bayes|SVM|DT|ANN|Boost|RT> <training_data_ratio> <data_file1> ... <data_fileN>

where:

  • <KNN|Bayes|SVM|DT|ANN|Boost|RT> is one of the supported classifiers;
  • <training_data_ratio> is the training/validation ratio, in the range [0.0:1.0]. The overall dataset is randomly divided into a training and a validation set, according to this ratio;
  • <data_file1> ... <data_fileN> are the feature dataset files, one per category, extracted from the raw acceleration log files, and formatted according to the WiiC log file.

Once executed, wiic-ml trains the selected classifier applying the training set, validates it with the validation set, and saves the trained model in a XML file for later usage. The model filename is <KNN|Bayes|SVM|DT|ANN|Boost|RT>_model.xml.

Validation

It is also possible to validate a classifier previously trained. The corresponding command syntax is:

wiic-ml val <KNN|Bayes|SVM|DT|ANN|Boost|RT> <model_file> [categories] <val_file1> ... <val_fileN>

where:

  • <KNN|Bayes|SVM|DT|ANN|Boost|RT> is one of the supported classifiers;
  • <model_file> is the classifier model previously saved during the training step;
  • [categories] (optional) is a text file (in this case, it must be called exactly categories) containing a list of words, separated by any of the common separators (e.g. space, tab or new line), each representing the name of a considered category. This is useful to assign a natural name to each gesture within the considered set.
  • <val_file1> ... <val_fileN> are the feature dataset files, one per category, extracted from the raw acceleration log files, and formatted according to the WiiC log file.

Recognition

Once trained, wiic-ml can be used to perform real-time gesture recognition. The corresponding command syntax is:

wiic-ml rec <KNN|Bayes|SVM|DT|ANN|Boost|RT> <model_file> [categories]

where:

  • <KNN|Bayes|SVM|DT|ANN|Boost|RT> is one of the supported classifiers;
  • <model_file> is the classifier model previously saved during the training step;
  • [categories] (optional) is a text file containing a list of words, separated by any of the common separators (e.g. space, tab or new line), each representing the name of a considered category. This is useful to assign a natural name to each gesture within the considered set.

Convert

All the machine learning functionalities are based on feature dataset files, which in turn are extracted and computed from the raw acceleration log files. The latter are the created through the logging functionalities provided by WiiC (e.g. using wiic-logger), and contain raw accelerometer values. On the other hand, feature dataset files can be obtained by using this converting functionality, which computes them according to a predefined feature vector used by WiiCML for gesture recognition. The command syntax is:

convert <data_file1> ... <data_fileN>

where:

  • <data_file1> ... <data_fileN> are the raw acceleration log files, one per category, which will be converted in a set of feature dataset files, each one with the same name of the corresponding raw log file, but prefixed with _features.

Introduction

Installation

Documentation

edit SideBar

Blix theme adapted by David Gilbert, powered by PmWiki