face

package
v26.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: Apache-2.0 Imports: 10 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"
)

func PossibleAccessoryTypeValues

func PossibleAccessoryTypeValues() []AccessoryType

PossibleAccessoryTypeValues returns an array of possible values for the AccessoryType const type.

type ApplySnapshotRequest

type ApplySnapshotRequest struct {
	// ObjectID - User specified target object id to be created from the snapshot.
	ObjectID *string `json:"objectId,omitempty"`
	// Mode - Snapshot applying mode. Currently only CreateNew is supported, which means the apply operation will fail if target subscription already contains an object of same type and using the same objectId. Users can specify the "objectId" in request body to avoid such conflicts. Possible values include: 'CreateNew'
	Mode SnapshotApplyMode `json:"mode,omitempty"`
}

ApplySnapshotRequest request body for applying snapshot operation.

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"
)

func PossibleAttributeTypeValues

func PossibleAttributeTypeValues() []AttributeType

PossibleAttributeTypeValues returns an array of possible values for the AttributeType const type.

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'
	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 BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint string
}

BaseClient is the base client for Face.

func New

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) 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"
)

func PossibleBlurLevelValues

func PossibleBlurLevelValues() []BlurLevel

PossibleBlurLevelValues returns an array of possible values for the BlurLevel const type.

type Client

type Client struct {
	BaseClient
}

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

func NewClient

func NewClient(endpoint string) 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. Parameters: imageParameter - an image stream. returnFaceID - a value indicating whether the operation should return faceIds of detected faces. returnFaceLandmarks - a value indicating whether the operation should return landmarks of the detected faces. returnFaceAttributes - 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. Parameters: imageURL - a JSON document with a URL pointing to the image that is to be analyzed. returnFaceID - a value indicating whether the operation should return faceIds of detected faces. returnFaceLandmarks - a value indicating whether the operation should return landmarks of the detected faces. returnFaceAttributes - 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, a face list or a large face list. Parameters: body - 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. Parameters: body - 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 1-to-many identification to find the closest matches of the specific query person face from a person group or large person group. Parameters: body - 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. Parameters: body - request body for face to face verification.

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 Parameters: body - request body for face to person verification.

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"
)

func PossibleExposureLevelValues

func PossibleExposureLevelValues() []ExposureLevel

PossibleExposureLevelValues returns an array of possible values for the ExposureLevel const type.

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"
)

func PossibleFindSimilarMatchModeValues

func PossibleFindSimilarMatchModeValues() []FindSimilarMatchMode

