face

package
v14.6.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package face implements the Azure ARM Face service API version 1.0.

An API for face detection, verification, and identification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type APIError

type APIError struct {
	Error *Error `json:"error,omitempty"`
}

APIError error information returned by the API

type Accessory

type Accessory struct {
	// Type - Type of an accessory. Possible values include: 'HeadWear', 'Glasses', 'Mask'
	Type AccessoryType `json:"type,omitempty"`
	// Confidence - Confidence level of an accessory
	Confidence *float64 `json:"confidence,omitempty"`
}

Accessory accessory item and corresponding confidence level.

type AccessoryType

type AccessoryType string

AccessoryType enumerates the values for accessory type.

const (
	// Glasses ...
	Glasses AccessoryType = "glasses"
	// HeadWear ...
	HeadWear AccessoryType = "headWear"
	// Mask ...
	Mask AccessoryType = "mask"
)

type AttributeType

type AttributeType string

AttributeType enumerates the values for attribute type.

const (
	// AttributeTypeAccessories ...
	AttributeTypeAccessories AttributeType = "accessories"
	// AttributeTypeAge ...
	AttributeTypeAge AttributeType = "age"
	// AttributeTypeBlur ...
	AttributeTypeBlur AttributeType = "blur"
	// AttributeTypeEmotion ...
	AttributeTypeEmotion AttributeType = "emotion"
	// AttributeTypeExposure ...
	AttributeTypeExposure AttributeType = "exposure"
	// AttributeTypeFacialHair ...
	AttributeTypeFacialHair AttributeType = "facialHair"
	// AttributeTypeGender ...
	AttributeTypeGender AttributeType = "gender"
	// AttributeTypeGlasses ...
	AttributeTypeGlasses AttributeType = "glasses"
	// AttributeTypeHair ...
	AttributeTypeHair AttributeType = "hair"
	// AttributeTypeHeadPose ...
	AttributeTypeHeadPose AttributeType = "headPose"
	// AttributeTypeMakeup ...
	AttributeTypeMakeup AttributeType = "makeup"
	// AttributeTypeNoise ...
	AttributeTypeNoise AttributeType = "noise"
	// AttributeTypeOcclusion ...
	AttributeTypeOcclusion AttributeType = "occlusion"
	// AttributeTypeSmile ...
	AttributeTypeSmile AttributeType = "smile"
)

type Attributes

type Attributes struct {
	// Age - Age in years
	Age *float64 `json:"age,omitempty"`
	// Gender - Possible gender of the face. Possible values include: 'Male', 'Female', 'Genderless'
	Gender Gender `json:"gender,omitempty"`
	// Smile - Smile intensity, a number between [0,1]
	Smile *float64 `json:"smile,omitempty"`
	// FacialHair - Properties describing facial hair attributes.
	FacialHair *FacialHair `json:"facialHair,omitempty"`
	// Glasses - Glasses type if any of the face. Possible values include: 'NoGlasses', 'ReadingGlasses', 'Sunglasses', 'SwimmingGoggles'
	Glasses GlassesType `json:"glasses,omitempty"`
	// HeadPose - Properties indicating head pose of the face.
	HeadPose *HeadPose `json:"headPose,omitempty"`
	// Emotion - Properties describing facial emotion in form of confidence ranging from 0 to 1.
	Emotion *Emotion `json:"emotion,omitempty"`
	// Hair - Properties describing hair attributes.
	Hair *Hair `json:"hair,omitempty"`
	// Makeup - Properties describing present makeups on a given face.
	Makeup *Makeup `json:"makeup,omitempty"`
	// Occlusion - Properties describing occlusions on a given face.
	Occlusion *Occlusion `json:"occlusion,omitempty"`
	// Accessories - Properties describing any accessories on a given face.
	Accessories *[]Accessory `json:"accessories,omitempty"`
	// Blur - Properties describing any presence of blur within the image.
	Blur *Blur `json:"blur,omitempty"`
	// Exposure - Properties describing exposure level of the image.
	Exposure *Exposure `json:"exposure,omitempty"`
	// Noise - Properties describing noise level of the image.
	Noise *Noise `json:"noise,omitempty"`
}

Attributes face Attributes

type AzureRegions

type AzureRegions string

AzureRegions enumerates the values for azure regions.

const (
	// Australiaeast ...
	Australiaeast AzureRegions = "australiaeast"
	// Brazilsouth ...
	Brazilsouth AzureRegions = "brazilsouth"
	// Eastasia ...
	Eastasia AzureRegions = "eastasia"
	// Eastus ...
	Eastus AzureRegions = "eastus"
	// Eastus2 ...
	Eastus2 AzureRegions = "eastus2"
	// Northeurope ...
	Northeurope AzureRegions = "northeurope"
	// Southcentralus ...
	Southcentralus AzureRegions = "southcentralus"
	// Southeastasia ...
	Southeastasia AzureRegions = "southeastasia"
	// Westcentralus ...
	Westcentralus AzureRegions = "westcentralus"
	// Westeurope ...
	Westeurope AzureRegions = "westeurope"
	// Westus ...
	Westus AzureRegions = "westus"
	// Westus2 ...
	Westus2 AzureRegions = "westus2"
)

type BaseClient

type BaseClient struct {
	autorest.Client
	AzureRegion AzureRegions
}

BaseClient is the base client for Face.

func New

func New(azureRegion AzureRegions) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(azureRegion AzureRegions) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type Blur

type Blur struct {
	// BlurLevel - An enum value indicating level of blurriness. Possible values include: 'Low', 'Medium', 'High'
	BlurLevel BlurLevel `json:"blurLevel,omitempty"`
	// Value - A number indicating level of blurriness ranging from 0 to 1.
	Value *float64 `json:"value,omitempty"`
}

Blur properties describing any presence of blur within the image.

type BlurLevel

type BlurLevel string

BlurLevel enumerates the values for blur level.

const (
	// High ...
	High BlurLevel = "High"
	// Low ...
	Low BlurLevel = "Low"
	// Medium ...
	Medium BlurLevel = "Medium"
)

type Client

type Client struct {
	BaseClient
}

Client is the an API for face detection, verification, and identification.

func NewClient

func NewClient(azureRegion AzureRegions) Client

NewClient creates an instance of the Client client.

func (Client) DetectWithStream

func (client Client) DetectWithStream(ctx context.Context, imageParameter io.ReadCloser, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes []AttributeType) (result ListDetectedFace, err error)

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

imageParameter is an image stream. imageParameter will be closed upon successful return. Callers should ensure closure when receiving an error.returnFaceID is a value indicating whether the operation should return faceIds of detected faces. returnFaceLandmarks is a value indicating whether the operation should return landmarks of the detected faces. returnFaceAttributes is analyze and return the one or more specified face attributes in the comma-separated string like "returnFaceAttributes=age,gender". Supported face attributes include age, gender, headPose, smile, facialHair, glasses and emotion. Note that each face attribute analysis has additional computational and time cost.

func (Client) DetectWithStreamPreparer

func (client Client) DetectWithStreamPreparer(ctx context.Context, imageParameter io.ReadCloser, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes []AttributeType) (*http.Request, error)

