Eye glasses Detection¶
-
SDK.
detect_glasses
(self: tfsdk.SDK, face_box_and_landmarks: tfsdk.FaceBoxAndLandmarks) → Tuple[tfsdk.ERRORCODE, tfsdk.GLASSESLABEL, float]¶ “Detect if there are eye glasses on the face in the given image.
- Parameters
face_box_and_landmarks –
tfsdk.FaceBoxAndLandmarks
returned bytfsdk.SDK.detect_faces()
ortfsdk.SDK.detect_largest_face()
.- Returns
The
ERRORCODE
, thetfsdk.GLASSESLABEL
, and the glasses score, in that order. The glasses score can be used for setting a custom threshold that works better for the use case. By default, we use a glasses score greater than 0.0 to determine that glasses were detected.
-
class
tfsdk.
GLASSESLABEL
¶ Members:
GLASSES : There are glasses on the face
NO_GLASSES : There are no glasses on the face