Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Face SDK update #45402

Merged
merged 21 commits into from
Oct 22, 2024
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
17 changes: 15 additions & 2 deletions sdk/face/Azure.AI.Vision.Face/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
# Release History

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

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

### Breaking Changes

- Changed the parameter of `CreateLivenessWithVerifySession` from model `CreateLivenessSessionContent` to `CreateLivenessWithVerifySessionContent`.

### Bugs Fixed

- Remove `Mask` from `FaceAsttributes.Detection01`, which is not supported.

### Other Changes

- Change the default service API version to `v1.2-preview.1`.

## 1.0.0-beta.1 (2024-05-27)

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).
Expand Down
36 changes: 33 additions & 3 deletions sdk/face/Azure.AI.Vision.Face/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The Azure AI Face service provides AI algorithms that detect, recognize, and ana
- Liveness detection
- Face recognition
- Face verification ("one-to-one" matching)
- Face identification ("one-to-many" matching)
- Find similar faces
- Group faces

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

### Service API versions

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.

#### Select a service API version

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.

For example,

```C# Snippet:CreateFaceClientWithVersion
Uri endpoint = new Uri("<your endpoint>");
DefaultAzureCredential credential = new DefaultAzureCredential();
AzureAIVisionFaceClientOptions options = new AzureAIVisionFaceClientOptions(AzureAIVisionFaceClientOptions.ServiceVersion.V1_2_Preview_1);
FaceClient client = new FaceClient(endpoint, credential, options);
```

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.

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.


## Key concepts

### FaceClient

`FaceClient` provides operations for:

- 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.
- Face recognition: Confirm that a user is who they claim to be based on how closely their face data matches the target face.
Support Face verification ("one-to-one" matching).
- 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).
- Finding similar faces from a smaller set of faces that look similar to the target face.
- Grouping faces into several smaller groups based on similarity.

### FaceAdministrationClient

`FaceAdministrationClient` is provided to interact with the following data structures that hold data on faces and
persons for Face recognition:

- LargeFaceList
- LargePersonGroup

### FaceSessionClient

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