Dela via


LargePersonGroupClient.AddFaceAsync Method

Definition

Overloads

AddFaceAsync(Guid, RequestContent, IEnumerable<Int32>, String, String, RequestContext)

[Protocol Method] Add a face to a person into a Large Person Group for face identification or verification.

AddFaceAsync(Guid, BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken)

Add a face to a person into a Large Person Group for face identification or verification.

AddFaceAsync(Guid, Uri, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken)

Add a face to a person into a Large Person Group for face identification or verification.

AddFaceAsync(Guid, RequestContent, IEnumerable<Int32>, String, String, RequestContext)

Source:
LargePersonGroupClient.cs

[Protocol Method] Add a face to a person into a Large Person Group for face identification or verification.

public virtual System.Threading.Tasks.Task<Azure.Response> AddFaceAsync (Guid personId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable<int> targetFace = default, string detectionModel = default, string userData = default, Azure.RequestContext context = default);
abstract member AddFaceAsync : Guid * Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AddFaceAsync : Guid * Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AddFaceAsync (personId As Guid, content As RequestContent, Optional targetFace As IEnumerable(Of Integer) = Nothing, Optional detectionModel As String = Nothing, Optional userData As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

personId
Guid

ID of the person.

content
RequestContent

The content to send as the body of the request.

targetFace
IEnumerable<Int32>

A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'.

detectionModel
String

The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03".

userData
String

User-provided data attached to the face. The size limit is 1K.

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.

Applies to

AddFaceAsync(Guid, BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken)

Source:
LargePersonGroupClient.cs

Add a face to a person into a Large Person Group for face identification or verification.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>> AddFaceAsync (Guid personId, BinaryData imageContent, System.Collections.Generic.IEnumerable<int> targetFace = default, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default, string userData = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFaceAsync : Guid * BinaryData * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>>
override this.AddFaceAsync : Guid * BinaryData * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>>
Public Overridable Function AddFaceAsync (personId As Guid, imageContent As BinaryData, Optional targetFace As IEnumerable(Of Integer) = Nothing, Optional detectionModel As Nullable(Of FaceDetectionModel) = Nothing, Optional userData As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AddFaceResult))

Parameters

personId
Guid

ID of the person.

imageContent
BinaryData

The image to be analyzed.

targetFace
IEnumerable<Int32>

A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'.

detectionModel
Nullable<FaceDetectionModel>

The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'.

userData
String

User-provided data attached to the face. The size limit is 1K.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

imageContent is null.

Remarks

Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face for more details.

Applies to

AddFaceAsync(Guid, Uri, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken)

Source:
LargePersonGroupClient.cs

Add a face to a person into a Large Person Group for face identification or verification.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>> AddFaceAsync (Guid personId, Uri uri, System.Collections.Generic.IEnumerable<int> targetFace = default, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default, string userData = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFaceAsync : Guid * Uri * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>>
override this.AddFaceAsync : Guid * Uri * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>>
Public Overridable Function AddFaceAsync (personId As Guid, uri As Uri, Optional targetFace As IEnumerable(Of Integer) = Nothing, Optional detectionModel As Nullable(Of FaceDetectionModel) = Nothing, Optional userData As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AddFaceResult))

Parameters

personId
Guid

ID of the person.

uri
Uri

URL of input image.

targetFace
IEnumerable<Int32>

A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'.

detectionModel
Nullable<FaceDetectionModel>

The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'.

userData
String

User-provided data attached to the face. The size limit is 1K.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

uri is null.

Remarks

Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/add-large-person-group-person-face-from-url for more details.

Applies to