Skip to content

Commit

Permalink
Prepare for Face SDK release (#44153)
Browse files Browse the repository at this point in the history
* Update codegen

* Correct sample and customization

* Remove not supported operation from README

* Update to latest spec

* Add back assert for detect customization

* Update 1.0.0-beta.1 release date

* Remove empty block in changelog
  • Loading branch information
Han-msft committed May 24, 2024
1 parent ed4a20a commit 9f55143
Show file tree
Hide file tree
Showing 124 changed files with 336 additions and 38,544 deletions.
11 changes: 2 additions & 9 deletions sdk/face/Azure.AI.Vision.Face/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 1.0.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2024-05-24)

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).
This library replaces the package [Microsoft.Azure.CognitiveServices.Vision.Face](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Vision.Face).
Expand All @@ -10,16 +10,9 @@ This package's [documentation](https://github.com/Azure/azure-sdk-for-net/tree/m
- This library supports only the Azure AI Face v1.1-preview.1 API.
- The namespace/package name for Azure AI Face has changed from `Microsoft.Azure.CognitiveServices.Vision.Face` to `Azure.AI.Vision.Face`.
- Three client design:
- `FaceClient` to perform core Face functions such as face detection, recognition(identification and verification), finding similar faces and grouping faces.
- `FaceAdministrationClient` to managed the following data structures that hold data on faces and persons for Face recognition.
- `FaceClient` to perform core Face functions such as face detection, verification, finding similar faces and grouping faces.
- `FaceSessionClient` to interact with sessions which is used for Liveness detection.

### Features Added

- Added support for Liveness detection.

### Breaking Changes

### Bugs Fixed

### Other Changes
20 changes: 4 additions & 16 deletions sdk/face/Azure.AI.Vision.Face/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Use the client library for to:
- 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 @@ -108,21 +107,10 @@ var client = new FaceClient(endpoint, credential);

- 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.
It includes Face verification ("one-to-one" matching) and Face identification ("one-to-many" matching).
Support Face verification ("one-to-one" 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:

- PersonDirectory
- FaceList
- LargeFaceList
- PersonGroup
- LargePersonGroup

### FaceSessionClient

`FaceSessionClient` is provided to interact with sessions which is used for Liveness detection.
Expand Down Expand Up @@ -278,7 +266,7 @@ For example, if you submit a image with an invalid `Uri`, a `400` error is retur
```C# Snippet:DetectFacesInvalidUrl
var invalidUri = new Uri("http://invalid.uri");
try {
var detectResponse = client.DetectFromUrl(
var detectResponse = client.Detect(
invalidUri,
FaceDetectionModel.Detection01,
FaceRecognitionModel.Recognition04,
Expand Down Expand Up @@ -373,8 +361,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[face_sample_detection]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/samples/Sample1_FaceDetection.md
[liveness_tutorial]: https://learn.microsoft.com/azure/ai-services/computer-vision/tutorials/liveness
[integrate_liveness_into_mobile_application]: https://learn.microsoft.com/azure/ai-services/computer-vision/tutorials/liveness#integrate-liveness-into-mobile-application
[face_sample_liveness_session]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithSession.md
[face_sample_liveness_with_verify_session]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/samples/Sample4_DetectLivenessWithVerifyWithSession.md
[face_sample_liveness_session]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/samples/Sample2_DetectLivenessWithSession.md
[face_sample_liveness_with_verify_session]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/samples/Sample3_DetectLivenessWithVerifyWithSession.md

[logging]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/core/Azure.Core/samples/Diagnostics.md

Expand Down
5 changes: 2 additions & 3 deletions sdk/face/Azure.AI.Vision.Face/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ Azure AI Vision Face is a cloud service that gives you access to advanced algor
- Detect faces from image [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetection.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample1_FaceDetectionAsync.cs)
- From local image file
- From URL
- Verification and identification from Large Person Group [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample2_LargePersonGroup.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample2_LargePersonGroupAsync.cs)
- Detect liveness in faces with session [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithSession.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithSessionAsync.cs)
- Detect liveness with face verification with session [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_DetectLivenessWithVerifyWithSession.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample4_DetectLivenessWithVerifyWithSessionAsync.cs)
- Detect liveness in faces with session [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample2_DetectLivenessWithSession.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample2_DetectLivenessWithSessionAsync.cs)
- Detect liveness with face verification with session [synchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSession.cs) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/face/Azure.AI.Vision.Face/tests/samples/Sample3_DetectLivenessWithVerifyWithSessionAsync.cs)
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ foreach (var detectedFace in detectedFaces)
You can also detect faces from an image URL. The following code demonstrates how to detect faces from an image URL.

```C# Snippet:DetectFacesFromUrl
var detectResponse = client.DetectFromUrl(
var detectResponse = client.Detect(
imageUri,
FaceDetectionModel.Detection01,
FaceRecognitionModel.Recognition04,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ foreach (var detectedFace in detectedFaces)
You can also detect faces from an image URL. The following code demonstrates how to detect faces from an image URL.

```C# Snippet:DetectFacesFromUrlAsync
var detectResponse = await client.DetectFromUrlAsync(
var detectResponse = await client.DetectAsync(
imageUri,
FaceDetectionModel.Detection01,
FaceRecognitionModel.Recognition04,
Expand Down
85 changes: 0 additions & 85 deletions sdk/face/Azure.AI.Vision.Face/samples/Sample2_LargePersonGroup.md

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions sdk/face/Azure.AI.Vision.Face/src/Custom/FaceAttributeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public struct Detection03 {
public static FaceAttributeType HeadPose { get; } = FaceAttributeType.HeadPose;
/// <summary> Whether each face is wearing a mask. Mask type returns 'noMask', 'faceMask', 'otherMaskOrOcclusion', or 'uncertain'. Value returns a boolean 'noseAndMouthCovered' indicating whether nose and mouth are covered. </summary>
public static FaceAttributeType Mask { get; } = FaceAttributeType.Mask;
/// <summary> Face is blurry or not. Level returns 'Low', 'Medium' or 'High'. Value returns a number between [0,1], the larger the blurrier. </summary>
public static FaceAttributeType Blur { get; } = FaceAttributeType.Blur;
}

/// <summary> Available attributes for recognition03 model. </summary>
Expand Down
Loading

0 comments on commit 9f55143

Please sign in to comment.