Skip to content

Commit f500870

Browse files
lmazuelAutorestCI
andauthored
FaceAPI 0.4.1 (#12199)
* FaceAPI 0.4.1 * Packaging update of azure-cognitiveservices-vision-face Co-authored-by: Azure SDK Bot <[email protected]>
1 parent 5667b8b commit f500870

14 files changed

+179
-164
lines changed

sdk/cognitiveservices/azure-cognitiveservices-vision-face/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 0.4.1 (2020-06-24)
4+
5+
**Features**
6+
7+
- Add recognition_03 support
8+
39
## 0.4.0 (2019-06-27)
410

511
**Features**
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
## Microsoft Azure SDK for Python
1+
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Cognitive Services Face Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
46

5-
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.
67

7-
For a more complete set of Azure libraries, see the
8-
[azure](https://pypi.python.org/pypi/azure) bundle package.
8+
# Usage
99

10-
## Usage
11-
12-
For code examples, see [Cognitive Services
13-
Face](https://docs.microsoft.com/python/api/overview/azure/cognitive-services)
10+
For code examples, see [Cognitive Services Face](https://docs.microsoft.com/python/api/overview/azure/cognitive-services)
1411
on docs.microsoft.com.
1512

16-
## Provide Feedback
1713

18-
If you encounter any bugs or have suggestions, please file an issue in
19-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
14+
# Provide Feedback
15+
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2018
section of the project.
2119

22-
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-vision-face%2FREADME.png)
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-vision-face%2FREADME.png)

sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_face_client_enums.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class RecognitionModel(str, Enum):
1616

1717
recognition_01 = "recognition_01"
1818
recognition_02 = "recognition_02"
19+
recognition_03 = "recognition_03"
1920

2021

2122
class Gender(str, Enum):

sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class DetectedFace(Model):
153153
:param face_id:
154154
:type face_id: str
155155
:param recognition_model: Possible values include: 'recognition_01',
156-
'recognition_02'. Default value: "recognition_01" .
156+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
157157
:type recognition_model: str or
158158
~azure.cognitiveservices.vision.face.models.RecognitionModel
159159
:param face_rectangle: Required.
@@ -527,7 +527,7 @@ class MetaDataContract(NameAndUserDataContract):
527527
:param user_data: User specified data. Length should not exceed 16KB.
528528
:type user_data: str
529529
:param recognition_model: Possible values include: 'recognition_01',
530-
'recognition_02'. Default value: "recognition_01" .
530+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
531531
:type recognition_model: str or
532532
~azure.cognitiveservices.vision.face.models.RecognitionModel
533533
"""
@@ -558,7 +558,7 @@ class FaceList(MetaDataContract):
558558
:param user_data: User specified data. Length should not exceed 16KB.
559559
:type user_data: str
560560
:param recognition_model: Possible values include: 'recognition_01',
561-
'recognition_02'. Default value: "recognition_01" .
561+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
562562
:type recognition_model: str or
563563
~azure.cognitiveservices.vision.face.models.RecognitionModel
564564
:param face_list_id: Required. FaceListId of the target face list.
@@ -983,7 +983,7 @@ class LargeFaceList(MetaDataContract):
983983
:param user_data: User specified data. Length should not exceed 16KB.
984984
:type user_data: str
985985
:param recognition_model: Possible values include: 'recognition_01',
986-
'recognition_02'. Default value: "recognition_01" .
986+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
987987
:type recognition_model: str or
988988
~azure.cognitiveservices.vision.face.models.RecognitionModel
989989
:param large_face_list_id: Required. LargeFaceListId of the target large
@@ -1019,7 +1019,7 @@ class LargePersonGroup(MetaDataContract):
10191019
:param user_data: User specified data. Length should not exceed 16KB.
10201020
:type user_data: str
10211021
:param recognition_model: Possible values include: 'recognition_01',
1022-
'recognition_02'. Default value: "recognition_01" .
1022+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
10231023
:type recognition_model: str or
10241024
~azure.cognitiveservices.vision.face.models.RecognitionModel
10251025
:param large_person_group_id: Required. LargePersonGroupId of the target
@@ -1256,7 +1256,7 @@ class PersonGroup(MetaDataContract):
12561256
:param user_data: User specified data. Length should not exceed 16KB.
12571257
:type user_data: str
12581258
:param recognition_model: Possible values include: 'recognition_01',
1259-
'recognition_02'. Default value: "recognition_01" .
1259+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
12601260
:type recognition_model: str or
12611261
~azure.cognitiveservices.vision.face.models.RecognitionModel
12621262
:param person_group_id: Required. PersonGroupId of the target person

sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/_models_py3.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class DetectedFace(Model):
153153
:param face_id:
154154
:type face_id: str
155155
:param recognition_model: Possible values include: 'recognition_01',
156-
'recognition_02'. Default value: "recognition_01" .
156+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
157157
:type recognition_model: str or
158158
~azure.cognitiveservices.vision.face.models.RecognitionModel
159159
:param face_rectangle: Required.
@@ -527,7 +527,7 @@ class MetaDataContract(NameAndUserDataContract):
527527
:param user_data: User specified data. Length should not exceed 16KB.
528528
:type user_data: str
529529
:param recognition_model: Possible values include: 'recognition_01',
530-
'recognition_02'. Default value: "recognition_01" .
530+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
531531
:type recognition_model: str or
532532
~azure.cognitiveservices.vision.face.models.RecognitionModel
533533
"""
@@ -558,7 +558,7 @@ class FaceList(MetaDataContract):
558558
:param user_data: User specified data. Length should not exceed 16KB.
559559
:type user_data: str
560560
:param recognition_model: Possible values include: 'recognition_01',
561-
'recognition_02'. Default value: "recognition_01" .
561+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
562562
:type recognition_model: str or
563563
~azure.cognitiveservices.vision.face.models.RecognitionModel
564564
:param face_list_id: Required. FaceListId of the target face list.
@@ -983,7 +983,7 @@ class LargeFaceList(MetaDataContract):
983983
:param user_data: User specified data. Length should not exceed 16KB.
984984
:type user_data: str
985985
:param recognition_model: Possible values include: 'recognition_01',
986-
'recognition_02'. Default value: "recognition_01" .
986+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
987987
:type recognition_model: str or
988988
~azure.cognitiveservices.vision.face.models.RecognitionModel
989989
:param large_face_list_id: Required. LargeFaceListId of the target large
@@ -1019,7 +1019,7 @@ class LargePersonGroup(MetaDataContract):
10191019
:param user_data: User specified data. Length should not exceed 16KB.
10201020
:type user_data: str
10211021
:param recognition_model: Possible values include: 'recognition_01',
1022-
'recognition_02'. Default value: "recognition_01" .
1022+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
10231023
:type recognition_model: str or
10241024
~azure.cognitiveservices.vision.face.models.RecognitionModel
10251025
:param large_person_group_id: Required. LargePersonGroupId of the target
@@ -1256,7 +1256,7 @@ class PersonGroup(MetaDataContract):
12561256
:param user_data: User specified data. Length should not exceed 16KB.
12571257
:type user_data: str
12581258
:param recognition_model: Possible values include: 'recognition_01',
1259-
'recognition_02'. Default value: "recognition_01" .
1259+
'recognition_02', 'recognition_03'. Default value: "recognition_01" .
12601260
:type recognition_model: str or
12611261
~azure.cognitiveservices.vision.face.models.RecognitionModel
12621262
:param person_group_id: Required. PersonGroupId of the target person

sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_face_list_operations.py

+25-24
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ def create(
4242
in one subscription.
4343
<br /> Face list is a list of faces, up to 1,000 faces, and used by
4444
[Face - Find
45-
Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
45+
Similar](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/findsimilar).
4646
<br /> After creation, user should use [FaceList - Add
47-
Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250)
47+
Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/addfacefromurl)
4848
to import the faces. No image will be stored. Only the extracted face
4949
features are stored on server until [FaceList -
50-
Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f)
50+
Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/delete)
5151
is called.
5252
<br /> Find Similar is used for scenario like finding celebrity-like
5353
faces, similar face filtering, or as a light way face identification.
5454
But if the actual use is to identify person, please use
55-
[PersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395244)
55+
[PersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/persongroup)
5656
/
57-
[LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d)
57+
[LargePersonGroup](https://docs.microsoft.com/rest/api/cognitiveservices/face/largepersongroup)
5858
and [Face -
59-
Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
59+
Identify](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/identify).
6060
<br /> Please consider
61-
[LargeFaceList](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc)
61+
[LargeFaceList](https://docs.microsoft.com/rest/api/cognitiveservices/face/largefacelist)
6262
when the face number is large. It can support up to 1,000,000 faces.
6363
<br />'recognitionModel' should be specified to associate with this
6464
face list. The default value for 'recognitionModel' is
@@ -69,12 +69,13 @@ def create(
6969
can't be updated to features extracted by another version of
7070
recognition model.
7171
* 'recognition_01': The default recognition model for [FaceList-
72-
Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b).
72+
Create](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/create).
7373
All those face lists created before 2019 March are bonded with this
7474
recognition model.
7575
* 'recognition_02': Recognition model released in 2019 March.
76-
'recognition_02' is recommended since its overall accuracy is improved
77-
compared with 'recognition_01'.
76+
* 'recognition_03': Recognition model released in 2020 May.
77+
'recognition_03' is recommended since its overall accuracy is improved
78+
compared with 'recognition_01' and 'recognition_02'.
7879
7980
:param face_list_id: Id referencing a particular face list.
8081
:type face_list_id: str
@@ -83,7 +84,7 @@ def create(
8384
:param user_data: User specified data. Length should not exceed 16KB.
8485
:type user_data: str
8586
:param recognition_model: Possible values include: 'recognition_01',
86-
'recognition_02'
87+
'recognition_02', 'recognition_03'
8788
:type recognition_model: str or
8889
~azure.cognitiveservices.vision.face.models.RecognitionModel
8990
:param dict custom_headers: headers that will be added to the request
@@ -292,7 +293,7 @@ def list(
292293
"""List face lists’ faceListId, name, userData and recognitionModel. <br
293294
/>
294295
To get face information inside faceList use [FaceList -
295-
Get](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524c)
296+
Get](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/get)
296297
.
297298
298299
:param return_recognition_model: A value indicating whether the
@@ -404,13 +405,13 @@ def add_face_from_url(
404405
persistedFaceId representing the added face. No image will be stored.
405406
Only the extracted face feature will be stored on server until
406407
[FaceList - Delete
407-
Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395251)
408+
Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/deleteface)
408409
or [FaceList -
409-
Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f)
410+
Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/delete)
410411
is called.
411412
<br /> Note persistedFaceId is different from faceId generated by [Face
412413
-
413-
Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
414+
Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl).
414415
* Higher face image quality means better detection and recognition
415416
precision. Please consider high-quality faces: frontal, clear, and face
416417
size is 200x200 pixels (100 pixels between eyes) or bigger.
@@ -419,7 +420,7 @@ def add_face_from_url(
419420
* "targetFace" rectangle should contain one face. Zero or multiple
420421
faces will be regarded as an error. If the provided "targetFace"
421422
rectangle is not returned from [Face -
422-
Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
423+
Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl),
423424
there’s no guarantee to detect and add the face successfully.
424425
* Out of detectable face size (36x36 - 4096x4096 pixels), large
425426
head-pose, or large occlusions will cause failures.
@@ -430,11 +431,11 @@ def add_face_from_url(
430431
1920x1080 pixels will need a proportionally larger minimum face size.
431432
* Different 'detectionModel' values can be provided. To use and compare
432433
different detection models, please refer to [How to specify a detection
433-
model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
434+
model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
434435
| Model | Recommended use-case(s) |
435436
| ---------- | -------- |
436437
| 'detection_01': | The default detection model for [FaceList - Add
437-
Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250).
438+
Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/addfacefromurl).
438439
Recommend for near frontal face detection. For scenarios with
439440
exceptionally large angle (head-pose) faces, occluded faces or wrong
440441
image orientation, the faces in such cases may not be detected. |
@@ -528,13 +529,13 @@ def add_face_from_stream(
528529
persistedFaceId representing the added face. No image will be stored.
529530
Only the extracted face feature will be stored on server until
530531
[FaceList - Delete
531-
Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395251)
532+
Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/deleteface)
532533
or [FaceList -
533-
Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524f)
534+
Delete](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/delete)
534535
is called.
535536
<br /> Note persistedFaceId is different from faceId generated by [Face
536537
-
537-
Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236).
538+
Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl).
538539
* Higher face image quality means better detection and recognition
539540
precision. Please consider high-quality faces: frontal, clear, and face
540541
size is 200x200 pixels (100 pixels between eyes) or bigger.
@@ -543,7 +544,7 @@ def add_face_from_stream(
543544
* "targetFace" rectangle should contain one face. Zero or multiple
544545
faces will be regarded as an error. If the provided "targetFace"
545546
rectangle is not returned from [Face -
546-
Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
547+
Detect](https://docs.microsoft.com/rest/api/cognitiveservices/face/face/detectwithurl),
547548
there’s no guarantee to detect and add the face successfully.
548549
* Out of detectable face size (36x36 - 4096x4096 pixels), large
549550
head-pose, or large occlusions will cause failures.
@@ -554,11 +555,11 @@ def add_face_from_stream(
554555
1920x1080 pixels will need a proportionally larger minimum face size.
555556
* Different 'detectionModel' values can be provided. To use and compare
556557
different detection models, please refer to [How to specify a detection
557-
model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
558+
model](https://docs.microsoft.com/azure/cognitive-services/face/face-api-how-to-topics/specify-detection-model)
558559
| Model | Recommended use-case(s) |
559560
| ---------- | -------- |
560561
| 'detection_01': | The default detection model for [FaceList - Add
561-
Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395250).
562+
Face](https://docs.microsoft.com/rest/api/cognitiveservices/face/facelist/addfacefromurl).
562563
Recommend for near frontal face detection. For scenarios with
563564
exceptionally large angle (head-pose) faces, occluded faces or wrong
564565
image orientation, the faces in such cases may not be detected. |

0 commit comments

Comments
 (0)