DetectWithStreamPreparer prepares the DetectWithStream request.

func (Client) DetectWithStreamResponder

func (client Client) DetectWithStreamResponder(resp *http.Response) (result ListDetectedFace, err error)

DetectWithStreamResponder handles the response to the DetectWithStream request. The method always closes the http.Response Body.

func (Client) DetectWithStreamSender

func (client Client) DetectWithStreamSender(req *http.Request) (*http.Response, error)

DetectWithStreamSender sends the DetectWithStream request. The method will close the http.Response Body if it receives an error.

func (Client) DetectWithURL

func (client Client) DetectWithURL(ctx context.Context, imageURL ImageURL, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes []AttributeType) (result ListDetectedFace, err error)

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

imageURL is a JSON document with a URL pointing to the image that is to be analyzed. returnFaceID is a value indicating whether the operation should return faceIds of detected faces. returnFaceLandmarks is a value indicating whether the operation should return landmarks of the detected faces. returnFaceAttributes is analyze and return the one or more specified face attributes in the comma-separated string like "returnFaceAttributes=age,gender". Supported face attributes include age, gender, headPose, smile, facialHair, glasses and emotion. Note that each face attribute analysis has additional computational and time cost.

func (Client) DetectWithURLPreparer

func (client Client) DetectWithURLPreparer(ctx context.Context, imageURL ImageURL, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes []AttributeType) (*http.Request, error)

DetectWithURLPreparer prepares the DetectWithURL request.

func (Client) DetectWithURLResponder

func (client Client) DetectWithURLResponder(resp *http.Response) (result ListDetectedFace, err error)

DetectWithURLResponder handles the response to the DetectWithURL request. The method always closes the http.Response Body.

func (Client) DetectWithURLSender

func (client Client) DetectWithURLSender(req *http.Request) (*http.Response, error)

DetectWithURLSender sends the DetectWithURL request. The method will close the http.Response Body if it receives an error.

func (Client) FindSimilar

func (client Client) FindSimilar(ctx context.Context, body FindSimilarRequest) (result ListSimilarFace, err error)

FindSimilar given query face's faceId, find the similar-looking faces from a faceId array or a faceListId.

body is request body for Find Similar.

func (Client) FindSimilarPreparer

func (client Client) FindSimilarPreparer(ctx context.Context, body FindSimilarRequest) (*http.Request, error)

FindSimilarPreparer prepares the FindSimilar request.

func (Client) FindSimilarResponder

func (client Client) FindSimilarResponder(resp *http.Response) (result ListSimilarFace, err error)

FindSimilarResponder handles the response to the FindSimilar request. The method always closes the http.Response Body.

func (Client) FindSimilarSender

func (client Client) FindSimilarSender(req *http.Request) (*http.Response, error)

FindSimilarSender sends the FindSimilar request. The method will close the http.Response Body if it receives an error.

func (Client) Group

func (client Client) Group(ctx context.Context, body GroupRequest) (result GroupResult, err error)

Group divide candidate faces into groups based on face similarity.

body is request body for grouping.

func (Client) GroupPreparer

func (client Client) GroupPreparer(ctx context.Context, body GroupRequest) (*http.Request, error)

GroupPreparer prepares the Group request.

func (Client) GroupResponder

func (client Client) GroupResponder(resp *http.Response) (result GroupResult, err error)

GroupResponder handles the response to the Group request. The method always closes the http.Response Body.

func (Client) GroupSender

func (client Client) GroupSender(req *http.Request) (*http.Response, error)

GroupSender sends the Group request. The method will close the http.Response Body if it receives an error.

func (Client) Identify

func (client Client) Identify(ctx context.Context, body IdentifyRequest) (result ListIdentifyResult, err error)

Identify identify unknown faces from a person group.

body is request body for identify operation.

func (Client) IdentifyPreparer

func (client Client) IdentifyPreparer(ctx context.Context, body IdentifyRequest) (*http.Request, error)

IdentifyPreparer prepares the Identify request.

func (Client) IdentifyResponder

func (client Client) IdentifyResponder(resp *http.Response) (result ListIdentifyResult, err error)

IdentifyResponder handles the response to the Identify request. The method always closes the http.Response Body.

func (Client) IdentifySender

func (client Client) IdentifySender(req *http.Request) (*http.Response, error)

IdentifySender sends the Identify request. The method will close the http.Response Body if it receives an error.

func (Client) VerifyFaceToFace

func (client Client) VerifyFaceToFace(ctx context.Context, body VerifyFaceToFaceRequest) (result VerifyResult, err error)

VerifyFaceToFace verify whether two faces belong to a same person or whether one face belongs to a person.

body is request body for verify operation.

func (Client) VerifyFaceToFacePreparer

func (client Client) VerifyFaceToFacePreparer(ctx context.Context, body VerifyFaceToFaceRequest) (*http.Request, error)

VerifyFaceToFacePreparer prepares the VerifyFaceToFace request.

func (Client) VerifyFaceToFaceResponder

func (client Client) VerifyFaceToFaceResponder(resp *http.Response) (result VerifyResult, err error)

VerifyFaceToFaceResponder handles the response to the VerifyFaceToFace request. The method always closes the http.Response Body.

func (Client) VerifyFaceToFaceSender

func (client Client) VerifyFaceToFaceSender(req *http.Request) (*http.Response, error)

VerifyFaceToFaceSender sends the VerifyFaceToFace request. The method will close the http.Response Body if it receives an error.

func (Client) VerifyFaceToPerson

func (client Client) VerifyFaceToPerson(ctx context.Context, body VerifyFaceToPersonRequest) (result VerifyResult, err error)

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

body is request body for verifying two faces in a person group

func (Client) VerifyFaceToPersonPreparer

func (client Client) VerifyFaceToPersonPreparer(ctx context.Context, body VerifyFaceToPersonRequest) (*http.Request, error)

VerifyFaceToPersonPreparer prepares the VerifyFaceToPerson request.

func (Client) VerifyFaceToPersonResponder

func (client Client) VerifyFaceToPersonResponder(resp *http.Response) (result VerifyResult, err error)

VerifyFaceToPersonResponder handles the response to the VerifyFaceToPerson request. The method always closes the http.Response Body.

func (Client) VerifyFaceToPersonSender

func (client Client) VerifyFaceToPersonSender(req *http.Request) (*http.Response, error)

VerifyFaceToPersonSender sends the VerifyFaceToPerson request. The method will close the http.Response Body if it receives an error.

type Coordinate

type Coordinate struct {
	// X - The horizontal component, in pixels.
	X *float64 `json:"x,omitempty"`
	// Y - The vertical component, in pixels.
	Y *float64 `json:"y,omitempty"`
}

Coordinate coordinates within an image

type DetectedFace

type DetectedFace struct {
	FaceID         *uuid.UUID  `json:"faceId,omitempty"`
	FaceRectangle  *Rectangle  `json:"faceRectangle,omitempty"`
	FaceLandmarks  *Landmarks  `json:"faceLandmarks,omitempty"`
	FaceAttributes *Attributes `json:"faceAttributes,omitempty"`
}