PossibleFindSimilarMatchModeValues returns an array of possible values for the FindSimilarMatchMode const type.

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, largeFaceListId and faceIds should not be provided at the same time.
	FaceListID *string `json:"faceListId,omitempty"`
	// LargeFaceListID - An existing user-specified unique candidate large face list, created in LargeFaceList - Create. Large face list contains a set of persistedFaceIds which are persisted and will never expire. Parameter faceListId, largeFaceListId and faceIds should not be provided at the same time.
	LargeFaceListID *string `json:"largeFaceListId,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. The number of faceIds is limited to 1000. Parameter faceListId, largeFaceListId and faceIds should not be provided at the same time.
	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"
	// Male ...
	Male Gender = "male"
)

func PossibleGenderValues

func PossibleGenderValues() []Gender

PossibleGenderValues returns an array of possible values for the Gender const type.

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"
)

func PossibleGlassesTypeValues

func PossibleGlassesTypeValues() []GlassesType

PossibleGlassesTypeValues returns an array of possible values for the GlassesType const type.

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"
)

func PossibleHairColorTypeValues

func PossibleHairColorTypeValues() []HairColorType

PossibleHairColorTypeValues returns an array of possible values for the HairColorType const type.

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 {
	// 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"`
	// PersonGroupID - PersonGroupId of the target person group, created by PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.
	PersonGroupID *string `json:"personGroupId,omitempty"`
	// LargePersonGroupID - LargePersonGroupId of the target large person group, created by LargePersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.
	LargePersonGroupID *string `json:"largePersonGroupId,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 - Publicly reachable URL of an image
	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 LargeFaceList

type LargeFaceList struct {
	autorest.Response `json:"-"`
	// LargeFaceListID - LargeFaceListId of the target large face list.
	LargeFaceListID *string `json:"largeFaceListId,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"`
}

LargeFaceList large face list object.

type LargeFaceListClient

type LargeFaceListClient struct {
	BaseClient
}

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

func NewLargeFaceListClient

func NewLargeFaceListClient(endpoint string) LargeFaceListClient

NewLargeFaceListClient creates an instance of the LargeFaceListClient client.

func (LargeFaceListClient) AddFaceFromStream

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

AddFaceFromStream add a face to a large 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. Parameters: largeFaceListID - id referencing a particular large face list. imageParameter - an image stream. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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 (LargeFaceListClient) AddFaceFromStreamPreparer

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

AddFaceFromStreamPreparer prepares the AddFaceFromStream request.

func (LargeFaceListClient) AddFaceFromStreamResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) AddFaceFromStreamSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) AddFaceFromURL

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

AddFaceFromURL add a face to a large 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. Parameters: largeFaceListID - id referencing a particular large face list. imageURL - a JSON document with a URL pointing to the image that is to be analyzed. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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 (LargeFaceListClient) AddFaceFromURLPreparer

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

AddFaceFromURLPreparer prepares the AddFaceFromURL request.

func (LargeFaceListClient) AddFaceFromURLResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) AddFaceFromURLSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) Create

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

Create create an empty large face list. Up to 64 large face lists are allowed to exist in one subscription. Parameters: largeFaceListID - id referencing a particular large face list. body - request body for creating a large face list.

func (LargeFaceListClient) CreatePreparer

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

CreatePreparer prepares the Create request.

func (LargeFaceListClient) CreateResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) CreateSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) Delete

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

Delete delete an existing large face list according to faceListId. Persisted face images in the large face list will also be deleted. Parameters: largeFaceListID - id referencing a particular large face list.

func (LargeFaceListClient) DeleteFace

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

DeleteFace delete an existing face from a large face list (given by a persistedFaceId and a largeFaceListId). Persisted image related to the face will also be deleted. Parameters: largeFaceListID - id referencing a particular large face list. persistedFaceID - id referencing a particular persistedFaceId of an existing face.

func (LargeFaceListClient) DeleteFacePreparer

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

DeleteFacePreparer prepares the DeleteFace request.

func (LargeFaceListClient) DeleteFaceResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) DeleteFaceSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) DeletePreparer

func (client LargeFaceListClient) DeletePreparer(ctx context.Context, largeFaceListID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (LargeFaceListClient) DeleteResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) DeleteSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) Get

func (client LargeFaceListClient) Get(ctx context.Context, largeFaceListID string) (result LargeFaceList, err error)

Get retrieve a large face list's information. Parameters: largeFaceListID - id referencing a particular large face list.

func (LargeFaceListClient) GetFace

func (client LargeFaceListClient) GetFace(ctx context.Context, largeFaceListID string, persistedFaceID uuid.UUID) (result PersistedFace, err error)

GetFace retrieve information about a persisted face (specified by persistedFaceId and its belonging largeFaceListId). Parameters: largeFaceListID - id referencing a particular large face list. persistedFaceID - id referencing a particular persistedFaceId of an existing face.

func (LargeFaceListClient) GetFacePreparer

func (client LargeFaceListClient) GetFacePreparer(ctx context.Context, largeFaceListID string, persistedFaceID uuid.UUID) (*http.Request, error)

GetFacePreparer prepares the GetFace request.

func (LargeFaceListClient) GetFaceResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) GetFaceSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) GetPreparer

func (client LargeFaceListClient) GetPreparer(ctx context.Context, largeFaceListID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (LargeFaceListClient) GetResponder

func (client LargeFaceListClient) GetResponder(resp *http.Response) (result LargeFaceList, err error)

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

func (LargeFaceListClient) GetSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) GetTrainingStatus

func (client LargeFaceListClient) GetTrainingStatus(ctx context.Context, largeFaceListID string) (result TrainingStatus, err error)

GetTrainingStatus retrieve the training status of a large face list (completed or ongoing). Parameters: largeFaceListID - id referencing a particular large face list.

func (LargeFaceListClient) GetTrainingStatusPreparer

func (client LargeFaceListClient) GetTrainingStatusPreparer(ctx context.Context, largeFaceListID string) (*http.Request, error)

GetTrainingStatusPreparer prepares the GetTrainingStatus request.

func (LargeFaceListClient) GetTrainingStatusResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) GetTrainingStatusSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) List

func (client LargeFaceListClient) List(ctx context.Context) (result ListLargeFaceList, err error)

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

func (LargeFaceListClient) ListFaces

func (client LargeFaceListClient) ListFaces(ctx context.Context, largeFaceListID string, start string, top *int32) (result ListPersistedFace, err error)

ListFaces list all faces in a large face list, and retrieve face information (including userData and persistedFaceIds of registered faces of the face). Parameters: largeFaceListID - id referencing a particular large face list. start - starting face id to return (used to list a range of faces). top - number of faces to return starting with the face id indicated by the 'start' parameter.

func (LargeFaceListClient) ListFacesPreparer

func (client LargeFaceListClient) ListFacesPreparer(ctx context.Context, largeFaceListID string, start string, top *int32) (*http.Request, error)

ListFacesPreparer prepares the ListFaces request.

func (LargeFaceListClient) ListFacesResponder

func (client LargeFaceListClient) ListFacesResponder(resp *http.Response) (result ListPersistedFace, err error)

ListFacesResponder handles the response to the ListFaces request. The method always closes the http.Response Body.

func (LargeFaceListClient) ListFacesSender

func (client LargeFaceListClient) ListFacesSender(req *http.Request) (*http.Response, error)

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

func (LargeFaceListClient) ListPreparer

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

ListPreparer prepares the List request.

func (LargeFaceListClient) ListResponder

func (client LargeFaceListClient) ListResponder(resp *http.Response) (result ListLargeFaceList, err error)

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

func (LargeFaceListClient) ListSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) Train

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

Train queue a large face list training task, the training task may not be started immediately. Parameters: largeFaceListID - id referencing a particular large face list.

func (LargeFaceListClient) TrainPreparer

func (client LargeFaceListClient) TrainPreparer(ctx context.Context, largeFaceListID string) (*http.Request, error)

TrainPreparer prepares the Train request.

func (LargeFaceListClient) TrainResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) TrainSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) Update

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

Update update information of a large face list. Parameters: largeFaceListID - id referencing a particular large face list. body - request body for updating a large face list.

func (LargeFaceListClient) UpdateFace

func (client LargeFaceListClient) UpdateFace(ctx context.Context, largeFaceListID string, persistedFaceID uuid.UUID, body UpdateFaceRequest) (result autorest.Response, err error)

UpdateFace update a persisted face's userData field. Parameters: largeFaceListID - id referencing a particular large face list. persistedFaceID - id referencing a particular persistedFaceId of an existing face. body - request body for updating persisted face.

func (LargeFaceListClient) UpdateFacePreparer

func (client LargeFaceListClient) UpdateFacePreparer(ctx context.Context, largeFaceListID string, persistedFaceID uuid.UUID, body UpdateFaceRequest) (*http.Request, error)

UpdateFacePreparer prepares the UpdateFace request.

func (LargeFaceListClient) UpdateFaceResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) UpdateFaceSender

func (client LargeFaceListClient) 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 (LargeFaceListClient) UpdatePreparer

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

UpdatePreparer prepares the Update request.

func (LargeFaceListClient) UpdateResponder

func (client LargeFaceListClient) 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 (LargeFaceListClient) UpdateSender

func (client LargeFaceListClient) 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 LargePersonGroup

type LargePersonGroup struct {
	autorest.Response `json:"-"`
	// LargePersonGroupID - LargePersonGroupId of the target large person groups
	LargePersonGroupID *string `json:"largePersonGroupId,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"`
}

LargePersonGroup large person group object.

type LargePersonGroupClient

type LargePersonGroupClient struct {
	BaseClient
}

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

func NewLargePersonGroupClient

func NewLargePersonGroupClient(endpoint string) LargePersonGroupClient

NewLargePersonGroupClient creates an instance of the LargePersonGroupClient client.

func (LargePersonGroupClient) Create

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

Create create a new large person group with specified largePersonGroupId, name and user-provided userData. Parameters: largePersonGroupID - id referencing a particular large person group. body - request body for creating new large person group.

func (LargePersonGroupClient) CreatePreparer

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

CreatePreparer prepares the Create request.

func (LargePersonGroupClient) CreateResponder

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) CreateSender

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) Delete

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

Delete delete an existing large person group. Persisted face features of all people in the large person group will also be deleted. Parameters: largePersonGroupID - id referencing a particular large person group.

func (LargePersonGroupClient) DeletePreparer

func (client LargePersonGroupClient) DeletePreparer(ctx context.Context, largePersonGroupID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (LargePersonGroupClient) DeleteResponder

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) DeleteSender

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) Get

func (client LargePersonGroupClient) Get(ctx context.Context, largePersonGroupID string) (result LargePersonGroup, err error)

Get retrieve the information of a large person group, including its name and userData. Parameters: largePersonGroupID - id referencing a particular large person group.

func (LargePersonGroupClient) GetPreparer

func (client LargePersonGroupClient) GetPreparer(ctx context.Context, largePersonGroupID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (LargePersonGroupClient) GetResponder

func (client LargePersonGroupClient) GetResponder(resp *http.Response) (result LargePersonGroup, err error)

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

func (LargePersonGroupClient) GetSender

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) GetTrainingStatus

func (client LargePersonGroupClient) GetTrainingStatus(ctx context.Context, largePersonGroupID string) (result TrainingStatus, err error)

GetTrainingStatus retrieve the training status of a large person group (completed or ongoing). Parameters: largePersonGroupID - id referencing a particular large person group.

func (LargePersonGroupClient) GetTrainingStatusPreparer

func (client LargePersonGroupClient) GetTrainingStatusPreparer(ctx context.Context, largePersonGroupID string) (*http.Request, error)

GetTrainingStatusPreparer prepares the GetTrainingStatus request.

func (LargePersonGroupClient) GetTrainingStatusResponder

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) GetTrainingStatusSender

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) List

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

List list large person groups and their information. Parameters: start - list large person groups from the least largePersonGroupId greater than the "start". top - the number of large person groups to list.

func (LargePersonGroupClient) ListPreparer

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

ListPreparer prepares the List request.

func (LargePersonGroupClient) ListResponder

func (client LargePersonGroupClient) ListResponder(resp *http.Response) (result ListLargePersonGroup, err error)

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

func (LargePersonGroupClient) ListSender

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) Train

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

Train queue a large person group training task, the training task may not be started immediately. Parameters: largePersonGroupID - id referencing a particular large person group.

func (LargePersonGroupClient) TrainPreparer

func (client LargePersonGroupClient) TrainPreparer(ctx context.Context, largePersonGroupID string) (*http.Request, error)

TrainPreparer prepares the Train request.

func (LargePersonGroupClient) TrainResponder

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) TrainSender

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) Update

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

Update update an existing large person group's display name and userData. The properties which does not appear in request body will not be updated. Parameters: largePersonGroupID - id referencing a particular large person group. body - request body for updating large person group.

func (LargePersonGroupClient) UpdatePreparer

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

UpdatePreparer prepares the Update request.

func (LargePersonGroupClient) UpdateResponder

func (client LargePersonGroupClient) 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 (LargePersonGroupClient) UpdateSender

func (client LargePersonGroupClient) 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 LargePersonGroupPersonClient

type LargePersonGroupPersonClient struct {
	BaseClient
}

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

func NewLargePersonGroupPersonClient

func NewLargePersonGroupPersonClient(endpoint string) LargePersonGroupPersonClient

NewLargePersonGroupPersonClient creates an instance of the LargePersonGroupPersonClient client.

func (LargePersonGroupPersonClient) AddFaceFromStream

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

AddFaceFromStream add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person. imageParameter - an image stream. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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 (LargePersonGroupPersonClient) AddFaceFromStreamPreparer

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

AddFaceFromStreamPreparer prepares the AddFaceFromStream request.

func (LargePersonGroupPersonClient) AddFaceFromStreamResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) AddFaceFromStreamSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) AddFaceFromURL

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

AddFaceFromURL add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person. imageURL - a JSON document with a URL pointing to the image that is to be analyzed. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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 (LargePersonGroupPersonClient) AddFaceFromURLPreparer

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

AddFaceFromURLPreparer prepares the AddFaceFromURL request.

func (LargePersonGroupPersonClient) AddFaceFromURLResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) AddFaceFromURLSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) Create

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

Create create a new person in a specified large person group. Parameters: largePersonGroupID - id referencing a particular large person group. body - request body for creating new person.

func (LargePersonGroupPersonClient) CreatePreparer

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

CreatePreparer prepares the Create request.

func (LargePersonGroupPersonClient) CreateResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) CreateSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) Delete

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

Delete delete an existing person from a large person group. All stored person data, and face features in the person entry will be deleted. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person.

func (LargePersonGroupPersonClient) DeleteFace

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

DeleteFace delete a face from a person. Relative feature for the persisted face will also be deleted. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person. persistedFaceID - id referencing a particular persistedFaceId of an existing face.

func (LargePersonGroupPersonClient) DeleteFacePreparer

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

DeleteFacePreparer prepares the DeleteFace request.

func (LargePersonGroupPersonClient) DeleteFaceResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) DeleteFaceSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) DeletePreparer

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

DeletePreparer prepares the Delete request.

func (LargePersonGroupPersonClient) DeleteResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) DeleteSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) Get

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

Get retrieve a person's information, including registered persisted faces, name and userData. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person.

func (LargePersonGroupPersonClient) GetFace

func (client LargePersonGroupPersonClient) GetFace(ctx context.Context, largePersonGroupID 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 largePersonGroupId). Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person. persistedFaceID - id referencing a particular persistedFaceId of an existing face.

func (LargePersonGroupPersonClient) GetFacePreparer

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

GetFacePreparer prepares the GetFace request.

func (LargePersonGroupPersonClient) GetFaceResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) GetFaceSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) GetPreparer

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

GetPreparer prepares the Get request.

func (LargePersonGroupPersonClient) GetResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) GetSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) List

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

List list all persons in a large person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces of the person). Parameters: largePersonGroupID - id referencing a particular large person group. start - starting person id to return (used to list a range of persons). top - number of persons to return starting with the person id indicated by the 'start' parameter.

func (LargePersonGroupPersonClient) ListPreparer

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

ListPreparer prepares the List request.

func (LargePersonGroupPersonClient) ListResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) ListSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) Update

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

Update update name or userData of a person. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person. body - request body for person update operation.

func (LargePersonGroupPersonClient) UpdateFace

func (client LargePersonGroupPersonClient) UpdateFace(ctx context.Context, largePersonGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID, body UpdateFaceRequest) (result autorest.Response, err error)

UpdateFace update a person persisted face's userData field. Parameters: largePersonGroupID - id referencing a particular large person group. personID - id referencing a particular person. persistedFaceID - id referencing a particular persistedFaceId of an existing face. body - request body for updating persisted face.

func (LargePersonGroupPersonClient) UpdateFacePreparer

func (client LargePersonGroupPersonClient) UpdateFacePreparer(ctx context.Context, largePersonGroupID string, personID uuid.UUID, persistedFaceID uuid.UUID, body UpdateFaceRequest) (*http.Request, error)

UpdateFacePreparer prepares the UpdateFace request.

func (LargePersonGroupPersonClient) UpdateFaceResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) UpdateFaceSender

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) UpdatePreparer

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

UpdatePreparer prepares the Update request.

func (LargePersonGroupPersonClient) UpdateResponder

func (client LargePersonGroupPersonClient) 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 (LargePersonGroupPersonClient) UpdateSender

func (client LargePersonGroupPersonClient) 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 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(endpoint string) 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. Parameters: faceListID - id referencing a particular face list. imageParameter - an image stream. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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. Parameters: faceListID - id referencing a particular face list. imageURL - a JSON document with a URL pointing to the image that is to be analyzed. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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. Parameters: faceListID - id referencing a particular face list. body - 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. Parameters: faceListID - 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 persistedFaceId and a faceListId). Persisted image related to the face will also be deleted. Parameters: faceListID - id referencing a particular face list. persistedFaceID - 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. Parameters: faceListID - 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. Parameters: faceListID - id referencing a particular face list. body - 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 ListLargeFaceList

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

ListLargeFaceList ...

type ListLargePersonGroup

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

ListLargePersonGroup ...

type ListList

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

ListList ...

type ListPersistedFace

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

ListPersistedFace ...

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 ListSnapshot

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

ListSnapshot ...

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, largePersonGroup/personGroup, and largeFaceList/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"
)

func PossibleNoiseLevelValues

func PossibleNoiseLevelValues() []NoiseLevel

PossibleNoiseLevelValues returns an array of possible values for the NoiseLevel const type.

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 OperationStatus

type OperationStatus struct {
	autorest.Response `json:"-"`
	// Status - Operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field "message" to check the failure reason. Possible values include: 'Notstarted', 'Running', 'Succeeded', 'Failed'
	Status OperationStatusType `json:"status,omitempty"`
	// CreatedTime - A combined UTC date and time string that describes the time when the operation (take or apply a snapshot) is requested. E.g. 2018-12-25T11:41:02.2331413Z.
	CreatedTime *date.Time `json:"createdTime,omitempty"`
	// LastActionTime - A combined UTC date and time string that describes the last time the operation (take or apply a snapshot) is actively migrating data. The lastActionTime will keep increasing until the operation finishes. E.g. 2018-12-25T11:51:27.8705696Z.
	LastActionTime *date.Time `json:"lastActionTime,omitempty"`
	// ResourceLocation - When the operation succeeds successfully, for snapshot taking operation the snapshot id will be included in this field, and for snapshot applying operation, the path to get the target object will be returned in this field.
	ResourceLocation *string `json:"resourceLocation,omitempty"`
	// Message - Show failure message when operation fails (omitted when operation succeeds).
	Message *string `json:"message,omitempty"`
}

OperationStatus operation status object. Operation refers to the asynchronous backend task including taking a snapshot and applying a snapshot.

type OperationStatusType

type OperationStatusType string

OperationStatusType enumerates the values for operation status type.

const (
	// Failed ...
	Failed OperationStatusType = "failed"
	// Notstarted ...
	Notstarted OperationStatusType = "notstarted"
	// Running ...
	Running OperationStatusType = "running"
	// Succeeded ...
	Succeeded OperationStatusType = "succeeded"
)

func PossibleOperationStatusTypeValues

func PossibleOperationStatusTypeValues() []OperationStatusType

PossibleOperationStatusTypeValues returns an array of possible values for the OperationStatusType const type.

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 target person group.
	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(endpoint string) 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. Parameters: personGroupID - id referencing a particular person group. body - 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 features of all people in the person group will also be deleted. Parameters: personGroupID - 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. Parameters: personGroupID - 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). Parameters: personGroupID - 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. Parameters: start - list person groups from the least personGroupId greater than the "start". top - 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. Parameters: personGroupID - 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. Parameters: personGroupID - id referencing a particular person group. body - 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(endpoint string) PersonGroupPersonClient

NewPersonGroupPersonClient creates an instance of the PersonGroupPersonClient client.

func (PersonGroupPersonClient) AddFaceFromStream

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

AddFaceFromStream add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle. Parameters: personGroupID - id referencing a particular person group. personID - id referencing a particular person. imageParameter - an image stream. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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) AddFaceFromStreamPreparer

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

AddFaceFromStreamPreparer prepares the AddFaceFromStream request.

func (PersonGroupPersonClient) AddFaceFromStreamResponder

func (client PersonGroupPersonClient) 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 (PersonGroupPersonClient) AddFaceFromStreamSender

func (client PersonGroupPersonClient) 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 (PersonGroupPersonClient) AddFaceFromURL

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

AddFaceFromURL add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle. Parameters: personGroupID - id referencing a particular person group. personID - id referencing a particular person. imageURL - a JSON document with a URL pointing to the image that is to be analyzed. userData - user-specified data about the face for any purpose. The maximum length is 1KB. targetFace - 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) AddFaceFromURLPreparer

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

AddFaceFromURLPreparer prepares the AddFaceFromURL request.

func (PersonGroupPersonClient) AddFaceFromURLResponder

func (client PersonGroupPersonClient) 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 (PersonGroupPersonClient) AddFaceFromURLSender

func (client PersonGroupPersonClient) 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 (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. Parameters: personGroupID - id referencing a particular person group. body - 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. All stored person data, and face features in the person entry will be deleted. Parameters: personGroupID - id referencing a particular person group. personID - 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 feature for the persisted face will also be deleted. Parameters: personGroupID - id referencing a particular person group. personID - id referencing a particular person. persistedFaceID - 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. Parameters: personGroupID - id referencing a particular person group. personID - 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). Parameters: personGroupID - id referencing a particular person group. personID - id referencing a particular person. persistedFaceID - 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). Parameters: personGroupID - id referencing a particular person group. start - starting person id to return (used to list a range of persons). top - 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. Parameters: personGroupID - id referencing a particular person group. personID - id referencing a particular person. body - 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 UpdateFaceRequest) (result autorest.Response, err error)

UpdateFace update a person persisted face's userData field. Parameters: personGroupID - id referencing a particular person group. personID - id referencing a particular person. persistedFaceID - id referencing a particular persistedFaceId of an existing face. body - 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 UpdateFaceRequest) (*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 Snapshot

type Snapshot struct {
	autorest.Response `json:"-"`
	// ID - Snapshot id.
	ID *uuid.UUID `json:"id,omitempty"`
	// Account - Azure Cognitive Service Face account id of the subscriber who created the snapshot by Snapshot - Take.
	Account *string `json:"account,omitempty"`
	// Type - Type of the source object in the snapshot, specified by the subscriber who created the snapshot when calling Snapshot - Take. Currently FaceList, PersonGroup, LargeFaceList and LargePersonGroup are supported. Possible values include: 'SnapshotObjectTypeFaceList', 'SnapshotObjectTypeLargeFaceList', 'SnapshotObjectTypeLargePersonGroup', 'SnapshotObjectTypePersonGroup'
	Type SnapshotObjectType `json:"type,omitempty"`
	// ApplyScope - Array of the target Face subscription ids for the snapshot, specified by the user who created the snapshot when calling Snapshot - Take. For each snapshot, only subscriptions included in the applyScope of Snapshot - Take can apply it.
	ApplyScope *[]uuid.UUID `json:"applyScope,omitempty"`
	// UserData - User specified data about the snapshot for any purpose. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
	// CreatedTime - A combined UTC date and time string that describes the created time of the snapshot. E.g. 2018-12-25T11:41:02.2331413Z.
	CreatedTime *date.Time `json:"createdTime,omitempty"`
	// LastUpdateTime - A combined UTC date and time string that describes the last time when the snapshot was created or updated by Snapshot - Update. E.g. 2018-12-25T11:51:27.8705696Z.
	LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"`
}

