Skip to content

Commit fe44601

Browse files
authored
AI Face SDK update (Azure#45402)
* Added support for the Large Face List and Large Person Group * Added support for latest Detect Liveness Session API * Change the default service API version to v1.2-preview.1.
1 parent 4a51ce9 commit fe44601

File tree

98 files changed

+14536
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+14536
-493
lines changed

sdk/face/Azure.AI.Vision.Face/CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.2 (2024-10-23)
44

5-
### Features Added
5+
- Added support for the Large Face List and Large Person Group:
6+
- Added client `LargeFaceListClient` and `LargePersonGroupClient`.
7+
- Added operations `FindSimilarFromLargeFaceList`, `IdentifyFromLargePersonGroup` and `VerifyFromLargePersonGroup` to `FaceClient`.
8+
- Added models for supporting Large Face List and Large Person Group.
9+
- Added support for latest Detect Liveness Session API:
10+
- Added operations `GetSessionImage` and `DetectFromSessionImage` to `FaceSessionClient`.
11+
- Added properties `EnableSessionImage ` and `LivenessSingleModalModel` to model `CreateLivenessSessionContent`.
12+
- Added model `CreateLivenessWithVerifySessionContent`.
613

714
### Breaking Changes
815

16+
- Changed the parameter of `CreateLivenessWithVerifySession` from model `CreateLivenessSessionContent` to `CreateLivenessWithVerifySessionContent`.
17+
918
### Bugs Fixed
1019

20+
- Remove `Mask` from `FaceAsttributes.Detection01`, which is not supported.
21+
1122
### Other Changes
1223

24+
- Change the default service API version to `v1.2-preview.1`.
25+
1326
## 1.0.0-beta.1 (2024-05-27)
1427

1528
This is the first preview Azure AI Face client library that follows the [.NET Azure SDK Design Guidelines](https://azure.github.io/azure-sdk/dotnet_introduction.html).

sdk/face/Azure.AI.Vision.Face/README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The Azure AI Face service provides AI algorithms that detect, recognize, and ana
66
- Liveness detection
77
- Face recognition
88
- Face verification ("one-to-one" matching)
9+
- Face identification ("one-to-many" matching)
910
- Find similar faces
1011
- Group faces
1112

@@ -97,18 +98,47 @@ AzureKeyCredential credential = new AzureKeyCredential("<your apiKey>");
9798
var client = new FaceClient(endpoint, credential);
9899
```
99100

101+
### Service API versions
102+
103+
The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate.
104+
105+
#### Select a service API version
106+
107+
You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version.
108+
109+
For example,
110+
111+
```C# Snippet:CreateFaceClientWithVersion
112+
Uri endpoint = new Uri("<your endpoint>");
113+
DefaultAzureCredential credential = new DefaultAzureCredential();
114+
AzureAIVisionFaceClientOptions options = new AzureAIVisionFaceClientOptions(AzureAIVisionFaceClientOptions.ServiceVersion.V1_2_Preview_1);
115+
FaceClient client = new FaceClient(endpoint, credential, options);
116+
```
117+
118+
When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility.
119+
120+
Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
121+
122+
100123
## Key concepts
101124

102125
### FaceClient
103126

104127
`FaceClient` provides operations for:
105128

106129
- Face detection and analysis: Detect human faces in an image and return the rectangle coordinates of their locations, and optionally with landmarks, and face-related attributes. This operation is required as a first step in all the other face recognition scenarios.
107-
- Face recognition: Confirm that a user is who they claim to be based on how closely their face data matches the target face.
108-
Support Face verification ("one-to-one" matching).
130+
- Face recognition: Confirm that a user is who they claim to be based on how closely their face data matches the target face. It includes Face verification ("one-to-one" matching) and Face identification ("one-to-many" matching).
109131
- Finding similar faces from a smaller set of faces that look similar to the target face.
110132
- Grouping faces into several smaller groups based on similarity.
111133

134+
### FaceAdministrationClient
135+
136+
`FaceAdministrationClient` is provided to interact with the following data structures that hold data on faces and
137+
persons for Face recognition:
138+
139+
- LargeFaceList
140+
- LargePersonGroup
141+
112142
### FaceSessionClient
113143

114144
`FaceSessionClient` is provided to interact with sessions which is used for Liveness detection.
@@ -163,7 +193,7 @@ foreach (var detectedFace in detectedFaces)
163193
{
164194
Console.WriteLine($"Face Rectangle: left={detectedFace.FaceRectangle.Left}, top={detectedFace.FaceRectangle.Top}, width={detectedFace.FaceRectangle.Width}, height={detectedFace.FaceRectangle.Height}");
165195
Console.WriteLine($"Head pose: pitch={detectedFace.FaceAttributes.HeadPose.Pitch}, roll={detectedFace.FaceAttributes.HeadPose.Roll}, yaw={detectedFace.FaceAttributes.HeadPose.Yaw}");
166-
Console.WriteLine($"Mask: {detectedFace.FaceAttributes.Mask}");
196+
Console.WriteLine($"Mask: NoseAndMouthCovered={detectedFace.FaceAttributes.Mask.NoseAndMouthCovered}, Type={detectedFace.FaceAttributes.Mask.Type}");
167197
Console.WriteLine($"Quality: {detectedFace.FaceAttributes.QualityForRecognition}");
168198
Console.WriteLine($"Recognition model: {detectedFace.RecognitionModel}");
169199
Console.WriteLine($"Landmarks: ");

0 commit comments

Comments
 (0)