IFaceOperations IFaceOperations IFaceOperations Interface

Definition

FaceOperations operations.

public interface IFaceOperations
type IFaceOperations = interface
Public Interface IFaceOperations
Derived

Methods

DetectWithStreamWithHttpMessagesAsync(Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, Dictionary<String,List<String>>, CancellationToken) DetectWithStreamWithHttpMessagesAsync(Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, Dictionary<String,List<String>>, CancellationToken) DetectWithStreamWithHttpMessagesAsync(Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, Dictionary<String,List<String>>, CancellationToken)

Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.

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

Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes.<br />

  • Optional parameters including faceId, landmarks, and attributes. Attributes include age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise.
  • The extracted face feature, instead of the actual image, will be stored on server. The faceId is an identifier of the face feature and will be used in Face - Identify, Face - Verify, and Face - Find Similar. It will expire 24 hours after the detection call.
  • Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
  • Faces are detectable when its size is 36x36 to 4096x4096 pixels. If need to detect very small but clear faces, please try to enlarge the input image.
  • Up to 64 faces can be returned for an image. Faces are ranked by face rectangle size from large to small.
  • Face detector prefer frontal and near-frontal faces. There are cases that faces may not be detected, e.g. exceptionally large face angles (head-pose) or being occluded, or wrong image orientation.
  • Attributes (age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise) may not be perfectly accurate. HeadPose's pitch value is a reserved field and will always return 0.
  • Different 'recognitionModel' values are provided. If follow-up operations like Verify, Identify, Find Similar are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to How to specify a recognition model
DetectWithUrlWithHttpMessagesAsync(String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Dictionary<String,List<String>>, CancellationToken) DetectWithUrlWithHttpMessagesAsync(String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Dictionary<String,List<String>>, CancellationToken) DetectWithUrlWithHttpMessagesAsync(String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, Dictionary<String,List<String>>, CancellationToken)
FindSimilarWithHttpMessagesAsync(Guid, String, String, IList<Nullable<Guid>>, Nullable<Int32>, FindSimilarMatchMode, Dictionary<String,List<String>>, CancellationToken) FindSimilarWithHttpMessagesAsync(Guid, String, String, IList<Nullable<Guid>>, Nullable<Int32>, FindSimilarMatchMode, 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) GroupWithHttpMessagesAsync(IList<Guid>, Dictionary<String,List<String>>, CancellationToken) 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, Nullable<Int32>, Nullable<Double>, Dictionary<String,List<String>>, CancellationToken) IdentifyWithHttpMessagesAsync(IList<Guid>, String, String, Nullable<Int32>, Nullable<Double>, Dictionary<String,List<String>>, CancellationToken) IdentifyWithHttpMessagesAsync(IList<Guid>, String, String, Nullable<Int32>, Nullable<Double>, Dictionary<String,List<String>>, CancellationToken)

1-to-many identification to find the closest matches of the specific query person face from a person group or large person group. <br/> For each face in the faceIds array, Face Identify will compute similarities between the query face and all the faces in the person group (given by personGroupId) or large person group (given by largePersonGroupId), and return candidate person(s) for that face ranked by similarity confidence. The person group/large person group should be trained to make it ready for identification. See more in PersonGroup - Train and LargePersonGroup - Train. <br/>

Remarks:<br />

  • The algorithm allows more than one face to be identified independently at the same request, but no more than 10 faces.
  • Each person in the person group/large person group could have more than one face, but no more than 248 faces.
  • 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.
  • Number of candidates returned is restricted by maxNumOfCandidatesReturned and confidenceThreshold. If no person is identified, the returned candidates will be an empty array.
  • Try Face - Find Similar when you need to find similar faces from a face list/large face list instead of a person group/large person group.
  • The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target person group or large person group.
