Eye position - looking up centre or down integer from any height

Help needed. I’m using NVIDIA face tracking and most of it is all working lovely but I have one niggling thing that is way beyond my Notch/maths ability.

I want an integer value of -1,0 or 1 based on whether the user is looking up, straight ahead or down. Initial thoughts were to use the pitch value and create a range but this only works for a specific height of user. For smaller users their pitch is already offset from the camera based on their height.

Second attempt was to use the Face Y property but this has the same issue. My brain says I need to record a specific ‘horizon line’ for each user and use that as an offset but I just can’t work it out.

Any help is very much appreciated.


That’s a tricky thing to generate, as it will probably be unique both per users and depending on where the user sits in the camera view. Could try adjusting the output ranges based on the Face height?

– Ryan

Thanks for the reply Ryan.

Yeah I’m still battling with working out ranges based on eye/head position. It works perfectly with the pitch but as soon as you wear a mask (which is compulsory for the event I’m working on) it isn’t reliable, only eye/head position are solid reads.

If you have any brain waves I’ll be eternally grateful and shower you with gifts.


Ah, Face masks are probably a major issue there. We just pass video into the NVIDIA face tracker and get the mask and face data back, so there isn’t much we can do to solve that. Maybe draw some faces onto the mask? Or use the CPU tracker, and give it a bunch of training data which contains face masks?

– Ryan