From 85a201c508c1beea3a36bdd27c070500b1a75560 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 25 Oct 2017 07:40:31 +0100 Subject: [PATCH 1/6] OpenBLAS cmake fixes. --- exe/FaceLandmarkImg/CMakeLists.txt | 2 +- lib/local/FaceAnalyser/CMakeLists.txt | 3 +++ lib/local/LandmarkDetector/CMakeLists.txt | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/exe/FaceLandmarkImg/CMakeLists.txt b/exe/FaceLandmarkImg/CMakeLists.txt index 65097c9..a6966be 100644 --- a/exe/FaceLandmarkImg/CMakeLists.txt +++ b/exe/FaceLandmarkImg/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(FaceLandmarkImg LandmarkDetector) target_link_libraries(FaceLandmarkImg FaceAnalyser) target_link_libraries(FaceLandmarkImg dlib) -target_link_libraries(FaceLandmarkImg ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES}) +target_link_libraries(FaceLandmarkImg ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) install (TARGETS FaceLandmarkImg DESTINATION bin) diff --git a/lib/local/FaceAnalyser/CMakeLists.txt b/lib/local/FaceAnalyser/CMakeLists.txt index 41d0c13..46184cf 100644 --- a/lib/local/FaceAnalyser/CMakeLists.txt +++ b/lib/local/FaceAnalyser/CMakeLists.txt @@ -4,6 +4,9 @@ include_directories(${BLAS_ROOT_DIR}) include_directories(${BOOST_INCLUDE_DIR}) +#OpenBlas library +include_directories(../../3rdParty/OpenBLAS/include) + SET(SOURCE src/Face_utils.cpp src/FaceAnalyser.cpp diff --git a/lib/local/LandmarkDetector/CMakeLists.txt b/lib/local/LandmarkDetector/CMakeLists.txt index 9d5055c..1ff9878 100644 --- a/lib/local/LandmarkDetector/CMakeLists.txt +++ b/lib/local/LandmarkDetector/CMakeLists.txt @@ -3,6 +3,9 @@ include_directories(${TBB_ROOT_DIR}/include) include_directories(${BOOST_INCLUDE_DIR}) +#OpenBlas library +include_directories(../../3rdParty/OpenBLAS/include) + SET(SOURCE src/CCNF_patch_expert.cpp src/LandmarkDetectionValidator.cpp From 9356344e910c2044baf7c041b1a11e0ce3650ddd Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 25 Oct 2017 08:39:38 +0100 Subject: [PATCH 2/6] Another missing include for cmake. --- lib/local/FaceAnalyser/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/local/FaceAnalyser/CMakeLists.txt b/lib/local/FaceAnalyser/CMakeLists.txt index 46184cf..2469e4f 100644 --- a/lib/local/FaceAnalyser/CMakeLists.txt +++ b/lib/local/FaceAnalyser/CMakeLists.txt @@ -7,6 +7,9 @@ include_directories(${BOOST_INCLUDE_DIR}) #OpenBlas library include_directories(../../3rdParty/OpenBLAS/include) +#LandmarkDetector library +include_directories(../../local/LandmarkDetector/include) + SET(SOURCE src/Face_utils.cpp src/FaceAnalyser.cpp From ea370ae43ffc8c275d86b49e94517df4377b46f4 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 25 Oct 2017 17:04:28 +0100 Subject: [PATCH 3/6] A fix for unix compilation. --- lib/local/FaceAnalyser/include/PAW.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/local/FaceAnalyser/include/PAW.h b/lib/local/FaceAnalyser/include/PAW.h index 968a2ee..1b9ed22 100644 --- a/lib/local/FaceAnalyser/include/PAW.h +++ b/lib/local/FaceAnalyser/include/PAW.h @@ -32,8 +32,8 @@ // /////////////////////////////////////////////////////////////////////////////// -#ifndef __PAW_h_ -#define __PAW_h_ +#ifndef __PAWA_h_ +#define __PAWA_h_ // OpenCV includes #include From 3a3b3751979cc03bbef2c559a900872777ccd3de Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 25 Oct 2017 19:13:47 +0100 Subject: [PATCH 4/6] Another attempt at a fix. --- lib/local/FaceAnalyser/src/Face_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/local/FaceAnalyser/src/Face_utils.cpp b/lib/local/FaceAnalyser/src/Face_utils.cpp index aa2e730..2cc7e82 100644 --- a/lib/local/FaceAnalyser/src/Face_utils.cpp +++ b/lib/local/FaceAnalyser/src/Face_utils.cpp @@ -217,7 +217,7 @@ namespace FaceAnalysis destination_landmarks = cv::Mat(destination_landmarks.t()).reshape(1, 1).t(); - PAW paw(destination_landmarks, triangulation, 0, 0, aligned_face.cols-1, aligned_face.rows-1); + FaceAnalysis::PAW paw(destination_landmarks, triangulation, 0, 0, aligned_face.cols-1, aligned_face.rows-1); // Mask each of the channels (a bit of a roundabout way, but OpenCV 3.1 in debug mode doesn't seem to be able to handle a more direct way using split and merge) vector aligned_face_channels(aligned_face.channels()); From 0980b1587cd44b1b0aff4691a960dd2c942a7812 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 25 Oct 2017 19:32:36 +0100 Subject: [PATCH 5/6] Another attempt to resolve the include issues for gcc. --- lib/local/FaceAnalyser/include/Face_utils.h | 1 + lib/local/FaceAnalyser/src/Face_utils.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/local/FaceAnalyser/include/Face_utils.h b/lib/local/FaceAnalyser/include/Face_utils.h index ee395a6..8e4439c 100644 --- a/lib/local/FaceAnalyser/include/Face_utils.h +++ b/lib/local/FaceAnalyser/include/Face_utils.h @@ -39,6 +39,7 @@ #include #include "PDM.h" +#include "PAW.h" namespace FaceAnalysis { diff --git a/lib/local/FaceAnalyser/src/Face_utils.cpp b/lib/local/FaceAnalyser/src/Face_utils.cpp index 2cc7e82..2acfec9 100644 --- a/lib/local/FaceAnalyser/src/Face_utils.cpp +++ b/lib/local/FaceAnalyser/src/Face_utils.cpp @@ -33,7 +33,6 @@ /////////////////////////////////////////////////////////////////////////////// #include -#include // OpenCV includes #include From ae7497ef0951aa960c403d894b41cc1e08e53f69 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 25 Oct 2017 20:16:37 +0100 Subject: [PATCH 6/6] Fixes for linking to OpenBLAS. --- exe/FaceLandmarkVid/CMakeLists.txt | 2 +- exe/FaceLandmarkVidMulti/CMakeLists.txt | 2 +- exe/FeatureExtraction/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exe/FaceLandmarkVid/CMakeLists.txt b/exe/FaceLandmarkVid/CMakeLists.txt index 5c5587f..7ab0120 100644 --- a/exe/FaceLandmarkVid/CMakeLists.txt +++ b/exe/FaceLandmarkVid/CMakeLists.txt @@ -14,6 +14,6 @@ target_link_libraries(FaceLandmarkVid FaceAnalyser) target_link_libraries(FaceLandmarkVid dlib) -target_link_libraries(FaceLandmarkVid ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES}) +target_link_libraries(FaceLandmarkVid ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) install (TARGETS FaceLandmarkVid DESTINATION bin) diff --git a/exe/FaceLandmarkVidMulti/CMakeLists.txt b/exe/FaceLandmarkVidMulti/CMakeLists.txt index 181db54..3e4086c 100644 --- a/exe/FaceLandmarkVidMulti/CMakeLists.txt +++ b/exe/FaceLandmarkVidMulti/CMakeLists.txt @@ -10,6 +10,6 @@ add_executable(FaceLandmarkVidMulti FaceLandmarkVidMulti.cpp) target_link_libraries(FaceLandmarkVidMulti LandmarkDetector) target_link_libraries(FaceLandmarkVidMulti dlib) -target_link_libraries(FaceLandmarkVidMulti ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES}) +target_link_libraries(FaceLandmarkVidMulti ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) install (TARGETS FaceLandmarkVidMulti DESTINATION bin) diff --git a/exe/FeatureExtraction/CMakeLists.txt b/exe/FeatureExtraction/CMakeLists.txt index 5d6d72d..3b22407 100644 --- a/exe/FeatureExtraction/CMakeLists.txt +++ b/exe/FeatureExtraction/CMakeLists.txt @@ -13,6 +13,6 @@ target_link_libraries(FeatureExtraction LandmarkDetector) target_link_libraries(FeatureExtraction FaceAnalyser) target_link_libraries(FeatureExtraction dlib) -target_link_libraries(FeatureExtraction ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES}) +target_link_libraries(FeatureExtraction ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) install (TARGETS FeatureExtraction DESTINATION bin)