Handsfree.js – integrate face, hand, and/or pose tracking to front end projects
github.com
github.com
(I understand that this is a technically complicated, and potentially sensitive subject)
I've been approached by a few people who are doing what they can to lower the cost of prescription glasses. It's a mix of (licensed) ophthalmologists, people interested in offering community health services, etc.
What is the current state of the art for pupillary distance (PD) measurement based on face detection / pupil tracking using laptop webcams or mobile (front) cameras?
I imagine (obviously?) that there must be scholar research on the acceptable error margins for a PD measurement (depending on the type of vision condition, i.e. farsightedness, etc.)?
Would using something like Handsfree.js or https://github.com/esimov/pigo (which has pupil detection) be a good start, or would these be an ~order of magnitude off in terms of the necessary margins?
Thanks a lot.
We can detect faces, eyes and pupils, but with no reference points we have no idea how big or far apart they are.
What about sites (such as Warby Parker) that make you hold up a credit card (which has a standard size) and use that to determine (via what I assume is a rule of three) the PD? [0]
I can see of course problems with the card not being “perpendicular” and other 3d distortions.
And Google's MediaPipe Iris used iris diameter for distance estimation.[1]
EyeQue is perhaps a cautionary tale. "Change the world" "few dollars of optics + phone = D+CYL" become $45 one-person-per-subscription "vision tracker".
[1] https://ai.googleblog.com/2020/08/mediapipe-iris-real-time-i...
The credit card trick somewhat works since you can guage depth given the size and positioning of the card, but the errors still can end up in the 2-3mm range fairly easily.
The best mechanism would be to create something like a Google cardboard to guarantee the head is properly positioned and then perform the measurements.
Pretty fun to watch!
...
I did do another whacky one today that is a lot easier to do. It's called "Flintstone Mode": https://twitter.com/GoingHandsfree/status/140136648492059033...
So, while it may look good with the skeletons, notice they do not have useful demos, mostly just proof of concept demos that do almost nothing.
Maybe you'll find some of these more useful?
- Face Pointer, and accessibility tool to help people who can't use a mouse/keyboard: https://handsfree.js.org/ref/plugin/facePointer.html
- Palm Pointers, scroll the page and even multiple scroll areas at once: https://handsfree.js.org/ref/plugin/palmPointers.html
- Gesture Mapper, map static poses in seconds: https://handsfree.dev/tools/gesture-mapper/
- Face Coding (not ready), to help people with disabilities code by snapping blocks together: https://twitter.com/GoingHandsfree/status/140056015231972966...
- The library itself doubles as a Chrome Extension, here are some examples of what you can do with it: https://handsfree.dev/sites/
I have dozens and dozens of more experiments. Most of them are pretty basic, but the point is to show you what's possible :)
If you want to see how stable it is, have a look at that: https://youtu.be/zz9S5hgrWpM?t=147
It's tracking me with the Oculus Quest on the head, so it does not even have facial features to go on
We are currently experimenting with using phones (or tablets or basically anything with a browser and a camera) as a tracking source for full body tracking on the Oculus Quest ([1]) and being able to just use a Tensorflow model in the browser has cut down the time of development on the mobile device side to almost nothing.
There are of course a whole lot of other issues one buys into with that approach (browser security policies, the whole thing not working in certain countries due to problems with loading the model) but that's manageable
[1] https://www.youtube.com/watch?v=zz9S5hgrWpM (relevant part starts at 0:29)