0

Is there a way to detect sunglasses (glasses) using the new Face API from google vision?

feisal
  • 585
  • 1
  • 8
  • 20
  • Based off what's available in the docs, no. Maybe you can do something like check for eye landmarks and check the color around that area. Not sure if you can get them if someone has sunglasses on though. – Andy Aug 28 '15 at 16:41

1 Answers1

0

The face detector can detect faces for people wearing sunglasses. But there is no explicit support for detecting if people are wearing sunglasses.

As Andy suggested above, using the eye landmarks and checking the color around those points may be something to try. However, note that eye landmark detection may not be very accurate when sunglasses are present -- you may find that eye landmarks are not reported for many pictures with sunglasses. You'd probably have more luck by guessing the position of the eyes relative to the head bounds and other landmarks in this case, and checking the color around those locations to infer if sunglasses are present.

pm0733464
  • 2,862
  • 14
  • 16
  • Yes it doesnt always gives the proper eye location, I was hopping the Classification for the probality of the eyes being open or closed to help distinguish that which wasnt the case. – feisal Aug 28 '15 at 18:15
  • The eye landmarks have to have been detected first, before the eyes open classification can be done. If the eyes are sufficiently obscured by the sunglasses, then neither the eye landmarks nor the eye classifications can be determined. – pm0733464 Aug 28 '15 at 22:07
  • Hello, I using face detection everything works fine, but is there any way to know the person whom we are detecting is actually a human and not a video of human, can anyone suggest me a way to do it? – Pratik Vyas Jun 28 '18 at 06:36