gaze
0.1.0
Perform gaze tracking with common webcams.
|
Implements a wrapper around the pre-trained caffe model by Krafka2016. More...
#include "itracker/itracker.h"
Public Member Functions | |
ITracker (const std::string &model_file, const std::string &weights_file, const std::string &mean_left_eye_file, const std::string &mean_right_eye_file, const std::string &mean_face_file) | |
cv::Vec2f | predict (const cv::Mat &left_eye, const cv::Mat &right_eye, const cv::Mat &face, const cv::Mat &face_mask) |
Implements a wrapper around the pre-trained caffe model by Krafka2016.
Definition at line 31 of file itracker.h.
itracker::ITracker::ITracker | ( | const std::string & | model_file, |
const std::string & | weights_file, | ||
const std::string & | mean_left_eye_file, | ||
const std::string & | mean_right_eye_file, | ||
const std::string & | mean_face_file | ||
) |
Initializes the iTracker.
model_file | A path to the model file, usually a *_deploy.prototxt |
weights_file | A path to the trained weights, usually a *.caffemodel |
mean_left_file | Path to a *.binaryproto file, holds the mean of left eyes of the training set |
mean_right_file | Path to a *.binaryproto file, holds the mean of right eyes of the training set |
mean_face_file | Path to a *.binaryprotofile, holds the mean of faces of the training set |
Definition at line 140 of file itracker.cpp.
cv::Vec2f itracker::ITracker::predict | ( | const cv::Mat & | left_eye, |
const cv::Mat & | right_eye, | ||
const cv::Mat & | face, | ||
const cv::Mat & | face_mask | ||
) |
Performs a forward step for the neural network.
left_eye | A cropped left eye. |
right_eye | A cropped right eye. |
face | The cropped face |
face_mask | A 25x25 matrix which has 1 where the face was in the original image (relative), and 0 at the other places |
Definition at line 149 of file itracker.cpp.