Delen via


FaceOperations Class

Definition

FaceOperations operations.

public class FaceOperations : Microsoft.Azure.CognitiveServices.Vision.Face.IFaceOperations, Microsoft.Rest.IServiceOperations<Microsoft.Azure.CognitiveServices.Vision.Face.FaceClient>
type FaceOperations = class
    interface IServiceOperations<FaceClient>
    interface IFaceOperations
Public Class FaceOperations
Implements IFaceOperations, IServiceOperations(Of FaceClient)
Inheritance
FaceOperations
Implements

Constructors

FaceOperations(FaceClient)

Initializes a new instance of the FaceOperations class.

Properties

Client

Gets a reference to the FaceClient

Methods

DetectWithStreamWithHttpMessagesAsync(Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Nullable<Int32>, Dictionary<String,List<String>>, CancellationToken)
DetectWithUrlWithHttpMessagesAsync(String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Nullable<Int32>, Dictionary<String,List<String>>, CancellationToken)
FindSimilarWithHttpMessagesAsync(Guid, String, String, IList<Nullable<Guid>>, Nullable<Int32>, FindSimilarMatchMode, Dictionary<String,List<String>>, CancellationToken)

Given query face's faceId, to search the similar-looking faces from a faceId array, a face list or a large face list. faceId array contains the faces created by Face - Detect, which will expire 24 hours after creation. A "faceListId" is created by FaceList - Create containing persistedFaceIds that will not expire. And a "largeFaceListId" is created by LargeFaceList - Create containing persistedFaceIds that will also not expire. Depending on the input the returned similar faces list contains faceIds or persistedFaceIds ranked by similarity. <br/>Find similar has two working modes, "matchPerson" and "matchFace". "matchPerson" is the default mode that it tries to find faces of the same person as possible by using internal same-person thresholds. It is useful to find a known person's other photos. Note that an empty list will be returned if no faces pass the internal thresholds. "matchFace" mode ignores same-person thresholds and returns ranked similar faces anyway, even the similarity is low. It can be used in the cases like searching celebrity-looking faces. <br/>The 'recognitionModel' associated with the query face's faceId should be the same as the 'recognitionModel' used by the target faceId array, face list or large face list.

GroupWithHttpMessagesAsync(IList<Guid>, Dictionary<String,List<String>>, CancellationToken)

Divide candidate faces into groups based on face similarity.<br />

  • The output is one or more disjointed face groups and a messyGroup. A face group contains faces that have similar looking, often of the same person. Face groups are ranked by group size, i.e. number of faces. Notice that faces belonging to a same person might be split into several groups in the result.
  • MessyGroup is a special face group containing faces that cannot find any similar counterpart face from original faces. The messyGroup will not appear in the result if all faces found their counterparts.
  • Group API needs at least 2 candidate faces and 1000 at most. We suggest to try Face - Verify when you only have 2 candidate faces.
  • The 'recognitionModel' associated with the query faces' faceIds should be the same.
IdentifyWithHttpMessagesAsync(IList<Guid>, String, String, String, IList<String>, Nullable<Int32>, Nullable<Double>, Dictionary<String, List<String>>, CancellationToken)
VerifyFaceToFaceWithHttpMessagesAsync(Guid, Guid, Dictionary<String,List<String>>, CancellationToken)

Verify whether two faces belong to a same person or whether one face belongs to a person. <br/> Remarks:<br />

  • Higher face image quality means better identification precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • For the scenarios that are sensitive to accuracy please make your own judgment.
  • The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target face, person group or large person group.
VerifyFaceToPersonWithHttpMessagesAsync(Guid, Guid, String, String, Dictionary<String,List<String>>, CancellationToken)

Verify whether two faces belong to a same person. Compares a face Id with a Person Id

Extension Methods

DetectWithStreamAsync(IFaceOperations, Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Nullable<Int32>, CancellationToken)
DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Nullable<Int32>, CancellationToken)
FindSimilarAsync(IFaceOperations, Guid, String, String, IList<Nullable<Guid>>, Nullable<Int32>, FindSimilarMatchMode, CancellationToken)

Given query face's faceId, to search the similar-looking faces from a faceId array, a face list or a large face list. faceId array contains the faces created by Face - Detect, which will expire 24 hours after creation. A "faceListId" is created by FaceList - Create containing persistedFaceIds that will not expire. And a "largeFaceListId" is created by LargeFaceList - Create containing persistedFaceIds that will also not expire. Depending on the input the returned similar faces list contains faceIds or persistedFaceIds ranked by similarity. <br/>Find similar has two working modes, "matchPerson" and "matchFace". "matchPerson" is the default mode that it tries to find faces of the same person as possible by using internal same-person thresholds. It is useful to find a known person's other photos. Note that an empty list will be returned if no faces pass the internal thresholds. "matchFace" mode ignores same-person thresholds and returns ranked similar faces anyway, even the similarity is low. It can be used in the cases like searching celebrity-looking faces. <br/>The 'recognitionModel' associated with the query face's faceId should be the same as the 'recognitionModel' used by the target faceId array, face list or large face list.

GroupAsync(IFaceOperations, IList<Guid>, CancellationToken)

Divide candidate faces into groups based on face similarity.<br />

  • The output is one or more disjointed face groups and a messyGroup. A face group contains faces that have similar looking, often of the same person. Face groups are ranked by group size, i.e. number of faces. Notice that faces belonging to a same person might be split into several groups in the result.
  • MessyGroup is a special face group containing faces that cannot find any similar counterpart face from original faces. The messyGroup will not appear in the result if all faces found their counterparts.
  • Group API needs at least 2 candidate faces and 1000 at most. We suggest to try Face - Verify when you only have 2 candidate faces.
  • The 'recognitionModel' associated with the query faces' faceIds should be the same.
IdentifyAsync(IFaceOperations, IList<Guid>, String, String, String, IList<String>, Nullable<Int32>, Nullable<Double>, CancellationToken)
VerifyFaceToFaceAsync(IFaceOperations, Guid, Guid, CancellationToken)

Verify whether two faces belong to a same person or whether one face belongs to a person. <br/> Remarks:<br />

  • Higher face image quality means better identification precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • For the scenarios that are sensitive to accuracy please make your own judgment.
  • The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target face, person group or large person group.
VerifyFaceToPersonAsync(IFaceOperations, Guid, Guid, String, String, CancellationToken)

Verify whether two faces belong to a same person. Compares a face Id with a Person Id

Applies to