model

package
v0.0.88 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionsList added in v0.0.58

type ActionsList struct {

	// 置信度,取值范围0~1。
	Confidence float64 `json:"confidence"`

	// 动作编号,取值范围:[1,2,3,4],其中: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
	Action *int32 `json:"action,omitempty"`
}

func (ActionsList) String added in v0.0.58

func (o ActionsList) String() string

type AddFacesBase64Req

type AddFacesBase64Req struct {

	// 图像数据,Base64编码,要求: • Base64编码后大小不超过8MB,建议小于1MB。 • 图片为JPG/JPEG/BMP/PNG格式。
	ImageBase64 string `json:"image_base64"`

	// [根据用户自定义数据类型,填入相应的数值。 创建faceset时定义该字段,Json字符串不校验重复性,参考[自定义字段](https://support.huaweicloud.com/api-face/face_02_0012.html)。](tag:hc) [根据用户自定义数据类型,填入相应的数值。 创建faceset时定义该字段,Json字符串不校验重复性,参考[自定义字段](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0012.html)。](tag:hk)
	ExternalFields *interface{} `json:"external_fields,omitempty"`

	// 用户指定的图片外部ID,与当前图像绑定。用户没提供,系统会生成一个。 该ID长度范围为1~36位,可以包含字母、数字、中划线或者下划线,不包含其他的特殊字符。
	ExternalImageId *string `json:"external_image_id,omitempty"`

	// 是否将图片中的最大人脸添加至人脸库。可选值包括: • true: 传入的单张图片中如果包含多张人脸,则只将最大人脸添加到人脸库中。 • false: 默认为false。传入的单张图片中如果包含多张人脸,则将所有人脸添加至人脸库中。
	Single *bool `json:"single,omitempty"`
}

func (AddFacesBase64Req) String

func (o AddFacesBase64Req) String() string

type AddFacesByBase64Request

type AddFacesByBase64Request struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *AddFacesBase64Req `json:"body,omitempty"`
}

Request Object

func (AddFacesByBase64Request) String

func (o AddFacesByBase64Request) String() string

type AddFacesByBase64Response