Snapshot snapshot object.

type SnapshotApplyMode

type SnapshotApplyMode string

SnapshotApplyMode enumerates the values for snapshot apply mode.

const (
	// CreateNew ...
	CreateNew SnapshotApplyMode = "CreateNew"
)

func PossibleSnapshotApplyModeValues

func PossibleSnapshotApplyModeValues() []SnapshotApplyMode

PossibleSnapshotApplyModeValues returns an array of possible values for the SnapshotApplyMode const type.

type SnapshotClient

type SnapshotClient struct {
	BaseClient
}

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

func NewSnapshotClient

func NewSnapshotClient(endpoint string) SnapshotClient

NewSnapshotClient creates an instance of the SnapshotClient client.

func (SnapshotClient) Apply

func (client SnapshotClient) Apply(ctx context.Context, snapshotID uuid.UUID, body ApplySnapshotRequest) (result autorest.Response, err error)

Apply submit an operation to apply a snapshot to current subscription. For each snapshot, only subscriptions included in the applyScope of Snapshot - Take can apply it.<br /> The snapshot interfaces are for users to backup and restore their face data from one face subscription to another, inside same region or across regions. The workflow contains two phases, user first calls Snapshot - Take to create a copy of the source object and store it as a snapshot, then calls Snapshot - Apply to paste the snapshot to target subscription. The snapshots are stored in a centralized location (per Azure instance), so that they can be applied cross accounts and regions.<br /> Applying snapshot is an asynchronous operation. An operation id can be obtained from the "Operation-Location" field in response header, to be used in OperationStatus - Get for tracking the progress of applying the snapshot. The target object id will be included in the "resourceLocation" field in OperationStatus - Get response when the operation status is "succeeded".<br /> Snapshot applying time depends on the number of person and face entries in the snapshot object. It could be in seconds, or up to 1 hour for 1,000,000 persons with multiple faces.<br /> Snapshots will be automatically expired and cleaned in 48 hours after it is created by Snapshot - Take. So the target subscription is required to apply the snapshot in 48 hours since its creation.<br /> Applying a snapshot will not block any other operations against the target object, however it is not recommended because the correctness cannot be guaranteed during snapshot applying. After snapshot applying is completed, all operations towards the target object can work as normal. Snapshot also includes the training results of the source object, which means target subscription the snapshot applied to does not need re-train the target object before calling Identify/FindSimilar.<br /> One snapshot can be applied multiple times in parallel, while currently only CreateNew apply mode is supported, which means the apply operation will fail if target subscription already contains an object of same type and using the same objectId. Users can specify the "objectId" in request body to avoid such conflicts.<br /> * Free-tier subscription quota: 100 apply operations per month. * S0-tier subscription quota: 100 apply operations per day. Parameters: snapshotID - id referencing a particular snapshot. body - request body for applying a snapshot.