DetectedFace detected Face object.

type Emotion

type Emotion struct {
	Anger     *float64 `json:"anger,omitempty"`
	Contempt  *float64 `json:"contempt,omitempty"`
	Disgust   *float64 `json:"disgust,omitempty"`
	Fear      *float64 `json:"fear,omitempty"`
	Happiness *float64 `json:"happiness,omitempty"`
	Neutral   *float64 `json:"neutral,omitempty"`
	Sadness   *float64 `json:"sadness,omitempty"`
	Surprise  *float64 `json:"surprise,omitempty"`
}

Emotion properties describing facial emotion in form of confidence ranging from 0 to 1.

type Error

type Error struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

Error error body.

type Exposure

type Exposure struct {
	// ExposureLevel - An enum value indicating level of exposure. Possible values include: 'UnderExposure', 'GoodExposure', 'OverExposure'
	ExposureLevel ExposureLevel `json:"exposureLevel,omitempty"`
	// Value - A number indicating level of exposure level ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) is good exposure. [0.75, 1] is over exposure.
	Value *float64 `json:"value,omitempty"`
}

Exposure properties describing exposure level of the image.

type ExposureLevel

type ExposureLevel string

ExposureLevel enumerates the values for exposure level.

const (
	// GoodExposure ...
	GoodExposure ExposureLevel = "GoodExposure"
	// OverExposure ...
	OverExposure ExposureLevel = "OverExposure"
	// UnderExposure ...
	UnderExposure ExposureLevel = "UnderExposure"
)

type FacialHair

type FacialHair struct {
	Moustache *float64 `json:"moustache,omitempty"`
	Beard     *float64 `json:"beard,omitempty"`
	Sideburns *float64 `json:"sideburns,omitempty"`
}

FacialHair properties describing facial hair attributes.

type FindSimilarMatchMode

type FindSimilarMatchMode string

FindSimilarMatchMode enumerates the values for find similar match mode.

const (
	// MatchFace ...
	MatchFace FindSimilarMatchMode = "matchFace"
	// MatchPerson ...
	MatchPerson FindSimilarMatchMode = "matchPerson"
)

type FindSimilarRequest

type FindSimilarRequest struct {
	// FaceID - FaceId of the query face. User needs to call Face - Detect first to get a valid faceId. Note that this faceId is not persisted and will expire 24 hours after the detection call
	FaceID *uuid.UUID `json:"faceId,omitempty"`
	// FaceListID - An existing user-specified unique candidate face list, created in Face List - Create a Face List. Face list contains a set of persistedFaceIds which are persisted and will never expire. Parameter faceListId and faceIds should not be provided at the same time
	FaceListID *string `json:"faceListId,omitempty"`
	// FaceIds - An array of candidate faceIds. All of them are created by Face - Detect and the faceIds will expire 24 hours after the detection call.
	FaceIds *[]uuid.UUID `json:"faceIds,omitempty"`
	// MaxNumOfCandidatesReturned - The number of top similar faces returned. The valid range is [1, 1000].
	MaxNumOfCandidatesReturned *int32 `json:"maxNumOfCandidatesReturned,omitempty"`
	// Mode - Similar face searching mode. It can be "matchPerson" or "matchFace". Possible values include: 'MatchPerson', 'MatchFace'
	Mode FindSimilarMatchMode `json:"mode,omitempty"`
}

FindSimilarRequest request body for find similar operation.

type Gender

type Gender string

Gender enumerates the values for gender.

const (
	// Female ...
	Female Gender = "female"
	// Genderless ...
	Genderless Gender = "genderless"
	// Male ...
	Male Gender = "male"
)

type GlassesType

type GlassesType string

GlassesType enumerates the values for glasses type.

const (
	// NoGlasses ...
	NoGlasses GlassesType = "noGlasses"
	// ReadingGlasses ...
	ReadingGlasses GlassesType = "readingGlasses"
	// Sunglasses ...
	Sunglasses GlassesType = "sunglasses"
	// SwimmingGoggles ...
	SwimmingGoggles GlassesType = "swimmingGoggles"
)

type GroupRequest

type GroupRequest struct {
	// FaceIds - Array of candidate faceId created by Face - Detect. The maximum is 1000 faces
	FaceIds *[]uuid.UUID `json:"faceIds,omitempty"`
}

GroupRequest request body for group request.

type GroupResult

type GroupResult struct {
	autorest.Response `json:"-"`
	// Groups - A partition of the original faces based on face similarity. Groups are ranked by number of faces
	Groups *[][]uuid.UUID `json:"groups,omitempty"`
	// MessyGroup - Face ids array of faces that cannot find any similar faces from original faces.
	MessyGroup *[]uuid.UUID `json:"messyGroup,omitempty"`
}

GroupResult an array of face groups based on face similarity.

type Hair

type Hair struct {
	// Bald - A number describing confidence level of whether the person is bald.
	Bald *float64 `json:"bald,omitempty"`
	// Invisible - A boolean value describing whether the hair is visible in the image.
	Invisible *bool `json:"invisible,omitempty"`
	// HairColor - An array of candidate colors and confidence level in the presence of each.
	HairColor *[]HairColor `json:"hairColor,omitempty"`
}

Hair properties describing hair attributes.

type HairColor

type HairColor struct {
	// Color - Name of the hair color. Possible values include: 'Unknown', 'White', 'Gray', 'Blond', 'Brown', 'Red', 'Black', 'Other'
	Color HairColorType `json:"color,omitempty"`
	// Confidence - Confidence level of the color
	Confidence *float64 `json:"confidence,omitempty"`
}

HairColor hair color and associated confidence

type HairColorType

type HairColorType string

HairColorType enumerates the values for hair color type.

const (
	// Black ...
	Black HairColorType = "black"
	// Blond ...
	Blond HairColorType = "blond"
	// Brown ...
	Brown HairColorType = "brown"
	// Gray ...
	Gray HairColorType = "gray"
	// Other ...
	Other HairColorType = "other"
	// Red ...
	Red HairColorType = "red"
	// Unknown ...
	Unknown HairColorType = "unknown"
	// White ...
	White HairColorType = "white"
)

type HeadPose

type HeadPose struct {
	Roll  *float64 `json:"roll,omitempty"`
	Yaw   *float64 `json:"yaw,omitempty"`
	Pitch *float64 `json:"pitch,omitempty"`
}

HeadPose properties indicating head pose of the face.

type IdentifyCandidate

type IdentifyCandidate struct {
	// PersonID - Id of candidate
	PersonID *uuid.UUID `json:"personId,omitempty"`
	// Confidence - Confidence threshold of identification, used to judge whether one face belong to one person. The range of confidenceThreshold is [0, 1] (default specified by algorithm).
	Confidence *float64 `json:"confidence,omitempty"`
}

IdentifyCandidate all possible faces that may qualify.

type IdentifyRequest