type AddFacesByBase64Response struct {

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName *string `json:"face_set_name,omitempty"`

	// [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hc) [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]FaceSetFace `json:"faces,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (AddFacesByBase64Response) String

func (o AddFacesByBase64Response) String() string

type AddFacesByFileRequest

type AddFacesByFileRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *AddFacesByFileRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (AddFacesByFileRequest) String

func (o AddFacesByFileRequest) String() string

type AddFacesByFileRequestBody

type AddFacesByFileRequestBody struct {

	// 本地图片文件,图片不能超过8MB,建议小于1MB。上传文件时,请求格式为multipart。
	ImageFile *def.FilePart `json:"image_file"`

	// 用户指定的图片外部ID,与当前图像绑定。用户没提供,系统会生成一个。 该ID长度范围为1~36位,可以包含字母、数字、中划线或者下划线,不包含其他的特殊字符。
	ExternalImageId *def.MultiPart `json:"external_image_id,omitempty"`

	// [根据用户自定义数据类型,填入相应的数值。 创建faceset时定义该字段,Json字符串不校验重复性,参考[自定义字段](https://support.huaweicloud.com/api-face/face_02_0012.html)。](tag:hc) [根据用户自定义数据类型,填入相应的数值。 创建faceset时定义该字段,Json字符串不校验重复性,参考[自定义字段](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0012.html)。](tag:hk)
	ExternalFields *def.MultiPart `json:"external_fields,omitempty"`

	// 是否将图片中的最大人脸添加至人脸库。可选值包括: • true: 传入的单张图片中如果包含多张人脸,则只将最大人脸添加到人脸库中。 • false: 默认为false。传入的单张图片中如果包含多张人脸,则将所有人脸添加至人脸库中。
	Single *def.MultiPart `json:"single,omitempty"`
}

func (AddFacesByFileRequestBody) String

func (o AddFacesByFileRequestBody) String() string

func (*AddFacesByFileRequestBody) UnmarshalJSON added in v0.0.67

func (o *AddFacesByFileRequestBody) UnmarshalJSON(b []byte) error

type AddFacesByFileResponse

type AddFacesByFileResponse struct {

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName *string `json:"face_set_name,omitempty"`

	// [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hc) [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]FaceSetFace `json:"faces,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (AddFacesByFileResponse) String

func (o AddFacesByFileResponse) String() string

type AddFacesByUrlRequest

type AddFacesByUrlRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *AddFacesUrlReq `json:"body,omitempty"`
}

Request Object

func (AddFacesByUrlRequest) String

func (o AddFacesByUrlRequest) String() string

type AddFacesByUrlResponse

type AddFacesByUrlResponse struct {

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName *string `json:"face_set_name,omitempty"`

	// [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hc) [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]FaceSetFace `json:"faces,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (AddFacesByUrlResponse) String

func (o AddFacesByUrlResponse) String() string

type AddFacesUrlReq

type AddFacesUrlReq struct {

	// 图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见服务授权。
	ImageUrl string `json:"image_url"`

	// 根据用户自定义数据类型,填入相应的数值。 创建faceset时定义该字段,Json字符串不校验重复性,参考自定义字段。
	ExternalFields *interface{} `json:"external_fields,omitempty"`

	// 用户指定的图片外部ID,与当前图像绑定。用户没提供,系统会生成一个。 该ID长度范围为1~36位,可以包含字母、数字、中划线或者下划线,不包含其他的特殊字符。
	ExternalImageId *string `json:"external_image_id,omitempty"`

	// 是否将图片中的最大人脸添加至人脸库。可选值包括: • true: 传入的单张图片中如果包含多张人脸,则只将最大人脸添加到人脸库中。 • false: 默认为false。传入的单张图片中如果包含多张人脸,则将所有人脸添加至人脸库中。
	Single *bool `json:"single,omitempty"`
}

func (AddFacesUrlReq) String

func (o AddFacesUrlReq) String() string

type Attributes

type Attributes struct {
	Dress *Dress `json:"dress"`

	// 是否带眼镜: • yes:带眼镜 • dark:带墨镜 • none:未戴眼镜 • unknown:未知
	Glass string `json:"glass"`

	// 是否戴帽子: • yes:戴帽子 • none:未戴帽子 • unknown:未知
	Hat string `json:"hat"`

	// 年龄。
	Age int32 `json:"age"`

	// 是否戴口罩: • yes:戴口罩 • none:未戴口罩 • unknown:未知
	Mask string `json:"mask"`

	// 胡须: • yes:有胡须 • none:无胡须 • unknown:未知
	Beard string `json:"beard"`

	// 图片类型: • idcard:证件照 • monitor:摄像头监控 • internet photo:网络图片
	Phototype string `json:"phototype"`

	Quality *FaceQuality `json:"quality"`

	// 发型: • long:长发 • short:短发 • unknown:未知
	Hair string `json:"hair"`

	Expression *AttributesExpression `json:"expression"`

	// 人脸图片旋转角(顺时针偏转角度),支持0°、90°、180°和270°图片旋转。
	FaceAngle int32 `json:"face_angle"`
}

func (Attributes) String

func (o Attributes) String() string

type AttributesExpression

type AttributesExpression struct {

	// 人脸表情类型: • neutral:中性 • happy:高兴 • fear:害怕 • surprise:惊讶 • sad:伤心 • angry:生气 • disgust:厌恶 • unknown:图片质量问题导致未识别
	Type *string `json:"type,omitempty"`

	// 表情置信度,取值范围[0-1]。
	Probability *float64 `json:"probability,omitempty"`
}

人脸表情,包括中性、高兴、害怕、惊讶、伤心、生气、厌恶。

func (AttributesExpression) String

func (o AttributesExpression) String() string

type BatchDeleteFacesRequest

type BatchDeleteFacesRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *DeleteFacesBatchReq `json:"body,omitempty"`
}

Request Object

func (BatchDeleteFacesRequest) String

func (o BatchDeleteFacesRequest) String() string

type BatchDeleteFacesResponse

type BatchDeleteFacesResponse struct {

	// 删除的人脸数量。 调用失败时无此字段。
	FaceNumber *int32 `json:"face_number,omitempty"`

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName    *string `json:"face_set_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (BatchDeleteFacesResponse) String

func (o BatchDeleteFacesResponse) String() string

type BoundingBox

type BoundingBox struct {

	// 矩形框宽度。
	Width int32 `json:"width"`

	// 矩形框左上角纵坐标。
	TopLeftY int32 `json:"top_left_y"`

	// 矩形框左上角横坐标。
	TopLeftX int32 `json:"top_left_x"`

	// 矩形框高度。
	Height int32 `json:"height"`
}

func (BoundingBox) String

func (o BoundingBox) String() string

type CompareFace

type CompareFace struct {
	BoundingBox *BoundingBox `json:"bounding_box"`
}

func (CompareFace) String

func (o CompareFace) String() string

type CompareFaceByBase64Request

type CompareFaceByBase64Request struct {
	Body *FaceCompareBase64Req `json:"body,omitempty"`
}

Request Object

func (CompareFaceByBase64Request) String

type CompareFaceByBase64Response

type CompareFaceByBase64Response struct {
	Image1Face *CompareFace `json:"image1_face,omitempty"`

	Image2Face *CompareFace `json:"image2_face,omitempty"`

	// 人脸相似度,1表示最大,0表示最小,值越大表示越相似。一般情况下超过0.93即可认为是同一个人。 调用失败时无此字段。
	Similarity     *float64 `json:"similarity,omitempty"`
	HttpStatusCode int      `json:"-"`
}

Response Object

func (CompareFaceByBase64Response) String

type CompareFaceByFileRequest

type CompareFaceByFileRequest struct {
	Body *CompareFaceByFileRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (CompareFaceByFileRequest) String

func (o CompareFaceByFileRequest) String() string

type CompareFaceByFileRequestBody

type CompareFaceByFileRequestBody struct {

	// 本地图片文件,图片不能超过8MB。上传文件时,请求格式为multipart。
	Image1File *def.FilePart `json:"image1_file"`

	// 本地图片文件,图片不能超过8MB。上传文件时,请求格式为multipart。
	Image2File *def.FilePart `json:"image2_file"`
}

func (CompareFaceByFileRequestBody) String

func (*CompareFaceByFileRequestBody) UnmarshalJSON added in v0.0.67

func (o *CompareFaceByFileRequestBody) UnmarshalJSON(b []byte) error

type CompareFaceByFileResponse

type CompareFaceByFileResponse struct {
	Image1Face *CompareFace `json:"image1_face,omitempty"`

	Image2Face *CompareFace `json:"image2_face,omitempty"`

	// 人脸相似度,1表示最大,0表示最小,值越大表示越相似。一般情况下超过0.93即可认为是同一个人。 调用失败时无此字段。
	Similarity     *float64 `json:"similarity,omitempty"`
	HttpStatusCode int      `json:"-"`
}

Response Object

func (CompareFaceByFileResponse) String

func (o CompareFaceByFileResponse) String() string

type CompareFaceByUrlRequest

type CompareFaceByUrlRequest struct {
	Body *FaceCompareUrlReq `json:"body,omitempty"`
}

Request Object

func (CompareFaceByUrlRequest) String

func (o CompareFaceByUrlRequest) String() string

type CompareFaceByUrlResponse

type CompareFaceByUrlResponse struct {
	Image1Face *CompareFace `json:"image1_face,omitempty"`

	Image2Face *CompareFace `json:"image2_face,omitempty"`

	// 人脸相似度,1表示最大,0表示最小,值越大表示越相似。一般情况下超过0.93即可认为是同一个人。 调用失败时无此字段。
	Similarity     *float64 `json:"similarity,omitempty"`
	HttpStatusCode int      `json:"-"`
}

Response Object

func (CompareFaceByUrlResponse) String

func (o CompareFaceByUrlResponse) String() string

type CreateFaceSetReq

type CreateFaceSetReq struct {

	// [用户自定义数据,自定义字段不能以系统保留字段vector、bounding_box、external_image_id、face_id、create_time、_id、_all、_source等字段命名。 Json字符串不校验重复性,自定义字段的key值长度范围为[1,36],string类型的value长度范围为[1,256],具体参见[自定义字段](https://support.huaweicloud.com/api-face/face_02_0012.html)。](tag:hc) [用户自定义数据,自定义字段不能以系统保留字段vector、bounding_box、external_image_id、face_id、create_time、_id、_all、_source等字段命名。 Json字符串不校验重复性,自定义字段的key值长度范围为[1,36],string类型的value长度范围为[1,256],具体参见[自定义字段](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0012.html)。](tag:hk)
	ExternalFields map[string]TypeInfo `json:"external_fields,omitempty"`

	// 人脸库名称。 建议人脸库的名称不要以下划线(_)开头,否则云监控服务会无法采集人脸数量。
	FaceSetName string `json:"face_set_name"`

	// 人脸库最大的容量,填写1万整数倍的数字,例如:30000。 默认为100000,最大值为100000,可通过创建新的人脸库进行扩容,每个用户可免费默认使用10个人脸库,每个人脸库容量为10万个人脸特征。如需扩容单个人脸库规模,请联系华为云客服确认扩容规模与价格。
	FaceSetCapacity *int32 `json:"face_set_capacity,omitempty"`
}

func (CreateFaceSetReq) String

func (o CreateFaceSetReq) String() string

type CreateFaceSetRequest

type CreateFaceSetRequest struct {
	Body *CreateFaceSetReq `json:"body,omitempty"`
}

Request Object

func (CreateFaceSetRequest) String

func (o CreateFaceSetRequest) String() string

type CreateFaceSetResponse

type CreateFaceSetResponse struct {
	FaceSetInfo    *FaceSetInfo `json:"face_set_info,omitempty"`
	HttpStatusCode int          `json:"-"`
}

Response Object

func (CreateFaceSetResponse) String

func (o CreateFaceSetResponse) String() string

type DeleteFaceByExternalImageIdRequest

type DeleteFaceByExternalImageIdRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	// external_image_id。
	ExternalImageId string `json:"external_image_id"`
}

Request Object

func (DeleteFaceByExternalImageIdRequest) String

type DeleteFaceByExternalImageIdResponse

type DeleteFaceByExternalImageIdResponse struct {

	// 删除的人脸数量。 调用失败时无此字段。
	FaceNumber *int32 `json:"face_number,omitempty"`

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName    *string `json:"face_set_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (DeleteFaceByExternalImageIdResponse) String

type DeleteFaceByFaceIdRequest

type DeleteFaceByFaceIdRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	// 人脸ID。
	FaceId string `json:"face_id"`
}

Request Object

func (DeleteFaceByFaceIdRequest) String

func (o DeleteFaceByFaceIdRequest) String() string

type DeleteFaceByFaceIdResponse

type DeleteFaceByFaceIdResponse struct {

	// 删除的人脸数量。 调用失败时无此字段。
	FaceNumber *int32 `json:"face_number,omitempty"`

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName    *string `json:"face_set_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (DeleteFaceByFaceIdResponse) String

type DeleteFaceSetRequest

type DeleteFaceSetRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`
}

Request Object

func (DeleteFaceSetRequest) String

func (o DeleteFaceSetRequest) String() string

type DeleteFaceSetResponse

type DeleteFaceSetResponse struct {

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName    *string `json:"face_set_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (DeleteFaceSetResponse) String

func (o DeleteFaceSetResponse) String() string

type DeleteFacesBatchReq

type DeleteFacesBatchReq struct {

	// [过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc)[过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
	Filter string `json:"filter"`
}

func (DeleteFacesBatchReq) String

func (o DeleteFacesBatchReq) String() string

type DetectFace

type DetectFace struct {
	BoundingBox *BoundingBox `json:"bounding_box"`

	Attributes *Attributes `json:"attributes,omitempty"`
}

func (DetectFace) String

func (o DetectFace) String() string

type DetectFaceByBase64IntlRequest added in v0.0.88

type DetectFaceByBase64IntlRequest struct {
	Body *FaceDetectBase64Req `json:"body,omitempty"`
}

Request Object

func (DetectFaceByBase64IntlRequest) String added in v0.0.88

type DetectFaceByBase64IntlResponse added in v0.0.88

type DetectFaceByBase64IntlResponse struct {

	// 检测到的人脸。 调用失败时无此字段。
	Faces          *[]DetectFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (DetectFaceByBase64IntlResponse) String added in v0.0.88

type DetectFaceByBase64Request

type DetectFaceByBase64Request struct {
	Body *FaceDetectBase64Req `json:"body,omitempty"`
}

Request Object

func (DetectFaceByBase64Request) String

func (o DetectFaceByBase64Request) String() string

type DetectFaceByBase64Response

type DetectFaceByBase64Response struct {

	// 检测到的人脸。 调用失败时无此字段。
	Faces          *[]DetectFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (DetectFaceByBase64Response) String

type DetectFaceByFileIntlRequest added in v0.0.88

type DetectFaceByFileIntlRequest struct {
	Body *DetectFaceByFileIntlRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (DetectFaceByFileIntlRequest) String added in v0.0.88

type DetectFaceByFileIntlRequestBody added in v0.0.88

type DetectFaceByFileIntlRequestBody struct {

	// 本地图片文件,图片不能超过8MB。上传文件时,请求格式为multipart。
	ImageFile *def.FilePart `json:"image_file"`
}

func (DetectFaceByFileIntlRequestBody) String added in v0.0.88

func (*DetectFaceByFileIntlRequestBody) UnmarshalJSON added in v0.0.88

func (o *DetectFaceByFileIntlRequestBody) UnmarshalJSON(b []byte) error

type DetectFaceByFileIntlResponse added in v0.0.88

type DetectFaceByFileIntlResponse struct {

	// 检测到的人脸。 调用失败时无此字段。
	Faces          *[]DetectFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (DetectFaceByFileIntlResponse) String added in v0.0.88

type DetectFaceByFileRequest

type DetectFaceByFileRequest struct {
	Body *DetectFaceByFileRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (DetectFaceByFileRequest) String

func (o DetectFaceByFileRequest) String() string

type DetectFaceByFileRequestBody

type DetectFaceByFileRequestBody struct {

	// 本地图片文件,图片不能超过8MB。上传文件时,请求格式为multipart。
	ImageFile *def.FilePart `json:"image_file"`

	// 是否返回人脸属性,希望获取的属性列表,多个属性间使用逗号(,)隔开。目前支持的属性有: • 2:年龄 • 4:装束(帽子、眼镜) • 6:口罩 • 7:发型 • 8:胡须 • 11:图片类型 • 12:质量 • 13:表情 • 21:人脸图片旋转角(顺时针偏转角度),支持0°、90°、180°和270°图片旋转
	Attributes *def.MultiPart `json:"attributes,omitempty"`
}

func (DetectFaceByFileRequestBody) String

func (*DetectFaceByFileRequestBody) UnmarshalJSON added in v0.0.67

func (o *DetectFaceByFileRequestBody) UnmarshalJSON(b []byte) error

type DetectFaceByFileResponse

type DetectFaceByFileResponse struct {

	// 检测到的人脸。 调用失败时无此字段。
	Faces          *[]DetectFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (DetectFaceByFileResponse) String

func (o DetectFaceByFileResponse) String() string

type DetectFaceByUrlIntlRequest added in v0.0.88

type DetectFaceByUrlIntlRequest struct {
	Body *FaceDetectUrlReq `json:"body,omitempty"`
}

Request Object

func (DetectFaceByUrlIntlRequest) String added in v0.0.88

type DetectFaceByUrlIntlResponse added in v0.0.88

type DetectFaceByUrlIntlResponse struct {

	// 检测到的人脸。 调用失败时无此字段。
	Faces          *[]DetectFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (DetectFaceByUrlIntlResponse) String added in v0.0.88

type DetectFaceByUrlRequest

type DetectFaceByUrlRequest struct {
	Body *FaceDetectUrlReq `json:"body,omitempty"`
}

Request Object

func (DetectFaceByUrlRequest) String

func (o DetectFaceByUrlRequest) String() string

type DetectFaceByUrlResponse

type DetectFaceByUrlResponse struct {

	// 检测到的人脸。 调用失败时无此字段。
	Faces          *[]DetectFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (DetectFaceByUrlResponse) String

func (o DetectFaceByUrlResponse) String() string

type DetectLiveByBase64IntlRequest added in v0.0.88

type DetectLiveByBase64IntlRequest struct {
	Body *LiveDetectBase64Req `json:"body,omitempty"`
}

Request Object

func (DetectLiveByBase64IntlRequest) String added in v0.0.88

type DetectLiveByBase64IntlResponse added in v0.0.88

type DetectLiveByBase64IntlResponse struct {
	VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"`

	// [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hc) [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hk)
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveByBase64IntlResponse) String added in v0.0.88

type DetectLiveByBase64Request added in v0.0.58

type DetectLiveByBase64Request struct {
	Body *LiveDetectBase64Req `json:"body,omitempty"`
}

Request Object

func (DetectLiveByBase64Request) String added in v0.0.58

func (o DetectLiveByBase64Request) String() string

type DetectLiveByBase64Response added in v0.0.58

type DetectLiveByBase64Response struct {
	VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"`

	// [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hc) [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hk)
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveByBase64Response) String added in v0.0.58

type DetectLiveByFileIntlRequest added in v0.0.88

type DetectLiveByFileIntlRequest struct {
	Body *DetectLiveByFileIntlRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (DetectLiveByFileIntlRequest) String added in v0.0.88

type DetectLiveByFileIntlRequestBody added in v0.0.88

type DetectLiveByFileIntlRequestBody struct {

	// 本地视频文件。上传文件时,请求格式为multipart。 视频要求: • 视频文件大小不超过8MB,建议客户端压缩到200KB~2MB。 • 限制视频时长1~15秒。 • 建议帧率10fps~30fps。 • 封装格式:mp4、avi、flv、webm、asf、mov。 • 视频编码格式: h261、h263、h264、hevc、vc1、vp8、vp9、wmv3。
	VideoFile *def.FilePart `json:"video_file"`

	// 动作代码顺序列表,英文逗号(,)分隔。建议单动作,目前支持的动作有: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
	Actions *def.MultiPart `json:"actions"`

	// 该参数为动作时间数组拼接的字符串,数组的长度和actions的数量一致,每一项代表了对应次序动作的起始时间和结束时间,单位为距视频开始的毫秒数。
	ActionTime *def.MultiPart `json:"action_time,omitempty"`
}

func (DetectLiveByFileIntlRequestBody) String added in v0.0.88

func (*DetectLiveByFileIntlRequestBody) UnmarshalJSON added in v0.0.88

func (o *DetectLiveByFileIntlRequestBody) UnmarshalJSON(b []byte) error

type DetectLiveByFileIntlResponse added in v0.0.88

type DetectLiveByFileIntlResponse struct {
	VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"`

	// [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hc) [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hk)
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveByFileIntlResponse) String added in v0.0.88

type DetectLiveByFileRequest added in v0.0.58

type DetectLiveByFileRequest struct {
	Body *DetectLiveByFileRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (DetectLiveByFileRequest) String added in v0.0.58

func (o DetectLiveByFileRequest) String() string

type DetectLiveByFileRequestBody added in v0.0.58

type DetectLiveByFileRequestBody struct {

	// 本地视频文件。上传文件时,请求格式为multipart。 视频要求: • 视频文件大小不超过8MB,建议客户端压缩到200KB~2MB。 • 限制视频时长1~15秒。 • 建议帧率10fps~30fps。 • 封装格式:mp4、avi、flv、webm、asf、mov。 • 视频编码格式: h261、h263、h264、hevc、vc1、vp8、vp9、wmv3。
	VideoFile *def.FilePart `json:"video_file"`

	// 动作代码顺序列表,英文逗号(,)分隔。建议单动作,目前支持的动作有: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
	Actions *def.MultiPart `json:"actions"`

	// 该参数为动作时间数组拼接的字符串,数组的长度和actions的数量一致,每一项代表了对应次序动作的起始时间和结束时间,单位为距视频开始的毫秒数。
	ActionTime *def.MultiPart `json:"action_time,omitempty"`
}

func (DetectLiveByFileRequestBody) String added in v0.0.58

func (*DetectLiveByFileRequestBody) UnmarshalJSON added in v0.0.67

func (o *DetectLiveByFileRequestBody) UnmarshalJSON(b []byte) error

type DetectLiveByFileResponse added in v0.0.58

type DetectLiveByFileResponse struct {
	VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"`

	// [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hc) [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hk)
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveByFileResponse) String added in v0.0.58

func (o DetectLiveByFileResponse) String() string

type DetectLiveByUrlIntlRequest added in v0.0.88

type DetectLiveByUrlIntlRequest struct {
	Body *LiveDetectUrlReq `json:"body,omitempty"`
}

Request Object

func (DetectLiveByUrlIntlRequest) String added in v0.0.88

type DetectLiveByUrlIntlResponse added in v0.0.88

type DetectLiveByUrlIntlResponse struct {
	VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"`

	// [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hc) [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hk)
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveByUrlIntlResponse) String added in v0.0.88

type DetectLiveByUrlRequest added in v0.0.58

type DetectLiveByUrlRequest struct {
	Body *LiveDetectUrlReq `json:"body,omitempty"`
}

Request Object

func (DetectLiveByUrlRequest) String added in v0.0.58

func (o DetectLiveByUrlRequest) String() string

type DetectLiveByUrlResponse added in v0.0.58

type DetectLiveByUrlResponse struct {
	VideoResult *LiveDetectRespVideoresult `json:"video-result,omitempty"`

	// [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hc) [警告信息列表,WarningList结构见[WarningList](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0077.html)。 调用失败时无此字段](tag:hk)
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveByUrlResponse) String added in v0.0.58

func (o DetectLiveByUrlResponse) String() string

type DetectLiveFaceByBase64Request added in v0.0.58

type DetectLiveFaceByBase64Request struct {
	Body *LiveDetectFaceBase64Req `json:"body,omitempty"`
}

Request Object

func (DetectLiveFaceByBase64Request) String added in v0.0.58

type DetectLiveFaceByBase64Response added in v0.0.58

type DetectLiveFaceByBase64Response struct {
	Result *LiveDetectFaceRespResult `json:"result,omitempty"`

	// 警告信息列表。 调用失败时无此字段。
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveFaceByBase64Response) String added in v0.0.58

type DetectLiveFaceByFileRequest added in v0.0.58

type DetectLiveFaceByFileRequest struct {
	Body *DetectLiveFaceByFileRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (DetectLiveFaceByFileRequest) String added in v0.0.58

type DetectLiveFaceByFileRequestBody added in v0.0.58

type DetectLiveFaceByFileRequestBody struct {

	// 本地图片文件。上传文件时,请求格式为multipart。
	ImageFile *def.FilePart `json:"image_file"`
}

func (DetectLiveFaceByFileRequestBody) String added in v0.0.58

func (*DetectLiveFaceByFileRequestBody) UnmarshalJSON added in v0.0.67

func (o *DetectLiveFaceByFileRequestBody) UnmarshalJSON(b []byte) error

type DetectLiveFaceByFileResponse added in v0.0.58

type DetectLiveFaceByFileResponse struct {
	Result *LiveDetectFaceRespResult `json:"result,omitempty"`

	// 警告信息列表。 调用失败时无此字段。
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveFaceByFileResponse) String added in v0.0.58

type DetectLiveFaceByUrlRequest added in v0.0.58

type DetectLiveFaceByUrlRequest struct {
	Body *LiveDetectFaceUrlReq `json:"body,omitempty"`
}

Request Object

func (DetectLiveFaceByUrlRequest) String added in v0.0.58

type DetectLiveFaceByUrlResponse added in v0.0.58

type DetectLiveFaceByUrlResponse struct {
	Result *LiveDetectFaceRespResult `json:"result,omitempty"`

	// 警告信息列表。 调用失败时无此字段。
	WarningList    *[]WarningList `json:"warning-list,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (DetectLiveFaceByUrlResponse) String added in v0.0.58

type Dress added in v0.0.57

type Dress struct {

	// 是否带眼镜: • yes:带眼镜 • dark:带墨镜 • none:未戴眼镜 • unknown:未知
	Glass *string `json:"glass,omitempty"`

	// 是否戴帽子: • yes:戴帽子 • none:未戴帽子 • unknown:未知
	Hat *string `json:"hat,omitempty"`
}

func (Dress) String added in v0.0.57

func (o Dress) String() string

type FaceCompareBase64Req

type FaceCompareBase64Req struct {

	// 图像数据,Base64编码,要求: • Base64编码后大小不超过8MB,建议小于1MB。 • 图片为JPG/JPEG/BMP/PNG格式。
	Image2Base64 string `json:"image2_base64"`

	// 图像数据,Base64编码,要求: • Base64编码后大小不超过8MB,建议小于1MB。 • 图片为JPG/JPEG/BMP/PNG格式。
	Image1Base64 string `json:"image1_base64"`
}

func (FaceCompareBase64Req) String

func (o FaceCompareBase64Req) String() string

type FaceCompareUrlReq

type FaceCompareUrlReq struct {

	// [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。  与image1_file、image1_base64三选一 ](tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。  与image1_file、image1_base64三选一 ](tag:hk)
	Image1Url string `json:"image1_url"`

	// [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。  与image2_file、image2_base64三选一](tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。  与image2_file、image2_base64三选一](tag:hk)
	Image2Url string `json:"image2_url"`
}

func (FaceCompareUrlReq) String

func (o FaceCompareUrlReq) String() string

type FaceDetectBase64Req

type FaceDetectBase64Req struct {

	// 图像数据,Base64编码,要求: • Base64编码后大小不超过8MB,建议小于1MB。 • 图片为JPG/JPEG/BMP/PNG格式。
	ImageBase64 string `json:"image_base64"`

	// 是否返回人脸属性,希望获取的属性列表,多个属性间使用逗号(,)隔开。目前支持的属性有:   • 2:年龄   • 4:装束(帽子、眼镜)   • 6:口罩   • 7:发型   • 8:胡须   • 11:图片类型   • 12:质量   • 13:表情   • 21:人脸图片旋转角(顺时针偏转角度),支持0°、90°、180°和270°图片旋转
	Attributes *string `json:"attributes,omitempty"`
}

func (FaceDetectBase64Req) String

func (o FaceDetectBase64Req) String() string

type FaceDetectUrlReq

type FaceDetectUrlReq struct {

	// [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。(tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。(tag:hk)
	ImageUrl string `json:"image_url"`

	// 是否返回人脸属性,希望获取的属性列表,多个属性间使用逗号(,)隔开。目前支持的属性有:   • 2:年龄   • 4:装束(帽子、眼镜)   • 6:口罩   • 7:发型   • 8:胡须   • 11:图片类型   • 12:质量   • 13:表情   • 21:人脸图片旋转角(顺时针偏转角度),支持0°、90°、180°和270°图片旋转
	Attributes *string `json:"attributes,omitempty"`
}

func (FaceDetectUrlReq) String

func (o FaceDetectUrlReq) String() string

type FaceQuality

type FaceQuality struct {

	// 人脸质量总分,取值范围[0-1],分值越大质量越高。
	TotalScore float64 `json:"total_score"`

	// 模糊度,取值范围[0-1],分值越大模糊问题越严重。
	Blur float64 `json:"blur"`

	// 姿态,取值范围[0-1],分值越大姿态问题越严重。
	Pose float64 `json:"pose"`

	// 遮挡,取值范围[0-1],分值越大遮挡问题越严重。
	Occlusion float64 `json:"occlusion"`

	// 光照,取值范围[0-1],分值越大光照问题越严重。
	Illumination float64 `json:"illumination"`
}

func (FaceQuality) String

func (o FaceQuality) String() string

type FaceSearchBase64Req

type FaceSearchBase64Req struct {

	// [过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc)[过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
	Filter *string `json:"filter,omitempty"`

	// 返回查询到的最相似的N张人脸,N默认为10。
	TopN *int32 `json:"top_n,omitempty"`

	// 图像数据,Base64编码,要求: • Base64编码后大小不超过8MB,建议小于MB。 • 图片为JPG/JPEG/BMP/PNG格式。
	ImageBase64 string `json:"image_base64"`

	// 指定返回的自定义字段。
	ReturnFields *[]string `json:"return_fields,omitempty"`

	// 人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
	Threshold *float64 `json:"threshold,omitempty"`

	// [支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc)[支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
	Sort *[]map[string]string `json:"sort,omitempty"`
}

func (FaceSearchBase64Req) String

func (o FaceSearchBase64Req) String() string

type FaceSearchFaceIdReq

type FaceSearchFaceIdReq struct {

	// [过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc)[过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
	Filter *string `json:"filter,omitempty"`

	// 返回查询到的最相似的N张人脸,N默认为10。
	TopN *int32 `json:"top_n,omitempty"`

	// 导入人脸时,系统返回的人脸编号,即人脸ID。
	FaceId string `json:"face_id"`

	// 指定返回的自定义字段。
	ReturnFields *[]string `json:"return_fields,omitempty"`

	// 人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
	Threshold *float64 `json:"threshold,omitempty"`

	// [支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc)[支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
	Sort *[]map[string]string `json:"sort,omitempty"`
}

func (FaceSearchFaceIdReq) String

func (o FaceSearchFaceIdReq) String() string

type FaceSearchUrlReq

type FaceSearchUrlReq struct {

	// [过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc)[过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
	Filter *string `json:"filter,omitempty"`

	// 返回查询到的最相似的N张人脸,N默认为10。
	TopN *int32 `json:"top_n,omitempty"`

	// [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。(tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。(tag:hk)
	ImageUrl string `json:"image_url"`

	// 指定返回的自定义字段。
	ReturnFields *[]string `json:"return_fields,omitempty"`

	// 人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
	Threshold *float64 `json:"threshold,omitempty"`

	// [支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc)[支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
	Sort *[]map[string]string `json:"sort,omitempty"`
}

func (FaceSearchUrlReq) String

func (o FaceSearchUrlReq) String() string

type FaceSetFace

type FaceSetFace struct {
	BoundingBox *BoundingBox `json:"bounding_box"`

	// 用户添加的额外字段。
	ExternalFields *interface{} `json:"external_fields"`

	// 人脸所在的外部图片ID。
	ExternalImageId string `json:"external_image_id"`

	// 人脸ID,由系统内部生成的唯一ID。
	FaceId string `json:"face_id"`
}

func (FaceSetFace) String

func (o FaceSetFace) String() string

type FaceSetInfo

type FaceSetInfo struct {

	// 人脸库当中的人脸数量。
	FaceNumber int32 `json:"face_number"`

	// 用户的自定义字段。
	ExternalFields *interface{} `json:"external_fields"`

	// 人脸库ID,随机生成的包含八个字符的字符串。
	FaceSetId string `json:"face_set_id"`

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	// 创建时间。
	CreateDate string `json:"create_date"`

	// 人脸库最大的容量。
	FaceSetCapacity int32 `json:"face_set_capacity"`
}

func (FaceSetInfo) String

func (o FaceSetInfo) String() string

type LiveDetectBase64Req added in v0.0.58

type LiveDetectBase64Req struct {

	// 该参数为动作时间数组拼接的字符串,数组的长度和actions的数量一致,每一项代表了对应次序动作的起始时间和结束时间,单位为距视频开始的毫秒数。
	ActionTime *string `json:"action_time,omitempty"`

	// 视频数据,Base64编码,要求: • Base64编码后大小不超过8MB,建议客户端压缩到200KB~2MB。 • 限制视频时长1~15秒。 • 建议帧率10fps~30fps。 • 封装格式:mp4、avi、flv、webm、asf、mov。 • 视频编码格式: h261、h263、h264、hevc、vc1、vp8、vp9、wmv3。
	VideoBase64 string `json:"video_base64"`

	// 动作代码顺序列表,英文逗号(,)分隔。建议单动作,目前支持的动作有: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
	Actions string `json:"actions"`
}

func (LiveDetectBase64Req) String added in v0.0.58

func (o LiveDetectBase64Req) String() string

type LiveDetectFaceBase64Req added in v0.0.58

type LiveDetectFaceBase64Req struct {

	// 图像数据,Base64编码,要求: • Base64编码后大小不超过8MB。 • 图片编码格式: JPG、PNG、JPEG、BMP格式的图片。
	ImageBase64 string `json:"image_base64"`
}

func (LiveDetectFaceBase64Req) String added in v0.0.58

func (o LiveDetectFaceBase64Req) String() string

type LiveDetectFaceRespResult added in v0.0.58

type LiveDetectFaceRespResult struct {

	// 是否是活体。
	Alive *bool `json:"alive,omitempty"`

	// 置信度,取值范围0~1。
	Confidence *float64 `json:"confidence,omitempty"`

	// 检测出最大人脸的图片base64字符串。
	Picture *string `json:"picture,omitempty"`
}

静默活体检测结果,LivelessDetectResult结构见表[结构格式说明表](https://support.huaweicloud.com/api-face/face_02_0102.html#face_02_0102__table112325301714)。 调用失败时无此字段。

func (LiveDetectFaceRespResult) String added in v0.0.58

func (o LiveDetectFaceRespResult) String() string

type LiveDetectFaceUrlReq added in v0.0.58

type LiveDetectFaceUrlReq struct {

	// [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。(tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。(tag:hk)
	ImageUrl string `json:"image_url"`
}

func (LiveDetectFaceUrlReq) String added in v0.0.58

func (o LiveDetectFaceUrlReq) String() string

type LiveDetectRespVideoresult added in v0.0.58

type LiveDetectRespVideoresult struct {

	// 是否是活体。
	Alive *bool `json:"alive,omitempty"`

	// 动作列表。
	Actions *[]ActionsList `json:"actions,omitempty"`

	// 检测出最大人脸的图片base64。
	Picture *string `json:"picture,omitempty"`
}

[活体检测结果,VideoDetectResult结构见[VideoDetectResult](https://support.huaweicloud.com/api-face/face_02_0010.html)。 调用失败时无此字段。](tag:hc) [活体检测结果,VideoDetectResult结构见[VideoDetectResult](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0010.html)。 调用失败时无此字段。](tag:hk)

func (LiveDetectRespVideoresult) String added in v0.0.58

func (o LiveDetectRespVideoresult) String() string

type LiveDetectUrlReq added in v0.0.58

type LiveDetectUrlReq struct {

	// 该参数为动作时间数组拼接的字符串,数组的长度和actions的数量一致,每一项代表了对应次序动作的起始时间和结束时间,单位为距视频开始的毫秒数。
	ActionTime *string `json:"action_time,omitempty"`

	// [视频的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。 开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。视频要求: • 视频Base64编码后大小不超过8MB。 • 限制视频时长1~15秒。 • 建议帧率10fps~30fps。 • 封装格式:mp4、avi、flv、webm、asf、mov。 • 视频编码格式: h261、h263、h264、hevc、vc1、vp8、vp9、wmv3。](tag:hc) [视频的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。           开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。视频要求:           • 视频Base64编码后大小不超过8MB。           • 限制视频时长1~15秒。           • 建议帧率10fps~30fps。           • 封装格式:mp4、avi、flv、webm、asf、mov。           • 视频编码格式: h261、h263、h264、hevc、vc1、vp8、vp9、wmv3。](tag:hk)
	VideoUrl string `json:"video_url"`

	// 动作代码顺序列表,英文逗号(,)分隔。建议单动作,目前支持的动作有: • 1:左摇头 • 2:右摇头 • 3:点头 • 4:嘴部动作
	Actions string `json:"actions"`
}

func (LiveDetectUrlReq) String added in v0.0.58

func (o LiveDetectUrlReq) String() string

type SearchFace

type SearchFace struct {
	BoundingBox *BoundingBox `json:"bounding_box,omitempty"`

	// 人脸搜索时用于被检索的相似度。
	Similarity *float64 `json:"similarity,omitempty"`

	// 用户添加的额外自定义字段。
	ExternalFields *interface{} `json:"external_fields,omitempty"`

	// 人脸所在的外部图片ID。
	ExternalImageId *string `json:"external_image_id,omitempty"`

	// 人脸ID,由系统内部生成的唯一ID。
	FaceId *string `json:"face_id,omitempty"`
}

func (SearchFace) String

func (o SearchFace) String() string

type SearchFaceByBase64Request

type SearchFaceByBase64Request struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *FaceSearchBase64Req `json:"body,omitempty"`
}

Request Object

func (SearchFaceByBase64Request) String

func (o SearchFaceByBase64Request) String() string

type SearchFaceByBase64Response

type SearchFaceByBase64Response struct {

	// [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hc) [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]SearchFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (SearchFaceByBase64Response) String

type SearchFaceByFaceIdRequest

type SearchFaceByFaceIdRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *FaceSearchFaceIdReq `json:"body,omitempty"`
}

Request Object

func (SearchFaceByFaceIdRequest) String

func (o SearchFaceByFaceIdRequest) String() string

type SearchFaceByFaceIdResponse

type SearchFaceByFaceIdResponse struct {

	// [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hc) [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]SearchFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (SearchFaceByFaceIdResponse) String

type SearchFaceByFileRequest

type SearchFaceByFileRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *SearchFaceByFileRequestBody `json:"body,omitempty" type:"multipart"`
}

Request Object

func (SearchFaceByFileRequest) String

func (o SearchFaceByFileRequest) String() string

type SearchFaceByFileRequestBody

type SearchFaceByFileRequestBody struct {

	// 本地图片文件,图片不能超过8MB,建议小于1MB。上传文件时,请求格式为multipart。  必选,与image_url、image_base64、face_id四选一。
	ImageFile *def.FilePart `json:"image_file"`

	// 返回查询到的最相似的N张人脸,N默认为10。
	TopN *def.MultiPart `json:"top_n,omitempty"`

	// 人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
	Threshold *def.MultiPart `json:"threshold,omitempty"`

	// [支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc)[支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
	Sort *def.MultiPart `json:"sort,omitempty"`

	// [过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc)[过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
	Filter *def.MultiPart `json:"filter,omitempty"`

	// 指定返回的自定义字段。
	ReturnFields *def.MultiPart `json:"return_fields,omitempty"`
}

func (SearchFaceByFileRequestBody) String

func (*SearchFaceByFileRequestBody) UnmarshalJSON added in v0.0.67

func (o *SearchFaceByFileRequestBody) UnmarshalJSON(b []byte) error

type SearchFaceByFileResponse

type SearchFaceByFileResponse struct {

	// [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hc) [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]SearchFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (SearchFaceByFileResponse) String

func (o SearchFaceByFileResponse) String() string

type SearchFaceByUrlRequest

type SearchFaceByUrlRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *FaceSearchUrlReq `json:"body,omitempty"`
}

Request Object

func (SearchFaceByUrlRequest) String

func (o SearchFaceByUrlRequest) String() string

type SearchFaceByUrlResponse

type SearchFaceByUrlResponse struct {

	// [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hc) [查找的人脸集合,详见[SearchFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0019.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]SearchFace `json:"faces,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (SearchFaceByUrlResponse) String

func (o SearchFaceByUrlResponse) String() string

type ShowAllFaceSetsRequest

type ShowAllFaceSetsRequest struct {
}

Request Object

func (ShowAllFaceSetsRequest) String

func (o ShowAllFaceSetsRequest) String() string

type ShowAllFaceSetsResponse

type ShowAllFaceSetsResponse struct {

	// [人脸库信息,详见[FaceSetInfo](https://support.huaweicloud.com/api-face/face_02_0020.html)。 调用失败时无此字段。](tag:hc) [人脸库信息,详见[FaceSetInfo](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0020.html)。 调用失败时无此字段。](tag:hk)
	FaceSetsInfo   *[]FaceSetInfo `json:"face_sets_info,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (ShowAllFaceSetsResponse) String

func (o ShowAllFaceSetsResponse) String() string

type ShowFaceSetRequest

type ShowFaceSetRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`
}

Request Object

func (ShowFaceSetRequest) String

func (o ShowFaceSetRequest) String() string

type ShowFaceSetResponse

type ShowFaceSetResponse struct {
	FaceSetInfo    *FaceSetInfo `json:"face_set_info,omitempty"`
	HttpStatusCode int          `json:"-"`
}

Response Object

func (ShowFaceSetResponse) String

func (o ShowFaceSetResponse) String() string

type ShowFacesByFaceIdRequest

type ShowFacesByFaceIdRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	// 人脸ID。
	FaceId string `json:"face_id"`
}

Request Object

func (ShowFacesByFaceIdRequest) String

func (o ShowFacesByFaceIdRequest) String() string

type ShowFacesByFaceIdResponse

type ShowFacesByFaceIdResponse struct {

	// 人脸库ID,随机生成的包含八个字符的字符串。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName *string `json:"face_set_name,omitempty"`

	// [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hc) [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]FaceSetFace `json:"faces,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (ShowFacesByFaceIdResponse) String

func (o ShowFacesByFaceIdResponse) String() string

type ShowFacesByLimitRequest

type ShowFacesByLimitRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	// 从第几条数据读起,默认为0。
	Offset int32 `json:"offset"`

	// 读取多少条,默认为5。
	Limit int32 `json:"limit"`
}

Request Object

func (ShowFacesByLimitRequest) String

func (o ShowFacesByLimitRequest) String() string

type ShowFacesByLimitResponse

type ShowFacesByLimitResponse struct {

	// 人脸库ID,随机生成的包含八个字符的字符串。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName *string `json:"face_set_name,omitempty"`

	// [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hc) [人脸库当中的人脸结构,详见[FaceSetFace](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0018.html)。 调用失败时无此字段。](tag:hk)
	Faces          *[]FaceSetFace `json:"faces,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (ShowFacesByLimitResponse) String

func (o ShowFacesByLimitResponse) String() string

type TypeInfo

type TypeInfo struct {

	// 数据类型:string,integer,double,long等。
	Type *string `json:"type,omitempty"`
}

func (TypeInfo) String

func (o TypeInfo) String() string

type UpdateFaceReq

type UpdateFaceReq struct {

	// [Json字符串不校验重复性,自定义字段的key值长度范围为[1,36],string类型的value长度范围为[1,256],具体参见[自定义字段](https://support.huaweicloud.com/api-face/face_02_0012.html)。 这里是待修改的参数,external_image_id和external_fields至少选一个。](tag:hc) [Json字符串不校验重复性,自定义字段的key值长度范围为[1,36],string类型的value长度范围为[1,256],具体参见[自定义字段](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0012.html)。 这里是待修改的参数,external_image_id和external_fields至少选一个。](tag:hk)
	ExternalFields *interface{} `json:"external_fields,omitempty"`

	// 用户指定的图片外部ID,与当前图像绑定。用户没提供,系统会生成一个。该ID长度范围为1~36位,可以包含字母、数字、中划线或者下划线,不包含其他的特殊字符。 这里是待修改的参数,external_image_id和external_fields至少选一个。
	ExternalImageId *string `json:"external_image_id,omitempty"`

	// 人脸库ID,由系统内部生成的唯一ID。
	FaceId string `json:"face_id"`
}

func (UpdateFaceReq) String

func (o UpdateFaceReq) String() string

type UpdateFaceRequest

type UpdateFaceRequest struct {

	// 人脸库名称。
	FaceSetName string `json:"face_set_name"`

	Body *UpdateFaceReq `json:"body,omitempty"`
}

Request Object

func (UpdateFaceRequest) String

func (o UpdateFaceRequest) String() string

type UpdateFaceResponse

type UpdateFaceResponse struct {

	// 更新的人脸数量。 调用失败时无此字段。
	FaceNumber *int32 `json:"face_number,omitempty"`

	// 人脸库ID。 调用失败时无此字段。
	FaceSetId *string `json:"face_set_id,omitempty"`

	// 人脸库名称。 调用失败时无此字段。
	FaceSetName    *string `json:"face_set_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (UpdateFaceResponse) String

func (o UpdateFaceResponse) String() string

type WarningList added in v0.0.58

type WarningList struct {

	// 警告ID。
	WarningCode *int32 `json:"warningCode,omitempty"`

	// 告警消息。
	WarningMsg *string `json:"warningMsg,omitempty"`
}

func (WarningList) String added in v0.0.58

func (o WarningList) String() string

Source Files

Jump to

Keyboard shortcuts

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