func (SnapshotClient) ApplyPreparer

func (client SnapshotClient) ApplyPreparer(ctx context.Context, snapshotID uuid.UUID, body ApplySnapshotRequest) (*http.Request, error)

ApplyPreparer prepares the Apply request.

func (SnapshotClient) ApplyResponder

func (client SnapshotClient) ApplyResponder(resp *http.Response) (result autorest.Response, err error)

ApplyResponder handles the response to the Apply request. The method always closes the http.Response Body.

func (SnapshotClient) ApplySender

func (client SnapshotClient) ApplySender(req *http.Request) (*http.Response, error)

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

func (SnapshotClient) Delete

func (client SnapshotClient) Delete(ctx context.Context, snapshotID uuid.UUID) (result autorest.Response, err error)

Delete delete an existing snapshot according to the snapshotId. All object data and information in the snapshot will also be deleted. Only the source subscription who took the snapshot can delete the snapshot. If the user does not delete a snapshot with this API, the snapshot will still be automatically deleted in 48 hours after creation. Parameters: snapshotID - id referencing a particular snapshot.

func (SnapshotClient) DeletePreparer

func (client SnapshotClient) DeletePreparer(ctx context.Context, snapshotID uuid.UUID) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (SnapshotClient) DeleteResponder

func (client SnapshotClient) 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 (SnapshotClient) DeleteSender

