From d5d07b44364cf32fcac3e2b432bfc4f7b7b80e56 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Mon, 5 Nov 2018 08:13:33 +0000 Subject: [PATCH] Making multi-view on by default (slower but more accurate) --- lib/local/LandmarkDetector/src/LandmarkDetectorFunc.cpp | 3 ++- lib/local/LandmarkDetector/src/LandmarkDetectorParameters.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/local/LandmarkDetector/src/LandmarkDetectorFunc.cpp b/lib/local/LandmarkDetector/src/LandmarkDetectorFunc.cpp index 281fd735..e949b554 100644 --- a/lib/local/LandmarkDetector/src/LandmarkDetectorFunc.cpp +++ b/lib/local/LandmarkDetector/src/LandmarkDetectorFunc.cpp @@ -342,9 +342,10 @@ bool LandmarkDetector::DetectLandmarksInVideo(const cv::Mat &rgb_image, CLNF& cl // Do the actual landmark detection (and keep it only if successful) // Perform multi-hypothesis detection here (as face detector can pick up multiple of them) + bool old_value = params.multi_view; params.multi_view = true; bool landmark_detection_success = DetectLandmarksInImage(rgb_image, bounding_box, clnf_model, params, grayscale_image); - params.multi_view = false; + params.multi_view = old_value; // If landmark reinitialisation unsucessful continue from previous estimates diff --git a/lib/local/LandmarkDetector/src/LandmarkDetectorParameters.cpp b/lib/local/LandmarkDetector/src/LandmarkDetectorParameters.cpp index 97245808..f39f987f 100644 --- a/lib/local/LandmarkDetector/src/LandmarkDetectorParameters.cpp +++ b/lib/local/LandmarkDetector/src/LandmarkDetectorParameters.cpp @@ -331,7 +331,8 @@ void FaceModelParameters::init() validation_boundary = 0.725f; limit_pose = true; - multi_view = false; + + multi_view = true; reinit_video_every = 2;