mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2025-12-30 04:52:29 +00:00
Attempting to move to modern cmake
This commit is contained in:
233
CMakeLists.txt
233
CMakeLists.txt
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project (OpenFace)
|
||||
cmake_minimum_required (VERSION 3.2)
|
||||
project (OpenFace 2.0.2)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/)
|
||||
|
||||
@@ -13,173 +13,111 @@ find_package( BLAS REQUIRED )
|
||||
include_directories( ${BLAS_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES(${BLAS_LIBRARY_DIRS})
|
||||
|
||||
find_package( OpenCV 3.3 REQUIRED )
|
||||
|
||||
find_package( OpenCV 3.3 REQUIRED COMPONENTS core imgproc calib3d highgui objdetect)
|
||||
MESSAGE("OpenCV information:")
|
||||
MESSAGE(" OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}")
|
||||
MESSAGE(" OpenCV_LIBRARIES: ${OpenCV_LIBRARIES}")
|
||||
MESSAGE(" OpenCV_LIBRARY_DIRS: ${OpenCV_LIBRARY_DIRS}")
|
||||
include_directories( ${OpenCV_INCLUDE_DIRS} )
|
||||
MESSAGE(" OpenCV_LIBRARY_DIRS: ${OpenCV_LINK_DIRECTORIES}")
|
||||
|
||||
find_package( Boost 1.5.9 REQUIRED COMPONENTS filesystem system)
|
||||
MESSAGE("Boost information:")
|
||||
MESSAGE(" Boost_VERSION: ${Boost_VERSION}")
|
||||
MESSAGE(" Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
|
||||
MESSAGE(" Boost_LIBRARIES: ${Boost_LIBRARIES}")
|
||||
MESSAGE(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
|
||||
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}/boost)
|
||||
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
find_package( TBB CONFIG )
|
||||
if (NOT ${TBB_FOUND})
|
||||
find_package( TBB REQUIRED )
|
||||
endif()
|
||||
|
||||
MESSAGE("TBB information:")
|
||||
MESSAGE(" TBB_VERSION: ${TBB_VERSION}")
|
||||
MESSAGE(" TBB_INCLUDE_DIRS: ${TBB_INCLUDE_DIRS}")
|
||||
MESSAGE(" TBB_LIBRARIES: ${TBB_LIBRARIES}")
|
||||
|
||||
# Move LandmarkDetector model
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/*.txt")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model)
|
||||
endforeach()
|
||||
|
||||
# Move the hierarchical LandmarkDetector models
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/model*")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model)
|
||||
install(DIRECTORY ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model)
|
||||
endforeach()
|
||||
|
||||
# Move detection validation models
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/detection_validation/*.txt")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model/detection_validation)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model/detection_validation)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/detection_validation)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/detection_validation)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model/detection_validation)
|
||||
endforeach()
|
||||
|
||||
# Move patch experts
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/patch_experts/*.txt")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model/patch_experts)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model/patch_experts)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/patch_experts)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/patch_experts)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model/patch_experts)
|
||||
endforeach()
|
||||
|
||||
# Move CEN patch experts
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/patch_experts/*.dat")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model/patch_experts)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model/patch_experts)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/patch_experts)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/patch_experts)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model/patch_experts)
|
||||
endforeach()
|
||||
|
||||
# Move MTCNN face detector
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/mtcnn_detector/*.txt")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model/mtcnn_detector)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model/mtcnn_detector)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/mtcnn_detector)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/mtcnn_detector)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model/mtcnn_detector)
|
||||
endforeach()
|
||||
|
||||
# Move MTCNN face detector
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/mtcnn_detector/*.dat")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model/mtcnn_detector)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model/mtcnn_detector)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/mtcnn_detector)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/mtcnn_detector)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model/mtcnn_detector)
|
||||
endforeach()
|
||||
|
||||
# Move Point Distribution models
|
||||
file(GLOB files "lib/local/LandmarkDetector/model/pdms/*.txt")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/model/pdms)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/model/pdms)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/pdms)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/model/pdms)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/model/pdms)
|
||||
endforeach()
|
||||
|
||||
# Move OpenCV classifiers
|
||||
file(GLOB files "lib/3rdParty/OpenCV3.1/classifiers/*.xml")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/classifiers)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/classifiers)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/classifiers)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/classifiers)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/classifiers)
|
||||
endforeach()
|
||||
|
||||
# Move AU prediction modules
|
||||
file(GLOB files "lib/local/FaceAnalyser/AU_predictors/*.txt")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/AU_predictors)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/AU_predictors)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/AU_predictors)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/AU_predictors)
|
||||
install(FILES ${file} DESTINATION ${CMAKE_CONFIG_DIR}/AU_predictors)
|
||||
endforeach()
|
||||
|
||||
# Move AU prediction modules
|
||||
file(GLOB files "lib/local/FaceAnalyser/AU_predictors/svr*")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/AU_predictors)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/AU_predictors)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/AU_predictors)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/AU_predictors)
|
||||
install(DIRECTORY ${file} DESTINATION ${CMAKE_CONFIG_DIR}/AU_predictors)
|
||||
endforeach()
|
||||
|
||||
# Move AU prediction modules
|
||||
file(GLOB files "lib/local/FaceAnalyser/AU_predictors/svm*")
|
||||
foreach(file ${files})
|
||||
if (MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/AU_predictors)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/AU_predictors)
|
||||
else(MSVC)
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/AU_predictors)
|
||||
endif(MSVC)
|
||||
|
||||
file(COPY ${file} DESTINATION ${CMAKE_BINARY_DIR}/bin/AU_predictors)
|
||||
install(DIRECTORY ${file} DESTINATION ${CMAKE_CONFIG_DIR}/AU_predictors)
|
||||
endforeach()
|
||||
|
||||
@@ -194,28 +132,31 @@ else ()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -msse -msse2 -msse3")
|
||||
endif ()
|
||||
|
||||
# Boost
|
||||
if(WIN32)
|
||||
include_directories(lib/3rdParty/boost)
|
||||
include_directories(lib/3rdParty/boost/boost)
|
||||
link_directories( ${PROJECT_SOURCE_DIR}/lib/3rdParty/boost/lib )
|
||||
# dlib
|
||||
find_package(dlib 19.13 QUIET)
|
||||
if(${dlib_FOUND})
|
||||
message("dlib information:")
|
||||
message(" dlib version: ${dlib_VERSION}")
|
||||
message(" dlib_INCLUDE_DIRS: ${dlib_INCLUDE_DIRS}")
|
||||
|
||||
if (NOT TARGET dlib)
|
||||
add_library(dlib INTERFACE IMPORTED GLOBAL)
|
||||
endif()
|
||||
set_target_properties(dlib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${dlib_INCLUDE_DIRS}")
|
||||
set_target_properties(dlib PROPERTIES INTERFACE_LINK_LIBRARIES "${dlib_LIBRARIES}")
|
||||
else()
|
||||
INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIR})
|
||||
message(WARNING "dlib not found in the system. Using the one vended with OpenFace.")
|
||||
|
||||
# dlib library
|
||||
add_subdirectory(lib/3rdParty/dlib)
|
||||
target_include_directories(dlib INTERFACE lib/3rdParty/dlib/include)
|
||||
endif()
|
||||
|
||||
# dlib library, allow specifying own or use the included one
|
||||
if(NOT DEFINED ${DLIB_INCLUDE_DIR})
|
||||
set(DLIB_INCLUDE_DIR lib/3rdParty/dlib)
|
||||
set(DLIB_LIBRARY ${CMAKE_BINARY_DIR}/lib/3rdParty/dlib/dlib/libdlib.a)
|
||||
add_subdirectory(lib/3rdParty/dlib)
|
||||
# suppress auto_ptr deprecation warnings
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
add_compile_options("-Wno-deprecated-declarations")
|
||||
endif()
|
||||
|
||||
include_directories(${DLIB_INCLUDE_DIR})
|
||||
|
||||
MESSAGE("DLIB information:")
|
||||
MESSAGE(" DLIB_INCLUDE_DIR: ${DLIB_INCLUDE_DIR}")
|
||||
MESSAGE(" DLIB libraries: ${DLIB_LIBRARY}")
|
||||
|
||||
# LandmarkDetector library
|
||||
add_subdirectory(lib/local/LandmarkDetector)
|
||||
# Facial Expression analysis library
|
||||
@@ -224,6 +165,76 @@ add_subdirectory(lib/local/FaceAnalyser)
|
||||
add_subdirectory(lib/local/GazeAnalyser)
|
||||
# Utilities library
|
||||
add_subdirectory(lib/local/Utilities)
|
||||
|
||||
# test if this file is a top list file
|
||||
# thus we're building an OpenFace as a standalone
|
||||
# project; otherwise OpenFace is being built as a
|
||||
# part or larger tree;
|
||||
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
# for a standalone builds - allow installing package configs;
|
||||
message(STATUS "Standalone mode detected; Enabling configuration/targets export.")
|
||||
|
||||
# export libraries for reuse
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
set(LIB_INSTALL_DIR lib)
|
||||
set(CONFIG_DEST_DIR ${LIB_INSTALL_DIR}/cmake/OpenFace/)
|
||||
set(OpenFace_LIBRARIES OpenFace::GazeAnalyser OpenFace::FaceAnalyser OpenFace::LandmarkDetector OpenFace::Utilities)
|
||||
|
||||
# export targets [build tree]
|
||||
export(EXPORT OpenFaceTargets
|
||||
NAMESPACE OpenFace::
|
||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_DEST_DIR}/OpenFaceTargets.cmake")
|
||||
|
||||
# write package version file
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_DEST_DIR}/OpenFaceConfigVersion.cmake"
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
|
||||
# define [build tree] bindir relative include dir
|
||||
foreach(lib ${OpenFace_LIBRARIES})
|
||||
if(TARGET ${lib})
|
||||
get_target_property(libname ${lib} "NAME")
|
||||
file(RELATIVE_PATH rel_incdir ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/lib/local/${libname}/include")
|
||||
list(APPEND OPENFACE_INCLUDE_DIRS ${rel_incdir})
|
||||
endif()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES OPENFACE_INCLUDE_DIRS)
|
||||
|
||||
# write package config file from template [build tree]
|
||||
# all PATH_VARS should be relative to a ${CMAKE_CURRENT_BINARY_DIR}
|
||||
# as it's the "prefix" of our non installed package in the build tree
|
||||
configure_package_config_file(cmake/OpenFaceConfig.cmake.in
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_DEST_DIR}/OpenFaceConfig.cmake"
|
||||
INSTALL_DESTINATION ${CONFIG_DEST_DIR}
|
||||
PATH_VARS OPENFACE_INCLUDE_DIRS)
|
||||
|
||||
# store current build dir in the CMake package registry
|
||||
# export(PACKAGE OpenFace)
|
||||
|
||||
# install exported targets [install tree]
|
||||
install(EXPORT OpenFaceTargets
|
||||
FILE OpenFaceTargets.cmake
|
||||
NAMESPACE OpenFace::
|
||||
DESTINATION ${CONFIG_DEST_DIR})
|
||||
|
||||
# redefine [install tree] prefix relative include dir
|
||||
set(OPENFACE_INCLUDE_DIRS "include/OpenFace")
|
||||
|
||||
# write package config file from template [install tree]
|
||||
configure_package_config_file(cmake/OpenFaceConfig.cmake.in
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/OpenFace/OpenFaceConfig.cmake"
|
||||
INSTALL_DESTINATION ${CONFIG_DEST_DIR}
|
||||
PATH_VARS OPENFACE_INCLUDE_DIRS)
|
||||
|
||||
# install package configs
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/OpenFace/OpenFaceConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_DEST_DIR}/OpenFaceConfigVersion.cmake"
|
||||
DESTINATION ${CONFIG_DEST_DIR})
|
||||
endif()
|
||||
|
||||
# executables
|
||||
add_subdirectory(exe/FaceLandmarkImg)
|
||||
add_subdirectory(exe/FaceLandmarkVid)
|
||||
|
||||
@@ -1,25 +1,10 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
include_directories(../../lib/3rdParty/OpenBLAS/include)
|
||||
|
||||
# Local libraries
|
||||
include_directories(${LandmarkDetector_SOURCE_DIR}/include)
|
||||
|
||||
include_directories(../../lib/local/LandmarkDetector/include)
|
||||
include_directories(../../lib/local/FaceAnalyser/include)
|
||||
include_directories(../../lib/local/GazeAnalyser/include)
|
||||
include_directories(../../lib/local/Utilities/include)
|
||||
|
||||
add_executable(FaceLandmarkImg FaceLandmarkImg.cpp)
|
||||
target_link_libraries(FaceLandmarkImg LandmarkDetector)
|
||||
target_link_libraries(FaceLandmarkImg FaceAnalyser)
|
||||
target_link_libraries(FaceLandmarkImg GazeAnalyser)
|
||||
target_link_libraries(FaceLandmarkImg Utilities)
|
||||
|
||||
target_link_libraries(FaceLandmarkImg ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(FaceLandmarkImg ${DLIB_LIBRARY})
|
||||
|
||||
install (TARGETS FaceLandmarkImg DESTINATION bin)
|
||||
install (TARGETS FaceLandmarkImg DESTINATION bin)
|
||||
@@ -1,27 +1,10 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
include_directories(../../lib/3rdParty/OpenBLAS/include)
|
||||
|
||||
add_executable(FaceLandmarkVid FaceLandmarkVid.cpp)
|
||||
|
||||
# Local libraries
|
||||
include_directories(${LandmarkDetector_SOURCE_DIR}/include)
|
||||
|
||||
include_directories(../../lib/local/LandmarkDetector/include)
|
||||
include_directories(../../lib/local/FaceAnalyser/include)
|
||||
include_directories(../../lib/local/GazeAnalyser/include)
|
||||
include_directories(../../lib/local/Utilities/include)
|
||||
|
||||
|
||||
add_executable(FaceLandmarkVid FaceLandmarkVid.cpp)
|
||||
target_link_libraries(FaceLandmarkVid LandmarkDetector)
|
||||
target_link_libraries(FaceLandmarkVid FaceAnalyser)
|
||||
target_link_libraries(FaceLandmarkVid GazeAnalyser)
|
||||
target_link_libraries(FaceLandmarkVid Utilities)
|
||||
|
||||
target_link_libraries(FaceLandmarkVid ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(FaceLandmarkVid ${DLIB_LIBRARY})
|
||||
|
||||
install (TARGETS FaceLandmarkVid DESTINATION bin)
|
||||
install (TARGETS FaceLandmarkVid DESTINATION bin)
|
||||
@@ -1,25 +1,10 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
include_directories(../../lib/3rdParty/OpenBLAS/include)
|
||||
|
||||
# Local libraries
|
||||
include_directories(${LandmarkDetector_SOURCE_DIR}/include)
|
||||
|
||||
include_directories(../../lib/local/LandmarkDetector/include)
|
||||
include_directories(../../lib/local/FaceAnalyser/include)
|
||||
include_directories(../../lib/local/GazeAnalyser/include)
|
||||
include_directories(../../lib/local/Utilities/include)
|
||||
|
||||
add_executable(FaceLandmarkVidMulti FaceLandmarkVidMulti.cpp)
|
||||
target_link_libraries(FaceLandmarkVidMulti LandmarkDetector)
|
||||
target_link_libraries(FaceLandmarkVidMulti FaceAnalyser)
|
||||
target_link_libraries(FaceLandmarkVidMulti GazeAnalyser)
|
||||
target_link_libraries(FaceLandmarkVidMulti Utilities)
|
||||
|
||||
target_link_libraries(FaceLandmarkVidMulti ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(FaceLandmarkVidMulti ${DLIB_LIBRARY})
|
||||
|
||||
install (TARGETS FaceLandmarkVidMulti DESTINATION bin)
|
||||
install (TARGETS FaceLandmarkVidMulti DESTINATION bin)
|
||||
@@ -1,27 +1,10 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
include_directories(../../lib/3rdParty/OpenBLAS/include)
|
||||
|
||||
add_executable(FeatureExtraction FeatureExtraction.cpp)
|
||||
|
||||
# Local libraries
|
||||
include_directories(${LandmarkDetector_SOURCE_DIR}/include)
|
||||
|
||||
include_directories(../../lib/local/LandmarkDetector/include)
|
||||
include_directories(../../lib/local/FaceAnalyser/include)
|
||||
include_directories(../../lib/local/GazeAnalyser/include)
|
||||
include_directories(../../lib/local/Utilities/include)
|
||||
|
||||
|
||||
add_executable(FeatureExtraction FeatureExtraction.cpp)
|
||||
target_link_libraries(FeatureExtraction LandmarkDetector)
|
||||
target_link_libraries(FeatureExtraction FaceAnalyser)
|
||||
target_link_libraries(FeatureExtraction GazeAnalyser)
|
||||
target_link_libraries(FeatureExtraction Utilities)
|
||||
target_link_libraries(FeatureExtraction dlib)
|
||||
|
||||
target_link_libraries(FeatureExtraction ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(FeatureExtraction ${DLIB_LIBRARY})
|
||||
|
||||
install (TARGETS FeatureExtraction DESTINATION bin)
|
||||
install (TARGETS FeatureExtraction DESTINATION bin)
|
||||
@@ -1,14 +1,3 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
include_directories(${DLIB_INCLUDE_DIR})
|
||||
|
||||
include_directories(${BOOST_INCLUDE_DIR})
|
||||
include_directories(${DLIB_INCLUDE_DIR})
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(../../3rdParty/OpenBLAS/include)
|
||||
|
||||
#LandmarkDetector library
|
||||
include_directories(../../local/LandmarkDetector/include)
|
||||
|
||||
@@ -35,10 +24,28 @@ SET(HEADERS
|
||||
include/SVR_static_lin_regressors.h
|
||||
)
|
||||
|
||||
include_directories(./include)
|
||||
include_directories(${FACEANALYSER_SOURCE_DIR}/include)
|
||||
|
||||
add_library( FaceAnalyser ${SOURCE} ${HEADERS})
|
||||
add_library( OpenFace::FaceAnalyser ALIAS FaceAnalyser)
|
||||
|
||||
install (TARGETS FaceAnalyser DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
target_include_directories(FaceAnalyser PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/OpenFace>)
|
||||
|
||||
target_include_directories(FaceAnalyser PRIVATE ${FACEANALYSER_SOURCE_DIR}/include)
|
||||
target_include_directories(FaceAnalyser PUBLIC ${TBB_ROOT_DIR}/include)
|
||||
target_include_directories(FaceAnalyser PUBLIC ${Boost_INCLUDE_DIRS})
|
||||
target_include_directories(FaceAnalyser PUBLIC ${Boost_INCLUDE_DIRS}/boost)
|
||||
target_include_directories(FaceAnalyser PUBLIC ${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(FaceAnalyser PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(FaceAnalyser PUBLIC dlib)
|
||||
|
||||
if(${BLAS_FOUND})
|
||||
target_include_directories(FaceAnalyser PRIVATE ${BLAS_ROOT_DIR})
|
||||
else()
|
||||
target_include_directories(FaceAnalyser PRIVATE ../../3rdParty/OpenBLAS/include)
|
||||
endif()
|
||||
|
||||
install (TARGETS FaceAnalyser EXPORT OpenFaceTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
@@ -1,15 +1,3 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
|
||||
include_directories(${BOOST_INCLUDE_DIR})
|
||||
|
||||
include_directories(${DLIB_INCLUDE_DIR})
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(../../3rdParty/OpenBLAS/include)
|
||||
|
||||
#LandmarkDetector library
|
||||
include_directories(../../local/LandmarkDetector/include)
|
||||
|
||||
@@ -24,10 +12,27 @@ SET(HEADERS
|
||||
include/GazeEstimation.h
|
||||
)
|
||||
|
||||
include_directories(./include)
|
||||
include_directories(${GazeAnalyser_SOURCE_DIR}/include)
|
||||
add_library( GazeAnalyser ${SOURCE} ${HEADERS})
|
||||
add_library( OpenFace::GazeAnalyser ALIAS GazeAnalyser)
|
||||
|
||||
add_library( GazeAnalyser ${SOURCE} ${HEADERS} )
|
||||
target_include_directories(GazeAnalyser PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/OpenFace>)
|
||||
|
||||
install (TARGETS GazeAnalyser DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
target_include_directories(GazeAnalyser PRIVATE ${GAZEANALYSER_SOURCE_DIR}/include)
|
||||
target_include_directories(GazeAnalyser PUBLIC ${TBB_ROOT_DIR}/include)
|
||||
target_include_directories(GazeAnalyser PUBLIC ${Boost_INCLUDE_DIRS})
|
||||
target_include_directories(GazeAnalyser PUBLIC ${Boost_INCLUDE_DIRS}/boost)
|
||||
target_include_directories(GazeAnalyser PUBLIC ${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(GazeAnalyser PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(GazeAnalyser PUBLIC dlib)
|
||||
|
||||
if(${BLAS_FOUND})
|
||||
target_include_directories(GazeAnalyser PRIVATE ${BLAS_ROOT_DIR})
|
||||
else()
|
||||
target_include_directories(GazeAnalyser PRIVATE ../../3rdParty/OpenBLAS/include)
|
||||
endif()
|
||||
|
||||
install (TARGETS GazeAnalyser EXPORT OpenFaceTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
@@ -1,12 +1,3 @@
|
||||
#TBB library
|
||||
include_directories(${TBB_ROOT_DIR}/include)
|
||||
include_directories(${BLAS_ROOT_DIR})
|
||||
|
||||
include_directories(${BOOST_INCLUDE_DIR})
|
||||
include_directories(${DLIB_INCLUDE_DIR})
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(../../3rdParty/OpenBLAS/include)
|
||||
|
||||
#Utilities library
|
||||
include_directories(../../local/Utilities/include)
|
||||
@@ -46,10 +37,27 @@ SET(HEADERS
|
||||
include/stdafx.h
|
||||
)
|
||||
|
||||
include_directories(./include)
|
||||
include_directories(${LandmarkDetector_SOURCE_DIR}/include)
|
||||
|
||||
add_library( LandmarkDetector ${SOURCE} ${HEADERS} )
|
||||
add_library( OpenFace::LandmarkDetector ALIAS LandmarkDetector)
|
||||
|
||||
install (TARGETS LandmarkDetector DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
target_include_directories(LandmarkDetector PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/OpenFace>)
|
||||
|
||||
target_include_directories(LandmarkDetector PRIVATE ${LandmarkDetector_SOURCE_DIR}/include)
|
||||
target_include_directories(LandmarkDetector PUBLIC ${TBB_ROOT_DIR}/include)
|
||||
target_include_directories(LandmarkDetector PUBLIC ${Boost_INCLUDE_DIRS})
|
||||
target_include_directories(LandmarkDetector PUBLIC ${Boost_INCLUDE_DIRS}/boost)
|
||||
target_include_directories(LandmarkDetector PUBLIC ${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(LandmarkDetector PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES})
|
||||
target_link_libraries(LandmarkDetector PUBLIC dlib)
|
||||
|
||||
if(${BLAS_FOUND})
|
||||
target_include_directories(LandmarkDetector PRIVATE ${BLAS_ROOT_DIR})
|
||||
else()
|
||||
target_include_directories(LandmarkDetector PRIVATE ../../3rdParty/OpenBLAS/include)
|
||||
endif()
|
||||
|
||||
install (TARGETS LandmarkDetector EXPORT OpenFaceTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
@@ -455,7 +455,12 @@ void CLNF::Read(string main_location)
|
||||
|
||||
this->hierarchical_model_names.push_back(part_name);
|
||||
|
||||
FaceModelParameters params;
|
||||
// Making sure we look based on model directory
|
||||
std::string root_loc = boost::filesystem::path(main_location).parent_path().string();
|
||||
std::vector<string> sub_arguments{ root_loc };
|
||||
|
||||
FaceModelParameters params(sub_arguments);
|
||||
|
||||
params.validate_detections = false;
|
||||
params.refine_hierarchical = false;
|
||||
params.refine_parameters = false;
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
include_directories(${BOOST_INCLUDE_DIR})
|
||||
include_directories(${DLIB_INCLUDE_DIR})
|
||||
|
||||
#OpenBlas library
|
||||
include_directories(../../3rdParty/OpenBLAS/include)
|
||||
|
||||
|
||||
SET(SOURCE
|
||||
src/ImageCapture.cpp
|
||||
src/RecorderCSV.cpp
|
||||
@@ -27,10 +20,21 @@ SET(HEADERS
|
||||
include/Visualizer.h
|
||||
)
|
||||
|
||||
include_directories(./include)
|
||||
include_directories(${UTILITIES_SOURCE_DIR}/include)
|
||||
|
||||
add_library( Utilities ${SOURCE} ${HEADERS})
|
||||
add_library( OpenFace::Utilities ALIAS Utilities)
|
||||
|
||||
install (TARGETS Utilities DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
target_include_directories(Utilities PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/OpenFace>)
|
||||
|
||||
target_include_directories(Utilities PRIVATE ${UTILITIES_SOURCE_DIR}/include)
|
||||
target_include_directories(Utilities PUBLIC ${TBB_ROOT_DIR}/include)
|
||||
target_include_directories(Utilities PUBLIC ${Boost_INCLUDE_DIRS})
|
||||
target_include_directories(Utilities PUBLIC ${Boost_INCLUDE_DIRS}/boost)
|
||||
target_include_directories(Utilities PUBLIC ${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(Utilities PUBLIC ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES})
|
||||
target_link_libraries(Utilities PUBLIC dlib)
|
||||
|
||||
install (TARGETS Utilities EXPORT OpenFaceTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
|
||||
install (FILES ${HEADERS} DESTINATION include/OpenFace)
|
||||
Reference in New Issue
Block a user