xucong-zhang / ETH-XGaze

Official implementation of ETH-XGaze dataset baseline
185 stars 33 forks source link

Estimated gaze without the normalization #8

Open VeruGromnicova opened 3 years ago

VeruGromnicova commented 3 years ago

Hello, I wolud like to ask, if there is any easy way to get the real gaze values. I understand from the code that the return values of gaze are calculated after normalization, but I need to get the real gaze values of origin image and I do not know what operation should I do with result gaze for getting the real estimation from original image position. I hope you understand what I mean. Thank you.

anilrgukt commented 3 years ago

You have to invert the gaze vector normalization https://github.com/xucong-zhang/ETH-XGaze/blob/0a120278a60e412e81a10235a3ad14ea6852c541/normalization_example.py#L85-L88

chky commented 3 years ago

you can refer to the paper "Revisiting data normalization for appearance-based gaze estimation", in section 3.3 Modified Data Normalization, xucong-zhang says gaze_normalized = R * gazereal, where R is the Rotation matrix ( R = np.c[right, down, forward].T )

mahdip72 commented 3 years ago

The value of gaze are about in the range of -3 to 3 and the paper of dataset doesn't describe the normalizing procedure precisely or maybe I couldn't find it. Can somebody help me how could I transform the labels to degrees?

VeruGromnicova commented 3 years ago

@mahdip72 The values are in radians, so just convert it according to this equation: 1 rad = 57.2958 degrees (you can find the more precise value ..). And the sign indicates which side from the axis is the angle.

mahdip72 commented 3 years ago

@VeruGromnicova Thanks for your respond. In the paper said that the head pose angles are between -80 to 80 degree, but if I the labels are in radian, then the maximum value goes beyond 80 degree (approximately 170 degree). Is it okay?

VeruGromnicova commented 3 years ago

@mahdip72 Yes, that's okay, in radians the values have to be between -3,14 and 3,14, so in degrees it should be between -180 and 180 degrees. I am not really sure, what exactly the paper says cause I am not the author, but I tested this method in my thesis and this is what I remember..

mahdip72 commented 3 years ago

I think there is a problem if we consider radian for labels. I mean if maximum value of head pose is 180 degree or something like that, then the camera should be placed behind of subject's head. There isn't an image like that in datatset. Am I wrong?

xucong-zhang commented 3 years ago

Hi, the values of head pose and gaze direction are in radians as pointed by @VeruGromnicova. @mahdip72 Both head pose and gaze directions are in the camera coordinate system and initialled in the head/face position. The range of head pose in our dataset is about [-80, 80]. I don't think we have a 180 degree head pose.