chili-epfl / attention-tracker

136 stars 96 forks source link

Issues with installation/running #13

Open pythonanonuser opened 8 years ago

pythonanonuser commented 8 years ago

I'm able to compile the program successfully, but receive the following error when I try to run the head pose estimation test.

OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /tmp/opencv-20160612-56703-1c8n1km/modules/highgui/src/window.cpp, line 261 libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv-20160612-56703-1c8n1km/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow

I've isolated the error to something in the estimator._debug, as when I try to imshow just the plain frame variable, it works.

I also tried to install gazr to see if a newer version might fix it. I was able to install dlib 18.18 successfully on its own but couldn't link it to gazr. Here was the output from make-j8

Undefined symbols for architecture x86_64: "_USER_ERRORmissing_dlib_all_source_cpp_fileORinconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessordirectives", referenced from: GLOBALI_a in head_pose_estimation.cpp.o "dlib::entropy_decoder_kernel_2::get_target(unsigned int)", referenced from: dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::1::basic_istream<char, std::1::char_traits >&, std::__1::basic_ostream<char, std::1::char_traits >&) const in head_pose_estimation.cpp.o dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in head_pose_estimation.cpp.o "dlib::entropy_decoder_kernel_2::set_stream(std::1::basic_istream<char, std::1::char_traits >&)", referenced from: dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::1::basic_istream<char, std::1::char_traits >&, std::1::basic_ostream<char, std::__1::char_traits >&) const in head_pose_estimation.cpp.o "dlib::entropy_decoder_kernel_2::decode(unsigned int, unsigned int)", referenced from: dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::1::basic_istream<char, std::1::char_traits >&, std::__1::basic_ostream<char, std::1::char_traits >&) const in head_pose_estimation.cpp.o dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in head_pose_estimation.cpp.o "dlib::entropy_decoder_kernel_2::entropy_decoder_kernel_2()", referenced from: dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::1::basic_istream<char, std::__1::char_traits >&, std::1::basic_ostream<char, std::1::char_traits >&) const in head_pose_estimation.cpp.o "dlib::entropy_decoder_kernel_2::~entropy_decoder_kernel_2()", referenced from: dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::1::basic_istream<char, std::1::char_traits >&, std::__1::basic_ostream<char, std::1::char_traits >&) const in head_pose_estimation.cpp.o "dlib::base64::base64()", referenced from: dlib::get_serialized_frontal_faces() in head_pose_estimation.cpp.o "dlib::base64::~base64()", referenced from: dlib::get_serialized_frontal_faces() in head_pose_estimation.cpp.o "dlib::base64::decode(std::1::basic_istream<char, std::__1::char_traits >&, std::1::basic_ostream<char, std::1::char_traits >&) const", referenced from: dlib::get_serialized_frontal_faces() in head_pose_estimation.cpp.o "_cblas_dgemm", referenced from: dlib::point_transform_affine dlib::find_affine_transform(std::1::vector<dlib::vector<float, 2l>, std::1::allocator<dlib::vector<float, 2l> > > const&, std::1::vector<dlib::vector<float, 2l>, std::__1::allocator<dlib::vector<float, 2l> > > const&) in head_pose_estimation.cpp.o dlib::matrix<dlib::matrix_op<dlib::op_trans<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > >::type, dlib::matrix_op<dlib::op_trans<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > >::NC, dlib::matrix_op<dlib::op_trans<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > >::NR, dlib::matrix_op<dlib::op_trans<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > >::mem_manager_type, dlib::row_major_layout> const dlib::pinv_helper<dlib::matrix_op<dlib::op_trans<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > > >(dlib::matrix_exp<dlib::matrix_op<dlib::op_trans<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > > > const&, double) in head_pose_estimation.cpp.o dlib::matrix<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>::type, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>::NC, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>::NR, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>::mem_manager_type, dlib::row_major_layout> const dlib::pinv_helper<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> >(dlib::matrix_exp<dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout> > const&, double) in head_pose_estimation.cpp.o "dgesvd", referenced from: int dlib::lapack::gesvd<double, 3l, 0l, 3l, 0l, 0l, 1l, 0l, 0l, dlib::memory_manager_stateless_kernel_1 >(char, char, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 0l, 1l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&) in head_pose_estimation.cpp.o int dlib::lapack::gesvd<double, 0l, 3l, 0l, 3l, 3l, 1l, 3l, 3l, dlib::memory_manager_stateless_kernel_1 >(char, char, dlib::matrix<double, 0l, 3l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 3l, 1l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 0l, 3l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 3l, 3l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&) in head_pose_estimation.cpp.o int dlib::lapack::gesvd<double, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, dlib::memory_manager_stateless_kernel_1 >(char, char, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1, dlib::row_major_layout>&) in head_pose_estimation.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: * [libgazr.dylib] Error 1 make[1]: * [CMakeFiles/gazr.dir/all] Error 2 make[1]: *\ Waiting for unfinished jobs.... [ 94%] Linking CXX static library libdlib.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(sockets_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(dir_nav_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(threads_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(stack_trace.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(gui_core_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(sockets_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(dir_nav_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(threads_kernel_1.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(stack_trace.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(gui_core_kernel_1.o) has no symbols

severin-lemaignan commented 8 years ago

Hello @12rohanb and thanks for reporting your issue.

The first issue you report is due to empty images being passed for processing (it sometimes happen that the very first images captured by OpenCV from the webcam are empty). You can prevent the error by first checking the image is not empty before trying to detect faces.

The second issue looks like dlib being unhappy about something (the assert error USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives is issued by dlib).

How did you install dlib? from sources?

pythonanonuser commented 8 years ago

On the first issue, I tried playing around with things, but it seems as though estimator._debug is always an empty Mat. Not sure why that's the case. I'm on OSX 10.9.5 and using opencv 2.4.13 (tried with 2.4.12 as well).

On the second issue, I installed dlib 18.18 in the standard way from source using cmake and make. Not sure what's going on there either.

teresakozera commented 8 years ago

I know in the README you emphasized that you are not able to provide support for other platforms than Linux, but maybe you will be able to help me. I can't execute 'make install' on OSX, do you know how in a different way I can install the library there?