DetectFace¶
-
class
DetectFace.
DetectFace
(concurrency=1, concurrentTimeout=100.0, errorCol=None, handler=None, imageUrl=None, outputCol=None, returnFaceAttributes=None, returnFaceId=None, returnFaceLandmarks=None, subscriptionKey=None, timeout=60.0, url=None)[source]¶ Bases:
mmlspark.Utils.ComplexParamsMixin
,pyspark.ml.util.JavaMLReadable
,pyspark.ml.util.JavaMLWritable
,pyspark.ml.wrapper.JavaTransformer
Parameters: - concurrency (int) – max number of concurrent calls (default: 1)
- concurrentTimeout (double) – max number seconds to wait on futures if concurrency >= 1 (default: 100.0)
- errorCol (str) – column to hold http errors (default: [self.uid]_error)
- handler (object) – Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None))
- imageUrl (object) – the url of the image to use
- outputCol (str) – The name of the output column (default: [self.uid]_output)
- returnFaceAttributes (object) – Analyze and return the one or more specified face attributes Supported face attributes include: age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. Face attribute analysis has additional computational and time cost.
- returnFaceId (object) – Return faceIds of the detected faces or not. The default value is true
- returnFaceLandmarks (object) – Return face landmarks of the detected faces or not. The default value is false.
- subscriptionKey (object) – the API key to use
- timeout (double) – number of seconds to wait before closing the connection (default: 60.0)
- url (str) – Url of the service
-
getConcurrentTimeout
()[source]¶ Returns: max number seconds to wait on futures if concurrency >= 1 (default: 100.0) Return type: double
-
getErrorCol
()[source]¶ Returns: column to hold http errors (default: [self.uid]_error) Return type: str
-
getHandler
()[source]¶ Returns: Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None)) Return type: object
-
getOutputCol
()[source]¶ Returns: The name of the output column (default: [self.uid]_output) Return type: str
-
getReturnFaceAttributes
()[source]¶ Returns: Analyze and return the one or more specified face attributes Supported face attributes include: age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. Face attribute analysis has additional computational and time cost. Return type: object
-
getReturnFaceId
()[source]¶ Returns: Return faceIds of the detected faces or not. The default value is true Return type: object
-
getReturnFaceLandmarks
()[source]¶ Returns: Return face landmarks of the detected faces or not. The default value is false. Return type: object
-
getTimeout
()[source]¶ Returns: number of seconds to wait before closing the connection (default: 60.0) Return type: double
-
setConcurrency
(value)[source]¶ Parameters: concurrency (int) – max number of concurrent calls (default: 1)
-
setConcurrentTimeout
(value)[source]¶ Parameters: concurrentTimeout (double) – max number seconds to wait on futures if concurrency >= 1 (default: 100.0)
-
setErrorCol
(value)[source]¶ Parameters: errorCol (str) – column to hold http errors (default: [self.uid]_error)
-
setHandler
(value)[source]¶ Parameters: handler (object) – Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None))
-
setOutputCol
(value)[source]¶ Parameters: outputCol (str) – The name of the output column (default: [self.uid]_output)
-
setParams
(concurrency=1, concurrentTimeout=100.0, errorCol=None, handler=None, imageUrl=None, outputCol=None, returnFaceAttributes=None, returnFaceId=None, returnFaceLandmarks=None, subscriptionKey=None, timeout=60.0, url=None)[source]¶ Set the (keyword only) parameters
Parameters: - concurrency (int) – max number of concurrent calls (default: 1)
- concurrentTimeout (double) – max number seconds to wait on futures if concurrency >= 1 (default: 100.0)
- errorCol (str) – column to hold http errors (default: [self.uid]_error)
- handler (object) – Which strategy to use when handling requests (default: UserDefinedFunction(<function2>,StringType,None))
- imageUrl (object) – the url of the image to use
- outputCol (str) – The name of the output column (default: [self.uid]_output)
- returnFaceAttributes (object) – Analyze and return the one or more specified face attributes Supported face attributes include: age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. Face attribute analysis has additional computational and time cost.
- returnFaceId (object) – Return faceIds of the detected faces or not. The default value is true
- returnFaceLandmarks (object) – Return face landmarks of the detected faces or not. The default value is false.
- subscriptionKey (object) – the API key to use
- timeout (double) – number of seconds to wait before closing the connection (default: 60.0)
- url (str) – Url of the service
-
setReturnFaceAttributes
(value)[source]¶ Parameters: returnFaceAttributes (object) – Analyze and return the one or more specified face attributes Supported face attributes include: age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. Face attribute analysis has additional computational and time cost.
-
setReturnFaceAttributesCol
(value)[source]¶ Parameters: returnFaceAttributes (object) – Analyze and return the one or more specified face attributes Supported face attributes include: age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. Face attribute analysis has additional computational and time cost.
-
setReturnFaceId
(value)[source]¶ Parameters: returnFaceId (object) – Return faceIds of the detected faces or not. The default value is true
-
setReturnFaceIdCol
(value)[source]¶ Parameters: returnFaceId (object) – Return faceIds of the detected faces or not. The default value is true
-
setReturnFaceLandmarks
(value)[source]¶ Parameters: returnFaceLandmarks (object) – Return face landmarks of the detected faces or not. The default value is false.
-
setReturnFaceLandmarksCol
(value)[source]¶ Parameters: returnFaceLandmarks (object) – Return face landmarks of the detected faces or not. The default value is false.