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.71k stars 1.82k forks source link

How can I detect eye contact/mutual gaze between two people in a video using the gaze vectors? #1035

Open amritbhat786 opened 1 year ago

amritbhat786 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior, with error description (and images/videos if failing on them).

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Will the gaze vector (X,Y,Z) of one person be the negative of another, if they are looking at each other? Can this logic be used to detect mutual gaze/eye contact?

brmarkus commented 1 year ago

These would "just" be two vectors, "representing" two lines in a 3D space (or, projected, in a 2D space); these could be parallel, could cross each other, could be exactly the same, could be "mirrored". But whether they really have eye contact is difficult to say, isn't it?

amritbhat786 commented 1 year ago

Thanks for your comment, @brmarkus. Can't we say that if the gaze vector (X,Y,Z) of one person is the negative of another, they are having an eye contact?

brmarkus commented 1 year ago

If the two persons stand next to each other, shoulder-at-shoulder - then their gaze-vector could be "opposite", yes, the negative of the other, but their vector might just be parallel - shoulder-at-shoulder or a few meters between them, looking just parallel... not necessarily looking into their eyes.

brmarkus commented 1 year ago

This is about whether two lines in 3D space (given by two vectors, but without a "base") intersect, e.g.

https://math.stackexchange.com/questions/302598/how-to-prove-that-two-lines-in-3d-are-not-parallel-and-do-not-intersect-also-h

https://mikespivey.wordpress.com/2016/10/06/how-do-you-tell-whether-two-lines-intersect-in-3d/