Giter VIP home page Giter VIP logo

attention-tracker's People

Contributors

alexis-jacq avatar davisking avatar mohataher avatar severin-lemaignan avatar skadge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

attention-tracker's Issues

benchmark_head_pose_estimation_single_frame.cpp:(.text.startup+0x751): undefined reference to `USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_'

Hi

I tried to build gazr . firstly there was problem in the cmake file . I changed this line in gazr cmakelists

find_package(dlib REQUIRED)
include_directories(${dlib_INCLUDE_DIRS})

to
set(DLIB_PATH "" CACHE PATH "Path to DLIB")
include(/home/tofi/dlib/dlib/cmake)

cmake .. completed without errors . make showing this errors :

[ 1%] Built target gazr
Linking CXX executable gazr_benchmark_head_pose_single_frame
CMakeFiles/gazr_benchmark_head_pose_single_frame.dir/tools/benchmark_head_pose_estimation_single_frame.cpp.o: In function _GLOBAL__sub_I_main': benchmark_head_pose_estimation_single_frame.cpp:(.text.startup+0x751): undefined reference to USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_'
libgazr.so: undefined reference to dlib::base64::decode(std::istream&, std::ostream&) const' libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::decode(unsigned int, unsigned int)'
libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::set_stream(std::istream&)' libgazr.so: undefined reference to dlib::base64::base64()'
libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::get_target(unsigned int)' libgazr.so: undefined reference to dlib::base64::~base64()'
libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::~entropy_decoder_kernel_2()' libgazr.so: undefined reference to dlib::entropy_decoder_kernel_2::entropy_decoder_kernel_2()'
collect2: error: ld returned 1 exit status
make[2]: *** [gazr_benchmark_head_pose_single_frame] Error 1
make[1]: *** [CMakeFiles/gazr_benchmark_head_pose_single_frame.dir/all] Error 2
make: *** [all] Error 2

Issues with installation/running

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_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives", referenced from:
__GLOBAL__I_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

installation on Ubuntu 16.04 and ROS kinetic

Whatever the version of OpenCV I use (I tried 2.4.9 and 2.4.13) I obtain this error of compilation:

/home/alexis/catkin_ws/src/attention-tracker/src/head_pose_estimation.cpp: In member function ‘head_pose HeadPoseEstimation::pose(size_t) const’:
/home/alexis/catkin_ws/src/attention-tracker/src/head_pose_estimation.cpp:152:13: error: ‘ITERATIVE’ is not a member of ‘cv’
cv::ITERATIVE);

If I change the parameter cv::ITERATIVE by CV_ITERATIVE in the call of solvePnP in head_pose_estimation.cpp it solves this issue.

Then, it is head_pose_estimation_test.cpp that throw errors of compilation:

CMakeFiles/head_pose_test.dir/samples/head_pose_estimation_test.cpp.o: In function `main':

head_pose_estimation_test.cpp:(.text.startup+0x15d): undefined reference to cv::String::allocate(unsigned long)' head_pose_estimation_test.cpp:(.text.startup+0x177): undefined reference tocv::namedWindow(cv::String const&, int)'
head_pose_estimation_test.cpp:(.text.startup+0x17f): undefined reference to cv::String::deallocate()' head_pose_estimation_test.cpp:(.text.startup+0x59d): undefined reference tocv::String::allocate(unsigned long)'
head_pose_estimation_test.cpp:(.text.startup+0x5b7): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' head_pose_estimation_test.cpp:(.text.startup+0x5bf): undefined reference tocv::String::deallocate()'
head_pose_estimation_test.cpp:(.text.startup+0x750): undefined reference to cv::String::deallocate()' head_pose_estimation_test.cpp:(.text.startup+0x764): undefined reference tocv::String::deallocate()'
/home/alexis/catkin_ws/devel/lib/libhead_pose_estimation.so: undefined reference to `cv::line(cv::InputOutputArray const&, cv::Point, cv::Point_, cv::Scalar_ const&, int, int, int)'

/home/alexis/catkin_ws/devel/lib/libhead_pose_estimation.so: undefined reference to _IplImage::_IplImage(cv::Mat const&)' /home/alexis/catkin_ws/devel/lib/libhead_pose_estimation.so: undefined reference tocv::error(int, cv::String const&, char const_, char const_, int)'
/home/alexis/catkin_ws/devel/lib/libhead_pose_estimation.so: undefined reference to cv::putText(cv::_InputOutputArray const&, cv::String const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)' /home/alexis/catkin_ws/devel/lib/libhead_pose_estimation.so: undefined reference tocv::circle(cv::InputOutputArray const&, cv::Point, int, cv::Scalar_ const&, int, int, int)'
/home/alexis/catkin_ws/devel/lib/libhead_pose_estimation.so: undefined reference to `cv::InputArray::getMat(int) const'

