Python Face Detector API¶
oneML model to detect faces in images, returning their confident score, bounding box, face landmarks and poses.
-
oneML.faceAPI.FaceDetector : public object The oneML FaceDetector API object.
Class to create and use oneML face detector model.
Public Functions
-
__init__(self, manager)¶ Construct a FaceDetector object.
- Parameters
manager: LicenseManager instance.
-
detect_batch(self, imgvec_, score_threshold=- 1.0)¶ Detect faces in images.
- Return
FaceDetectorResultVector: list of FaceDetectorResult objects
- Parameters
imgvec_: numpy array with shape (batch, height, width, channel)score_threshold: score threshold, -1.0 means default threshould
-
detect(self, imgvec_, score_threshold=- 1.0)¶ Detect faces in images.
- Return
FaceDetectorResult: result object
- Parameters
imgvec_: numpy array with shape (height, width, channel)score_threshold: score threshold, -1.0 means default threshould
-
-
oneML.faceAPI.FaceDetectorResult : public object The result object for oneML FaceDetector API.
Helper class to access all the results from an API call.
Public Functions
-
get_scores(self)¶ Get result scores.
- Return
FloatVector: list of float scores
-
get_size(self)¶ Get number of faces detected.
- Return
int: number of faces detected
-
get_poses(self)¶ Get result pose.
- Return
IntVector: list of int values of Pose enumerators
-
get_return_status(self)¶ Get return status.
- Return
IntVector: list of in values of return status
-
-
oneML.faceAPI.FaceDetectorResultVector : public object
List of FaceDetectorResult objects.
-
oneML.faceAPI.FaceDetectorStatus_Empty= _oneMLfacePython.FaceDetectorStatus_Empty¶
-
oneML.faceAPI.FaceDetectorStatus_Success= _oneMLfacePython.FaceDetectorStatus_Success¶
-
oneML.faceAPI.FaceDetectorStatus_Fail= _oneMLfacePython.FaceDetectorStatus_Fail¶