func (client SnapshotClient) 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 (SnapshotClient) Get

func (client SnapshotClient) Get(ctx context.Context, snapshotID uuid.UUID) (result Snapshot, err error)

Get retrieve information about a snapshot. Snapshot is only accessible to the source subscription who took it, and target subscriptions included in the applyScope in Snapshot - Take. Parameters: snapshotID - id referencing a particular snapshot.

func (SnapshotClient) GetOperationStatus

func (client SnapshotClient) GetOperationStatus(ctx context.Context, operationID uuid.UUID) (result OperationStatus, err error)

GetOperationStatus retrieve the status of a take/apply snapshot operation. Parameters: operationID - id referencing a particular take/apply snapshot operation.

func (SnapshotClient) GetOperationStatusPreparer

func (client SnapshotClient) GetOperationStatusPreparer(ctx context.Context, operationID uuid.UUID) (*http.Request, error)

GetOperationStatusPreparer prepares the GetOperationStatus request.

func (SnapshotClient) GetOperationStatusResponder

func (client SnapshotClient) GetOperationStatusResponder(resp *http.Response) (result OperationStatus, err error)

GetOperationStatusResponder handles the response to the GetOperationStatus request. The method always closes the http.Response Body.

func (SnapshotClient) GetOperationStatusSender