type IdentifyRequest struct {
	// PersonGroupID - PersonGroupId of the target person group, created by PersonGroups.Create
	PersonGroupID *string `json:"personGroupId,omitempty"`
	// FaceIds - Array of query faces faceIds, created by the Face - Detect. Each of the faces are identified independently. The valid number of faceIds is between [1, 10].
	FaceIds *[]uuid.UUID `json:"faceIds,omitempty"`
	// MaxNumOfCandidatesReturned - The range of maxNumOfCandidatesReturned is between 1 and 5 (default is 1).
	MaxNumOfCandidatesReturned *int32 `json:"maxNumOfCandidatesReturned,omitempty"`
	// ConfidenceThreshold - Confidence threshold of identification, used to judge whether one face belong to one person. The range of confidenceThreshold is [0, 1] (default specified by algorithm).
	ConfidenceThreshold *float64 `json:"confidenceThreshold,omitempty"`
}

IdentifyRequest request body for identify face operation.

type IdentifyResult

type IdentifyResult struct {
	// FaceID - FaceId of the query face
	FaceID *uuid.UUID `json:"faceId,omitempty"`
	// Candidates - Identified person candidates for that face (ranked by confidence). Array size should be no larger than input maxNumOfCandidatesReturned. If no person is identified, will return an empty array.
	Candidates *[]IdentifyCandidate `json:"candidates,omitempty"`
}

IdentifyResult response body for identify face operation.

type ImageURL

type ImageURL struct {
	URL *string `json:"url,omitempty"`
}

ImageURL ...

type Landmarks

type Landmarks struct {
	PupilLeft           *Coordinate `json:"pupilLeft,omitempty"`
	PupilRight          *Coordinate `json:"pupilRight,omitempty"`
	NoseTip             *Coordinate `json:"noseTip,omitempty"`
	MouthLeft           *Coordinate `json:"mouthLeft,omitempty"`
	MouthRight          *Coordinate `json:"mouthRight,omitempty"`
	EyebrowLeftOuter    *Coordinate `json:"eyebrowLeftOuter,omitempty"`
	EyebrowLeftInner    *Coordinate `json:"eyebrowLeftInner,omitempty"`
	EyeLeftOuter        *Coordinate `json:"eyeLeftOuter,omitempty"`
	EyeLeftTop          *Coordinate `json:"eyeLeftTop,omitempty"`
	EyeLeftBottom       *Coordinate `json:"eyeLeftBottom,omitempty"`
	EyeLeftInner        *Coordinate `json:"eyeLeftInner,omitempty"`
	EyebrowRightInner   *Coordinate `json:"eyebrowRightInner,omitempty"`
	EyebrowRightOuter   *Coordinate `json:"eyebrowRightOuter,omitempty"`
	EyeRightInner       *Coordinate `json:"eyeRightInner,omitempty"`
	EyeRightTop         *Coordinate `json:"eyeRightTop,omitempty"`
	EyeRightBottom      *Coordinate `json:"eyeRightBottom,omitempty"`
	EyeRightOuter       *Coordinate `json:"eyeRightOuter,omitempty"`
	NoseRootLeft        *Coordinate `json:"noseRootLeft,omitempty"`
	NoseRootRight       *Coordinate `json:"noseRootRight,omitempty"`
	NoseLeftAlarTop     *Coordinate `json:"noseLeftAlarTop,omitempty"`
	NoseRightAlarTop    *Coordinate `json:"noseRightAlarTop,omitempty"`
	NoseLeftAlarOutTip  *Coordinate `json:"noseLeftAlarOutTip,omitempty"`
	NoseRightAlarOutTip *Coordinate `json:"noseRightAlarOutTip,omitempty"`
	UpperLipTop         *Coordinate `json:"upperLipTop,omitempty"`
	UpperLipBottom      *Coordinate `json:"upperLipBottom,omitempty"`
	UnderLipTop         *Coordinate `json:"underLipTop,omitempty"`
	UnderLipBottom      *Coordinate `json:"underLipBottom,omitempty"`
}

Landmarks a collection of 27-point face landmarks pointing to the important positions of face components.

type List

type List struct {
	autorest.Response `json:"-"`
	// FaceListID - FaceListId of the target face list.
	FaceListID *string `json:"faceListId,omitempty"`
	// PersistedFaces - Persisted faces within the face list.
	PersistedFaces *[]PersistedFace `json:"persistedFaces,omitempty"`
	// Name - User defined name, maximum length is 128.
	Name *string `json:"name,omitempty"`
	// UserData - User specified data. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
}

List face list object.

type ListClient

type ListClient struct {
	BaseClient
}

ListClient is the an API for face detection, verification, and identification.

func NewListClient

func NewListClient(azureRegion AzureRegions) ListClient

NewListClient creates an instance of the ListClient client.

func (ListClient) AddFaceFromStream

func (client ListClient) AddFaceFromStream(ctx context.Context, faceListID string, imageParameter io.ReadCloser, userData string, targetFace []int32) (result PersistedFace, err error)

AddFaceFromStream add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

faceListID is id referencing a particular face list. imageParameter is an image stream. imageParameter will be closed upon successful return. Callers should ensure closure when receiving an error.userData is user-specified data about the face for any purpose. The maximum length is 1KB. targetFace is a face rectangle to specify the target face to be added to a person in the format of "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in the image, targetFace is required to specify which face to add. No targetFace means there is only one face detected in the entire image.

func (ListClient) AddFaceFromStreamPreparer

func (client ListClient) AddFaceFromStreamPreparer(ctx context.Context, faceListID string, imageParameter io.ReadCloser, userData string, targetFace []int32) (*http.Request, error)

AddFaceFromStreamPreparer prepares the AddFaceFromStream request.

func (ListClient) AddFaceFromStreamResponder

func (client ListClient) AddFaceFromStreamResponder(resp *http.Response) (result PersistedFace, err error)

AddFaceFromStreamResponder handles the response to the AddFaceFromStream request. The method always closes the http.Response Body.

func (ListClient) AddFaceFromStreamSender

func (client ListClient) AddFaceFromStreamSender(req *http.Request) (*http.Response, error)

AddFaceFromStreamSender sends the AddFaceFromStream request. The method will close the http.Response Body if it receives an error.

func (ListClient) AddFaceFromURL

func (client ListClient) AddFaceFromURL(ctx context.Context, faceListID string, imageURL ImageURL, userData string, targetFace []int32) (result PersistedFace, err error)

AddFaceFromURL add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

faceListID is id referencing a particular face list. imageURL is a JSON document with a URL pointing to the image that is to be analyzed. userData is user-specified data about the face for any purpose. The maximum length is 1KB. targetFace is a face rectangle to specify the target face to be added to a person in the format of "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in the image, targetFace is required to specify which face to add. No targetFace means there is only one face detected in the entire image.

func (ListClient) AddFaceFromURLPreparer

func (client ListClient) AddFaceFromURLPreparer(ctx context.Context, faceListID string, imageURL ImageURL, userData string, targetFace []int32) (*http.Request, error)

AddFaceFromURLPreparer prepares the AddFaceFromURL request.

func (ListClient) AddFaceFromURLResponder

func (client ListClient) AddFaceFromURLResponder(resp *http.Response) (result PersistedFace, err error)

AddFaceFromURLResponder handles the response to the AddFaceFromURL request. The method always closes the http.Response Body.

func (ListClient) AddFaceFromURLSender

