patlevin / face-detection-tflite

Face and iris detection for Python based on MediaPipe
MIT License
137 stars 26 forks source link

Detecting Closed Eyes #6

Closed msj121 closed 3 years ago

msj121 commented 3 years ago

I have been having trouble using the face landmarks to detect closed eyes.

For the live Google Version:

https://storage.googleapis.com/tfjs-models/demos/face-landmarks-detection/index.html

If you have "predict irises" checked it will track eye open and close. Is there a way to use the detect face code and to enable this part of the model?

Thanks

msj121 commented 3 years ago

I updated the landmarks after iris detection but it still was not showing closed eyes.

Using the landmarks you have posted a few times:

  # Left eye.
    (33, 7), (7, 163), (163, 144), (144, 145), (145, 153), (153, 154),
    (154, 155), (155, 133), (33, 246), (246, 161), (161, 160), (160, 159),
    (159, 158), (158, 157), (157, 173), (173, 133),
msj121 commented 3 years ago

My mistake - got it working. I was using old data after updating the landmarks. Now using the returned landmarks instead of original works. Thanks!