From e83a3146190119ebbdfa6b477d3d15f9cf6203ce Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 21 Apr 2019 08:59:54 +0000 Subject: [PATCH 1/2] Generated from c61beec582e7adacd3e77308cae86af68f0a86f7 Update --- .../face/operations/face_list_operations.py | 66 ++++++++++++---- .../vision/face/operations/face_operations.py | 8 +- .../operations/large_face_list_operations.py | 70 ++++++++++++----- .../large_person_group_operations.py | 29 ++++--- .../large_person_group_person_operations.py | 49 ++++++++++-- .../operations/person_group_operations.py | 33 ++++---- .../person_group_person_operations.py | 77 +++++++++++++++++-- .../cognitiveservices/vision/face/version.py | 3 +- 8 files changed, 255 insertions(+), 80 deletions(-) diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_list_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_list_operations.py index 0b6ea19ef268..5e8c39a10751 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_list_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_list_operations.py @@ -43,7 +43,8 @@ def create( Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
After creation, user should use [FaceList - Add Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250) - to import the faces. Faces are stored on server until [FaceList - + 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.
Find Similar is used for scenario like finding celebrity-like @@ -57,14 +58,21 @@ def create(
Please consider [LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc) 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 the model you need - in this parameter. New faces that are added to an existing face list - will use the recognition model that's already associated with the - collection. Existing face features in a face list can't be updated to - features extracted by another version of recognition model. - . +
'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 + the model you need in this parameter. New faces that are added to an + existing face list will use the recognition model that's already + 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'. :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -236,8 +244,7 @@ def update( def delete( self, face_list_id, custom_headers=None, raw=False, **operation_config): - """Delete an existing face list according to faceListId. Persisted face - images in the face list will also be deleted. + """Delete a specified face list. :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -340,9 +347,10 @@ def list( def delete_face( self, face_list_id, persisted_face_id, custom_headers=None, raw=False, **operation_config): - """Delete an existing face from a face list (given by a persistedFaceId - and a faceListId). Persisted image related to the face will also be - deleted. + """Delete a face from a face list by specified faceListId and + persistedFaceId. +
Adding/deleting faces to/from a same face list are processed + sequentially and to/from different face lists are in parallel. :param face_list_id: Id referencing a particular face list. :type face_list_id: str @@ -390,9 +398,33 @@ def delete_face( def add_face_from_url( self, face_list_id, url, user_data=None, target_face=None, custom_headers=None, raw=False, **operation_config): - """Add a face to a face list. The input face is specified as an image with - a targetFace rectangle. It returns a persistedFaceId representing the - added face, and persistedFaceId will not expire. + """Add a face to a specified face list, up to 1,000 faces. +
To deal with an image contains multiple faces, input 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 + [FaceList - Delete + Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395251) + or [FaceList - + Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f) + is called. +
Note persistedFaceId is different from faceId generated by [Face + - + Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + * 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. + * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + 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), + 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. + * Adding/deleting faces to/from a same face list are processed + sequentially and to/from different face lists are in parallel. :param face_list_id: Id referencing a particular face list. :type face_list_id: str diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_operations.py index 256859ed8b56..85f8696dbe58 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/face_operations.py @@ -404,7 +404,7 @@ def detect_with_url( Attributes include age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise. - * The extracted face feature, instead of the actual image, will be + * 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), @@ -428,8 +428,7 @@ def detect_with_url( (head-pose) or being occluded, or wrong image orientation. * Attributes (age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and - noise) may not be perfectly accurate. HeadPose's pitch value is a - reserved field and will always return 0. + noise) may not be perfectly accurate. * 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 @@ -438,8 +437,7 @@ 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/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model). :param url: Publicly reachable URL of an image :type url: str diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.py index 9099cb2149a5..33a5970a3d9e 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.py @@ -44,9 +44,10 @@ def create( Add](/docs/services/563879b61984550e40cbbe8d/operations/5a158c10d2de3616c086f2d3) to import the faces and [LargeFaceList - Train](/docs/services/563879b61984550e40cbbe8d/operations/5a158422d2de3616c086f2d1) - to make it ready for [Face - - FindSimilar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237). - Faces are stored on server until [LargeFaceList - + 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.
Find Similar is used for scenario like finding celebrity-like @@ -57,19 +58,24 @@ def create( [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d) and [Face - Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239). -
- * Free-tier subscription quota: 64 large face lists. - * S0-tier subscription quota: 1,000,000 large face lists. -
- 'recognitionModel' should be specified to associate with this large - face list. The default value for 'recognitionModel' is +
'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 the model you need in this parameter. New faces that are added to an 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'. + Large face list quota: + * Free-tier subscription quota: 64 large face lists. + * S0-tier subscription quota: 1,000,000 large face lists. :param large_face_list_id: Id referencing a particular large face list. @@ -243,8 +249,7 @@ def update( def delete( self, large_face_list_id, custom_headers=None, raw=False, **operation_config): - """Delete an existing large face list according to faceListId. Persisted - face images in the large face list will also be deleted. + """Delete a specified large face list. :param large_face_list_id: Id referencing a particular large face list. @@ -465,9 +470,11 @@ def train( def delete_face( self, large_face_list_id, persisted_face_id, custom_headers=None, raw=False, **operation_config): - """Delete an existing face from a large face list (given by a - persistedFaceId and a largeFaceListId). Persisted image related to the - face will also be deleted. + """Delete a face from a large face list by specified largeFaceListId and + persistedFaceId. +
Adding/deleting faces to/from a same large face list are + processed sequentially and to/from different large face lists are in + parallel. :param large_face_list_id: Id referencing a particular large face list. @@ -633,9 +640,36 @@ def update_face( def add_face_from_url( self, large_face_list_id, url, user_data=None, target_face=None, custom_headers=None, raw=False, **operation_config): - """Add a face to a large face list. The input face is specified as an - image with a targetFace rectangle. It returns a persistedFaceId - representing the added face, and persistedFaceId will not expire. + """Add a face to a specified large face list, up to 1,000,000 faces. +
To deal with an image contains multiple faces, input 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 + [LargeFaceList Face - + Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a158c8ad2de3616c086f2d4) + or [LargeFaceList - + Delete](/docs/services/563879b61984550e40cbbe8d/operations/5a1580d5d2de3616c086f2cd) + is called. +
Note persistedFaceId is different from faceId generated by [Face + - + Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + * 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. + * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + 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), + 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. + * Adding/deleting faces to/from a same face list are processed + sequentially and to/from different face lists are in parallel. + Quota: + * Free-tier subscription quota: 1,000 faces per large face list. + * S0-tier subscription quota: 1,000,000 faces per large face list. :param large_face_list_id: Id referencing a particular large face list. diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_operations.py index f8b56685f2ae..be444e6d3c8c 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_operations.py @@ -38,33 +38,40 @@ def create( """Create a new large person group with user-specified largePersonGroupId, name, an optional userData and recognitionModel.
A large person group is the container of the uploaded person - data, including face images and face recognition feature, and up to - 1,000,000 people. + 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). -
The person face, image, and userData will be stored on server - until [LargePersonGroup Person - +
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. -
- * Free-tier subscription quota: 1,000 large person groups. - * S0-tier subscription quota: 1,000,000 large person groups. -
- 'recognitionModel' should be specified to associate with this large - person group. The default value for 'recognitionModel' is +
'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 the model you need in this parameter. New faces that are added to an 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'. + Large person group quota: + * Free-tier subscription quota: 1,000 large person groups. + * S0-tier subscription quota: 1,000,000 large person groups. :param large_person_group_id: Id referencing a particular large person group. diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_person_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_person_operations.py index a970a9ff50ae..28f5aacf3b41 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_person_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_person_group_person_operations.py @@ -165,8 +165,9 @@ def list( def delete( self, large_person_group_id, person_id, custom_headers=None, raw=False, **operation_config): - """Delete an existing person from a large person group. All stored person - data, and face features in the person entry will be deleted. + """Delete an existing person from a large person group. The + persistedFaceId, userData, person name and face feature in the person + entry will all be deleted. :param large_person_group_id: Id referencing a particular large person group. @@ -214,8 +215,8 @@ def delete( def get( self, large_person_group_id, person_id, custom_headers=None, raw=False, **operation_config): - """Retrieve a person's information, including registered persisted faces, - name and userData. + """Retrieve a person's name and userData, and the persisted faceIds + representing the registered person face feature. :param large_person_group_id: Id referencing a particular large person group. @@ -330,8 +331,11 @@ def update( def delete_face( self, large_person_group_id, person_id, persisted_face_id, custom_headers=None, raw=False, **operation_config): - """Delete a face from a person. Relative feature for the persisted face - will also be deleted. + """Delete a face from a person in a large person group by specified + largePersonGroupId, personId and persistedFaceId. +
Adding/deleting faces to/from a same person will be processed + sequentially. Adding/deleting faces to/from different persons are + processed in parallel. :param large_person_group_id: Id referencing a particular large person group. @@ -506,8 +510,37 @@ def update_face( def add_face_from_url( self, large_person_group_id, person_id, url, user_data=None, target_face=None, custom_headers=None, raw=False, **operation_config): - """Add a representative face to a person for identification. The input - face is specified as an image with a targetFace rectangle. + """Add a face to a person into a large person group for face + identification or verification. To deal with an image contains multiple + faces, input 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 [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. +
Note persistedFaceId is different from faceId generated by [Face + - + Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + * 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. + * Each person entry can hold up to 248 faces. + * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + 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), + 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. + * Adding/deleting faces to/from a same person will be processed + sequentially. Adding/deleting faces to/from different persons are + processed in parallel. :param large_person_group_id: Id referencing a particular large person group. diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_operations.py index bb150011911e..90e5381316dd 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_operations.py @@ -38,20 +38,36 @@ def create( """Create a new person group with specified personGroupId, name, user-provided userData and recognitionModel.
A person group is the container of the uploaded person data, - including face images and face recognition features. + 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). -
The person's face, image, and userData will be stored on server - until [PersonGroup Person - +
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. -
+
'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 + the model you need in this parameter. New faces that are added to an + existing person group will use the recognition model that's already + 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 @@ -59,15 +75,6 @@ def create( * to handle larger scale face identification problem, please consider using [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d). -
- '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 the model you need - in this parameter. New faces that are added to an existing person group - will use the recognition model that's already associated with the - collection. Existing face features in a person group can't be updated - to features extracted by another version of recognition model. - . :param person_group_id: Id referencing a particular person group. :type person_group_id: str diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_person_operations.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_person_operations.py index 8458ff94102d..401dcdc8dc65 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_person_operations.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/person_group_person_operations.py @@ -163,8 +163,9 @@ def list( def delete( self, person_group_id, person_id, custom_headers=None, raw=False, **operation_config): - """Delete an existing person from a person group. All stored person data, - and face features in the person entry will be deleted. + """Delete an existing person from a person group. The persistedFaceId, + userData, person name and face feature in the person entry will all be + deleted. :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -325,8 +326,11 @@ def update( def delete_face( self, person_group_id, person_id, persisted_face_id, custom_headers=None, raw=False, **operation_config): - """Delete a face from a person. Relative feature for the persisted face - will also be deleted. + """Delete a face from a person in a person group by specified + personGroupId, personId and persistedFaceId. +
Adding/deleting faces to/from a same person will be processed + sequentially. Adding/deleting faces to/from different persons are + processed in parallel. :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -438,7 +442,37 @@ def get_face( def update_face( self, person_group_id, person_id, persisted_face_id, user_data=None, custom_headers=None, raw=False, **operation_config): - """Update a person persisted face's userData field. + """Add a face to a person into a person group for face identification or + verification. To deal with an image contains multiple faces, input 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. +
Note persistedFaceId is different from faceId generated by [Face + - + Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + * 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. + * Each person entry can hold up to 248 faces. + * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + 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), + 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. + * Adding/deleting faces to/from a same person will be processed + sequentially. Adding/deleting faces to/from different persons are + processed in parallel. :param person_group_id: Id referencing a particular person group. :type person_group_id: str @@ -498,8 +532,37 @@ def update_face( def add_face_from_url( self, person_group_id, person_id, url, user_data=None, target_face=None, custom_headers=None, raw=False, **operation_config): - """Add a representative face to a person for identification. The input - face is specified as an image with a targetFace rectangle. + """Add a face to a person into a large person group for face + identification or verification. To deal with an image contains multiple + faces, input 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 [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. +
Note persistedFaceId is different from faceId generated by [Face + - + Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). + * 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. + * Each person entry can hold up to 248 faces. + * JPEG, PNG, GIF (the first frame), and BMP format are supported. The + 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), + 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. + * Adding/deleting faces to/from a same person will be processed + sequentially. Adding/deleting faces to/from different persons are + processed in parallel. :param person_group_id: Id referencing a particular person group. :type person_group_id: str diff --git a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py index fcb88654af0a..63d89bfb54fa 100644 --- a/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py +++ b/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/version.py @@ -9,4 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" +VERSION = "1.0" + From 687e6d972098c90682385c916450516014dc18d9 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Sun, 21 Apr 2019 09:04:26 +0000 Subject: [PATCH 2/2] Packaging update of azure-cognitiveservices-vision-face --- azure-cognitiveservices-vision-face/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-cognitiveservices-vision-face/setup.py b/azure-cognitiveservices-vision-face/setup.py index f7ab200174d8..8deb9ba1354f 100644 --- a/azure-cognitiveservices-vision-face/setup.py +++ b/azure-cognitiveservices-vision-face/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com',