func (client SnapshotClient) GetOperationStatusSender(req *http.Request) (*http.Response, error)

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

func (SnapshotClient) GetPreparer

func (client SnapshotClient) GetPreparer(ctx context.Context, snapshotID uuid.UUID) (*http.Request, error)

GetPreparer prepares the Get request.

func (SnapshotClient) GetResponder

func (client SnapshotClient) GetResponder(resp *http.Response) (result Snapshot, err error)

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

func (SnapshotClient) GetSender

func (client SnapshotClient) 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 (SnapshotClient) List

func (client SnapshotClient) List(ctx context.Context, typeParameter SnapshotObjectType, applyScope []uuid.UUID) (result ListSnapshot, err error)

List list all accessible snapshots with related information, including snapshots that were taken by the user, or snapshots to be applied to the user (subscription id was included in the applyScope in Snapshot - Take). Parameters: typeParameter - user specified object type as a search filter. applyScope - user specified snapshot apply scopes as a search filter. ApplyScope is an array of the target Azure subscription ids for the snapshot, specified by the user who created the snapshot by Snapshot - Take.

func (SnapshotClient) ListPreparer

func (client SnapshotClient) ListPreparer(ctx context.Context, typeParameter SnapshotObjectType, applyScope []uuid.UUID) (*http.Request, error)

