patrikhuber / eos Goto Github PK
View Code? Open in Web Editor NEWA lightweight 3D Morphable Face Model library in modern C++
License: Apache License 2.0
A lightweight 3D Morphable Face Model library in modern C++
License: Apache License 2.0
Hello,
First of all thank you for offering this code!
I have no particular programming experience, so I'm having issues getting it to work:
I tried in Visual Studio, and managed to get it all built up, but when I try to run the fit-model.exe, I get a debug error saying abort() has been called...
Could it be because I tried to build it in x64?
I've also tried using MinGW, but I get this error at the beginning during the make && make install step:
Scanning dependencies of target fit-model
[ 25%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.obj
In file included from C:\MinGW\include/windef.h:253:0,
from C:\MinGW\include/excpt.h:20,
from C:\MinGW\include/boost/archive/archive_exception.hpp:31,
from C:\MinGW\include/boost/multi_index/detail/index_node_base.hpp:21,
from C:\MinGW\include/boost/multi_index/detail/node_type.hpp:23,
from C:\MinGW\include/boost/multi_index/detail/index_base.hpp:25,
from C:\MinGW\include/boost/multi_index/detail/base_type.hpp:21,
from C:\MinGW\include/boost/multi_index_container.hpp:34,
from C:\MinGW\include/boost/property_tree/ptree.hpp:21,
from C:/Users/roger/Desktop/eos/include/eos/core/LandmarkMapper.hpp:27,
from C:\Users\roger\Desktop\eos\examples\fit-model.cpp:21:
C:\MinGW\include/winnt.h:2399:2: error: #error "undefined processor type"
#error "undefined processor type"
^~~~~
Then it keeps going for a while and finishes with this:
In file included from C:/Users/roger/Desktop/eos/include/eos/render/texture_extraction.hpp:35:0,
from C:\Users\roger\Desktop\eos\examples\fit-model.cpp:25:
c:\mingw\include\c++\6.1.0\future: At global scope:
c:\mingw\include\c++\6.1.0\future:183:5: error: 'std::future<typename std::result_of<typename std::decay<_Tp>::type(typename std::decay<_BoundArgs>::type ...)>::type> std::async(_Fn&&, _Args&& ...) [with _Fn = eos::render::extract_texture(eos::render::Mesh, cv::Mat, cv::Mat, cv::Mat, bool, eos::render::TextureInterpolation, int)::<lambda()>&; _Args = {}; typename std::result_of<typename std::decay<_Tp>::type(typename std::decay<_BoundArgs>::type ...)>::type = void]', declared using local type 'eos::render::extract_texture(eos::render::Mesh, cv::Mat, cv::Mat, cv::Mat, bool, eos::render::TextureInterpolation, int)::<lambda()>', is used but never defined [-fpermissive]
async(_Fn&& __fn, _Args&&... __args);
^~~~~
make[2]: *** [examples\CMakeFiles\fit-model.dir\build.make:63: examples/CMakeFiles/fit-model.dir/fit-model.cpp.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:119: examples/CMakeFiles/fit-model.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
I am not sure what I'm doing wrong... Could you help me fix those or give me advice (like for a complete beginner) as to how to make it work without errors?
Thank you,
Roger.
PS: I have Windows 10, x64.
when i tried to build dev branch "https://github.com/patrikhuber/eos/tree/devel/utils"
the below error message triggered, you have any idea how to resolve this issue?
What is the role of PCA and why do we need to apply PCA shape and texture model in eos in just simple words.can you explain it in a non-mathematical way,I read about pca in data mining course and I understand it,but I want to know how does it works in eos and how does it apply on the 3D face scans?
I strongly believe that
you do not really understand something unless you can explain it to your grandmother -- Albert Einstein
Well I can't explain it to layman
Can you explain it in simple words without using mathematical equations so that I will get the purpose of pca in eos as general........suppose that you are explaining this to a layman.
Not all methods inlined.
This is "headers only" library, and not inlined methods cause errors like "method already defined".
When using the low-resolution model and extracting the isomap, there's a black line in the middle of the face. Investigate and fix it.
Maybe a glitch in the texture coordinates or a rounding issue in the conversion from the CVSSP file.
Apparently, we can achieve a notable performance improvement by changing the current code:
const float sigma_squared_2D_inv = 1.0f / std::sqrt(sigma_squared_2D);
Mat Sigma = Mat::zeros(num_landmarks3, num_landmarks3, CV_32FC1);
for (int i = 0; i < num_landmarks3; ++i) {
Sigma.at<float>(i, i) = sigma_squared_2D_inv; // the higher the sigma_squared_2D, the smaller the diagonal entries of Sigma will be
}
Mat Omega = Sigma.t() * Sigma; // just squares the diagonal
to
const float sigma_squared_2D_inv = 1.0f / sigma_squared_2D;
Mat Omega = Mat::zeros(num_landmarks3, num_landmarks3, CV_32FC1);
for (int i = 0; i < num_landmarks3; ++i) {
Omega.at<float>(i, i) = sigma_squared_2D_inv; // the higher the sigma_squared_2D, the smaller the diagonal entries of Sigma will be
}
I haven't had a look at the code yet, but definitely need to. It's probably trivial.
Hi, in VISAPP paper mentioned script for convertion of Basel model to format accepted in this application. Was it published somewere ?
Hi,
Thanks for your shared Model and the published software framework.
You writed that after signing licence agreement ,we can apply for the others model( for example :the full surrey face model ) in your paper.
But i can not access to the website: http://cvssp.org/facemodel
How to apply for the others model?
Thanks very much.
Hi, Patrik! I am wondering if the isomap output is a way for obj file viewer to see the texture? Is there a way to visualise the 3D model directly(like utilising the openGL function)?
// This is not an issue, but I don't know where to put it.
Hi,
Thank you very much for sharing your research.I try to use myself landmark predictor ,it can get
a .pts file of the 2D image landmark,due to it outputs different points, i don't know how to map my landmark point onto 3D reference face model, and how to get the coordinate of 3D reference face modle.
your work is great ! thank you.But,more example is needed for beginer. Could you give us a example about the function:
std::pair<cv::Mat, cv::Mat> render(Mesh mesh, cv::Mat model_view_matrix, cv::Mat projection_matrix, int viewport_width, int viewport_height, const boost::optional<Texture>& texture = boost::none, bool enable_backface_culling = false, bool enable_near_clipping = true, bool enable_far_clipping = true)
.
thanks again.
Hello,
can you please provide the derivatives/jacobians for non liner camera refinement.
i was wondering if i can refine the liner camera estimate result but it seems to be no that simple.
thanx in advance!
how many different types of faces are included in "sfm_shape_3448" dataset. some indians face shapes are not match with output model. (specially female triangular shape face)
Types of face shape : Oblong faces, Heart faces, Square faces, Oval faces, round faces, Triangular faces, Diamond Faces
did you covered all these types of shapes?
Should we cite "Fitting 3D Morphable Models using Local Features" or "A multiresolution 3D Morphable face model and fitting framework" for using this code.
Scanning dependencies of target fit-model
[ 50%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o
Linking CXX executable fit-model
CMakeFiles/fit-model.dir/fit-model.cpp.o: In function main': fit-model.cpp:(.text+0x8319): undefined reference to
boost::program_options::options_description::options_description(std::string const&, unsigned int, unsigned int)'
fit-model.cpp:(.text+0x9105): undefined reference to boost::filesystem::path::replace_extension(boost::filesystem::path const&)' fit-model.cpp:(.text+0x918c): undefined reference to
boost::filesystem::path::stem() const'
fit-model.cpp:(.text+0x919f): undefined reference to boost::filesystem::path::stem() const' CMakeFiles/fit-model.dir/fit-model.cpp.o: In function
__static_initialization_and_destruction_0(int, int)':
fit-model.cpp:(.text+0xa8a5): undefined reference to boost::system::generic_category()' fit-model.cpp:(.text+0xa8b1): undefined reference to
boost::system::generic_category()'
fit-model.cpp:(.text+0xa8bd): undefined reference to `boost::system::system_category()'
make is error,why?
Hello
Firstly, thank you so much for offering your code.
I tried to run the code on Visual Studio 2015 update 3 (Windows 7 64bit). But when I tried to run the example, I got a 49 debug errors saying that :
Severity Code Description Project File Line Suppression State
Error LNK1104 cannot open file 'boost_program_options-vc140-mt-gd-1_58.lib' fit-model C:\phd\codes\eos-master (1)\eos-master\build\examples\LINK 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) class boost::system::error_category const & __cdecl boost::system::system_category(void)" (_imp?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::dynamic initializer for 'native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1 Error LNK2019 unresolved external symbol "__declspec(dllimport) class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (__imp_?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::
dynamic initializer for 'errno_ecat''(void)" (??__Eerrno_ecat@system@boost@@yaxxz) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class std::codecvt<wchar_t,char,struct _Mbstatet> const &)" (_imp?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@v?$allocator@_W@2@@std@@aebv?$codecvt@_WDU_Mbstatet@@@5@@z) referenced in function "void __cdecl boost::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &)" (?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@v?$allocator@_W@2@@std@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::filesystem::path::path(void)" (_imp??0path@filesystem@boost@@qeaa@XZ) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::filesystem::path::path(class boost::filesystem::path const &)" (_imp??0path@filesystem@boost@@qeaa@AEBV012@@z) referenced in function "class eos::morphablemodel::MorphableModel __cdecl eos::morphablemodel::load_scm_model(class boost::filesystem::path,class boost::filesystem::path)" (?load_scm_model@morphablemodel@eos@@ya?AVMorphableModel@12@Vpath@filesystem@boost@@0@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class boost::filesystem::path & __cdecl boost::filesystem::path::operator=(class boost::filesystem::path const &)" (_imp??4path@filesystem@boost@@QEAAAEAV012@AEBV012@@z) referenced in function "public: virtual void __cdecl boost::program_options::typed_value<class boost::filesystem::path,char>::notify(class boost::any const &)const " (?notify@?$typed_value@Vpath@filesystem@boost@@d@program_options@boost@@UEBAXAEBVany@3@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits,class std::allocator > const __cdecl boost::filesystem::path::string(void)const " (_imp?string@path@filesystem@boost@@qeba?BV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@xz) referenced in function "class std::vector<class cv::Vec<float,2>,class std::allocator<class cv::Vec<float,2> > > __cdecl eos::morphablemodel::load_isomap(class boost::filesystem::path)" (?load_isomap@morphablemodel@eos@@ya?AV?$vector@V?$Vec@M$01@cv@@v?$allocator@V?$Vec@M$01@cv@@@std@@@std@@VPath@filesystem@boost@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: bool __cdecl boost::filesystem::path::empty(void)const " (_imp?empty@path@filesystem@boost@@QEBA_NXZ) referenced in function "class eos::morphablemodel::MorphableModel __cdecl eos::morphablemodel::load_scm_model(class boost::filesystem::path,class boost::filesystem::path)" (?load_scm_model@morphablemodel@eos@@ya?AVMorphableModel@12@Vpath@filesystem@boost@@0@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: static class std::codecvt<wchar_t,char,struct _Mbstatet> const & __cdecl boost::filesystem::path::codecvt(void)" (_imp?codecvt@path@filesystem@boost@@SAAEBV?$codecvt@_WDU_Mbstatet@@@std@@xz) referenced in function "void __cdecl boost::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &)" (?convert@path_traits@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@v?$allocator@_W@2@@std@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::filesystem::path::~path(void)" (_imp??1path@filesystem@boost@@qeaa@XZ) referenced in function "class std::vector<class cv::Vec<float,2>,class std::allocator<class cv::Vec<float,2> > > __cdecl eos::morphablemodel::load_isomap(class boost::filesystem::path)" (?load_isomap@morphablemodel@eos@@ya?AV?$vector@V?$Vec@M$01@cv@@v?$allocator@V?$Vec@M$01@cv@@@std@@@std@@VPath@filesystem@boost@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::validation_error::validation_error(enum boost::program_options::validation_error::kind_t,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,int)" (_imp??0validation_error@program_options@boost@@qeaa@W4kind_t@012@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@1h@Z) referenced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl boost::program_options::validators::get_single_string(class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,bool)" (??$get_single_string@D@validators@program_options@boost@@YAAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@aebv?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@4@_N@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: virtual __cdecl boost::program_options::validation_error::~validation_error(void)" (_imp??1validation_error@program_options@boost@@UEAA@XZ) referenced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > const & __cdecl boost::program_options::validators::get_single_string(class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,bool)" (??$get_single_string@D@validators@program_options@boost@@YAAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@aebv?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@4@_N@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::validation_error::validation_error(class boost::program_options::validation_error const &)" (_imp??0validation_error@program_options@boost@@qeaa@AEBV012@@z) referenced in function "public: __cdecl boost::exception_detail::error_info_injector::error_info_injector(struct boost::exception_detail::error_info_injector const &)" (??0?$error_info_injector@Vvalidation_error@program_options@boost@@@exception_detail@boost@@qeaa@AEBU012@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::invalid_option_value::invalid_option_value(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (_imp??0invalid_option_value@program_options@boost@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) referenced in function __catch$??$validate@Vpath@filesystem@boost@@d@program_options@boost@@YAXAEAVany@1@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@PEAVpath@filesystem@1@J@Z$0 scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::invalid_option_value::invalid_option_value(class boost::program_options::invalid_option_value const &)" (_imp??0invalid_option_value@program_options@boost@@qeaa@AEBV012@@z) referenced in function "public: __cdecl boost::exception_detail::error_info_injector::error_info_injector(struct boost::exception_detail::error_info_injector const &)" (??0?$error_info_injector@Vinvalid_option_value@program_options@boost@@@exception_detail@boost@@qeaa@AEBU012@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::value_semantic_codecvt_helper::value_semantic_codecvt_helper(void)" (_imp??0?$value_semantic_codecvt_helper@D@program_options@boost@@qeaa@XZ) referenced in function "public: __cdecl boost::program_options::typed_value<class boost::filesystem::path,char>::typed_value<class boost::filesystem::path,char>(class boost::filesystem::path *)" (??0?$typed_value@Vpath@filesystem@boost@@d@program_options@boost@@qeaa@PEAVpath@filesystem@2@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: virtual __cdecl boost::program_options::value_semantic_codecvt_helper::~value_semantic_codecvt_helper(void)" (_imp??1?$value_semantic_codecvt_helper@D@program_options@boost@@UEAA@XZ) referenced in function "int public: __cdecl boost::program_options::typed_value<class boost::filesystem::path,char>::typed_value<class boost::filesystem::path,char>(class program_options::filesystem::path *)'::
1'::dtor$0" (?dtor$0@?0???0?$typed_value@Vpath@filesystem@boost@@d@program_options@boost@@qeaa@PEAVpath@filesystem@2@@z@4HA) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl boost::program_options::validators::check_first_occurrence(class boost::any const &)" (_imp?check_first_occurrence@validators@program_options@boost@@YAXAEBVany@3@@z) referenced in function "void __cdecl boost::program_options::validate<class boost::filesystem::path,char>(class boost::any &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,class boost::filesystem::path *,long)" (??$validate@Vpath@filesystem@boost@@d@program_options@boost@@YAXAEAVany@1@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@PEAVpath@filesystem@1@J@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl boost::program_options::validate(class boost::any &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,bool *,int)" (_imp?validate@program_options@boost@@YAXAEAVany@2@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@PEA_NH@Z) referenced in function "public: virtual void __cdecl boost::program_options::typed_value<bool,char>::xparse(class boost::any &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &)const " (?xparse@?$typed_value@_ND@program_options@boost@@UEBAXAEAVany@3@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class boost::program_options::options_description_easy_init & __cdecl boost::program_options::options_description_easy_init::operator()(char const *,class boost::program_options::value_semantic const *,char const *)" (_imp??Roptions_description_easy_init@program_options@boost@@QEAAAEAV012@PEBDPEBVvalue_semantic@12@0@Z) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::options_description::options_description(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,unsigned int,unsigned int)" (_imp??0options_description@program_options@boost@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@ii@Z) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class boost::program_options::options_description_easy_init __cdecl boost::program_options::options_description::add_options(void)" (_imp?add_options@options_description@program_options@boost@@qeaa?AVoptions_description_easy_init@23@XZ) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits > & __cdecl boost::program_options::operator<<(class std::basic_ostream<char,struct std::char_traits > &,class boost::program_options::options_description const &)" (_imp??6program_options@boost@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@AEBVoptions_description@01@@z) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::options_description::~options_description(void)" (_imp??1options_description@program_options@boost@@qeaa@XZ) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::detail::cmdline::cmdline(class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &)" (_imp??0cmdline@detail@program_options@boost@@qeaa@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@@z) referenced in function "public: __cdecl boost::program_options::basic_command_line_parser::basic_command_line_parser(int,char const * const * const)" (??0?$basic_command_line_parser@D@program_options@boost@@qeaa@HQEBQEBD@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: int __cdecl boost::program_options::detail::cmdline::get_canonical_option_prefix(void)" (_imp?get_canonical_option_prefix@cmdline@detail@program_options@boost@@QEAAHXZ) referenced in function "public: class boost::program_options::basic_parsed_options __cdecl boost::program_options::basic_command_line_parser::run(void)" (?run@?$basic_command_line_parser@D@program_options@boost@@qeaa?AV?$basic_parsed_options@D@23@XZ) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: void __cdecl boost::program_options::detail::cmdline::set_options_description(class boost::program_options::options_description const &)" (_imp?set_options_description@cmdline@detail@program_options@boost@@QEAAXAEBVoptions_description@34@@z) referenced in function "public: class boost::program_options::basic_command_line_parser & __cdecl boost::program_options::basic_command_line_parser::options(class boost::program_options::options_description const &)" (?options@?$basic_command_line_parser@D@program_options@boost@@QEAAAEAV123@AEBVoptions_description@23@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: class std::vector<class boost::program_options::basic_option,class std::allocator<class boost::program_options::basic_option > > __cdecl boost::program_options::detail::cmdline::run(void)" (_imp?run@cmdline@detail@program_options@boost@@qeaa?AV?$vector@V?$basic_option@D@program_options@boost@@v?$allocator@V?$basic_option@D@program_options@boost@@@std@@@std@@xz) referenced in function "public: class boost::program_options::basic_parsed_options __cdecl boost::program_options::basic_command_line_parser::run(void)" (?run@?$basic_command_line_parser@D@program_options@boost@@qeaa?AV?$basic_parsed_options@D@23@XZ) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::detail::cmdline::~cmdline(void)" (_imp??1cmdline@detail@program_options@boost@@qeaa@XZ) referenced in function "public: __cdecl boost::program_options::basic_command_line_parser::~basic_command_line_parser(void)" (??1?$basic_command_line_parser@D@program_options@boost@@qeaa@XZ) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl boost::program_options::to_internal(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (_imp?to_internal@program_options@boost@@ya?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV34@@z) referenced in function "class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > __cdecl boost::program_options::to_internal<class std::basic_string<char,struct std::char_traits,class std::allocator > >(class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &)" (??$to_internal@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@program_options@boost@@ya?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@AEBV23@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl boost::program_options::store(class boost::program_options::basic_parsed_options const &,class boost::program_options::variables_map &,bool)" (_imp?store@program_options@boost@@YAXAEBV?$basic_parsed_options@D@12@AEAVvariables_map@12@_N@Z) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) void __cdecl boost::program_options::notify(class boost::program_options::variables_map &)" (_imp?notify@program_options@boost@@YAXAEAVvariables_map@12@@z) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: unsigned __int64 __cdecl std::_Tree<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits,class std::allocator >,class boost::program_options::variable_value,struct std::less<class std::basic_string<char,struct std::char_traits,class std::allocator > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits,class std::allocator > const ,class boost::program_options::variable_value> >,0> >::count(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (_imp?count@?$_Tree@V?$_Tmap_traits@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@Vvariable_value@program_options@boost@@U?$less@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@Vvariable_value@program_options@boost@@@std@@@2@$0A@@std@@@std@@QEBA_KAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@2@@z) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __cdecl boost::program_options::variables_map::variables_map(void)" (_imp??0variables_map@program_options@boost@@qeaa@XZ) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2019 unresolved external symbol "__declspec(dllimport) public: virtual __cdecl boost::program_options::variables_map::~variables_map(void)" (_imp??1variables_map@program_options@boost@@UEAA@XZ) referenced in function main scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "public: __cdecl boost::program_options::error::error(class boost::program_options::error const &)" (??0error@program_options@boost@@qeaa@AEBV012@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "public: __cdecl boost::program_options::error_with_option_name::error_with_option_name(class boost::program_options::error_with_option_name const &)" (??0error_with_option_name@program_options@boost@@qeaa@AEBV012@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "public: __cdecl boost::program_options::invalid_option_value::invalid_option_value(class boost::program_options::invalid_option_value const &)" (??0invalid_option_value@program_options@boost@@qeaa@AEBV012@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "public: __cdecl boost::program_options::validation_error::validation_error(class boost::program_options::validation_error const &)" (??0validation_error@program_options@boost@@qeaa@AEBV012@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "private: virtual void __cdecl boost::program_options::value_semantic_codecvt_helper::parse(class boost::any &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,bool)const " (?parse@?$value_semantic_codecvt_helper@D@program_options@boost@@EEBAXAEAVany@3@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@std@@_N@Z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "public: virtual void __cdecl boost::program_options::error_with_option_name::set_option_name(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?set_option_name@error_with_option_name@program_options@boost@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "protected: virtual void __cdecl boost::program_options::error_with_option_name::substitute_placeholders(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)const " (?substitute_placeholders@error_with_option_name@program_options@boost@@MEBAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "public: virtual char const * __cdecl boost::program_options::error_with_option_name::what(void)const " (?what@error_with_option_name@program_options@boost@@UEBAPEBDXZ) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits,class std::allocator > boost::program_options::arg" (_imp?arg@program_options@boost@@3v?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@A) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
Error LNK2001 unresolved external symbol "__declspec(dllimport) public: static unsigned int const boost::program_options::options_description::m_default_line_length" (_imp?m_default_line_length@options_description@program_options@boost@@2IB) scm-to-cereal C:\phd\codes\eos-master (1)\eos-master\build\examples\scm-to-cereal.obj 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
and 3 warnings saying that :
Severity Code Description Project File Line Suppression State
Warning LNK4272 library machine type 'X86' conflicts with target machine type 'x64' scm-to-cereal C:\boost_1_50_0\stage\lib\boost_system.lib 1
Warning LNK4272 library machine type 'X86' conflicts with target machine type 'x64' scm-to-cereal C:\boost_1_50_0\stage\lib\boost_filesystem.lib 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Although the Cmake configuration refers to Boost version: 1.58.0 as shows below:
Options:
BUILD_EXAMPLES: ON
BUILD_DOCUMENTATION: OFF
OpenCV ARCH: x64
OpenCV RUNTIME: vc14
OpenCV STATIC: OFF
Found OpenCV 2.4.12 in C:/opencv/install/x64/vc14/lib
You might need to add C:\opencv\install\x64\vc14\bin to your PATH to be able to run your applications.
OpenCV include dir found at C:/opencv/install/include;C:/opencv/install/include/opencv
OpenCV lib dir found at C:/opencv/install/x64/vc14/lib;C:/opencv/install/x64/vc14/lib
Boost version: 1.58.0
Found the following Boost libraries:
system
Boost found at C:/boost_1_58_0_for_vc14-64/boost_1_58_0-vc14_64/include
Eigen3 found: TRUE
Eigen3 include dir found at C:/eigen/eigen-eigen-bdd17ee3b1b3
Eigen3 version: 3.2.5
OpenCV 2.x detected
OpenCV ARCH: x64
OpenCV RUNTIME: vc14
OpenCV STATIC: OFF
Found OpenCV 2.4.12 in C:/opencv/install/x64/vc14/lib
You might need to add C:\opencv\install\x64\vc14\bin to your PATH to be able to run your applications.
OpenCV include dir found at C:/opencv/install/include;C:/opencv/install/include/opencv
OpenCV lib dir found at C:/opencv/install/x64/vc14/lib;C:/opencv/install/x64/vc14/lib
Boost version: 1.58.0
Found the following Boost libraries:
system
filesystem
program_options
Boost found at C:/boost_1_58_0_for_vc14-64/boost_1_58_0-vc14_64/include
Configuring done
Generating done
Regards
Hi Patrik,
I have added blendshape (expression_blendshapes_3448.bin) to PCA model using the below code.
i have read that output OBJ file in text editor, and there is no additional vertex appears in obj file. line count is same (13634).
But i can see some difference in model (mouth opened slightly), how to identify blendshapes are added in model, and how to test ?
find the attached output OBJ file
out.obj.zip
vector<float> fitted_coeffs = fitting::fit_shape_to_landmarks_linear(morphable_model, affine_from_ortho, image_points, vertex_indices);
vector<morphablemodel::Blendshape> blendshapes = morphablemodel::load_blendshapes(blendshapesfile.string());
vector<float> shape_coefficients, blendshape_coefficients;
Mat shape_instance = fitting::fit_shape_model(affine_from_ortho, morphable_model, blendshapes, image_points, vertex_indices, 10.0f, shape_coefficients, blendshape_coefficients);
render::Mesh mesh = morphable_model.draw_sample(fitted_coeffs, vector<float>());
auto merged_shape = morphable_model.get_shape_model().draw_sample(fitted_coeffs) + to_matrix(blendshapes) * Mat(blendshape_coefficients);
render::Mesh merged_mesh = morphablemodel::detail::sample_to_mesh(merged_shape, morphable_model.get_color_model().get_mean(), morphable_model.get_shape_model().get_triangle_list(), morphable_model.get_color_model().get_triangle_list(), morphable_model.get_texture_coordinates());
// Save the mesh as textured obj:
outputfile += fs::path(".obj");
render::write_textured_obj(merged_mesh, outputfile.string());
When i run the example I get all 3 files. out.isomap.png looks just fine if I open it with an image viewer, however when I load the obj file with meshlab or blender, the texture is completely black, even though the logs report successfully loading the texture. I couldn't get github to attach the files, so I uploaded them here: www.nebososo.com/out.zip
Hi,Patrickhuber:
Thanks for your shared model.
There is a problem when using anybody's 3D face(which is generated by your eos projects ) to fit a head frame model ( the size of the head frame is stable) .
The size of every people ’s face is different,so I think that I have to stretching the outside contour of the face for fitting the head frame model. But there are no mapping data between outside-contour landmarks and 3D model's vertex indexs in your ibug2did.txt.
Could you provide the mapping data of this part(1 to 8;10 to 17)?
Or could you tell me how to solve this problem if don't use the mapping data of outside contour?
Thanks very much!
Is the picture with .png is a common picture,and where can i get these pictures?Sorry for having so many questions.
Hi,
First of all so thanks for sharing your useful code. I'm going to fit 3d model of face into webcam stream in real-time. In the first frame, I've used of your SDM to find facial landmarks. Then I've passed its output to your Eos to construct 3d model of face. For other incoming frames I find facial landmarks again. Then transform the model to correct scale, position and angle. I've used of the Rendering parameters (from fitting::estimate_orthographic_camera) for model transformation. My Opengl code to renderScene is as follow:
void renderScene(void) {
-----------------------------
//Capture current frame
-----------------------------
RenderingParams = FindLandmarks_EstimateCamera(curFrame);
yaw_angle = glm::degrees(RenderingParams.r_y);
pitch_angle = glm::degrees(RenderingParams.r_x);
roll_angle = glm::degrees(RenderingParams.r_z);
trans_x = RenderingParams.t_x;
trans_y = RenderingParams.t_y;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-----------------------------
//render background image
-----------------------------
// set camera matrix
setCamera(camX, camY, camZ, 0, 0, 0);
// set the model matrix to the identity Matrix
setIdentityMatrix(modelMatrix, 4);
glRotate(roll_angle, 0.0f, 0.0f, 1.0f);
glRotate(yaw_angle, 0.0f, 1.0f, 0.0f);
glRotate(pitch_angle, 1.0f, 0.0f, 0.0f);
OrthoFrustum(RenderingParams.frustum.l, RenderingParams.frustum.r, RenderingParams.frustum.b, RenderingParams.frustum.t, 1, 1000);
-----------------------------
//render model
-----------------------------
glutSwapBuffers();
}
void OrthoFrustum(float l, float r, float b, float t, float n, float f) {
float aux[16];
setOrthoFrustum(aux, l, r, b, t, n, f);
multMatrix(modelMatrix, aux);
setModelMatrix();
}
void setOrthoFrustum(float *mat, float l, float r, float b, float t, float n, float f)
{
setIdentityMatrix(mat, 4);
mat[0] = 2 / (r - l);
mat[5] = 2 / (t - b);
mat[10] = -2 / (f - n);
mat[12] = -(r + l) / (r - l);
mat[13] = -(t + b) / (t - b);
mat[14] = -(f + n) / (f - n);
}
I have problem with speed. It is so slow which I can't see its transformation is correct or no. I found that it becomes slower and slower over time. I don't know if I'm in right way? Can I use these projects for real-time purpose? Is my Opengl code to transformation correct?
Regards,
Morteza
Hi Patrik,
I have created full head model (PCA model) and generated binary file as well (.bin file). i have used 20 different shape models for creating PCA binary file.
when i testing with fit-model command using my custom binary file (d123.bin), output model generated (obj) as same shape (same output) for all different shape picture (its look like mean model - average shape). i didn't see any difference between all output model
All landmark mappings are properly assign in "ibug2did.txt" file.
"./fit-model -m share/d123.bin -i face2.jpg -l face2.pts -p share/ibug2did.txt -o out"
you have any idea how to resolve this issue?
I was wondering why do estimate solution using inverse here:
https://github.com/patrikhuber/eos/blob/master/include/eos/fitting/linear_shape_fitting.hpp#L122
the system is positive definite matrix so it should be possible to solve it using LDLT/LLT without any inverse. its like 4-5x faster compared to inverse with SVD you are doing now.
Hi
I'm trying to build and install EOS on my ubuntu 14.04. I think all the dependencies are there but when I do make install, i get the following errors about OpenCV not found: Any ideas ?
Scanning dependencies of target fit-model [ 50%] Building CXX object examples/CMakeFiles/fit-model.dir/fit-model.cpp.o Linking CXX executable fit-model CMakeFiles/fit-model.dir/fit-model.cpp.o: In function
eos::render::draw_texcoords(eos::render::Mesh, cv::Mat)':
fit-model.cpp:(.text+0x2276): undefined reference to cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' fit-model.cpp:(.text+0x24ca): undefined reference to
cv::line(cv::InputOutputArray const&, cv::Point, cv::Point_, cv::Scalar_ const&, int, int, int)'
fit-model.cpp:(.text+0x271e): undefined reference to cv::line(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)' CMakeFiles/fit-model.dir/fit-model.cpp.o: In function
main':
fit-model.cpp:(.text+0x8c3f): undefined reference to cv::imread(cv::String const&, int)' fit-model.cpp:(.text+0x8ffe): undefined reference to
cv::rectangle(cv::InputOutputArray const&, cv::Point, cv::Point_, cv::Scalar_ const&, int, int, int)'
fit-model.cpp:(.text+0x96d9): undefined reference to cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' CMakeFiles/fit-model.dir/fit-model.cpp.o: In function
cv::String::String(char const_)':
fit-model.cpp:(.text.ZN2cv6StringC2EPKc[ZN2cv6StringC5EPKc]+0x4f): undefined reference to cv::String::allocate(unsigned long)' CMakeFiles/fit-model.dir/fit-model.cpp.o: In function
cv::String::~String()':
fit-model.cpp:(.text.ZN2cv6StringD2Ev[ZN2cv6StringD5Ev]+0x14): undefined reference to cv::String::deallocate()' CMakeFiles/fit-model.dir/fit-model.cpp.o: In function
cv::Mat::Mat(int, int, int, void, unsigned long)':
fit-model.cpp:(.text.ZN2cv3MatC2EiiiPvm[ZN2cv3MatC5EiiiPvm]+0x121): undefined reference to cv::error(int, cv::String const&, char const*, char const*, int)' fit-model.cpp:(.text._ZN2cv3MatC2EiiiPvm[_ZN2cv3MatC5EiiiPvm]+0x228): undefined reference to
cv::error(int, cv::String const&, char const, char const, int)'
CMakeFiles/fit-model.dir/fit-model.cpp.o: In function cv::String::String(std::string const&)': fit-model.cpp:(.text._ZN2cv6StringC2ERKSs[_ZN2cv6StringC5ERKSs]+0x69): undefined reference to
cv::String::allocate(unsigned long)'
CMakeFiles/fit-model.dir/fit-model.cpp.o: In function _ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi4EEEv': fit-model.cpp:(.text._ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi4EEEv[_ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi4EEEv]+0xc4): undefined reference to
cv::error(int, cv::String const&, char const, char const, int)'
CMakeFiles/fit-model.dir/fit-model.cpp.o: In function _ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi3EEEv': fit-model.cpp:(.text._ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi3EEEv[_ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi3EEEv]+0xc4): undefined reference to
cv::error(int, cv::String const&, char const, char const_, int)'
CMakeFiles/fit-model.dir/fit-model.cpp.o: In function _ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi2EEEv': fit-model.cpp:(.text._ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi2EEEv[_ZNK2cv3MatcvNS_3VecIT_XT0_EEEIfLi2EEEv]+0xc4): undefined reference to
cv::error(int, cv::String const&, char const_, char const_, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/fit-model] Error 1
make[1]: *** [examples/CMakeFiles/fit-model.dir/all] Error 2
`
The build info is listed below:
-- The C compiler identification is GNU 4.9.3 -- The CXX compiler identification is GNU 4.9.3 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Performing Test HAS_CXX14_FLAG -- Performing Test HAS_CXX14_FLAG - Success -- Options: -- BUILD_EXAMPLES: ON -- BUILD_DOCUMENTATION: OFF -- OpenCV include dir found at /usr/include/opencv;/usr/include -- OpenCV lib dir found at -- Boost version: 1.54.0 -- Found the following Boost libraries: -- system -- Boost found at /usr/include -- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") -- Eigen3 found: TRUE -- Eigen3 include dir found at /usr/include/eigen3 -- Eigen3 version: 3.2.0 -- OpenCV 2.x detected -- OpenCV include dir found at /usr/include/opencv;/usr/include -- OpenCV lib dir found at -- Boost version: 1.54.0 -- Found the following Boost libraries: -- system -- filesystem -- program_options -- Boost found at /usr/include -- Configuring done -- Generating done
estimate_orthographic_camera()
reportedly takes around 65ms to execute, which I believe is too much, it should be way faster. Have to measure & profile it on my system.
(the system in question is probably VS2013 x64)
This is more of a request. Could you make a video of the algorithm in action. There's a lot of work to get the library running and I'd like to see what I get before I go through all the fuss of installing it.
I found that the model does not look like me, and the nose is particularly high, so how to create my sfm_shape_3448.bin, I am Asian, or where can find Asian model.
Hi, in your code
morphablemodel::load_model(modelfile.string());
you used a .bin file to load the a Morphable Model.
I wonder what is inside the .bin file? Is it related to the reference.obj?
I am quite confused with that file.
Thanks
Hi patrikhuber,
I know this is a very basic question but I want know whats the difference between Morphable model and PCA model in simple words I am confused about these two terms can you please give me a little bit overview about these two terms and differentiate them and what they contains? also tell me about basel face model are they related with each others?
Thanks
Hi, thank you for your code, it has been very helpful to me.
But when I try to load my own pca model, I wonder how is your triangleList arranged?
Thanks alot for providing the library!! Could you please give some information about how this model was prepared. How many face scan does it has ?
Or some link which describes this Model.
That would be a great help.
I have successfully generate VS 2015 files using cmake by using this commands:
git clone https://github.com/patrikhuber/eos.git mkdir build && cd build cmake -G "<your favourite generator>" ../eos -DCMAKE_INSTALL_PREFIX=../install/
but when I run make && make install
It said "make: *** No targets specified and no makefile found. Stop."
I just can't figure it out how run install target.After running above commands I have successfully generate the build folder which has VS 2015 solution file etc. please help me.
Thanks
`
Hi Patrikhuber,
i want to create my own base face model with 5 sample obj 3D model, i am not familiar with MatLap software, do you have any guideline or tutorial to create base face model?
( or )
please describe with simple steps
Hi,
Please guide me to create PCA model from .ply or .obj file. I have full head model in obj format. I want to create PCA model from normal 3d model to implement into face-fit module.
Hi,
I'm using ubuntu 16.04, i got opencv 3.1, when i try to use "make && make install" i got this error:
"
[ 25%] Linking CXX executable fit-model
/usr/bin/ld: CMakeFiles/fit-model.dir/fit-model.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
examples/CMakeFiles/fit-model.dir/build.make:100: recipe for target 'examples/fit-model' failed
make[2]: *** [examples/fit-model] Error 1
CMakeFiles/Makefile2:119: recipe for target 'examples/CMakeFiles/fit-model.dir/all' failed
make[1]: *** [examples/CMakeFiles/fit-model.dir/all] Error 2
Makefile:150: recipe for target 'all' failed
make: *** [all] Error 2"
Can you help me to solve this please?
Thank you in advance.
Hi patrikhuber,
How to generate full head model from face image? how to create my own PCA model for input to fit-model tool.
Regards,
Sam
i tried to load PCA model by pca calculated data. i have the below PCA data to load PCA model
-Mean
-eigenvectors
-eigenvalues
PCA component - 7
Num of row (x,y,z,x,y,z..) - 15420
i need pca_basis to load PCA model, how to calculate PCA basis data, eigenvector is equal to PCA basis? but it's row wise pca component (like 7 x 15420) we need column wise pca component ( 15420 x 7)
PcaModel Constructor:
PcaModel(cv::Mat mean, cv::Mat pca_basis, cv::Mat eigenvalues, std::vector<std::array<int, 3>> triangle_list) : mean(mean), normalised_pca_basis(pca_basis), eigenvalues(eigenvalues), triangle_list(triangle_list)
Code:
eos::morphablemodel::PcaModel shapeModel(pt_mean, pt_eig_vecs, pt_eig_vals, triangleList);
Do I use the morphable model to fit the point cloud of face which got for stereo camera?
could you tell me the updated instructions to acquire the full model ?thanks
Hi,
i'm trying to use the fit-model, with other images but i coudn't make it, should i have any constraint on the inputs or how should i choose my inputs?
Thank you.
I've precompiled the required Boost and OpenCV libraries for VS 2015, as they're not available yet on their homepages:
They're compiled with SSE42 and I think AVX2 as well, so if you have an old CPU, you may run into trouble.
I'll keep this ticket open until VS2015 binaries are included in the Boost & OpenCV distributions.
Hi Patrik,
Thanks for sharing your codes. I'm trying to generate Visual Studio 2015 version of your code using CMake 3.3.1.
I've used your compiled Opencv and Boost libraries.
When I configure using CMake it fails with below error:
[Found the following Boost libraries:
system
Boost found at D:/boost_1_58_0-vc14_64/include
CMake Error at D:/Programming/Programming_Morteza/cmake_3.3/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
(Required is at least version "2.91.0")
Call Stack (most recent call first):
D:/Programming/Programming_Morteza/cmake_3.3/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/FindEigen3.cmake:76 (find_package_handle_standard_args)
CMakeLists.txt:81 (find_package)
Configuring incomplete, errors occurred!]
I guess It is related to my Boost variables settings.
I've copied Boost to my D drive and defined BOOSTROOT="D:\boost_1_58_0-vc14_64" in system variables path.
Would you please help me?
Thanks
desc.add_options()
("help,h",
"display the help message")
("model,m", po::value<fs::path>(&scmmodelfile)->required(),
"a CVSSP .scm Morphable Model file")
("isomap,t", po::value<fs::path>(&isomapfile),
"optional isomap containing the texture mapping coordinates")
("shape-only,s", po::value<bool>(&save_shape_only)->default_value(false)->implicit_value(true),
"save only the shape-model part of the full 3DMM")
("output,o", po::value<fs::path>(&outputfile)->required()->default_value("converted_model.bin"),
"output filename for the Morphable Model in cereal binary format")
;
(.scm file , isomap file) I am not found!!
when i run the below command, error message triggered like rapidjsonexception:
./json-to-cereal-binary -i /Users/sam/Documents/MATLAB/bfm_small.json -t model -o converted_model.bin
Error :
libc++abi.dylib: terminating with uncaught exception of type cereal::RapidJSONException: rapidjson internal assertion failure: flags_ & kIntFlag
Debug Result:
error message triggered from the below line
input_archive(morphable_model);
code :
if (file_type == "model")
{
morphablemodel::MorphableModel morphable_model;
std::ifstream file(jsonfile.string());
cereal::JSONInputArchive input_archive(file);
input_archive(morphable_model);
morphablemodel::save_model(morphable_model, outputfile.string());
}
Hello, Huber! When I run the fit-model after installing eos, I encountered an error as following:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >' what(): character conversion failed Aborted (core dumped)
I run it on Ubuntu 14.04, gcc 4.8.4, Boost 1.59.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.