Eye glasses Detection¶
- SDK.detect_glasses(self: tfsdk.SDK, tf_image: tfsdk.TFImage, 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
 tf_image – the input
tfsdk.TFImage, returned bytfsdk.SDK.preprocess_image().face_box_and_landmarks –
tfsdk.FaceBoxAndLandmarksreturned 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.