ListPreparer prepares the List request.

func (SnapshotClient) ListResponder

func (client SnapshotClient) ListResponder(resp *http.Response) (result ListSnapshot, err error)

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

func (SnapshotClient) ListSender

func (client SnapshotClient) 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 (SnapshotClient) Take

func (client SnapshotClient) Take(ctx context.Context, body TakeSnapshotRequest) (result autorest.Response, err error)

Take submit an operation to take a snapshot of face list, large face list, person group or large person group, with user-specified snapshot type, source object id, apply scope and an optional user data.<br /> The snapshot interfaces are for users to backup and restore their face data from one face subscription to another, inside same region or across regions. The workflow contains two phases, user first calls Snapshot - Take to create a copy of the source object and store it as a snapshot, then calls Snapshot - Apply to paste the snapshot to target subscription. The snapshots are stored in a centralized location (per Azure instance), so that they can be applied cross accounts and regions.<br /> Taking snapshot is an asynchronous operation. An operation id can be obtained from the "Operation-Location" field in response header, to be used in OperationStatus - Get for tracking the progress of creating the snapshot. The snapshot id will be included in the "resourceLocation" field in OperationStatus - Get response when the operation status is "succeeded".<br /> Snapshot taking time depends on the number of person and face entries in the source object. It could be in seconds, or up to several hours for 1,000,000 persons with multiple faces.<br /> Snapshots will be automatically expired and cleaned in 48 hours after it is created by Snapshot - Take. User can delete the snapshot using Snapshot - Delete by themselves any time before expiration.<br /> Taking snapshot for a certain object will not block any other operations against the object. All read-only operations (Get/List and Identify/FindSimilar/Verify) can be conducted as usual. For all writable operations, including Add/Update/Delete the source object or its persons/faces and Train, they are not blocked but not recommended because writable updates may not be reflected on the snapshot during its taking. After snapshot taking is completed, all readable and writable operations can work as normal. Snapshot will also include the training results of the source object, which means target subscription the snapshot applied to does not need re-train the target object before calling Identify/FindSimilar.<br /> * Free-tier subscription quota: 100 take operations per month. * S0-tier subscription quota: 100 take operations per day. Parameters: body - request body for taking a snapshot.

func (SnapshotClient) TakePreparer

func (client SnapshotClient) TakePreparer(ctx context.Context, body TakeSnapshotRequest) (*http.Request, error)

TakePreparer prepares the Take request.

func (SnapshotClient) TakeResponder

func (client SnapshotClient) TakeResponder(resp *http.Response) (result autorest.Response, err error)

TakeResponder handles the response to the Take request. The method always closes the http.Response Body.

func (SnapshotClient) TakeSender

func (client SnapshotClient) TakeSender(req *http.Request) (*http.Response, error)

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

func (SnapshotClient) Update

func (client SnapshotClient) Update(ctx context.Context, snapshotID uuid.UUID, body UpdateSnapshotRequest) (result autorest.Response, err error)

Update update the information of a snapshot. Only the source subscription who took the snapshot can update the snapshot. Parameters: snapshotID - id referencing a particular snapshot. body - request body for updating a snapshot.

