You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/face/azure-ai-vision-face/CHANGELOG.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,27 @@
1
1
# Release History
2
2
3
-
## 1.0.0b2 (Unreleased)
3
+
## 1.0.0b2 (2024-10-23)
4
4
5
5
### Features Added
6
6
7
+
- Added support for the Large Face List and Large Person Group:
8
+
- Added operation groups `LargeFaceListOperations` and `LargePersonGroupOperations` to `FaceAdministrationClient`.
9
+
- Added operations `find_similar_from_large_face_list`, `identify_from_large_person_group` and `verify_from_large_person_group` to `FaceClient`.
10
+
- Added models for supporting Large Face List and Large Person Group.
11
+
- Added support for latest Detect Liveness Session API:
12
+
- Added operations `get_session_image` and `detect_from_session_image` to `FaceSessionClient`.
13
+
- Added properties `enable_session_image` and `liveness_single_modal_model` to model `CreateLivenessSessionContent`.
14
+
- Added model `CreateLivenessWithVerifySessionContent`.
15
+
7
16
### Breaking Changes
8
17
9
-
### Bugs Fixed
18
+
- Changed the parameter of `create_liveness_with_verify_session` from model `CreateLivenessSessionContent` to `CreateLivenessWithVerifySessionContent`.
19
+
- Changed the enum value of `FaceDetectionModel`, `FaceRecognitionModel`, `LivenessModel` and `Versions`.
10
20
11
21
### Other Changes
12
22
23
+
- Change the default service API version to `v1.2-preview.1`.
24
+
13
25
## 1.0.0b1 (2024-05-28)
14
26
15
27
This is the first preview of the `azure-ai-vision-face` client library that follows the [Azure Python SDK Design Guidelines](https://azure.github.io/azure-sdk/python_design.html).
- Finding similar faces from a smaller set of faces that look similar to the target face.
131
132
- Grouping faces into several smaller groups based on similarity.
132
133
134
+
### FaceAdministrationClient
135
+
136
+
`FaceAdministrationClient` is provided to interact with the following data structures that hold data on faces and
137
+
person for Face recognition:
138
+
139
+
-`large_face_list`: It is a list of faces which can hold faces and used by [find similar faces][find_similar].
140
+
- It can up to 1,000,000 faces.
141
+
- Training (`begin_train()`) is required before calling `find_similar_from_large_face_list()`.
142
+
-`large_person_group`: It is a container which can hold person objects, and is used by face recognition.
143
+
- It can up to 1,000,000 person objects, with each person capable of holding up to 248 faces. The total person objects in all `large_person_group` should not exceed 1,000,000,000.
144
+
- For [face verification][face_verification], call `verify_from_large_person_group()`.
145
+
- For [face identification][face_identification], training (`begin_train()`) is required before calling `identify_from_large_person_group()`.
Long-running operations are operations which consist of an initial request sent to the service to start an operation,
158
+
followed by polling the service at intervals to determine whether the operation has completed or failed, and if it has
159
+
succeeded, to get the result.
160
+
161
+
Methods that train a group (LargeFaceList or LargePersonGroup) are modeled as long-running operations.
162
+
The client exposes a `begin_<method-name>` method that returns an `LROPoller` or `AsyncLROPoller`. Callers should wait
163
+
for the operation to complete by calling `result()` on the poller object returned from the `begin_<method-name>` method.
164
+
Sample code snippets are provided to illustrate using long-running operations [below](#examples"Examples").
142
165
143
166
## Examples
144
167
145
168
The following section provides several code snippets covering some of the most common Face tasks, including:
146
169
147
170
*[Detecting faces in an image](#face-detection"Face Detection")
171
+
*[Identifying the specific face from a LargePersonGroup](#face-recognition-from-largepersongroup"Face Recognition from LargePersonGroup")
148
172
*[Determining if a face in an video is real (live) or fake (spoof)](#liveness-detection"Liveness Detection")
149
173
150
174
### Face Detection
@@ -173,8 +197,8 @@ with FaceClient(endpoint=endpoint, credential=AzureKeyCredential(key)) as face_c
173
197
174
198
result = face_client.detect(
175
199
file_content,
176
-
detection_model=FaceDetectionModel.DETECTION_03, # The latest detection model.
177
-
recognition_model=FaceRecognitionModel.RECOGNITION_04, # The latest recognition model.
200
+
detection_model=FaceDetectionModel.DETECTION03, # The latest detection model.
201
+
recognition_model=FaceRecognitionModel.RECOGNITION04, # The latest recognition model.
178
202
return_face_id=True,
179
203
return_face_attributes=[
180
204
FaceAttributeTypeDetection03.HEAD_POSE,
@@ -192,6 +216,103 @@ with FaceClient(endpoint=endpoint, credential=AzureKeyCredential(key)) as face_c
192
216
print(f"Face: {face.as_dict()}")
193
217
```
194
218
219
+
### Face Recognition from LargePersonGroup
220
+
221
+
Identify a face against a defined LargePersonGroup.
222
+
223
+
First, we have to use `FaceAdministrationClient` to create a `LargePersonGroup`, add a few `Person` to it, and then register faces with these `Person`.
224
+
225
+
```python
226
+
from azure.core.credentials import AzureKeyCredential
227
+
from azure.ai.vision.face import FaceAdministrationClient, FaceClient
228
+
from azure.ai.vision.face.models import FaceDetectionModel, FaceRecognitionModel
229
+
230
+
231
+
defread_file_content(file_path: str):
232
+
withopen(file_path, "rb") as fd:
233
+
file_content = fd.read()
234
+
235
+
return file_content
236
+
237
+
238
+
endpoint ="<your endpoint>"
239
+
key ="<your api key>"
240
+
241
+
large_person_group_id ="lpg_family"
242
+
243
+
with FaceAdministrationClient(endpoint=endpoint, credential=AzureKeyCredential(key)) as face_admin_client:
244
+
print(f"Create a large person group with id: {large_person_group_id}")
0 commit comments