FaceClient.VerifyFromLargePersonGroupAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
VerifyFromLargePersonGroupAsync(RequestContent, RequestContext) |
[Protocol Method] Verify whether a face belongs to a person in a Large Person Group.
|
VerifyFromLargePersonGroupAsync(Guid, String, Guid, CancellationToken) |
Verify whether a face belongs to a person in a Large Person Group. |
VerifyFromLargePersonGroupAsync(RequestContent, RequestContext)
- Source:
- FaceClient.cs
[Protocol Method] Verify whether a face belongs to a person in a Large Person Group.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler VerifyFromLargePersonGroupAsync(Guid, String, Guid, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> VerifyFromLargePersonGroupAsync (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member VerifyFromLargePersonGroupAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.VerifyFromLargePersonGroupAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function VerifyFromLargePersonGroupAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)
Parameters
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content
is null.
Service returned a non-success status code.
Examples
This sample shows how to call VerifyFromLargePersonGroupAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceClient client = new FaceClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
faceId = "c5c24a82-6845-4031-9d5d-978df9175426",
personId = "815df99c-598f-4926-930a-a734b3fd651c",
largePersonGroupId = "your_large_person_group",
});
Response response = await client.VerifyFromLargePersonGroupAsync(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("isIdentical").ToString());
Console.WriteLine(result.GetProperty("confidence").ToString());
Applies to
VerifyFromLargePersonGroupAsync(Guid, String, Guid, CancellationToken)
- Source:
- FaceClient.cs
Verify whether a face belongs to a person in a Large Person Group.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceVerificationResult>> VerifyFromLargePersonGroupAsync (Guid faceId, string largePersonGroupId, Guid personId, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyFromLargePersonGroupAsync : Guid * string * Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceVerificationResult>>
override this.VerifyFromLargePersonGroupAsync : Guid * string * Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceVerificationResult>>
Public Overridable Function VerifyFromLargePersonGroupAsync (faceId As Guid, largePersonGroupId As String, personId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FaceVerificationResult))
Parameters
- faceId
- Guid
The faceId of the face, come from "Detect".
- largePersonGroupId
- String
Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in "Create Large Person Group".
- personId
- Guid
Specify a certain person in Large Person Group.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
largePersonGroupId
is null.
Examples
This sample shows how to call VerifyFromLargePersonGroupAsync.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceClient client = new FaceClient(endpoint, credential);
Response<FaceVerificationResult> response = await client.VerifyFromLargePersonGroupAsync(Guid.Parse("c5c24a82-6845-4031-9d5d-978df9175426"), "your_large_person_group", Guid.Parse("815df99c-598f-4926-930a-a734b3fd651c"));
Remarks
Please refer to https://learn.microsoft.com/rest/api/face/face-recognition-operations/verify-from-large-person-group for more details.
Applies to
Azure SDK for .NET