FaceClient.VerifyFromLargePersonGroup 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
VerifyFromLargePersonGroup(RequestContent, RequestContext) |
[Protocol Method] Verify whether a face belongs to a person in a Large Person Group.
|
VerifyFromLargePersonGroup(Guid, String, Guid, CancellationToken) |
Verify whether a face belongs to a person in a Large Person Group. |
VerifyFromLargePersonGroup(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 VerifyFromLargePersonGroup(Guid, String, Guid, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response VerifyFromLargePersonGroup (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member VerifyFromLargePersonGroup : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.VerifyFromLargePersonGroup : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function VerifyFromLargePersonGroup (content As RequestContent, Optional context As RequestContext = Nothing) As 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 VerifyFromLargePersonGroup 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 = client.VerifyFromLargePersonGroup(content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("isIdentical").ToString());
Console.WriteLine(result.GetProperty("confidence").ToString());
Applies to
VerifyFromLargePersonGroup(Guid, String, Guid, CancellationToken)
- Source:
- FaceClient.cs
Verify whether a face belongs to a person in a Large Person Group.
public virtual Azure.Response<Azure.AI.Vision.Face.FaceVerificationResult> VerifyFromLargePersonGroup (Guid faceId, string largePersonGroupId, Guid personId, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyFromLargePersonGroup : Guid * string * Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.FaceVerificationResult>
override this.VerifyFromLargePersonGroup : Guid * string * Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.FaceVerificationResult>
Public Overridable Function VerifyFromLargePersonGroup (faceId As Guid, largePersonGroupId As String, personId As Guid, Optional cancellationToken As CancellationToken = Nothing) As 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 VerifyFromLargePersonGroup.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceClient client = new FaceClient(endpoint, credential);
Response<FaceVerificationResult> response = client.VerifyFromLargePersonGroup(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