if I add a line in the CMakeliste to show the OpenCV libraries used I have:

-- OpenCV version: 2.4.9.1
-- OpenCV libraries: opencv_core;opencv_imgproc;opencv_calib3d;opencv_highgui

Installing the Library

I was able to compile the sample files perfectly but I wasn't able to install the library to include it in another project.

I didn't know where to run "make install" exactly. I tried it in several places but with no luck. I am getting the following error: make: *** No rule to make target 'install'. Stop.

So how should I install it and how do I include it exactly?

Thanks in advance.

Tf transform upside-down.

The coordinate axis presented by the debugger (projected points mapped back onto the image) does not match the published tf transform displayed in RVIZ. The head coordinate axis is upside down and the movements are inverted (compared to those displayed by the debug image).
inverted_axes

Get angles of head pose

Hi again,
seems like I'm super stupid, but I don't know how to get the angles of the head pose from the rotation matrix. OpenCV-SolvePnP and then Rodriges give me a 4x4 matrix (rotation + translation) - if I do unterstand this correctly. I thought I can use the roll-angle = atan2(r_{32}, r_{33}) (or atan2(r_{21},r_{22}) when starting to count from 0) and also pitch and yaw to get the angles...
But somehow the values I get do not correspont to the headpose shown in my images. For example there seems to be no big difference between a picture with a frontal head-pose and one with a 45° head-pose (only looking at the angle around the vertical axis...)
Hope someone can help

Thanks
Patricia

Couldn't CMake the project straight away.

Following your installation guide, I got this error

$attention-tracker/build$ cmake -DDLIB_PATH=../../dlib-18.16/ ..
-- Searching for BLAS and LAPACK
-- Found OpenBLAS library
-- Found LAPACK library
CMake Error at CMakeLists.txt:38 (find_package):
  By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCV", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/moha/dev/attention_tracker_dir/attention-tracker/CMakeFiles/CMakeOutput.log".
See also "/home/moha/dev/attention_tracker_dir/attention-tracker/CMakeFiles/CMakeError.log".

It wasn't mentioned that OpenCV has to be installed. Should I just install it myself? In this case, I will probably pull a request to change the README.md to reflect that. Please let me know.

Use code in eclipse project

Hi everyone,
I use Ubuntu 64-bit (in a VM: VirtualBox) and downloaded and installed your code (attention-tracker) as explained in the README and the code sample "head_pose_test" runs fine from console.
My question is: I would like to use this code in an eclipse project (to combine with other code, easy debugging and so on).
I'm a beginner on this field and so I tried many things but can not include it correctly.
In detail: I created a new project, copied the files into src directory, set up for dlib, opencv and ros (in properties).
I have the problem in class "estimated_focus.cpp": Type ' std_msgs::ColorRGBA ' could not be resolved. Google did not help me with this, yet.

Can anyone help me with this please?
Thanks a lot.
Patricia

Make issue

Hi,

I was just testing out this library for a project on Mac OSX 10.9. When trying to make the examples after running cmake I was getting the following error associated with the file head_pose_estimation.hpp:

error: no type named 'shape_predictor' in namespace 'dlib'
dlib::shape_predictor pose_model;

I have the shape predictor file for dlib to detect the landmarks. Just a bit confused as how to proceed. Any advice?

Thanks!

installation crashes

Hi,

Thanks a lot for your package. I'm unfortunately encountering an error when building:

>> make

...

