Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def create(
Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
<br /> 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.
<br /> Find Similar is used for scenario like finding celebrity-like
Expand All @@ -57,14 +58,21 @@ def create(
<br /> 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.
.
<br />'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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
<br /> 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
Expand Down Expand Up @@ -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.
<br /> 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.
<br /> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<br /> Find Similar is used for scenario like finding celebrity-like
Expand All @@ -57,19 +58,24 @@ def create(
[LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d)
and [Face -
Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).
<br />
* Free-tier subscription quota: 64 large face lists.
* S0-tier subscription quota: 1,000,000 large face lists.
<br />
'recognitionModel' should be specified to associate with this large
face list. The default value for 'recognitionModel' is
<br/>'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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
<br /> 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.
Expand Down Expand Up @@ -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.
<br /> 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.
<br /> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,40 @@ def create(
"""Create a new large person group with user-specified largePersonGroupId,
name, an optional userData and recognitionModel.
<br /> 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.
<br /> 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).
<br /> The person face, image, and userData will be stored on server
until [LargePersonGroup Person -
<br /> 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.
<br />
* Free-tier subscription quota: 1,000 large person groups.
* S0-tier subscription quota: 1,000,000 large person groups.
<br />
'recognitionModel' should be specified to associate with this large
person group. The default value for 'recognitionModel' is
<br/>'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.
Expand Down
Loading