LargeFaceListClient.AddFaceAsync Method

Definition

Overloads

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

Add a face to a specified Large Face List, up to 1,000,000 faces.

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

Add a face to a specified Large Face List, up to 1,000,000 faces.

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

[Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces.

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

Source:
LargeFaceListClient.cs

Add a face to a specified Large Face List, up to 1,000,000 faces.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>> AddFaceAsync (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 : 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 : 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 (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

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/face-list-operations/add-large-face-list-face for more details.

Applies to

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

Source:
LargeFaceListClient.cs

Add a face to a specified Large Face List, up to 1,000,000 faces.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.AddFaceResult>> AddFaceAsync (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 : 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 : 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 (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

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/face-list-operations/add-large-face-list-face-from-url for more details.

Applies to

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

Source:
LargeFaceListClient.cs

[Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces.

public virtual System.Threading.Tasks.Task<Azure.Response> AddFaceAsync (Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable<int> targetFace = default, string detectionModel = default, string userData = default, Azure.RequestContext context = default);
abstract member AddFaceAsync : Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.AddFaceAsync : Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AddFaceAsync (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

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