diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_face_client_enums.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_face_client_enums.py index b3fed2fd6d7f..f460b676a7e5 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_face_client_enums.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_face_client_enums.py @@ -16,6 +16,7 @@ class RecognitionModel(str, Enum): recognition_01 = "recognition_01" recognition_02 = "recognition_02" + recognition_03 = "recognition_03" class Gender(str, Enum): @@ -129,3 +130,4 @@ class DetectionModel(str, Enum): detection_01 = "detection_01" detection_02 = "detection_02" + detection_03 = "detection_03" diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models.py index bc0b3049df8e..218bf93924f5 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models.py @@ -153,7 +153,7 @@ class DetectedFace(Model): :param face_id: :type face_id: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param face_rectangle: Required. @@ -527,7 +527,7 @@ class MetaDataContract(NameAndUserDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel """ @@ -558,7 +558,7 @@ class FaceList(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param face_list_id: Required. FaceListId of the target face list. @@ -658,7 +658,8 @@ class FindSimilarRequest(Model): :param face_id: Required. FaceId of the query face. User needs to call Face - Detect first to get a valid faceId. Note that this faceId is not - persisted and will expire 24 hours after the detection call + persisted and will expire at the time specified by faceIdTimeToLive after + the detection call :type face_id: str :param face_list_id: An existing user-specified unique candidate face list, created in Face List - Create a Face List. Face list contains a set @@ -673,9 +674,10 @@ class FindSimilarRequest(Model): provided at the same time. :type large_face_list_id: str :param face_ids: An array of candidate faceIds. All of them are created by - Face - Detect and the faceIds will expire 24 hours after the detection - call. The number of faceIds is limited to 1000. Parameter faceListId, - largeFaceListId and faceIds should not be provided at the same time. + Face - Detect and the faceIds will expire at the time specified by + faceIdTimeToLive after the detection call. The number of faceIds is + limited to 1000. Parameter faceListId, largeFaceListId and faceIds should + not be provided at the same time. :type face_ids: list[str] :param max_num_of_candidates_returned: The number of top similar faces returned. The valid range is [1, 1000]. Default value: 20 . @@ -983,7 +985,7 @@ class LargeFaceList(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param large_face_list_id: Required. LargeFaceListId of the target large @@ -1019,7 +1021,7 @@ class LargePersonGroup(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param large_person_group_id: Required. LargePersonGroupId of the target @@ -1186,8 +1188,8 @@ class PersistedFace(Model): :param persisted_face_id: Required. The persistedFaceId of the target face, which is persisted and will not expire. Different from faceId - created by Face - Detect and will expire in 24 hours after the detection - call. + created by Face - Detect and will expire in at the time specified by + faceIdTimeToLive after the detection call. :type persisted_face_id: str :param user_data: User-provided data attached to the face. The size limit is 1KB. @@ -1256,7 +1258,7 @@ class PersonGroup(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param person_group_id: Required. PersonGroupId of the target person @@ -1288,7 +1290,8 @@ class SimilarFace(Model): All required parameters must be populated in order to send to Azure. :param face_id: FaceId of candidate face when find by faceIds. faceId is - created by Face - Detect and will expire 24 hours after the detection call + created by Face - Detect and will expire at the time specified by + faceIdTimeToLive after the detection call :type face_id: str :param persisted_face_id: PersistedFaceId of candidate face when find by faceListId. persistedFaceId in face list is persisted and will not expire. diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models_py3.py index 64ac24c59ed7..2ee49ca81704 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models_py3.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models_py3.py @@ -153,7 +153,7 @@ class DetectedFace(Model): :param face_id: :type face_id: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param face_rectangle: Required. @@ -527,7 +527,7 @@ class MetaDataContract(NameAndUserDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel """ @@ -558,7 +558,7 @@ class FaceList(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param face_list_id: Required. FaceListId of the target face list. @@ -658,7 +658,8 @@ class FindSimilarRequest(Model): :param face_id: Required. FaceId of the query face. User needs to call Face - Detect first to get a valid faceId. Note that this faceId is not - persisted and will expire 24 hours after the detection call + persisted and will expire at the time specified by faceIdTimeToLive after + the detection call :type face_id: str :param face_list_id: An existing user-specified unique candidate face list, created in Face List - Create a Face List. Face list contains a set @@ -673,9 +674,10 @@ class FindSimilarRequest(Model): provided at the same time. :type large_face_list_id: str :param face_ids: An array of candidate faceIds. All of them are created by - Face - Detect and the faceIds will expire 24 hours after the detection - call. The number of faceIds is limited to 1000. Parameter faceListId, - largeFaceListId and faceIds should not be provided at the same time. + Face - Detect and the faceIds will expire at the time specified by + faceIdTimeToLive after the detection call. The number of faceIds is + limited to 1000. Parameter faceListId, largeFaceListId and faceIds should + not be provided at the same time. :type face_ids: list[str] :param max_num_of_candidates_returned: The number of top similar faces returned. The valid range is [1, 1000]. Default value: 20 . @@ -983,7 +985,7 @@ class LargeFaceList(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param large_face_list_id: Required. LargeFaceListId of the target large @@ -1019,7 +1021,7 @@ class LargePersonGroup(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param large_person_group_id: Required. LargePersonGroupId of the target @@ -1186,8 +1188,8 @@ class PersistedFace(Model): :param persisted_face_id: Required. The persistedFaceId of the target face, which is persisted and will not expire. Different from faceId - created by Face - Detect and will expire in 24 hours after the detection - call. + created by Face - Detect and will expire in at the time specified by + faceIdTimeToLive after the detection call. :type persisted_face_id: str :param user_data: User-provided data attached to the face. The size limit is 1KB. @@ -1256,7 +1258,7 @@ class PersonGroup(MetaDataContract): :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02'. Default value: "recognition_01" . + 'recognition_02', 'recognition_03'. Default value: "recognition_01" . :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param person_group_id: Required. PersonGroupId of the target person @@ -1288,7 +1290,8 @@ class SimilarFace(Model): All required parameters must be populated in order to send to Azure. :param face_id: FaceId of candidate face when find by faceIds. faceId is - created by Face - Detect and will expire 24 hours after the detection call + created by Face - Detect and will expire at the time specified by + faceIdTimeToLive after the detection call :type face_id: str :param persisted_face_id: PersistedFaceId of candidate face when find by faceListId. persistedFaceId in face list is persisted and will not expire. diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_list_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_list_operations.py index 20457119ee27..23b4641c7cb4 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_list_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_list_operations.py @@ -41,25 +41,18 @@ def create( optional userData and recognitionModel. Up to 64 face lists are allowed in one subscription.
Face list is a list of faces, up to 1,000 faces, and used by - [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + [Face - Find Similar](../face/findsimilar).
After creation, user should use [FaceList - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250) - to import the faces. No image will be stored. Only the extracted face - features are stored on server until [FaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) - is called. + Face](../facelist/addfacefromurl) to import the faces. No image will be + stored. Only the extracted face features are stored on server until + [FaceList - Delete](../facelist/delete) is called.
Find Similar is used for scenario like finding celebrity-like faces, similar face filtering, or as a light way face identification. But if the actual use is to identify person, please use - [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) - / - [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) - and [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). -
Please consider - [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) - when the face number is large. It can support up to 1,000,000 faces. + [PersonGroup](../persongroup) / [LargePersonGroup](../largepersongroup) + and [Face - Identify](../face/identify). +
Please consider [LargeFaceList](../largefacelist) when the face + number is large. It can support up to 1,000,000 faces.
'recognitionModel' should be specified to associate with this face list. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify @@ -68,13 +61,8 @@ def create( associated with the collection. Existing face features in a face list can't be updated to features extracted by another version of recognition model. - * 'recognition_01': The default recognition model for [FaceList- - Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b). - All those face lists created before 2019 March are bonded with this - recognition model. - * 'recognition_02': Recognition model released in 2019 March. - 'recognition_02' is recommended since its overall accuracy is improved - compared with 'recognition_01'. + Please Refer to [Specify a face recognition + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model). :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -83,7 +71,7 @@ def create( :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02' + 'recognition_02', 'recognition_03' :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param dict custom_headers: headers that will be added to the request @@ -292,7 +280,7 @@ def list( """List face lists’ faceListId, name, userData and recognitionModel.
To get face information inside faceList use [FaceList - - Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c) + Get](../facelist/get) . :param return_recognition_model: A value indicating whether the @@ -403,14 +391,10 @@ def add_face_from_url( specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [FaceList - Delete - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395251) - or [FaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) - is called. + [FaceList - Delete Face](../facelist/deleteface) or [FaceList - + Delete](../facelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -418,8 +402,7 @@ def add_face_from_url( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -430,16 +413,7 @@ def add_face_from_url( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [FaceList - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. |. + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -459,7 +433,8 @@ def add_face_from_url( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request @@ -527,14 +502,10 @@ def add_face_from_stream( specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [FaceList - Delete - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395251) - or [FaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) - is called. + [FaceList - Delete Face](../facelist/deleteface) or [FaceList - + Delete](../facelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -542,8 +513,7 @@ def add_face_from_stream( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -554,16 +524,7 @@ def add_face_from_stream( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [FaceList - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. |. + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -583,7 +544,8 @@ def add_face_from_stream( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_operations.py index d2da536c3e62..7e93b36fe6a8 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_operations.py @@ -39,17 +39,15 @@ def find_similar( self, face_id, face_list_id=None, large_face_list_id=None, face_ids=None, max_num_of_candidates_returned=20, mode="matchPerson", custom_headers=None, raw=False, **operation_config): """Given query face's faceId, to search the similar-looking faces from a faceId array, a face list or a large face list. faceId array contains - the faces created by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), - which will expire 24 hours after creation. A "faceListId" is created by - [FaceList - - Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b) - containing persistedFaceIds that will not expire. And a - "largeFaceListId" is created by [LargeFaceList - - Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) - containing persistedFaceIds that will also not expire. Depending on the - input the returned similar faces list contains faceIds or - persistedFaceIds ranked by similarity. + the faces created by [Face - Detect With Url](detectwithurl) or [Face - + Detect With Stream](detectwithstream), which will expire at the time + specified by faceIdTimeToLive after creation. A "faceListId" is created + by [FaceList - Create](../facelist/create) containing persistedFaceIds + that will not expire. And a "largeFaceListId" is created by + [LargeFaceList - Create](../largefacelist/create) containing + persistedFaceIds that will also not expire. Depending on the input the + returned similar faces list contains faceIds or persistedFaceIds ranked + by similarity.
Find similar has two working modes, "matchPerson" and "matchFace". "matchPerson" is the default mode that it tries to find faces of the same person as possible by using internal same-person thresholds. It is @@ -65,7 +63,8 @@ def find_similar( :param face_id: FaceId of the query face. User needs to call Face - Detect first to get a valid faceId. Note that this faceId is not - persisted and will expire 24 hours after the detection call + persisted and will expire at the time specified by faceIdTimeToLive + after the detection call :type face_id: str :param face_list_id: An existing user-specified unique candidate face list, created in Face List - Create a Face List. Face list contains a @@ -80,10 +79,10 @@ def find_similar( be provided at the same time. :type large_face_list_id: str :param face_ids: An array of candidate faceIds. All of them are - created by Face - Detect and the faceIds will expire 24 hours after - the detection call. The number of faceIds is limited to 1000. - Parameter faceListId, largeFaceListId and faceIds should not be - provided at the same time. + created by Face - Detect and the faceIds will expire at the time + specified by faceIdTimeToLive after the detection call. The number of + faceIds is limited to 1000. Parameter faceListId, largeFaceListId and + faceIds should not be provided at the same time. :type face_ids: list[str] :param max_num_of_candidates_returned: The number of top similar faces returned. The valid range is [1, 1000]. @@ -155,9 +154,8 @@ def group( any similar counterpart face from original faces. The messyGroup will not appear in the result if all faces found their counterparts. * Group API needs at least 2 candidate faces and 1000 at most. We - suggest to try [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a) - when you only have 2 candidate faces. + suggest to try [Face - Verify](verifyfacetoface) when you only have 2 + candidate faces. * The 'recognitionModel' associated with the query faces' faceIds should be the same. . @@ -226,10 +224,8 @@ def identify( largePersonGroupId), and return candidate person(s) for that face ranked by similarity confidence. The person group/large person group should be trained to make it ready for identification. See more in - [PersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) - and [LargePersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). + [PersonGroup - Train](../persongroup/train) and [LargePersonGroup - + Train](../largepersongroup/train).
Remarks:
* The algorithm allows more than one face to be identified @@ -242,10 +238,9 @@ def identify( * Number of candidates returned is restricted by maxNumOfCandidatesReturned and confidenceThreshold. If no person is identified, the returned candidates will be an empty array. - * Try [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) - when you need to find similar faces from a face list/large face list - instead of a person group/large person group. + * Try [Face - Find Similar](../face/findsimilar) when you need to find + similar faces from a face list/large face list instead of a person + group/large person group. * The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target person group or large person group. @@ -395,19 +390,16 @@ def verify_face_to_face( verify_face_to_face.metadata = {'url': '/verify'} def detect_with_url( - self, url, return_face_id=True, return_face_landmarks=False, return_face_attributes=None, recognition_model="recognition_01", return_recognition_model=False, detection_model="detection_01", custom_headers=None, raw=False, **operation_config): + self, url, return_face_id=True, return_face_landmarks=False, return_face_attributes=None, recognition_model="recognition_01", return_recognition_model=False, detection_model="detection_01", face_id_time_to_live=86400, custom_headers=None, raw=False, **operation_config): """Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes.
* No image will be stored. Only the extracted face feature will be stored on server. The faceId is an identifier of the face feature and - will be used in [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), - [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), - and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). - The stored face feature(s) will expire and be deleted 24 hours after - the original detection call. + will be used in [Face - Identify](../face/identify), [Face - + Verify](../face/verifyfacetoface), and [Face - Find + Similar](../face/findsimilar). The stored face feature(s) will expire + and be deleted at the time specified by faceIdTimeToLive after the + original detection call. * Optional parameters include faceId, landmarks, and attributes. Attributes include age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and @@ -418,46 +410,25 @@ def detect_with_url( * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. * For optimal results when querying [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), - [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), - and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) - ('returnFaceId' is true), please use faces that are: frontal, clear, - and with a minimum size of 200x200 pixels (100 pixels between eyes). + Identify](../face/identify), [Face - Verify](../face/verifyfacetoface), + and [Face - Find Similar](../face/findsimilar) ('returnFaceId' is + true), please use faces that are: frontal, clear, and with a minimum + size of 200x200 pixels (100 pixels between eyes). * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. | + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). * Different 'recognitionModel' values are provided. If follow-up operations like Verify, Identify, Find Similar are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with - the specified recognition model. More details, please refer to [How to - specify a recognition - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'recognition_01': | The default recognition model for [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). - All those faceIds created before 2019 March are bonded with this - recognition model. | - | 'recognition_02': | Recognition model released in 2019 March. - 'recognition_02' is recommended since its overall accuracy is improved - compared with 'recognition_01'. |. + the specified recognition model. More details, please refer to [Specify + a recognition + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model). :param url: Publicly reachable URL of an image :type url: str @@ -482,7 +453,7 @@ def detect_with_url( (Large)FaceList - Create or (Large)PersonGroup - Create. The default value is 'recognition_01', if latest model needed, please explicitly specify the model you need. Possible values include: 'recognition_01', - 'recognition_02' + 'recognition_02', 'recognition_03' :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param return_recognition_model: A value indicating whether the @@ -493,9 +464,14 @@ def detect_with_url( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel + :param face_id_time_to_live: The number of seconds for the faceId + being cached. Supported range from 60 seconds up to 86400 seconds. The + default value is 86400 (24 hours). + :type face_id_time_to_live: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -530,6 +506,8 @@ def detect_with_url( query_parameters['returnRecognitionModel'] = self._serialize.query("return_recognition_model", return_recognition_model, 'bool') if detection_model is not None: query_parameters['detectionModel'] = self._serialize.query("detection_model", detection_model, 'str') + if face_id_time_to_live is not None: + query_parameters['faceIdTimeToLive'] = self._serialize.query("face_id_time_to_live", face_id_time_to_live, 'int', maximum=86400, minimum=60) # Construct headers header_parameters = {} @@ -632,19 +610,16 @@ def verify_face_to_person( verify_face_to_person.metadata = {'url': '/verify'} def detect_with_stream( - self, image, return_face_id=True, return_face_landmarks=False, return_face_attributes=None, recognition_model="recognition_01", return_recognition_model=False, detection_model="detection_01", custom_headers=None, raw=False, callback=None, **operation_config): + self, image, return_face_id=True, return_face_landmarks=False, return_face_attributes=None, recognition_model="recognition_01", return_recognition_model=False, detection_model="detection_01", face_id_time_to_live=86400, custom_headers=None, raw=False, callback=None, **operation_config): """Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes.
* No image will be stored. Only the extracted face feature will be stored on server. The faceId is an identifier of the face feature and - will be used in [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), - [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), - and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). - The stored face feature(s) will expire and be deleted 24 hours after - the original detection call. + will be used in [Face - Identify](../face/identify), [Face - + Verify](../face/verifyfacetoface), and [Face - Find + Similar](../face/findsimilar). The stored face feature(s) will expire + and be deleted at the time specified by faceIdTimeToLive after the + original detection call. * Optional parameters include faceId, landmarks, and attributes. Attributes include age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and @@ -655,46 +630,25 @@ def detect_with_stream( * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small. * For optimal results when querying [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239), - [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), - and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) - ('returnFaceId' is true), please use faces that are: frontal, clear, - and with a minimum size of 200x200 pixels (100 pixels between eyes). + Identify](../face/identify), [Face - Verify](../face/verifyfacetoface), + and [Face - Find Similar](../face/findsimilar) ('returnFaceId' is + true), please use faces that are: frontal, clear, and with a minimum + size of 200x200 pixels (100 pixels between eyes). * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. | + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) * Different 'recognitionModel' values are provided. If follow-up operations like Verify, Identify, Find Similar are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with - the specified recognition model. More details, please refer to [How to - specify a recognition - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'recognition_01': | The default recognition model for [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). - All those faceIds created before 2019 March are bonded with this - recognition model. | - | 'recognition_02': | Recognition model released in 2019 March. - 'recognition_02' is recommended since its overall accuracy is improved - compared with 'recognition_01'. |. + the specified recognition model. More details, please refer to [Specify + a recognition + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model). :param image: An image stream. :type image: Generator @@ -719,7 +673,7 @@ def detect_with_stream( (Large)FaceList - Create or (Large)PersonGroup - Create. The default value is 'recognition_01', if latest model needed, please explicitly specify the model you need. Possible values include: 'recognition_01', - 'recognition_02' + 'recognition_02', 'recognition_03' :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param return_recognition_model: A value indicating whether the @@ -730,9 +684,14 @@ def detect_with_stream( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel + :param face_id_time_to_live: The number of seconds for the faceId + being cached. Supported range from 60 seconds up to 86400 seconds. The + default value is 86400 (24 hours). + :type face_id_time_to_live: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -770,6 +729,8 @@ def detect_with_stream( query_parameters['returnRecognitionModel'] = self._serialize.query("return_recognition_model", return_recognition_model, 'bool') if detection_model is not None: query_parameters['detectionModel'] = self._serialize.query("detection_model", detection_model, 'str') + if face_id_time_to_live is not None: + query_parameters['faceIdTimeToLive'] = self._serialize.query("face_id_time_to_live", face_id_time_to_live, 'int', maximum=86400, minimum=60) # Construct headers header_parameters = {} diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_face_list_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_face_list_operations.py index 225794573afc..5170930a35a5 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_face_list_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_face_list_operations.py @@ -40,26 +40,18 @@ def create( """Create an empty large face list with user-specified largeFaceListId, name, an optional userData and recognitionModel.
Large face list is a list of faces, up to 1,000,000 faces, and - used by [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + used by [Face - Find Similar](../face/findsimilar).
After creation, user should use [LargeFaceList Face - - Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) - to import the faces and [LargeFaceList - - Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) - to make it ready for [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). - No image will be stored. Only the extracted face features are stored on - server until [LargeFaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) - is called. + Add](../largefacelist/addfacefromurl) to import the faces and + [LargeFaceList - Train](../largefacelist/train) to make it ready for + [Face - Find Similar](../face/findsimilar). No image will be stored. + Only the extracted face features are stored on server until + [LargeFaceList - Delete](../largefacelist/delete) is called.
Find Similar is used for scenario like finding celebrity-like faces, similar face filtering, or as a light way face identification. But if the actual use is to identify person, please use - [PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244) - / - [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) - and [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + [PersonGroup](../persongroup) / [LargePersonGroup](../largepersongroup) + and [Face - Identify](../face/identify).
'recognitionModel' should be specified to associate with this large face list. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify @@ -67,14 +59,8 @@ def create( existing large face list will use the recognition model that's already associated with the collection. Existing face features in a large face list can't be updated to features extracted by another version of - recognition model. - * 'recognition_01': The default recognition model for [LargeFaceList- - Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc). - All those large face lists created before 2019 March are bonded with - this recognition model. - * 'recognition_02': Recognition model released in 2019 March. - 'recognition_02' is recommended since its overall accuracy is improved - compared with 'recognition_01'. + recognition model. Please refer to [Specify a recognition + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model). Large face list quota: * Free-tier subscription quota: 64 large face lists. * S0-tier subscription quota: 1,000,000 large face lists. @@ -87,7 +73,7 @@ def create( :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02' + 'recognition_02', 'recognition_03' :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param dict custom_headers: headers that will be added to the request @@ -352,8 +338,7 @@ def list( """List large face lists’ information of largeFaceListId, name, userData and recognitionModel.
To get face information inside largeFaceList use [LargeFaceList Face - - Get](/docs/services/563879b61984550e40cbbe8d/operations/5a158cf2d2de3616c086f2d5)
+ Get](../largefacelist/getface)
* Large face lists are stored in alphabetical order of largeFaceListId. * "start" parameter (string, optional) is a user-provided largeFaceListId value that returned entries have larger ids by string @@ -643,14 +628,10 @@ def add_face_from_url( specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [LargeFaceList Face - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4) - or [LargeFaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) - is called. + [LargeFaceList Face - Delete](../largefacelist/deleteface) or + [LargeFaceList - Delete](../largefacelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -658,8 +639,7 @@ def add_face_from_url( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -670,17 +650,7 @@ def add_face_from_url( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [LargeFaceList - - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. | + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) Quota: * Free-tier subscription quota: 1,000 faces per large face list. * S0-tier subscription quota: 1,000,000 faces per large face list. @@ -704,7 +674,8 @@ def add_face_from_url( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request @@ -838,14 +809,10 @@ def add_face_from_stream( specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [LargeFaceList Face - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4) - or [LargeFaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) - is called. + [LargeFaceList Face - Delete](../largefacelist/deleteface) or + [LargeFaceList - Delete](../largefacelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -853,8 +820,7 @@ def add_face_from_stream( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -865,17 +831,7 @@ def add_face_from_stream( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [LargeFaceList - - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. | + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). Quota: * Free-tier subscription quota: 1,000 faces per large face list. * S0-tier subscription quota: 1,000,000 faces per large face list. @@ -899,7 +855,8 @@ def add_face_from_stream( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_operations.py index 4eb2a64c7dc5..c06f6b40a1d6 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_operations.py @@ -43,18 +43,13 @@ def create( data, including face recognition feature, and up to 1,000,000 people.
After creation, use [LargePersonGroup Person - - Create](/docs/services/563879b61984550e40cbbe8d/operations/599adcba3a7b9412a4d53f40) - to add person into the group, and call [LargePersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4) - to get this group ready for [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + Create](../largepersongroupperson/create) to add person into the group, + and call [LargePersonGroup - Train](../largepersongroup/train) to get + this group ready for [Face - Identify](../face/identify).
No image will be stored. Only the person's extracted face features and userData will be stored on server until [LargePersonGroup - Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) - or [LargePersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) - is called. + Person - Delete](../largepersongroupperson/delete) or [LargePersonGroup + - Delete](../largepersongroup/delete) is called.
'recognitionModel' should be specified to associate with this large person group. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify @@ -62,15 +57,9 @@ def create( existing large person group will use the recognition model that's already associated with the collection. Existing face features in a large person group can't be updated to features extracted by another - version of recognition model. - * 'recognition_01': The default recognition model for [LargePersonGroup - - - Create](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). - All those large person groups created before 2019 March are bonded with - this recognition model. - * 'recognition_02': Recognition model released in 2019 March. - 'recognition_02' is recommended since its overall accuracy is improved - compared with 'recognition_01'. + version of recognition model. Please refer to [Specify a face + recognition + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model). Large person group quota: * Free-tier subscription quota: 1,000 large person groups. * S0-tier subscription quota: 1,000,000 large person groups. @@ -83,7 +72,7 @@ def create( :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02' + 'recognition_02', 'recognition_03' :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param dict custom_headers: headers that will be added to the request @@ -181,8 +170,8 @@ def get( """Retrieve the information of a large person group, including its name, userData and recognitionModel. This API returns large person group information only, use [LargePersonGroup Person - - List](/docs/services/563879b61984550e40cbbe8d/operations/599adda06ac60f11b48b5aa1) - instead to retrieve person information under the large person group. + List](../largepersongroupperson/list) instead to retrieve person + information under the large person group. . :param large_person_group_id: Id referencing a particular large person diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_person_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_person_operations.py index 2e5dc3ffcee8..3fe8fec01fee 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_person_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_person_operations.py @@ -514,15 +514,11 @@ def add_face_from_url( rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until [LargePersonGroup PersonFace - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ae2966ac60f11b48b5aa3), - [LargePersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) - or [LargePersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) - is called. + Delete](../largepersongroupperson/deleteface), [LargePersonGroup Person + - Delete](../largepersongroupperson/delete) or [LargePersonGroup - + Delete](../largepersongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -531,8 +527,7 @@ def add_face_from_url( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -544,17 +539,7 @@ def add_face_from_url( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [LargePersonGroup - Person - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/599adf2a3a7b9412a4d53f42). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. |. + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). :param large_person_group_id: Id referencing a particular large person group. @@ -577,7 +562,8 @@ def add_face_from_url( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request @@ -647,15 +633,11 @@ def add_face_from_stream( rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until [LargePersonGroup PersonFace - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ae2966ac60f11b48b5aa3), - [LargePersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) - or [LargePersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) - is called. + Delete](../largepersongroupperson/deleteface), [LargePersonGroup Person + - Delete](../largepersongroupperson/delete) or [LargePersonGroup - + Delete](../largepersongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -664,8 +646,7 @@ def add_face_from_stream( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -677,17 +658,7 @@ def add_face_from_stream( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [LargePersonGroup - Person - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/599adf2a3a7b9412a4d53f42). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. |. + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). :param large_person_group_id: Id referencing a particular large person group. @@ -710,7 +681,8 @@ def add_face_from_stream( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_operations.py index 66cf2d6ca01c..003334fd3a75 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_operations.py @@ -42,18 +42,13 @@ def create(
A person group is the container of the uploaded person data, including face recognition features.
After creation, use [PersonGroup Person - - Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c) - to add persons into the group, and then call [PersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) - to get this group ready for [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + Create](../persongroupperson/create) to add persons into the group, and + then call [PersonGroup - Train](../persongroup/train) to get this group + ready for [Face - Identify](../face/identify).
No image will be stored. Only the person's extracted face features and userData will be stored on server until [PersonGroup - Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) - or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) - is called. + Person - Delete](../persongroupperson/delete) or [PersonGroup - + Delete](../persongroup/delete) is called.
'recognitionModel' should be specified to associate with this person group. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify @@ -62,21 +57,13 @@ def create( associated with the collection. Existing face features in a person group can't be updated to features extracted by another version of recognition model. - * 'recognition_01': The default recognition model for [PersonGroup - - Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244). - All those person groups created before 2019 March are bonded with this - recognition model. - * 'recognition_02': Recognition model released in 2019 March. - 'recognition_02' is recommended since its overall accuracy is improved - compared with 'recognition_01'. Person group quota: * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000 persons. * S0-tier subscription quota: 1,000,000 person groups. Each holds up to 10,000 persons. * to handle larger scale face identification problem, please consider - using - [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). + using [LargePersonGroup](../largepersongroup). :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -85,7 +72,7 @@ def create( :param user_data: User specified data. Length should not exceed 16KB. :type user_data: str :param recognition_model: Possible values include: 'recognition_01', - 'recognition_02' + 'recognition_02', 'recognition_03' :type recognition_model: str or ~azure.cognitiveservices.vision.face.models.RecognitionModel :param dict custom_headers: headers that will be added to the request @@ -181,7 +168,7 @@ def get( self, person_group_id, return_recognition_model=False, custom_headers=None, raw=False, **operation_config): """Retrieve person group name, userData and recognitionModel. To get person information under this personGroup, use [PersonGroup Person - - List](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395241). + List](../persongroupperson/list). :param person_group_id: Id referencing a particular person group. :type person_group_id: str diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_person_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_person_operations.py index 3d62f95c7cee..cd4fb988433c 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_person_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_person_group_person_operations.py @@ -445,16 +445,11 @@ def update_face( can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [PersonGroup PersonFace - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e), - [PersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) - or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) - is called. + [PersonGroup PersonFace - Delete](../persongroupperson/deleteface), + [PersonGroup Person - Delete](../persongroupperson/delete) or + [PersonGroup - Delete](../persongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -463,8 +458,7 @@ def update_face( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -535,16 +529,11 @@ def add_face_from_url( can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [PersonGroup PersonFace - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e), - [PersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) - or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) - is called. + [PersonGroup PersonFace - Delete](../persongroupperson/deleteface), + [PersonGroup Person - Delete](../persongroupperson/delete) or + [PersonGroup - Delete](../persongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -553,8 +542,7 @@ def add_face_from_url( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -566,17 +554,7 @@ def add_face_from_url( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [PersonGroup Person - - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. |. + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -598,7 +576,8 @@ def add_face_from_url( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request @@ -667,16 +646,11 @@ def add_face_from_stream( can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until - [PersonGroup PersonFace - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e), - [PersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) - or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) - is called. + [PersonGroup PersonFace - Delete](../persongroupperson/deleteface), + [PersonGroup Person - Delete](../persongroupperson/delete) or + [PersonGroup - Delete](../persongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + - Detect](../face/detectwithurl). * Higher face image quality means better recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger. @@ -685,8 +659,7 @@ def add_face_from_stream( allowed image file size is from 1KB to 6MB. * "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" - rectangle is not returned from [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), + rectangle is not returned from [Face - Detect](../face/detectwithurl), there’s no guarantee to detect and add the face successfully. * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures. @@ -698,17 +671,7 @@ def add_face_from_stream( 1920x1080 pixels will need a proportionally larger minimum face size. * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to [How to specify a detection - model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model) - | Model | Recommended use-case(s) | - | ---------- | -------- | - | 'detection_01': | The default detection model for [PersonGroup Person - - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b). - Recommend for near frontal face detection. For scenarios with - exceptionally large angle (head-pose) faces, occluded faces or wrong - image orientation, the faces in such cases may not be detected. | - | 'detection_02': | Detection model released in 2019 May with improved - accuracy especially on small, side and blurry faces. |. + model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model). :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -730,7 +693,8 @@ def add_face_from_stream( can be provided when performing Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add Face. The default value is 'detection_01', if another model is needed, please explicitly specify - it. Possible values include: 'detection_01', 'detection_02' + it. Possible values include: 'detection_01', 'detection_02', + 'detection_03' :type detection_model: str or ~azure.cognitiveservices.vision.face.models.DetectionModel :param dict custom_headers: headers that will be added to the request