func (SnapshotClient) UpdatePreparer

func (client SnapshotClient) UpdatePreparer(ctx context.Context, snapshotID uuid.UUID, body UpdateSnapshotRequest) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (SnapshotClient) UpdateResponder

func (client SnapshotClient) 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 (SnapshotClient) UpdateSender

func (client SnapshotClient) 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 SnapshotObjectType

type SnapshotObjectType string

SnapshotObjectType enumerates the values for snapshot object type.

const (
	// SnapshotObjectTypeFaceList ...
	SnapshotObjectTypeFaceList SnapshotObjectType = "FaceList"
	// SnapshotObjectTypeLargeFaceList ...
	SnapshotObjectTypeLargeFaceList SnapshotObjectType = "LargeFaceList"
	// SnapshotObjectTypeLargePersonGroup ...
	SnapshotObjectTypeLargePersonGroup SnapshotObjectType = "LargePersonGroup"
	// SnapshotObjectTypePersonGroup ...
	SnapshotObjectTypePersonGroup SnapshotObjectType = "PersonGroup"
)

func PossibleSnapshotObjectTypeValues

func PossibleSnapshotObjectTypeValues() []SnapshotObjectType

PossibleSnapshotObjectTypeValues returns an array of possible values for the SnapshotObjectType const type.

type TakeSnapshotRequest

type TakeSnapshotRequest struct {
	// Type - User specified type for the source object to take snapshot from. Currently FaceList, PersonGroup, LargeFaceList and LargePersonGroup are supported. Possible values include: 'SnapshotObjectTypeFaceList', 'SnapshotObjectTypeLargeFaceList', 'SnapshotObjectTypeLargePersonGroup', 'SnapshotObjectTypePersonGroup'
	Type SnapshotObjectType `json:"type,omitempty"`
	// ObjectID - User specified source object id to take snapshot from.
	ObjectID *string `json:"objectId,omitempty"`
	// ApplyScope - User specified array of target Face subscription ids for the snapshot. For each snapshot, only subscriptions included in the applyScope of Snapshot - Take can apply it.
	ApplyScope *[]uuid.UUID `json:"applyScope,omitempty"`
	// UserData - User specified data about the snapshot for any purpose. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
}

TakeSnapshotRequest request body for taking snapshot 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 or large person group is ready for Face - Identify, or this large face list is ready for Face - Find Similar. Status failed is often caused by no person or no persisted face exist in the person group or large person group, or no persisted face exist in the large face list. Possible values include: 'TrainingStatusTypeNonstarted', 'TrainingStatusTypeRunning', 'TrainingStatusTypeSucceeded', 'TrainingStatusTypeFailed'
	Status TrainingStatusType `json:"status,omitempty"`
	// Created - A combined UTC date and time string that describes the created time of the person group, large person group or large face list.
	Created *date.Time `json:"createdDateTime,omitempty"`
	// LastAction - A combined UTC date and time string that describes the last modify time of the person group, large person group or large face list, could be null value when the group is not successfully trained.
	LastAction *date.Time `json:"lastActionDateTime,omitempty"`
	// LastSuccessfulTraining - A combined UTC date and time string that describes the last successful training time of the person group, large person group or large face list.
	LastSuccessfulTraining *date.Time `json:"lastSuccessfulTrainingDateTime,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 (
	// TrainingStatusTypeFailed ...
	TrainingStatusTypeFailed TrainingStatusType = "failed"
	// TrainingStatusTypeNonstarted ...
	TrainingStatusTypeNonstarted TrainingStatusType = "nonstarted"
	// TrainingStatusTypeRunning ...
	TrainingStatusTypeRunning TrainingStatusType = "running"
	// TrainingStatusTypeSucceeded ...
	TrainingStatusTypeSucceeded TrainingStatusType = "succeeded"
)

func PossibleTrainingStatusTypeValues

func PossibleTrainingStatusTypeValues() []TrainingStatusType

PossibleTrainingStatusTypeValues returns an array of possible values for the TrainingStatusType const type.

type UpdateFaceRequest

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

UpdateFaceRequest request to update face data.

type UpdateSnapshotRequest

type UpdateSnapshotRequest struct {
	// ApplyScope - Array of the target Face subscription ids for the snapshot, specified by the user who created the snapshot when calling Snapshot - Take. For each snapshot, only subscriptions included in the applyScope of Snapshot - Take can apply it.
	ApplyScope *[]uuid.UUID `json:"applyScope,omitempty"`
	// UserData - User specified data about the snapshot for any purpose. Length should not exceed 16KB.
	UserData *string `json:"userData,omitempty"`
}

UpdateSnapshotRequest request body for updating a snapshot, with a combination of user defined apply scope and user specified 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 face to face verification.

type VerifyFaceToPersonRequest

type VerifyFaceToPersonRequest struct {
	// FaceID - FaceId of 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 PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.
	PersonGroupID *string `json:"personGroupId,omitempty"`
	// LargePersonGroupID - Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in LargePersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.
	LargePersonGroupID *string `json:"largePersonGroupId,omitempty"`
	// PersonID - Specify a certain person in a person group or a large person group. personId is created in PersonGroup Person - Create or LargePersonGroup Person - Create.
	PersonID *uuid.UUID `json:"personId,omitempty"`
}

VerifyFaceToPersonRequest request body for face to person verification.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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