Bug fix with NU-RLMS optimization

This commit is contained in:
Tadas Baltrusaitis
2017-09-14 18:59:36 +01:00
parent 6c979c0bd3
commit f7c09e0635
3 changed files with 5 additions and 3 deletions

View File

@@ -744,8 +744,10 @@ bool CLNF::Fit(const cv::Mat_<uchar>& im, const std::vector<int>& window_sizes,
this->NU_RLMS(params_global, params_local, patch_expert_responses, cv::Vec6d(params_global), params_local.clone(), current_shape, sim_img_to_ref, sim_ref_to_img, window_size, view_id, true, scale, this->landmark_likelihoods, tmp_parameters, false);
// non-rigid optimisation
if(scale == num_scales - 1)
{
// If we are terminating next iteration, make sure to record the model likelihood
if(scale == num_scales - 1 || window_sizes[scale + 1] == 0 || params_global[0] < 0.30)
{
this->model_likelihood = this->NU_RLMS(params_global, params_local, patch_expert_responses, cv::Vec6d(params_global), params_local.clone(), current_shape, sim_img_to_ref, sim_ref_to_img, window_size, view_id, false, scale, this->landmark_likelihoods, tmp_parameters, true);
}
else