func (client ListClient) AddFaceFromURLSender(req *http.Request) (*http.Response, error)

AddFaceFromURLSender sends the AddFaceFromURL request. The method will close the http.Response Body if it receives an error.

func (ListClient) Create

func (client ListClient) Create(ctx context.Context, faceListID string, body NameAndUserDataContract) (result autorest.Response, err error)

Create create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

faceListID is id referencing a particular face list. body is request body for creating a face list.

func (ListClient) CreatePreparer

func (client ListClient) CreatePreparer(ctx context.Context, faceListID string, body NameAndUserDataContract) (*http.Request, error)

CreatePreparer prepares the Create request.

func (ListClient) CreateResponder

func (client ListClient) CreateResponder(resp *http.Response) (result autorest.Response, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (ListClient) CreateSender

func (client ListClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (ListClient) Delete

func (client ListClient) Delete(ctx context.Context, faceListID string) (result autorest.Response, err error)

Delete delete an existing face list according to faceListId. Persisted face images in the face list will also be deleted.

faceListID is id referencing a particular face list.

func (ListClient) DeleteFace

func (client ListClient) DeleteFace(ctx context.Context, faceListID string, persistedFaceID uuid.UUID) (result autorest.Response, err error)

DeleteFace delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image related to the face will also be deleted.

faceListID is id referencing a particular face list. persistedFaceID is id referencing a particular persistedFaceId of an existing face.

func (ListClient) DeleteFacePreparer

func (client ListClient) DeleteFacePreparer(ctx context.Context, faceListID string, persistedFaceID uuid.UUID) (*http.Request, error)

DeleteFacePreparer prepares the DeleteFace request.

func (ListClient) DeleteFaceResponder

func (client ListClient) DeleteFaceResponder(resp *http.Response) (result autorest.Response, err error)

DeleteFaceResponder handles the response to the DeleteFace request. The method always closes the http.Response Body.

func (ListClient) DeleteFaceSender

func (client ListClient) DeleteFaceSender(req *http.Request) (*http.Response, error)

DeleteFaceSender sends the DeleteFace request. The method will close the http.Response Body if it receives an error.

func (ListClient) DeletePreparer

func (client ListClient) DeletePreparer(ctx context.Context, faceListID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ListClient) DeleteResponder

func (client ListClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ListClient) DeleteSender

func (client ListClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ListClient) Get

func (client ListClient) Get(ctx context.Context, faceListID string) (result List, err error)

Get retrieve a face list's information.

faceListID is id referencing a particular face list.

func (ListClient) GetPreparer

func (client ListClient) GetPreparer(ctx context.Context, faceListID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (ListClient) GetResponder

func (client ListClient) GetResponder(resp *http.Response) (result List, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ListClient) GetSender

func (client ListClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ListClient) List

func (client ListClient) List(ctx context.Context) (result ListList, err error)

List retrieve information about all existing face lists. Only faceListId, name and userData will be returned.

func (ListClient) ListPreparer

func (client ListClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (ListClient) ListResponder

func (client ListClient) ListResponder(resp *http.Response) (result ListList, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ListClient) ListSender

func (client ListClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (ListClient) Update

func (client ListClient) Update(ctx context.Context, faceListID string, body NameAndUserDataContract) (result autorest.Response, err error)

Update update information of a face list.

faceListID is id referencing a particular face list. body is request body for updating a face list.

func (ListClient) UpdatePreparer

func (client ListClient) UpdatePreparer(ctx context.Context, faceListID string, body NameAndUserDataContract) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (ListClient) UpdateResponder

func (client ListClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (ListClient) UpdateSender

func (client ListClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type ListDetectedFace

type ListDetectedFace struct {
	autorest.Response `json:"-"`
	Value             *[]DetectedFace `json:"value,omitempty"`
}

ListDetectedFace ...

type ListIdentifyResult

type ListIdentifyResult struct {
	autorest.Response `json:"-"`
	Value             *[]IdentifyResult `json:"value,omitempty"`
}

ListIdentifyResult ...

type ListList

type ListList struct {
	autorest.Response `json:"-"`
	Value             *[]List `json:"value,omitempty"`
}

ListList ...

type ListPerson

type ListPerson struct {
	autorest.Response `json:"-"`
	Value             *[]Person `json:"value,omitempty"`
}

ListPerson ...

type ListPersonGroup

type ListPersonGroup struct {
	autorest.Response `json:"-"`
	Value             *[]PersonGroup `json:"value,omitempty"`
}

ListPersonGroup ...

type ListSimilarFace

type ListSimilarFace struct {
	autorest.Response `json:"-"`
	Value             *[]SimilarFace `json:"value,omitempty"`
}

ListSimilarFace ...

type Makeup

type Makeup struct {
	// EyeMakeup - A boolean value describing whether eye makeup is present on a face.
	EyeMakeup *bool `json:"eyeMakeup,omitempty"`
	// LipMakeup - A boolean value describing whether lip makeup is present on a face.
	LipMakeup *bool `json:"lipMakeup,omitempty"`
}

Makeup properties describing present makeups on a given face.

type NameAndUserDataContract

type NameAndUserDataContract struct {
	// Name - User defined name, maximum length is 128.
	Name *string `json:"name,omitempty"`
	// UserData - User specified data. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
}

NameAndUserDataContract a combination of user defined name and user specified data for the person, personGroup, and faceList

type Noise

type Noise struct {
	// NoiseLevel - An enum value indicating level of noise. Possible values include: 'NoiseLevelLow', 'NoiseLevelMedium', 'NoiseLevelHigh'
	NoiseLevel NoiseLevel `json:"noiseLevel,omitempty"`
	// Value - A number indicating level of noise level ranging from 0 to 1. [0, 0.25) is under exposure. [0.25, 0.75) is good exposure. [0.75, 1] is over exposure. [0, 0.3) is low noise level. [0.3, 0.7) is medium noise level. [0.7, 1] is high noise level.
	Value *float64 `json:"value,omitempty"`
}

Noise properties describing noise level of the image.

type NoiseLevel

type NoiseLevel string

NoiseLevel enumerates the values for noise level.

const (
	// NoiseLevelHigh ...
	NoiseLevelHigh NoiseLevel = "High"
	// NoiseLevelLow ...
	NoiseLevelLow NoiseLevel = "Low"
	// NoiseLevelMedium ...
	NoiseLevelMedium NoiseLevel = "Medium"
)

type Occlusion

type Occlusion struct {
	// ForeheadOccluded - A boolean value indicating whether forehead is occluded.
	ForeheadOccluded *bool `json:"foreheadOccluded,omitempty"`
	// EyeOccluded - A boolean value indicating whether eyes are occluded.
	EyeOccluded *bool `json:"eyeOccluded,omitempty"`
	// MouthOccluded - A boolean value indicating whether the mouth is occluded.
	MouthOccluded *bool `json:"mouthOccluded,omitempty"`
}

Occlusion properties describing occlusions on a given face.

type PersistedFace

type PersistedFace struct {
	autorest.Response `json:"-"`
	// PersistedFaceID - The persistedFaceId of the target face, which is persisted and will not expire. Different from faceId created by Face - Detect and will expire in 24 hours after the detection call.
	PersistedFaceID *uuid.UUID `json:"persistedFaceId,omitempty"`
	// UserData - User-provided data attached to the face. The size limit is 1KB.
	UserData *string `json:"userData,omitempty"`
}

PersistedFace personFace object.

type Person

type Person struct {
	autorest.Response `json:"-"`
	// PersonID - PersonId of the target face list.
	PersonID *uuid.UUID `json:"personId,omitempty"`
	// PersistedFaceIds - PersistedFaceIds of registered faces in the person. These persistedFaceIds are returned from Person - Add a Person Face, and will not expire.
	PersistedFaceIds *[]uuid.UUID `json:"persistedFaceIds,omitempty"`
	// Name - User defined name, maximum length is 128.
	Name *string `json:"name,omitempty"`
	// UserData - User specified data. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
}

Person person object.

type PersonGroup

type PersonGroup struct {
	autorest.Response `json:"-"`
	// PersonGroupID - PersonGroupId of the existing person groups.
	PersonGroupID *string `json:"personGroupId,omitempty"`
	// Name - User defined name, maximum length is 128.
	Name *string `json:"name,omitempty"`
	// UserData - User specified data. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
}

PersonGroup person group object.

type PersonGroupClient

type PersonGroupClient struct {
	BaseClient
}

PersonGroupClient is the an API for face detection, verification, and identification.

func NewPersonGroupClient

func NewPersonGroupClient(azureRegion AzureRegions) PersonGroupClient

NewPersonGroupClient creates an instance of the PersonGroupClient client.

func (PersonGroupClient) Create

func (client PersonGroupClient) Create(ctx context.Context, personGroupID string, body NameAndUserDataContract) (result autorest.Response, err error)

Create create a new person group with specified personGroupId, name and user-provided userData.

personGroupID is id referencing a particular person group. body is request body for creating new person group.

func (PersonGroupClient) CreatePreparer

func (client PersonGroupClient) CreatePreparer(ctx context.Context, personGroupID string, body NameAndUserDataContract) (*http.Request, error)

CreatePreparer prepares the Create request.

func (PersonGroupClient) CreateResponder

func (client PersonGroupClient) CreateResponder(resp *http.Response) (result autorest.Response, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (PersonGroupClient) CreateSender

func (client PersonGroupClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (PersonGroupClient) Delete

func (client PersonGroupClient) Delete(ctx context.Context, personGroupID string) (result autorest.Response, err error)

Delete delete an existing person group. Persisted face images of all people in the person group will also be deleted.

personGroupID is id referencing a particular person group.

func (PersonGroupClient) DeletePreparer

func (client PersonGroupClient) DeletePreparer(ctx context.Context, personGroupID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (PersonGroupClient) DeleteResponder

func (client PersonGroupClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (PersonGroupClient) DeleteSender

func (client PersonGroupClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (PersonGroupClient) Get

func (client PersonGroupClient) Get(ctx context.Context, personGroupID string) (result PersonGroup, err error)

Get retrieve the information of a person group, including its name and userData.

personGroupID is id referencing a particular person group.

func (PersonGroupClient) GetPreparer

func (client PersonGroupClient) GetPreparer(ctx context.Context, personGroupID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (PersonGroupClient) GetResponder

func (client PersonGroupClient) GetResponder(resp *http.Response) (result PersonGroup, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PersonGroupClient) GetSender

func (client PersonGroupClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PersonGroupClient) GetTrainingStatus

func (client PersonGroupClient) GetTrainingStatus(ctx context.Context, personGroupID string) (result TrainingStatus, err error)

GetTrainingStatus retrieve the training status of a person group (completed or ongoing).

personGroupID is id referencing a particular person group.

func (PersonGroupClient) GetTrainingStatusPreparer

func (client PersonGroupClient) GetTrainingStatusPreparer(ctx context.Context, personGroupID string) (*http.Request, error)

GetTrainingStatusPreparer prepares the GetTrainingStatus request.

func (PersonGroupClient) GetTrainingStatusResponder

func (client PersonGroupClient) GetTrainingStatusResponder(resp *http.Response) (result TrainingStatus, err error)

GetTrainingStatusResponder handles the response to the GetTrainingStatus request. The method always closes the http.Response Body.

func (PersonGroupClient) GetTrainingStatusSender

func (client PersonGroupClient) GetTrainingStatusSender(req *http.Request) (*http.Response, error)

GetTrainingStatusSender sends the GetTrainingStatus request. The method will close the http.Response Body if it receives an error.

func (PersonGroupClient) List

func (client PersonGroupClient) List(ctx context.Context, start string, top *int32) (result ListPersonGroup, err error)

List list person groups and their information.

start is list person groups from the least personGroupId greater than the "start". top is the number of person groups to list.

func (PersonGroupClient) ListPreparer

func (client PersonGroupClient) ListPreparer(ctx context.Context, start string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (PersonGroupClient) ListResponder

func (client PersonGroupClient) ListResponder(resp *http.Response) (result ListPersonGroup, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (PersonGroupClient) ListSender

func (client PersonGroupClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (PersonGroupClient) Train

func (client PersonGroupClient) Train(ctx context.Context, personGroupID string) (result autorest.Response, err error)

Train queue a person group training task, the training task may not be started immediately.

personGroupID is id referencing a particular person group.

func (PersonGroupClient) TrainPreparer

func (client PersonGroupClient) TrainPreparer(ctx context.Context, personGroupID string) (*http.Request, error)

TrainPreparer prepares the Train request.

func (PersonGroupClient) TrainResponder

func (client PersonGroupClient) TrainResponder(resp *http.Response) (result autorest.Response, err error)

TrainResponder handles the response to the Train request. The method always closes the http.Response Body.

func (PersonGroupClient) TrainSender

func (client PersonGroupClient) TrainSender(req *http.Request) (*http.Response, error)

TrainSender sends the Train request. The method will close the http.Response Body if it receives an error.

func (PersonGroupClient) Update

func (client PersonGroupClient) Update(ctx context.Context, personGroupID string, body NameAndUserDataContract) (result autorest.Response, err error)

Update update an existing person group's display name and userData. The properties which does not appear in request body will not be updated.

personGroupID is id referencing a particular person group. body is request body for updating person group.

func (PersonGroupClient) UpdatePreparer

func (client PersonGroupClient) UpdatePreparer(ctx context.Context, personGroupID string, body NameAndUserDataContract) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (PersonGroupClient) UpdateResponder

func (client PersonGroupClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (PersonGroupClient) UpdateSender

func (client PersonGroupClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type PersonGroupPersonClient

type PersonGroupPersonClient struct {
	BaseClient
}

PersonGroupPersonClient is the an API for face detection, verification, and identification.

func NewPersonGroupPersonClient

func NewPersonGroupPersonClient(azureRegion AzureRegions) PersonGroupPersonClient

NewPersonGroupPersonClient creates an instance of the PersonGroupPersonClient client.

func (PersonGroupPersonClient) AddPersonFaceFromStream

func (client PersonGroupPersonClient) AddPersonFaceFromStream(ctx context.Context, personGroupID string, personID uuid.UUID, imageParameter io.ReadCloser, userData string, targetFace []int32) (result PersistedFace, err error)

AddPersonFaceFromStream add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.

personGroupID is id referencing a particular person group. personID is id referencing a particular person. imageParameter is an image stream. imageParameter will be closed upon successful return. Callers should ensure closure when receiving an error.userData is user-specified data about the face for any purpose. The maximum length is 1KB. targetFace is a face rectangle to specify the target face to be added to a person in the format of "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in the image, targetFace is required to specify which face to add. No targetFace means there is only one face detected in the entire image.

func (PersonGroupPersonClient) AddPersonFaceFromStreamPreparer

func (client PersonGroupPersonClient) AddPersonFaceFromStreamPreparer(ctx context.Context, personGroupID string, personID uuid.UUID, imageParameter io.ReadCloser, userData string, targetFace []int32) (*http.Request, error)

AddPersonFaceFromStreamPreparer prepares the AddPersonFaceFromStream request.

func (PersonGroupPersonClient) AddPersonFaceFromStreamResponder

func (client PersonGroupPersonClient) AddPersonFaceFromStreamResponder(resp *http.Response) (result PersistedFace, err error)

AddPersonFaceFromStreamResponder handles the response to the AddPersonFaceFromStream request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) AddPersonFaceFromStreamSender

func (client PersonGroupPersonClient) AddPersonFaceFromStreamSender(req *http.Request) (*http.Response, error)

AddPersonFaceFromStreamSender sends the AddPersonFaceFromStream request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) AddPersonFaceFromURL

func (client PersonGroupPersonClient) AddPersonFaceFromURL(ctx context.Context, personGroupID string, personID uuid.UUID, imageURL ImageURL, userData string, targetFace []int32) (result PersistedFace, err error)

AddPersonFaceFromURL add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.

personGroupID is id referencing a particular person group. personID is id referencing a particular person. imageURL is a JSON document with a URL pointing to the image that is to be analyzed. userData is user-specified data about the face for any purpose. The maximum length is 1KB. targetFace is a face rectangle to specify the target face to be added to a person in the format of "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in the image, targetFace is required to specify which face to add. No targetFace means there is only one face detected in the entire image.

func (PersonGroupPersonClient) AddPersonFaceFromURLPreparer

func (client PersonGroupPersonClient) AddPersonFaceFromURLPreparer(ctx context.Context, personGroupID string, personID uuid.UUID, imageURL ImageURL, userData string, targetFace []int32) (*http.Request, error)

AddPersonFaceFromURLPreparer prepares the AddPersonFaceFromURL request.

func (PersonGroupPersonClient) AddPersonFaceFromURLResponder

func (client PersonGroupPersonClient) AddPersonFaceFromURLResponder(resp *http.Response) (result PersistedFace, err error)

AddPersonFaceFromURLResponder handles the response to the AddPersonFaceFromURL request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) AddPersonFaceFromURLSender

func (client PersonGroupPersonClient) AddPersonFaceFromURLSender(req *http.Request) (*http.Response, error)

AddPersonFaceFromURLSender sends the AddPersonFaceFromURL request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) Create

func (client PersonGroupPersonClient) Create(ctx context.Context, personGroupID string, body NameAndUserDataContract) (result Person, err error)

Create create a new person in a specified person group.

personGroupID is id referencing a particular person group. body is request body for creating new person.

func (PersonGroupPersonClient) CreatePreparer

func (client PersonGroupPersonClient) CreatePreparer(ctx context.Context, personGroupID string, body NameAndUserDataContract) (*http.Request, error)

CreatePreparer prepares the Create request.

func (PersonGroupPersonClient) CreateResponder

func (client PersonGroupPersonClient) CreateResponder(resp *http.Response) (result Person, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) CreateSender

func (client PersonGroupPersonClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) Delete

func (client PersonGroupPersonClient) Delete(ctx context.Context, personGroupID string, personID uuid.UUID) (result autorest.Response, err error)

Delete delete an existing person from a person group. Persisted face images of the person will also be deleted.

personGroupID is id referencing a particular person group. personID is id referencing a particular person.

func (PersonGroupPersonClient) DeleteFace

func (client PersonGroupPersonClient) DeleteFace(ctx context.Context, personGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID) (result autorest.Response, err error)

DeleteFace delete a face from a person. Relative image for the persisted face will also be deleted.

personGroupID is id referencing a particular person group. personID is id referencing a particular person. persistedFaceID is id referencing a particular persistedFaceId of an existing face.

func (PersonGroupPersonClient) DeleteFacePreparer

func (client PersonGroupPersonClient) DeleteFacePreparer(ctx context.Context, personGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID) (*http.Request, error)

DeleteFacePreparer prepares the DeleteFace request.

func (PersonGroupPersonClient) DeleteFaceResponder

func (client PersonGroupPersonClient) DeleteFaceResponder(resp *http.Response) (result autorest.Response, err error)

DeleteFaceResponder handles the response to the DeleteFace request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) DeleteFaceSender

func (client PersonGroupPersonClient) DeleteFaceSender(req *http.Request) (*http.Response, error)

DeleteFaceSender sends the DeleteFace request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) DeletePreparer

func (client PersonGroupPersonClient) DeletePreparer(ctx context.Context, personGroupID string, personID uuid.UUID) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (PersonGroupPersonClient) DeleteResponder

func (client PersonGroupPersonClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) DeleteSender

func (client PersonGroupPersonClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) Get

func (client PersonGroupPersonClient) Get(ctx context.Context, personGroupID string, personID uuid.UUID) (result Person, err error)

Get retrieve a person's information, including registered persisted faces, name and userData.

personGroupID is id referencing a particular person group. personID is id referencing a particular person.

func (PersonGroupPersonClient) GetFace

func (client PersonGroupPersonClient) GetFace(ctx context.Context, personGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID) (result PersistedFace, err error)

GetFace retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging personGroupId).

personGroupID is id referencing a particular person group. personID is id referencing a particular person. persistedFaceID is id referencing a particular persistedFaceId of an existing face.

func (PersonGroupPersonClient) GetFacePreparer

func (client PersonGroupPersonClient) GetFacePreparer(ctx context.Context, personGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID) (*http.Request, error)

GetFacePreparer prepares the GetFace request.

func (PersonGroupPersonClient) GetFaceResponder

func (client PersonGroupPersonClient) GetFaceResponder(resp *http.Response) (result PersistedFace, err error)

GetFaceResponder handles the response to the GetFace request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) GetFaceSender

func (client PersonGroupPersonClient) GetFaceSender(req *http.Request) (*http.Response, error)

GetFaceSender sends the GetFace request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) GetPreparer

func (client PersonGroupPersonClient) GetPreparer(ctx context.Context, personGroupID string, personID uuid.UUID) (*http.Request, error)

GetPreparer prepares the Get request.

func (PersonGroupPersonClient) GetResponder

func (client PersonGroupPersonClient) GetResponder(resp *http.Response) (result Person, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) GetSender

func (client PersonGroupPersonClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) List

func (client PersonGroupPersonClient) List(ctx context.Context, personGroupID string, start string, top *int32) (result ListPerson, err error)

List list all persons in a person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces of the person).

personGroupID is id referencing a particular person group. start is starting person id to return (used to list a range of persons). top is number of persons to return starting with the person id indicated by the 'start' parameter.

func (PersonGroupPersonClient) ListPreparer

func (client PersonGroupPersonClient) ListPreparer(ctx context.Context, personGroupID string, start string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (PersonGroupPersonClient) ListResponder

func (client PersonGroupPersonClient) ListResponder(resp *http.Response) (result ListPerson, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) ListSender

func (client PersonGroupPersonClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) Update

func (client PersonGroupPersonClient) Update(ctx context.Context, personGroupID string, personID uuid.UUID, body NameAndUserDataContract) (result autorest.Response, err error)

Update update name or userData of a person.

personGroupID is id referencing a particular person group. personID is id referencing a particular person. body is request body for person update operation.

func (PersonGroupPersonClient) UpdateFace

func (client PersonGroupPersonClient) UpdateFace(ctx context.Context, personGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID, body UpdatePersonFaceRequest) (result autorest.Response, err error)

UpdateFace update a person persisted face's userData field.

personGroupID is id referencing a particular person group. personID is id referencing a particular person. persistedFaceID is id referencing a particular persistedFaceId of an existing face. body is request body for updating persisted face.

func (PersonGroupPersonClient) UpdateFacePreparer

func (client PersonGroupPersonClient) UpdateFacePreparer(ctx context.Context, personGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID, body UpdatePersonFaceRequest) (*http.Request, error)

UpdateFacePreparer prepares the UpdateFace request.

func (PersonGroupPersonClient) UpdateFaceResponder

func (client PersonGroupPersonClient) UpdateFaceResponder(resp *http.Response) (result autorest.Response, err error)

UpdateFaceResponder handles the response to the UpdateFace request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) UpdateFaceSender

func (client PersonGroupPersonClient) UpdateFaceSender(req *http.Request) (*http.Response, error)

UpdateFaceSender sends the UpdateFace request. The method will close the http.Response Body if it receives an error.

func (PersonGroupPersonClient) UpdatePreparer

func (client PersonGroupPersonClient) UpdatePreparer(ctx context.Context, personGroupID string, personID uuid.UUID, body NameAndUserDataContract) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (PersonGroupPersonClient) UpdateResponder

func (client PersonGroupPersonClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (PersonGroupPersonClient) UpdateSender

func (client PersonGroupPersonClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type Rectangle

type Rectangle struct {
	// Width - The width of the rectangle, in pixels.
	Width *int32 `json:"width,omitempty"`
	// Height - The height of the rectangle, in pixels.
	Height *int32 `json:"height,omitempty"`
	// Left - The distance from the left edge if the image to the left edge of the rectangle, in pixels.
	Left *int32 `json:"left,omitempty"`
	// Top - The distance from the top edge if the image to the top edge of the rectangle, in pixels.
	Top *int32 `json:"top,omitempty"`
}

Rectangle a rectangle within which a face can be found

type SimilarFace

type SimilarFace struct {
	// FaceID - FaceId of candidate face when find by faceIds. faceId is created by Face - Detect and will expire 24 hours after the detection call
	FaceID *uuid.UUID `json:"faceId,omitempty"`
	// PersistedFaceID - PersistedFaceId of candidate face when find by faceListId. persistedFaceId in face list is persisted and will not expire. As showed in below response
	PersistedFaceID *uuid.UUID `json:"persistedFaceId,omitempty"`
	// Confidence - Similarity confidence of the candidate face. The higher confidence, the more similar. Range between [0,1].
	Confidence *float64 `json:"confidence,omitempty"`
}

SimilarFace response body for find similar face operation.

type TrainingStatus

type TrainingStatus struct {
	autorest.Response `json:"-"`
	// Status - Training status: notstarted, running, succeeded, failed. If the training process is waiting to perform, the status is notstarted. If the training is ongoing, the status is running. Status succeed means this person group is ready for Face - Identify. Status failed is often caused by no person or no persisted face exist in the person group. Possible values include: 'Nonstarted', 'Running', 'Succeeded', 'Failed'
	Status TrainingStatusType `json:"status,omitempty"`
	// Created - A combined UTC date and time string that describes person group created time.
	Created *date.Time `json:"createdDateTime,omitempty"`
	// LastAction - Person group last modify time in the UTC, could be null value when the person group is not successfully trained.
	LastAction *date.Time `json:"lastActionDateTime,omitempty"`
	// Message - Show failure message when training failed (omitted when training succeed).
	Message *string `json:"message,omitempty"`
}

TrainingStatus training status object.

type TrainingStatusType

type TrainingStatusType string

TrainingStatusType enumerates the values for training status type.

const (
	// Failed ...
	Failed TrainingStatusType = "failed"
	// Nonstarted ...
	Nonstarted TrainingStatusType = "nonstarted"
	// Running ...
	Running TrainingStatusType = "running"
	// Succeeded ...
	Succeeded TrainingStatusType = "succeeded"
)

type UpdatePersonFaceRequest

type UpdatePersonFaceRequest struct {
	// UserData - User-provided data attached to the face. The size limit is 1KB.
	UserData *string `json:"userData,omitempty"`
}

UpdatePersonFaceRequest request to update person face data.

type VerifyFaceToFaceRequest

type VerifyFaceToFaceRequest struct {
	// FaceID1 - FaceId of the first face, comes from Face - Detect
	FaceID1 *uuid.UUID `json:"faceId1,omitempty"`
	// FaceID2 - FaceId of the second face, comes from Face - Detect
	FaceID2 *uuid.UUID `json:"faceId2,omitempty"`
}

VerifyFaceToFaceRequest request body for verify operation.

type VerifyFaceToPersonRequest

type VerifyFaceToPersonRequest struct {
	// FaceID - FaceId the face, comes from Face - Detect
	FaceID *uuid.UUID `json:"faceId,omitempty"`
	// PersonGroupID - Using existing personGroupId and personId for fast loading a specified person. personGroupId is created in Person Groups.Create.
	PersonGroupID *string `json:"personGroupId,omitempty"`
	// PersonID - Specify a certain person in a person group. personId is created in Persons.Create.
	PersonID *uuid.UUID `json:"personId,omitempty"`
}

VerifyFaceToPersonRequest request body for verify operation.

type VerifyResult

type VerifyResult struct {
	autorest.Response `json:"-"`
	// IsIdentical - True if the two faces belong to the same person or the face belongs to the person, otherwise false.
	IsIdentical *bool `json:"isIdentical,omitempty"`
	// Confidence - A number indicates the similarity confidence of whether two faces belong to the same person, or whether the face belongs to the person. By default, isIdentical is set to True if similarity confidence is greater than or equal to 0.5. This is useful for advanced users to override "isIdentical" and fine-tune the result on their own data.
	Confidence *float64 `json:"confidence,omitempty"`
}

VerifyResult result of the verify operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL