TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.94k stars 1.85k forks source link

Kinect v2 #77

Closed aaramirezd closed 7 years ago

aaramirezd commented 8 years ago

Hi Tadas, thank you very much, really is a good work:

I'm trying implement your work in an application for large rooms with multiple kinect, and I read #10 and I want compare the two methods (CLM-Z (rgb-d), CLNF(rgb)).

How I can run the application with the kinect data? Thanks Andrés

TadasBaltrusaitis commented 8 years ago

To run on depth data you will need to convert each frame to an image format, with each pixel representing depth (I usually use 16bit PNG images). You will then be able to provide the executable with a command line parameter of which folder the depth images are (they are expected to be sorted alphanumerically).

An example of this can be found in: 'matlab_runners\Head Pose Experiments\run_head_pose_tests_CLM.m'

Thanks, Tadas

aaramirezd commented 8 years ago

Thank you very much, again.

It is just the information I needed. I will work on the example.

Just one more question, any suggestion to save depth data as png image?

Thanks Andrés

TadasBaltrusaitis commented 8 years ago

OpenCV or Matlab should allow you to do it, you just need to take care to use a 16bit image (as depth values will exceed 256 if measured in millimeters)

aaramirezd commented 8 years ago

That's right, Thanks

aaramirezd commented 8 years ago

Hi Tadas:

I was able to test the two models, but note that the clm-z model does not have the eye model i.e. (clnf_model.eye_model=0), there is an option to allow the gaze estimation?

Thanks. Andrés

TadasBaltrusaitis commented 8 years ago

Hi Andres,

The CLM-Z model has not been trained for fine grained eye region landmark detection, but you could use a CLNF model on top of the CLM-Z one for the eye landmarks specifically.

Thanks, Tadas

aaramirezd commented 8 years ago

Hi Tadas

Thanks for your idea, I'll work on that right now.

Thanks Andrés

raulsilvamx commented 8 years ago

i have read your post and I noticed you Tadas said "has not been trained" so are these model AI? 👍 Congratulations!!!!

TadasBaltrusaitis commented 8 years ago

By have not been trained I meant that I do not have eye gaze estimation for CLM-Z, but I have one trained for CLNF.

aaramirezd commented 8 years ago

Hi Tadas.

I have other technical questions, I'm taking the head pose and understand that the format is R=rx_ry_rz. I used ROS to show the pose, but it displayed as if you were not looking at the camera (view the image) I used different transformations of Euler angles to quaternion, but the result is the same. Did you use any special representation of head pose? Thanks Andrés

captura de pantalla de 2016-10-21 10-47-25

TadasBaltrusaitis commented 8 years ago

Hi Andrés,

The pose is represented in the R=RxRyRz format, but there are two types of head pose representation, one is in camera space GetPoseCamera where the pose will be (0,0,0) when looking at the camera and the other is GetPoseWorld which is going to use world space coordinates for rotation with camera center being the origin. For accurate head pose you also need to have a good estimate of intrinsic camera parameters (focal length and optical axis centre). Hope this helps.

Thanks, Tadas

aaramirezd commented 8 years ago

Hi Tadas,

Thanks for the help, I needed to know what was the pose (0,0,0).

Andrés

aaramirezd commented 8 years ago

Hi Tadas, again with more questions.

When I'm looking at the camera which should be the result for gaze direction vector? (gaze_0_x, gaze_0_y, gaze_0_z)

I really appreciate your help

Thanks, Andrés

TadasBaltrusaitis commented 8 years ago

Hi Andrés,

This will depend on the head position. The gaze vectors are directional vector pointing from the eye in the world coordinate space. So if you take the 3D location of the eye and draw a vector in the direction of eye gaze you can see if it goes towards the camera or intersects it.

Hope this helps.

Thanks, Tadas

haniye7122 commented 7 years ago

hi i need to save location of a line in kinect can u help me plz? :(