From 251b19a7149bb8edf1986292f6564d98ad1ddd86 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Wed, 24 Jun 2020 14:57:52 -0700 Subject: [PATCH 1/2] FaceAPI 0.4.1 --- .../CHANGELOG.md | 6 ++ .../vision/face/models/_face_client_enums.py | 1 + .../vision/face/models/_models.py | 12 ++-- .../vision/face/models/_models_py3.py | 12 ++-- .../face/operations/_face_list_operations.py | 49 ++++++------- .../face/operations/_face_operations.py | 72 ++++++++++--------- .../operations/_large_face_list_operations.py | 51 ++++++------- .../_large_person_group_operations.py | 21 +++--- .../_large_person_group_person_operations.py | 28 ++++---- .../operations/_person_group_operations.py | 23 +++--- .../_person_group_person_operations.py | 38 +++++----- .../cognitiveservices/vision/face/version.py | 2 +- 12 files changed, 164 insertions(+), 151 deletions(-) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/CHANGELOG.md b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/CHANGELOG.md index 4f4f387ef392..d41740694d64 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/CHANGELOG.md +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 0.4.1 (2020-06-24) + +**Features** + +- Add recognition_03 support + ## 0.4.0 (2019-06-27) **Features** 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..0fa94e7e7355 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): 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..3d4b0c38de00 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. @@ -983,7 +983,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 +1019,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 @@ -1256,7 +1256,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 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..44ec04f6a8fc 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. @@ -983,7 +983,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 +1019,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 @@ -1256,7 +1256,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 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..ea195c665a64 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 @@ -42,23 +42,23 @@ def create( 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). + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/findsimilar).
After creation, user should use [FaceList - Add - Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250) + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/addfacefromurl) 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) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/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) + [PersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup) / - [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + [LargePersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup) and [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/identify).
Please consider - [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + [LargeFaceList](https://docs.microsoft.com/rest/api/cognitiveservices/face/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 @@ -69,12 +69,13 @@ def create( 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). + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/create). 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'. + * 'recognition_03': Recognition model released in 2020 May. + 'recognition_03' is recommended since its overall accuracy is improved + compared with 'recognition_01' and 'recognition_02'. :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -83,7 +84,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 +293,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](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/get) . :param return_recognition_model: A value indicating whether the @@ -404,13 +405,13 @@ def add_face_from_url( 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) + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/deleteface) or [FaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -419,7 +420,7 @@ def add_face_from_url( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,11 +431,11 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/addfacefromurl). 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. | @@ -528,13 +529,13 @@ def add_face_from_stream( 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) + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/deleteface) or [FaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -543,7 +544,7 @@ def add_face_from_stream( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,11 +555,11 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/addfacefromurl). 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. | 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..d5617ce3868b 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 @@ -40,13 +40,13 @@ def find_similar( """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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl), which will expire 24 hours after creation. A "faceListId" is created by [FaceList - - Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b) + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/create) containing persistedFaceIds that will not expire. And a "largeFaceListId" is created by [LargeFaceList - - Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -156,7 +156,7 @@ def group( 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) + Verify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/verifyfacetoface) when you only have 2 candidate faces. * The 'recognitionModel' associated with the query faces' faceIds should be the same. @@ -227,9 +227,9 @@ def identify( 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) + Train](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/train) and [LargePersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4). + Train](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup/train).
Remarks:
* The algorithm allows more than one face to be identified @@ -243,7 +243,7 @@ def identify( 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) + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/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 @@ -401,11 +401,11 @@ def detect_with_url( * 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), + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/identify), [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + Verify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/verifyfacetoface), and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/findsimilar). The stored face feature(s) will expire and be deleted 24 hours after the original detection call. * Optional parameters include faceId, landmarks, and attributes. @@ -418,11 +418,11 @@ 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), + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/identify), [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + Verify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/verifyfacetoface), and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/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 @@ -430,11 +430,11 @@ def detect_with_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](https://docs.microsoft.com/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). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl). 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. | @@ -448,16 +448,17 @@ def detect_with_url( 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](https://docs.microsoft.com/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). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl). 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'. |. + | 'recognition_02': | Recognition model released in 2019 March. | + | 'recognition_03': | Recognition model released in 2020 May. + 'recognition_03' is recommended since its overall accuracy is improved + compared with 'recognition_01' and 'recognition_02'. |. :param url: Publicly reachable URL of an image :type url: str @@ -482,7 +483,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 @@ -638,11 +639,11 @@ def detect_with_stream( * 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), + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/identify), [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + Verify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/verifyfacetoface), and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/findsimilar). The stored face feature(s) will expire and be deleted 24 hours after the original detection call. * Optional parameters include faceId, landmarks, and attributes. @@ -655,11 +656,11 @@ 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), + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/identify), [Face - - Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a), + Verify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/verifyfacetoface), and [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237) + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/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 @@ -667,11 +668,11 @@ def detect_with_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](https://docs.microsoft.com/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). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl). 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. | @@ -685,16 +686,17 @@ def detect_with_stream( 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](https://docs.microsoft.com/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). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl). 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'. |. + | 'recognition_02': | Recognition model released in 2019 March. | + | 'recognition_03': | Recognition model released in 2020 May. + 'recognition_03' is recommended since its overall accuracy is improved + compared with 'recognition_01' and 'recognition_02'. |. :param image: An image stream. :type image: Generator @@ -719,7 +721,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 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..5d024fca92a3 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 @@ -41,25 +41,25 @@ def create( 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). + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/findsimilar).
After creation, user should use [LargeFaceList Face - - Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) + Add](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/addfacefromurl) to import the faces and [LargeFaceList - - Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) + Train](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/train) to make it ready for [Face - Find - Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). + Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/findsimilar). No image will be stored. Only the extracted face features are stored on server until [LargeFaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/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) + [PersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup) / - [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) + [LargePersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup) and [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/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 @@ -69,12 +69,13 @@ def create( 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). + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/create). 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_03': Recognition model released in 2020 May. + 'recognition_03' is recommended since its overall accuracy is improved + compared with 'recognition_01' and 'recognition_02'. Large face list quota: * Free-tier subscription quota: 64 large face lists. * S0-tier subscription quota: 1,000,000 large face lists. @@ -87,7 +88,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,7 +353,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)
* Large face lists are stored in alphabetical order of largeFaceListId. * "start" parameter (string, optional) is a user-provided @@ -644,13 +645,13 @@ def add_face_from_url( 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) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/deleteface) or [LargeFaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -659,7 +660,7 @@ def add_face_from_url( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,12 +671,12 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/addfacefromurl). 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. | @@ -839,13 +840,13 @@ def add_face_from_stream( 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) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/deleteface) or [LargeFaceList - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -854,7 +855,7 @@ def add_face_from_stream( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,12 +866,12 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist/addfacefromurl). 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. | 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..acb548a0d854 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,17 +43,17 @@ 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) + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/create) to add person into the group, and call [LargePersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4) + Train](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup/train) to get this group ready for [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/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) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/delete) or [LargePersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup/delete) is called.
'recognitionModel' should be specified to associate with this large person group. The default value for 'recognitionModel' is @@ -65,12 +65,13 @@ def create( version of recognition model. * 'recognition_01': The default recognition model for [LargePersonGroup - - Create](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup/create). 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'. + * 'recognition_03': Recognition model released in 2020 May. + 'recognition_03' is recommended since its overall accuracy is improved + compared with 'recognition_01' and 'recognition_02'. 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 +84,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 +182,7 @@ 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) + List](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/list) instead to retrieve person information under the large person group. . 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..c872903b6164 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,15 @@ 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), + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/deleteface), [LargePersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/delete) or [LargePersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -532,7 +532,7 @@ def add_face_from_url( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,12 +544,12 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/addfacefromurl). 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. | @@ -647,15 +647,15 @@ 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), + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/deleteface), [LargePersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599ade5c6ac60f11b48b5aa2) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/delete) or [LargePersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/599adc216ac60f11b48b5a9f) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -665,7 +665,7 @@ def add_face_from_stream( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,12 +677,12 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroupperson/addfacefromurl). 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. | 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..c20110157e1e 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,17 +42,17 @@ 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) + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/create) to add persons into the group, and then call [PersonGroup - - Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249) + Train](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/train) to get this group ready for [Face - - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). + Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/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) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/delete) or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/delete) is called.
'recognitionModel' should be specified to associate with this person group. The default value for 'recognitionModel' is @@ -63,12 +63,13 @@ def create( 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). + Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/create). 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'. + * 'recognition_03': Recognition model released in 2020 May. + 'recognition_03' is recommended since its overall accuracy is improved + compared with 'recognition_01' and 'recognition_02'. Person group quota: * Free-tier subscription quota: 1,000 person groups. Each holds up to 1,000 persons. @@ -76,7 +77,7 @@ def create( 10,000 persons. * to handle larger scale face identification problem, please consider using - [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). + [LargePersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup). :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -85,7 +86,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 +182,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](https://docs.microsoft.com/rest/api/cognitiveservices/face/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..26c26bc1406b 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 @@ -446,15 +446,15 @@ def update_face( 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), + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/deleteface), [PersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/delete) or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -464,7 +464,7 @@ def update_face( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -536,15 +536,15 @@ def add_face_from_url( 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), + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/deleteface), [PersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/delete) or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -554,7 +554,7 @@ def add_face_from_url( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,12 +566,12 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/addfacefromurl). 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. | @@ -668,15 +668,15 @@ def add_face_from_stream( 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), + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/deleteface), [PersonGroup Person - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/delete) or [PersonGroup - - Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) + Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup/delete) is called.
Note persistedFaceId is different from faceId generated by [Face - - Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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. @@ -686,7 +686,7 @@ def add_face_from_stream( * "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), + Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/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,12 +698,12 @@ 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](https://docs.microsoft.com/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). + Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroupperson/addfacefromurl). 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. | diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py index 85da2c00c1a6..e9983c0d8c01 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.4.0" +VERSION = "0.4.1" From 4d8f69fb838c81bfcc10680188e1a4738335dd38 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Wed, 24 Jun 2020 22:01:08 +0000 Subject: [PATCH 2/2] Packaging update of azure-cognitiveservices-vision-face --- .../README.md | 23 +++++++++---------- .../setup.py | 5 +++- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/README.md b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/README.md index c16696d61e34..858f4fa58c79 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/README.md +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/README.md @@ -1,22 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Face Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. +# Usage -## Usage - -For code examples, see [Cognitive Services -Face](https://docs.microsoft.com/python/api/overview/azure/cognitive-services) +For code examples, see [Cognitive Services Face](https://docs.microsoft.com/python/api/overview/azure/cognitive-services) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-vision-face%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-vision-face%2FREADME.png) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/setup.py b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/setup.py index 9153d49002c4..6eec7ef224f0 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-vision-face/setup.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-vision-face/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -67,6 +69,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,