LargePersonGroupClient.AddFace 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
AddFace(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.
|
AddFace(Guid, BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken) |
Add a face to a person into a Large Person Group for face identification or verification. |
AddFace(Guid, Uri, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken) |
Add a face to a person into a Large Person Group for face identification or verification. |
AddFace(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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the ser AddFace(Guid, BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response AddFace (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 AddFace : Guid * Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> Azure.Response
override this.AddFace : Guid * Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function AddFace (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 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
AddFace(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 Azure.Response<Azure.AI.Vision.Face.AddFaceResult> AddFace (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 AddFace : Guid * BinaryData * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
override this.AddFace : Guid * BinaryData * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
Public Overridable Function AddFace (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 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
AddFace(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 Azure.Response<Azure.AI.Vision.Face.AddFaceResult> AddFace (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 AddFace : Guid * Uri * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
override this.AddFace : Guid * Uri * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
Public Overridable Function AddFace (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 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
Azure SDK for .NET