[ 96%] Linking CXX executable head_pose_single_frame
CMakeFiles/head_pose_single_frame.dir/samples/head_pose_estimation_single_frame.cpp.o: In function `main':
head_pose_estimation_single_frame.cpp:(.text.startup+0x200): undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
head_pose_estimation_single_frame.cpp:(.text.startup+0x563): undefined reference to `cv::imwrite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
libhead_pose_estimation.so: undefined reference to `cv::Exception::Exception(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
libhead_pose_estimation.so: undefined reference to `cv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
collect2: error: ld returned 1 exit status
CMakeFiles/head_pose_single_frame.dir/build.make:111: recipe for target 'head_pose_single_frame' failed
make[2]: *** [head_pose_single_frame] Error 1
CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/head_pose_single_frame.dir/all' failed
make[1]: *** [CMakeFiles/head_pose_single_frame.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

the cmake generated this ouput:

cmake -DDLIB_PATH=/home/jrking/git/dlib/
-- C++11 activated.
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
--   No package 'cblas' found
-- Checking for module 'lapack'
--   No package 'lapack' found
-- Found Intel MKL BLAS/LAPACK library
-- OpenCV version: 2.4.11
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jrking/git/attention-tracker

Would you have any hint on what I should do?

CMake Error at CMakeLists.txt:6 (find_package):

Hi

I have installed dlib and it works , but when I cmake gazr this error is shown :

CMake Error at CMakeLists.txt:6 (find_package):
By not providing "Finddlib.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "dlib", but
CMake did not find one.

Could not find a package configuration file provided by "dlib" with any of
the following names:

dlibConfig.cmake
dlib-config.cmake

Solvepnp better output with P3P

Hi,

First of all, thanks for developing this! Works like charm.

I have been messing around with this for a while now and found that P3P method of solvepnp works way better than iterative. Its very stable in profile faces, unlike ITERATIVE, which fluctuates at times, once we turn our head.

live_plot.py error

I'm trying to plot the roll yaw , and pitch using live_plot.py

I have used this :

tofi@tofi:~/gazr-master/build$

./gazr_estimate_head_direction -c --model=shape_predictor_68_face_landmarks.dat | python -u ../tools/live_plot.py
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::program_options::unknown_option >'
what(): unrecognised option '-c'
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/tofi/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Traceback (most recent call last):
File "../tools/live_plot.py", line 22, in
data = eval(line)
File "", line 0

^

SyntaxError: unexpected EOF while parsing

and also I tried :

tofi@tofi:~/gazr-master/build$ ./estimate_gaze_direction -c --model=shape_predictor_68_face_landmarks.dat | python -u ../tools/live_plot.py

bash: ./estimate_gaze_direction: No such file or directory
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/tofi/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Traceback (most recent call last):
File "../tools/live_plot.py", line 22, in
data = eval(line)
File "", line 0

^

SyntaxError: unexpected EOF while parsing

Delay cv::VideoCapture and 500ms per frame

Hey,
I'm using your code in my eclipse project (Ubuntu 64-bit) and I'm having two problems:

  1. a delay of 3 seconds using the VideoCapture
  2. an average speed of 500ms per frame instead of about 1ms (I added the flags -mavx and -msse4 under Project > Properties > C/C++ Build > Settings then on the Tool Settings tab GCC C++ Compiler > Miscellaneous and under Window > Preferences > C/C++ > Build > Settings on the Discovery tab chose CDT GCC Built-in Compiler Settings and add the flags to Command to get compiler specs) I also built in Release mode.

Do you have any idea how I can fix this? Here's the main part of my code (there is of cause a "<" in the includes in my code):

include dlib/image_processing/render_face_detections.h>

include dlib/gui_widgets.h>

include iostream>

include string>

include cmath>

include "head-pose-estimation/headposeestimation.h"

using namespace std;

int main(int argc, char** argv) {

auto estimator = HeadPoseEstimation();

dlib::image_window win;

std::string shapePredictor = argv[1];

estimator.initialize(shapePredictor);

cv::VideoCapture cap(0);

while(!win.is_closed()){

    cap >> estimator.matImage; //cv::Mat matImage
    dlib::cv_image<dlib::bgr_pixel> cvImage(estimator.matImage);

    auto t_start = cv::getTickCount();
    estimator.findLandmarks(cvImage);
    auto t_end = cv::getTickCount();
    cout << "Processing time for this frame: " << (t_end-t_start) / cv::getTickFrequency() * 1000. << "ms" << endl;

    win.clear_overlay();
    win.set_image(cvImage);

    win.add_overlay(render_face_detections(estimator.shapes));
}

}`

Thanks in advance.
Patricia

webcam opens and close in the same time

When I run

ubuntu@ubuntu:~/attention-tracker/build$ ./head_pose_test ../share/shape_predictor_68_face_landmarks.dat

the webcam opens and close and this message is displayed :

init done
opengl support available
Head pose: (0.0385467, 0.0183563, -0.641124)
Processing time for this frame: 91.4945ms

why I can't view the webcam normally ?

Using a different set of points

Hi, I'm interested in evaluating how this algorithm performs using a different set of 3D points of the head, for instance using a female head shape to track a female individual. Any advices on that?

Also, how did you manage to get those 3D points? I've looked at the link suggested (wikipedia...) but I could not find anything useful, thanks!

Other pnp methods and more landmarks?

Thanks for sharing the code, it is really great. A couple of questions. ¿Have you tried other pnp methods implemented in opencv 3 (EPNP, P3P, DLS, UPNP)? ¿Have your tried a different number of landmarks? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.