This part of robot structure provides machine learning algorithms, that can be used for data training, ex. robot can learn colors. It utilizes UKNearest module. There is also simple face recognizer based on UEigenfaces module.

Main functions

   // save all trained data
   // face - set true if you want to save data from face learning part of structure
   // colors - set true if you want to save data from colors learning part of structure
robot.ml.Save("fileName",face,colors);
   // load previous trained data
robot.ml.Load("fileName",face,colors);

Colors learning

   // train data
robot.ml.colorLearning.Learn([R,G,B], "colorName");
   // check a sample
robot.ml.colorLearning.Check([R,G,B]);
   // check number of trained samples
robot.ml.colorLearning.ChcekLevel();
   // save trained data
robot.ml.colorLearning.Save("fileName");
   // load saved trained data
robot.ml.colorLearning.Load("fileName");

Face learning

   // learn by one sample
   // face - image of face, ex. from robot.video.humanDetector.head.image
   // "userName" - string label 
robot.ml.faceLearning.Learn(face, "userName");
   // check the image sample
robot.ml.faceLearning.Check(face);
   // update database (call this function after every training series)
robot.ml.faceLearning.UpdateDatabase(value);
   // Save trained data to file
robot.ml.faceLearning.Save(fileName);
   // load previous data from file
robot.ml.faceLearning.Load(fileName);
   // set recognition threshold
robot.ml.faceLearning.threshold;

 

 

EMYS and FLASH are Open Source and distributed according to the GPL v2.0 © Rev. 0.8.0, 27.04.2016

FLASH Documentation