VerifyFaceToFaceWithHttpMessagesAsync(Guid, Guid, Dictionary<String,List<String>>, CancellationToken) VerifyFaceToFaceWithHttpMessagesAsync(Guid, Guid, 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) VerifyFaceToPersonWithHttpMessagesAsync(Guid, Guid, String, String, Dictionary<String,List<String>>, CancellationToken) 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, CancellationToken) DetectWithStreamAsync(IFaceOperations, Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, CancellationToken) DetectWithStreamAsync(IFaceOperations, Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, CancellationToken)
DetectWithStreamAsync(IFaceOperations, Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, CancellationToken) DetectWithStreamAsync(IFaceOperations, Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, CancellationToken) DetectWithStreamAsync(IFaceOperations, Stream, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, CancellationToken)

Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.

DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, CancellationToken) DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, CancellationToken) DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, String, CancellationToken)
DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, CancellationToken) DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, CancellationToken) DetectWithUrlAsync(IFaceOperations, String, Nullable<Boolean>, Nullable<Boolean>, IList<FaceAttributeType>, String, Nullable<Boolean>, CancellationToken)

Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes.<br />

  • Optional parameters including faceId, landmarks, and attributes. Attributes include age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise.
  • The extracted face feature, instead of the actual image, will be stored on server. The faceId is an identifier of the face feature and will be used in Face - Identify, Face - Verify, and Face - Find Similar. It will expire 24 hours after the detection call.
  • Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
  • Faces are detectable when its size is 36x36 to 4096x4096 pixels. If need to detect very small but clear faces, please try to enlarge the input image.
  • Up to 64 faces can be returned for an image. Faces are ranked by face rectangle size from large to small.
  • Face detector prefer frontal and near-frontal faces. There are cases that faces may not be detected, e.g. exceptionally large face angles (head-pose) or being occluded, or wrong image orientation.
  • Attributes (age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure and noise) may not be perfectly accurate. HeadPose's pitch value is a reserved field and will always return 0.
  • Different 'recognitionModel' values are provided. If follow-up operations like Verify, Identify, Find Similar are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to How to specify a recognition model
FindSimilarAsync(IFaceOperations, Guid, String, String, IList<Nullable<Guid>>, Nullable<Int32>, FindSimilarMatchMode, CancellationToken) FindSimilarAsync(IFaceOperations, Guid, String, String, IList<Nullable<Guid>>, Nullable<Int32>, FindSimilarMatchMode, 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) GroupAsync(IFaceOperations, IList<Guid>, CancellationToken) 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, Nullable<Int32>, Nullable<Double>, CancellationToken) IdentifyAsync(IFaceOperations, IList<Guid>, String, String, Nullable<Int32>, Nullable<Double>, CancellationToken) IdentifyAsync(IFaceOperations, IList<Guid>, String, String, Nullable<Int32>, Nullable<Double>, CancellationToken)

1-to-many identification to find the closest matches of the specific query person face from a person group or large person group. <br/> For each face in the faceIds array, Face Identify will compute similarities between the query face and all the faces in the person group (given by personGroupId) or large person group (given by largePersonGroupId), and return candidate person(s) for that face ranked by similarity confidence. The person group/large person group should be trained to make it ready for identification. See more in PersonGroup - Train and LargePersonGroup - Train. <br/>

Remarks:<br />

  • The algorithm allows more than one face to be identified independently at the same request, but no more than 10 faces.
  • Each person in the person group/large person group could have more than one face, but no more than 248 faces.
  • 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.
  • Number of candidates returned is restricted by maxNumOfCandidatesReturned and confidenceThreshold. If no person is identified, the returned candidates will be an empty array.
  • Try Face - Find Similar when you need to find similar faces from a face list/large face list instead of a person group/large person group.
  • The 'recognitionModel' associated with the query faces' faceIds should be the same as the 'recognitionModel' used by the target person group or large person group.
VerifyFaceToFaceAsync(IFaceOperations, Guid, Guid, CancellationToken) VerifyFaceToFaceAsync(IFaceOperations, Guid, Guid, 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) VerifyFaceToPersonAsync(IFaceOperations, Guid, Guid, String, String, CancellationToken) 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