Merge branch 'master' into feature/DCCNF

# Conflicts:
#	.gitignore
#	exe/FaceLandmarkImg/FaceLandmarkImg.cpp
#	exe/FeatureExtraction/FeatureExtraction.cpp
#	matlab_runners/Feature Point Experiments/results/in-the-wild-res-no-outline.pdf
#	matlab_runners/Feature Point Experiments/results/landmark_detections.mat
#	matlab_runners/Feature Point Experiments/run_OpenFace_feature_point_tests_300W.m
#	matlab_runners/Gaze Experiments/mpii_1500_errs.mat
This commit is contained in:
TadasBaltrusaitis
2017-04-10 11:04:30 -04:00
74 changed files with 6174 additions and 707 deletions

View File

@@ -67,6 +67,11 @@
// System includes
#include <sstream>
#include <iostream>
#include <cstdlib>
#ifndef CONFIG_DIR
#define CONFIG_DIR "~"
#endif
using namespace std;
@@ -200,15 +205,25 @@ FaceModelParameters::FaceModelParameters(vector<string> &arguments)
}
// Make sure model_location is valid
if (!boost::filesystem::exists(boost::filesystem::path(model_location)))
// First check working directory, then the executable's directory, then the config path set by the build process.
boost::filesystem::path config_path = boost::filesystem::path(CONFIG_DIR);
boost::filesystem::path model_path = boost::filesystem::path(model_location);
if (boost::filesystem::exists(model_path))
{
model_location = (root / model_location).string();
if (!boost::filesystem::exists(boost::filesystem::path(model_location)))
{
std::cout << "Could not find the landmark detection model to load" << std::endl;
}
model_location = model_path.string();
}
else if (boost::filesystem::exists(root/model_path))
{
model_location = (root/model_path).string();
}
else if (boost::filesystem::exists(config_path/model_path))
{
model_location = (config_path/model_path).string();
}
else
{
std::cout << "Could not find the landmark detection model to load" << std::endl;
}
}
void FaceModelParameters::init()