diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_operations/_operations.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_operations/_operations.py index bd19badabe3a..a5ba81789885 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_operations/_operations.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/_operations/_operations.py @@ -18860,7 +18860,7 @@ def create_liveness_session( # JSON input template you can fill out and use as your body input. body = { "livenessOperationMode": "str", # Type of liveness mode the client should - follow. Required. "Passive" + follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each end-user @@ -19034,7 +19034,7 @@ def create_liveness_session( # JSON input template you can fill out and use as your body input. body = { "livenessOperationMode": "str", # Type of liveness mode the client should - follow. Required. "Passive" + follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each end-user @@ -19687,7 +19687,7 @@ def _create_liveness_with_verify_session( # JSON input template you can fill out and use as your body input. body = { "livenessOperationMode": "str", # Type of liveness mode the client should - follow. Required. "Passive" + follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each end-user @@ -19845,7 +19845,7 @@ def _create_liveness_with_verify_session_with_verify_image( # pylint: disable=n body = { "Parameters": { "livenessOperationMode": "str", # Type of liveness mode the client - should follow. Required. "Passive" + should follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_operations/_operations.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_operations/_operations.py index a7a4f1d0c6c3..538d286dfa42 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_operations/_operations.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/aio/_operations/_operations.py @@ -16493,7 +16493,7 @@ async def create_liveness_session( # JSON input template you can fill out and use as your body input. body = { "livenessOperationMode": "str", # Type of liveness mode the client should - follow. Required. "Passive" + follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each end-user @@ -16667,7 +16667,7 @@ async def create_liveness_session( # JSON input template you can fill out and use as your body input. body = { "livenessOperationMode": "str", # Type of liveness mode the client should - follow. Required. "Passive" + follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each end-user @@ -17320,7 +17320,7 @@ async def _create_liveness_with_verify_session( # JSON input template you can fill out and use as your body input. body = { "livenessOperationMode": "str", # Type of liveness mode the client should - follow. Required. "Passive" + follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each end-user @@ -17478,7 +17478,7 @@ async def _create_liveness_with_verify_session_with_verify_image( # pylint: dis body = { "Parameters": { "livenessOperationMode": "str", # Type of liveness mode the client - should follow. Required. "Passive" + should follow. Required. Known values are: "Passive" and "PassiveActive". "authTokenTimeToLiveInSeconds": 0, # Optional. Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600. "deviceCorrelationId": "str", # Optional. Unique Guid per each diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_enums.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_enums.py index d29512713bb2..e20364497104 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_enums.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_enums.py @@ -213,10 +213,21 @@ class LivenessModel(str, Enum, metaclass=CaseInsensitiveEnumMeta): class LivenessOperationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The operation mode for the liveness modal.""" + """The liveness operation mode to drive the client’s end-user experience.""" PASSIVE = "Passive" - """The operation mode for the liveness modal.""" + """Utilizes a passive liveness technique that requires no additional actions from the user. + Requires normal indoor lighting and high screen brightness for optimal performance. And thus, + this mode has a narrow operational envelope and will not be suitable for scenarios that + requires the end-user’s to be in bright lighting conditions. Note: this is the only supported + mode for the Mobile (iOS and Android) solution.""" + PASSIVE_ACTIVE = "PassiveActive" + """This mode utilizes a hybrid passive or active liveness technique that necessitates user + cooperation. It is optimized to require active motion only under suboptimal lighting + conditions. Unlike the passive mode, this mode has no lighting restrictions, and thus offering + a broader operational envelope. This mode is preferable on Web based solutions due to the lack + of automatic screen brightness control available on browsers which hinders the Passive mode’s + operational envelope on Web based solutions.""" class MaskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_models.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_models.py index 6467daa94a02..fa480b10b056 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_models.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_models.py @@ -231,8 +231,8 @@ class CreateLivenessSessionContent(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar liveness_operation_mode: Type of liveness mode the client should follow. Required. - "Passive" + :ivar liveness_operation_mode: Type of liveness mode the client should follow. Required. Known + values are: "Passive" and "PassiveActive". :vartype liveness_operation_mode: str or ~azure.ai.vision.face.models.LivenessOperationMode :ivar send_results_to_client: Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients @@ -253,7 +253,8 @@ class CreateLivenessSessionContent(_model_base.Model): """ liveness_operation_mode: Union[str, "_models.LivenessOperationMode"] = rest_field(name="livenessOperationMode") - """Type of liveness mode the client should follow. Required. \"Passive\"""" + """Type of liveness mode the client should follow. Required. Known values are: \"Passive\" and + \"PassiveActive\".""" send_results_to_client: Optional[bool] = rest_field(name="sendResultsToClient") """Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' diff --git a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py index cc2815b630cc..620f4d62e728 100644 --- a/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py +++ b/sdk/face/azure-ai-vision-face/azure/ai/vision/face/models/_patch.py @@ -31,6 +31,7 @@ class FaceAttributeTypeDetection01(str, Enum, metaclass=CaseInsensitiveEnumMeta) class FaceAttributeTypeDetection03(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Available attribute options for detection_03 model.""" + BLUR = FaceAttributeType.BLUR.value HEAD_POSE = FaceAttributeType.HEAD_POSE.value MASK = FaceAttributeType.MASK.value diff --git a/sdk/face/azure-ai-vision-face/samples/samples_face_detection.py b/sdk/face/azure-ai-vision-face/samples/samples_face_detection.py index 56a4c57f9b8a..5f010bdaaa4e 100644 --- a/sdk/face/azure-ai-vision-face/samples/samples_face_detection.py +++ b/sdk/face/azure-ai-vision-face/samples/samples_face_detection.py @@ -64,6 +64,7 @@ def detect(self): recognition_model=FaceRecognitionModel.RECOGNITION_04, return_face_id=True, return_face_attributes=[ + FaceAttributeTypeDetection03.BLUR, FaceAttributeTypeDetection03.HEAD_POSE, FaceAttributeTypeDetection03.MASK, FaceAttributeTypeRecognition04.QUALITY_FOR_RECOGNITION, diff --git a/sdk/face/azure-ai-vision-face/samples/samples_face_detection_async.py b/sdk/face/azure-ai-vision-face/samples/samples_face_detection_async.py index 578dedb7467f..71fe86f1f97a 100644 --- a/sdk/face/azure-ai-vision-face/samples/samples_face_detection_async.py +++ b/sdk/face/azure-ai-vision-face/samples/samples_face_detection_async.py @@ -65,6 +65,7 @@ async def detect(self): recognition_model=FaceRecognitionModel.RECOGNITION_04, return_face_id=True, return_face_attributes=[ + FaceAttributeTypeDetection03.BLUR, FaceAttributeTypeDetection03.HEAD_POSE, FaceAttributeTypeDetection03.MASK, FaceAttributeTypeRecognition04.QUALITY_FOR_RECOGNITION, diff --git a/sdk/face/azure-ai-vision-face/tsp-location.yaml b/sdk/face/azure-ai-vision-face/tsp-location.yaml index 94d47ba080a4..8f4a68d3d8d1 100644 --- a/sdk/face/azure-ai-vision-face/tsp-location.yaml +++ b/sdk/face/azure-ai-vision-face/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Face -commit: 969c68562c5c4850257c9242a7a64b73c15f110d +commit: 60161e2f7d24680d91db0685e1912cfe85ba13d9 repo: Azure/azure-rest-api-specs additionalDirectories: