* limitations under the License.
*/
+#include <chrono>
+#include <iostream>
#include "SingleoInferenceTypes.h"
#include "GazeEstimator.h"
#include "FaceDetector.h"
const GazeResultType& GazeEstimator::run(BaseDataType &input)
{
FaceResult result;
+ chrono::steady_clock::time_point start = chrono::steady_clock::now();
_face_tasker->handle(input, result);
+ cout << "Face detection time: " << chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - start).count() << "ms\n";
SINGLEO_LOGI("FaceResult: faces %zu", result._rects.size());
_head_axes.clear();
normalized_image.byte_per_pixel = cv_warped_image.channels();
normalized_image.ptr = cv_warped_image.data;
+ start = chrono::steady_clock::now();
_gaze_estimator->invoke(normalized_image);
+ cout << "Gaze estimation time: " << chrono::duration_cast<chrono::milliseconds>(chrono::steady_clock::now() - start).count() << "ms\n";
auto normalized_gaze_angle = dynamic_cast<GazeResultType &>(_gaze_estimator->result());
_result = _head_pose_estimator->denormalizeGazeAngle(normalized_gaze_angle);