1// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package v20200303 16 17import ( 18 "encoding/json" 19 "errors" 20 21 tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http" 22) 23 24type AnalyzeDenseLandmarksRequest struct { 25 *tchttp.BaseRequest 26 27 // 检测模式。0 为检测所有出现的人脸, 1 为检测面积最大的人脸。 28 // 默认为 0。 29 // 最多返回 5 张人脸的五官定位(人脸关键点)具体信息。 30 Mode *uint64 `json:"Mode,omitempty" name:"Mode"` 31 32 // 图片 base64 数据,base64 编码后大小不可超过5M。 33 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 34 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 35 Image *string `json:"Image,omitempty" name:"Image"` 36 37 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 38 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 39 // Url、Image必须提供一个,如果都提供,只使用 Url。 40 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 41 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 42 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 43 Url *string `json:"Url,omitempty" name:"Url"` 44 45 // 人脸识别服务所用的算法模型版本。本接口仅支持 “3.0“ 输入。 46 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 47 48 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 49 NeedRotateDetection *int64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 50} 51 52func (r *AnalyzeDenseLandmarksRequest) ToJsonString() string { 53 b, _ := json.Marshal(r) 54 return string(b) 55} 56 57// It is highly **NOT** recommended to use this function 58// because it has no param check, nor strict type check 59func (r *AnalyzeDenseLandmarksRequest) FromJsonString(s string) error { 60 f := make(map[string]interface{}) 61 if err := json.Unmarshal([]byte(s), &f); err != nil { 62 return err 63 } 64 delete(f, "Mode") 65 delete(f, "Image") 66 delete(f, "Url") 67 delete(f, "FaceModelVersion") 68 delete(f, "NeedRotateDetection") 69 if len(f) > 0 { 70 return errors.New("AnalyzeDenseLandmarksRequest has unknown keys!") 71 } 72 return json.Unmarshal([]byte(s), &r) 73} 74 75type AnalyzeDenseLandmarksResponse struct { 76 *tchttp.BaseResponse 77 Response *struct { 78 79 // 请求的图片宽度。 80 ImageWidth *int64 `json:"ImageWidth,omitempty" name:"ImageWidth"` 81 82 // 请求的图片高度。 83 ImageHeight *int64 `json:"ImageHeight,omitempty" name:"ImageHeight"` 84 85 // 稠密人脸关键点具体信息。 86 DenseFaceShapeSet []*DenseFaceShape `json:"DenseFaceShapeSet,omitempty" name:"DenseFaceShapeSet" list` 87 88 // 人脸识别服务所用的算法模型版本。本接口仅支持 “3.0“ 输入。 89 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 90 91 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 92 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 93 } `json:"Response"` 94} 95 96func (r *AnalyzeDenseLandmarksResponse) ToJsonString() string { 97 b, _ := json.Marshal(r) 98 return string(b) 99} 100 101// It is highly **NOT** recommended to use this function 102// because it has no param check, nor strict type check 103func (r *AnalyzeDenseLandmarksResponse) FromJsonString(s string) error { 104 return json.Unmarshal([]byte(s), &r) 105} 106 107type AnalyzeFaceRequest struct { 108 *tchttp.BaseRequest 109 110 // 检测模式。0 为检测所有出现的人脸, 1 为检测面积最大的人脸。默认为 0。最多返回 10 张人脸的五官定位(人脸关键点)具体信息。 111 Mode *uint64 `json:"Mode,omitempty" name:"Mode"` 112 113 // 图片 base64 数据,base64 编码后大小不可超过5M。 114 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 115 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 116 Image *string `json:"Image,omitempty" name:"Image"` 117 118 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 119 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 120 // Url、Image必须提供一个,如果都提供,只使用 Url。 121 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 122 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 123 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 124 Url *string `json:"Url,omitempty" name:"Url"` 125 126 // 人脸识别服务所用的算法模型版本。 127 // 128 // 目前入参支持 “2.0”和“3.0“ 两个输入。 129 // 130 // 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。 131 // 132 // 2020年11月26日后开通服务的账号仅支持输入“3.0”。 133 // 134 // 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。 135 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 136 137 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 138 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 139} 140 141func (r *AnalyzeFaceRequest) ToJsonString() string { 142 b, _ := json.Marshal(r) 143 return string(b) 144} 145 146// It is highly **NOT** recommended to use this function 147// because it has no param check, nor strict type check 148func (r *AnalyzeFaceRequest) FromJsonString(s string) error { 149 f := make(map[string]interface{}) 150 if err := json.Unmarshal([]byte(s), &f); err != nil { 151 return err 152 } 153 delete(f, "Mode") 154 delete(f, "Image") 155 delete(f, "Url") 156 delete(f, "FaceModelVersion") 157 delete(f, "NeedRotateDetection") 158 if len(f) > 0 { 159 return errors.New("AnalyzeFaceRequest has unknown keys!") 160 } 161 return json.Unmarshal([]byte(s), &r) 162} 163 164type AnalyzeFaceResponse struct { 165 *tchttp.BaseResponse 166 Response *struct { 167 168 // 请求的图片宽度。 169 ImageWidth *uint64 `json:"ImageWidth,omitempty" name:"ImageWidth"` 170 171 // 请求的图片高度。 172 ImageHeight *uint64 `json:"ImageHeight,omitempty" name:"ImageHeight"` 173 174 // 五官定位(人脸关键点)具体信息。 175 FaceShapeSet []*FaceShape `json:"FaceShapeSet,omitempty" name:"FaceShapeSet" list` 176 177 // 人脸识别所用的算法模型版本。 178 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 179 180 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 181 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 182 } `json:"Response"` 183} 184 185func (r *AnalyzeFaceResponse) ToJsonString() string { 186 b, _ := json.Marshal(r) 187 return string(b) 188} 189 190// It is highly **NOT** recommended to use this function 191// because it has no param check, nor strict type check 192func (r *AnalyzeFaceResponse) FromJsonString(s string) error { 193 return json.Unmarshal([]byte(s), &r) 194} 195 196type AttributeItem struct { 197 198 // 属性值 199 Type *int64 `json:"Type,omitempty" name:"Type"` 200 201 // Type识别概率值,【0,1】,代表判断正确的概率。 202 Probability *float64 `json:"Probability,omitempty" name:"Probability"` 203} 204 205type Candidate struct { 206 207 // 人员ID 208 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 209 210 // 人脸ID 211 FaceId *string `json:"FaceId,omitempty" name:"FaceId"` 212 213 // 候选者的匹配得分。 214 // 215 // 1万大小人脸底库下,误识率百分之一对应分数为70分,误识率千分之一对应分数为80分,误识率万分之一对应分数为90分; 216 // 10万大小人脸底库下,误识率百分之一对应分数为80分,误识率千分之一对应分数为90分,误识率万分之一对应分数为100分; 217 // 30万大小人脸底库下,误识率百分之一对应分数为85分,误识率千分之一对应分数为95分。 218 // 219 // 一般80分左右可适用大部分场景,建议分数不要超过90分。您可以根据实际情况选择合适的分数。 220 Score *float64 `json:"Score,omitempty" name:"Score"` 221 222 // 人员名称 223 // 注意:此字段可能返回 null,表示取不到有效值。 224 PersonName *string `json:"PersonName,omitempty" name:"PersonName"` 225 226 // 人员性别 227 // 注意:此字段可能返回 null,表示取不到有效值。 228 Gender *int64 `json:"Gender,omitempty" name:"Gender"` 229 230 // 包含此人员的人员库及描述字段内容列表 231 // 注意:此字段可能返回 null,表示取不到有效值。 232 PersonGroupInfos []*PersonGroupInfo `json:"PersonGroupInfos,omitempty" name:"PersonGroupInfos" list` 233} 234 235type CheckSimilarPersonRequest struct { 236 *tchttp.BaseRequest 237 238 // 待整理的人员库列表。 239 // 人员库总人数不可超过200万,人员库个数不可超过10个。 240 // 数组元素取值为创建人员库接口中的GroupId 241 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 242 243 // 人员查重整理力度的控制。 244 // 1:力度较高的档案整理,能够消除更多的重复身份,对应稍高的非重复身份误清除率; 245 // 2:力度较低的档案整理,非重复身份的误清除率较低,对应稍低的重复身份消除率。 246 UniquePersonControl *int64 `json:"UniquePersonControl,omitempty" name:"UniquePersonControl"` 247} 248 249func (r *CheckSimilarPersonRequest) ToJsonString() string { 250 b, _ := json.Marshal(r) 251 return string(b) 252} 253 254// It is highly **NOT** recommended to use this function 255// because it has no param check, nor strict type check 256func (r *CheckSimilarPersonRequest) FromJsonString(s string) error { 257 f := make(map[string]interface{}) 258 if err := json.Unmarshal([]byte(s), &f); err != nil { 259 return err 260 } 261 delete(f, "GroupIds") 262 delete(f, "UniquePersonControl") 263 if len(f) > 0 { 264 return errors.New("CheckSimilarPersonRequest has unknown keys!") 265 } 266 return json.Unmarshal([]byte(s), &r) 267} 268 269type CheckSimilarPersonResponse struct { 270 *tchttp.BaseResponse 271 Response *struct { 272 273 // 查重任务ID,用于查询、获取查重的进度和结果。 274 JobId *string `json:"JobId,omitempty" name:"JobId"` 275 276 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 277 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 278 } `json:"Response"` 279} 280 281func (r *CheckSimilarPersonResponse) ToJsonString() string { 282 b, _ := json.Marshal(r) 283 return string(b) 284} 285 286// It is highly **NOT** recommended to use this function 287// because it has no param check, nor strict type check 288func (r *CheckSimilarPersonResponse) FromJsonString(s string) error { 289 return json.Unmarshal([]byte(s), &r) 290} 291 292type CompareFaceRequest struct { 293 *tchttp.BaseRequest 294 295 // A 图片 base64 数据,base64 编码后大小不可超过5M。 296 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 297 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 298 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 299 ImageA *string `json:"ImageA,omitempty" name:"ImageA"` 300 301 // B 图片 base64 数据,base64 编码后大小不可超过5M。 302 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 303 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 304 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 305 ImageB *string `json:"ImageB,omitempty" name:"ImageB"` 306 307 // A 图片的 Url ,对应图片 base64 编码后大小不可超过5M。 308 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 309 // A 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。 310 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 311 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 312 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 313 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 314 UrlA *string `json:"UrlA,omitempty" name:"UrlA"` 315 316 // B 图片的 Url ,对应图片 base64 编码后大小不可超过5M。 317 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 318 // B 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。 319 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 320 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 321 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 322 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 323 UrlB *string `json:"UrlB,omitempty" name:"UrlB"` 324 325 // 人脸识别服务所用的算法模型版本。 326 // 327 // 目前入参支持 “2.0”和“3.0“ 两个输入。 328 // 329 // 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。 330 // 331 // 2020年11月26日后开通服务的账号仅支持输入“3.0”。 332 // 333 // 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。 334 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 335 336 // 图片质量控制。 337 // 0: 不进行控制; 338 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 339 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 340 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 341 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 342 // 默认 0。 343 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 344 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 345 346 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 347 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 348} 349 350func (r *CompareFaceRequest) ToJsonString() string { 351 b, _ := json.Marshal(r) 352 return string(b) 353} 354 355// It is highly **NOT** recommended to use this function 356// because it has no param check, nor strict type check 357func (r *CompareFaceRequest) FromJsonString(s string) error { 358 f := make(map[string]interface{}) 359 if err := json.Unmarshal([]byte(s), &f); err != nil { 360 return err 361 } 362 delete(f, "ImageA") 363 delete(f, "ImageB") 364 delete(f, "UrlA") 365 delete(f, "UrlB") 366 delete(f, "FaceModelVersion") 367 delete(f, "QualityControl") 368 delete(f, "NeedRotateDetection") 369 if len(f) > 0 { 370 return errors.New("CompareFaceRequest has unknown keys!") 371 } 372 return json.Unmarshal([]byte(s), &r) 373} 374 375type CompareFaceResponse struct { 376 *tchttp.BaseResponse 377 Response *struct { 378 379 // 两张图片中人脸的相似度分数。 380 // 不同算法版本返回的相似度分数不同。 381 // 若需要验证两张图片中人脸是否为同一人,3.0版本误识率千分之一对应分数为40分,误识率万分之一对应分数为50分,误识率十万分之一对应分数为60分。 一般超过50分则可认定为同一人。 382 // 2.0版本误识率千分之一对应分数为70分,误识率万分之一对应分数为80分,误识率十万分之一对应分数为90分。 一般超过80分则可认定为同一人。 383 // 若需要验证两张图片中的人脸是否为同一人,建议使用人脸验证接口。 384 Score *float64 `json:"Score,omitempty" name:"Score"` 385 386 // 人脸识别所用的算法模型版本。 387 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 388 389 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 390 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 391 } `json:"Response"` 392} 393 394func (r *CompareFaceResponse) ToJsonString() string { 395 b, _ := json.Marshal(r) 396 return string(b) 397} 398 399// It is highly **NOT** recommended to use this function 400// because it has no param check, nor strict type check 401func (r *CompareFaceResponse) FromJsonString(s string) error { 402 return json.Unmarshal([]byte(s), &r) 403} 404 405type CompareMaskFaceRequest struct { 406 *tchttp.BaseRequest 407 408 // A 图片 base64 数据,base64 编码后大小不可超过5M。 409 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 410 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 411 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 412 ImageA *string `json:"ImageA,omitempty" name:"ImageA"` 413 414 // B 图片 base64 数据,base64 编码后大小不可超过5M。 415 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 416 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 417 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 418 ImageB *string `json:"ImageB,omitempty" name:"ImageB"` 419 420 // A 图片的 Url ,对应图片 base64 编码后大小不可超过5M。 421 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 422 // A 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。 423 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 424 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 425 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 426 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 427 UrlA *string `json:"UrlA,omitempty" name:"UrlA"` 428 429 // B 图片的 Url ,对应图片 base64 编码后大小不可超过5M。 430 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 431 // B 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。 432 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 433 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 434 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 435 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 436 UrlB *string `json:"UrlB,omitempty" name:"UrlB"` 437 438 // 人脸识别服务所用的算法模型版本。该接口只支持"3.0" 439 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 440 441 // 图片质量控制。 442 // 0: 不进行控制; 443 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 444 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 445 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 446 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 447 // 默认 0。 448 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 449 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 450} 451 452func (r *CompareMaskFaceRequest) ToJsonString() string { 453 b, _ := json.Marshal(r) 454 return string(b) 455} 456 457// It is highly **NOT** recommended to use this function 458// because it has no param check, nor strict type check 459func (r *CompareMaskFaceRequest) FromJsonString(s string) error { 460 f := make(map[string]interface{}) 461 if err := json.Unmarshal([]byte(s), &f); err != nil { 462 return err 463 } 464 delete(f, "ImageA") 465 delete(f, "ImageB") 466 delete(f, "UrlA") 467 delete(f, "UrlB") 468 delete(f, "FaceModelVersion") 469 delete(f, "QualityControl") 470 if len(f) > 0 { 471 return errors.New("CompareMaskFaceRequest has unknown keys!") 472 } 473 return json.Unmarshal([]byte(s), &r) 474} 475 476type CompareMaskFaceResponse struct { 477 *tchttp.BaseResponse 478 Response *struct { 479 480 // 两张图片中人脸的相似度分数。 481 // 不同算法版本返回的相似度分数不同。 482 // 若需要验证两张图片中人脸是否为同一人,3.0版本误识率千分之一对应分数为40分,误识率万分之一对应分数为50分,误识率十万分之一对应分数为60分。 一般超过50分则可认定为同一人。 483 // 2.0版本误识率千分之一对应分数为70分,误识率万分之一对应分数为80分,误识率十万分之一对应分数为90分。 一般超过80分则可认定为同一人。 484 // 若需要验证两张图片中的人脸是否为同一人,建议使用人脸验证接口。 485 Score *float64 `json:"Score,omitempty" name:"Score"` 486 487 // 人脸识别所用的算法模型版本。 488 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 489 490 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 491 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 492 } `json:"Response"` 493} 494 495func (r *CompareMaskFaceResponse) ToJsonString() string { 496 b, _ := json.Marshal(r) 497 return string(b) 498} 499 500// It is highly **NOT** recommended to use this function 501// because it has no param check, nor strict type check 502func (r *CompareMaskFaceResponse) FromJsonString(s string) error { 503 return json.Unmarshal([]byte(s), &r) 504} 505 506type CopyPersonRequest struct { 507 *tchttp.BaseRequest 508 509 // 人员ID,取值为创建人员接口中的PersonId 510 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 511 512 // 待加入的人员库列表,数组元素取值为创建人员库接口中的GroupId 513 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 514} 515 516func (r *CopyPersonRequest) ToJsonString() string { 517 b, _ := json.Marshal(r) 518 return string(b) 519} 520 521// It is highly **NOT** recommended to use this function 522// because it has no param check, nor strict type check 523func (r *CopyPersonRequest) FromJsonString(s string) error { 524 f := make(map[string]interface{}) 525 if err := json.Unmarshal([]byte(s), &f); err != nil { 526 return err 527 } 528 delete(f, "PersonId") 529 delete(f, "GroupIds") 530 if len(f) > 0 { 531 return errors.New("CopyPersonRequest has unknown keys!") 532 } 533 return json.Unmarshal([]byte(s), &r) 534} 535 536type CopyPersonResponse struct { 537 *tchttp.BaseResponse 538 Response *struct { 539 540 // 成功加入的人员库数量 541 SucGroupNum *uint64 `json:"SucGroupNum,omitempty" name:"SucGroupNum"` 542 543 // 成功加入的人员库列表 544 SucGroupIds []*string `json:"SucGroupIds,omitempty" name:"SucGroupIds" list` 545 546 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 547 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 548 } `json:"Response"` 549} 550 551func (r *CopyPersonResponse) ToJsonString() string { 552 b, _ := json.Marshal(r) 553 return string(b) 554} 555 556// It is highly **NOT** recommended to use this function 557// because it has no param check, nor strict type check 558func (r *CopyPersonResponse) FromJsonString(s string) error { 559 return json.Unmarshal([]byte(s), &r) 560} 561 562type CreateFaceRequest struct { 563 *tchttp.BaseRequest 564 565 // 人员ID,取值为创建人员接口中的PersonId 566 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 567 568 // 图片 base64 数据,base64 编码后大小不可超过5M。 569 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 570 // 人员人脸总数量不可超过5张。 571 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 572 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 573 Images []*string `json:"Images,omitempty" name:"Images" list` 574 575 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 576 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 577 // Url、Image必须提供一个,如果都提供,只使用 Url。 578 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 579 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 580 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 581 // 人员人脸总数量不可超过5张。 582 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 583 Urls []*string `json:"Urls,omitempty" name:"Urls" list` 584 585 // 只有和该人员已有的人脸相似度超过FaceMatchThreshold值的人脸,才能增加人脸成功。 586 // 默认值60分。取值范围[0,100] 。 587 FaceMatchThreshold *float64 `json:"FaceMatchThreshold,omitempty" name:"FaceMatchThreshold"` 588 589 // 图片质量控制。 590 // 0: 不进行控制; 591 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 592 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 593 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 594 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 595 // 默认 0。 596 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 597 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 598 599 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 600 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 601} 602 603func (r *CreateFaceRequest) ToJsonString() string { 604 b, _ := json.Marshal(r) 605 return string(b) 606} 607 608// It is highly **NOT** recommended to use this function 609// because it has no param check, nor strict type check 610func (r *CreateFaceRequest) FromJsonString(s string) error { 611 f := make(map[string]interface{}) 612 if err := json.Unmarshal([]byte(s), &f); err != nil { 613 return err 614 } 615 delete(f, "PersonId") 616 delete(f, "Images") 617 delete(f, "Urls") 618 delete(f, "FaceMatchThreshold") 619 delete(f, "QualityControl") 620 delete(f, "NeedRotateDetection") 621 if len(f) > 0 { 622 return errors.New("CreateFaceRequest has unknown keys!") 623 } 624 return json.Unmarshal([]byte(s), &r) 625} 626 627type CreateFaceResponse struct { 628 *tchttp.BaseResponse 629 Response *struct { 630 631 // 加入成功的人脸数量 632 SucFaceNum *uint64 `json:"SucFaceNum,omitempty" name:"SucFaceNum"` 633 634 // 加入成功的人脸ID列表 635 SucFaceIds []*string `json:"SucFaceIds,omitempty" name:"SucFaceIds" list` 636 637 // 每张人脸图片添加结果,-1101 代表未检测到人脸,-1102 代表图片解码失败, 638 // -1601代表不符合图片质量控制要求, -1604 代表人脸相似度没有超过FaceMatchThreshold。 639 // 其他非 0 值代表算法服务异常。 640 // RetCode的顺序和入参中 Images 或 Urls 的顺序一致。 641 RetCode []*int64 `json:"RetCode,omitempty" name:"RetCode" list` 642 643 // 加入成功的人脸索引。索引顺序和入参中 Images 或 Urls 的顺序一致。 644 // 例, Urls 中 有 3 个 url,第二个 url 失败,则 SucIndexes 值为 [0,2] 。 645 SucIndexes []*uint64 `json:"SucIndexes,omitempty" name:"SucIndexes" list` 646 647 // 加入成功的人脸框位置。顺序和入参中 Images 或 Urls 的顺序一致。 648 SucFaceRects []*FaceRect `json:"SucFaceRects,omitempty" name:"SucFaceRects" list` 649 650 // 人脸识别所用的算法模型版本。 651 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 652 653 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 654 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 655 } `json:"Response"` 656} 657 658func (r *CreateFaceResponse) ToJsonString() string { 659 b, _ := json.Marshal(r) 660 return string(b) 661} 662 663// It is highly **NOT** recommended to use this function 664// because it has no param check, nor strict type check 665func (r *CreateFaceResponse) FromJsonString(s string) error { 666 return json.Unmarshal([]byte(s), &r) 667} 668 669type CreateGroupRequest struct { 670 *tchttp.BaseRequest 671 672 // 人员库名称,[1,60]个字符,可修改,不可重复。 673 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 674 675 // 人员库 ID,不可修改,不可重复。支持英文、数字、-%@#&_,长度限制64B。 676 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 677 678 // 人员库自定义描述字段,用于描述人员库中人员属性,该人员库下所有人员将拥有此描述字段。 679 // 最多可以创建5个。 680 // 每个自定义描述字段支持[1,30]个字符。 681 // 在同一人员库中自定义描述字段不可重复。 682 // 例: 设置某人员库“自定义描述字段”为["学号","工号","手机号"], 683 // 则该人员库下所有人员将拥有名为“学号”、“工号”、“手机号”的描述字段, 684 // 可在对应人员描述字段中填写内容,登记该人员的学号、工号、手机号等信息。 685 GroupExDescriptions []*string `json:"GroupExDescriptions,omitempty" name:"GroupExDescriptions" list` 686 687 // 人员库信息备注,[0,40]个字符。 688 Tag *string `json:"Tag,omitempty" name:"Tag"` 689 690 // 人脸识别服务所用的算法模型版本。 691 // 692 // 目前入参支持 “2.0”和“3.0“ 两个输入。 693 // 694 // 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。 695 // 696 // 2020年11月26日后开通服务的账号仅支持输入“3.0”。 697 // 698 // 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。 699 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 700} 701 702func (r *CreateGroupRequest) ToJsonString() string { 703 b, _ := json.Marshal(r) 704 return string(b) 705} 706 707// It is highly **NOT** recommended to use this function 708// because it has no param check, nor strict type check 709func (r *CreateGroupRequest) FromJsonString(s string) error { 710 f := make(map[string]interface{}) 711 if err := json.Unmarshal([]byte(s), &f); err != nil { 712 return err 713 } 714 delete(f, "GroupName") 715 delete(f, "GroupId") 716 delete(f, "GroupExDescriptions") 717 delete(f, "Tag") 718 delete(f, "FaceModelVersion") 719 if len(f) > 0 { 720 return errors.New("CreateGroupRequest has unknown keys!") 721 } 722 return json.Unmarshal([]byte(s), &r) 723} 724 725type CreateGroupResponse struct { 726 *tchttp.BaseResponse 727 Response *struct { 728 729 // 人脸识别所用的算法模型版本。 730 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 731 732 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 733 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 734 } `json:"Response"` 735} 736 737func (r *CreateGroupResponse) ToJsonString() string { 738 b, _ := json.Marshal(r) 739 return string(b) 740} 741 742// It is highly **NOT** recommended to use this function 743// because it has no param check, nor strict type check 744func (r *CreateGroupResponse) FromJsonString(s string) error { 745 return json.Unmarshal([]byte(s), &r) 746} 747 748type CreatePersonRequest struct { 749 *tchttp.BaseRequest 750 751 // 待加入的人员库ID,取值为创建人员库接口中的GroupId 752 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 753 754 // 人员名称。[1,60]个字符,可修改,可重复。 755 PersonName *string `json:"PersonName,omitempty" name:"PersonName"` 756 757 // 人员ID,单个腾讯云账号下不可修改,不可重复。支持英文、数字、-%@#&_,长度限制64B。 758 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 759 760 // 0代表未填写,1代表男性,2代表女性。 761 Gender *int64 `json:"Gender,omitempty" name:"Gender"` 762 763 // 人员描述字段内容,key-value。[0,60]个字符,可修改,可重复。 764 PersonExDescriptionInfos []*PersonExDescriptionInfo `json:"PersonExDescriptionInfos,omitempty" name:"PersonExDescriptionInfos" list` 765 766 // 图片 base64 数据,base64 编码后大小不可超过5M。 767 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 768 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 769 Image *string `json:"Image,omitempty" name:"Image"` 770 771 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 772 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 773 // Url、Image必须提供一个,如果都提供,只使用 Url。 774 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 775 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 776 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 777 Url *string `json:"Url,omitempty" name:"Url"` 778 779 // 此参数用于控制判断 Image 或 Url 中图片包含的人脸,是否在人员库中已有疑似的同一人。 780 // 如果判断为已有相同人在人员库中,则不会创建新的人员,返回疑似同一人的人员信息。 781 // 如果判断没有,则完成创建人员。 782 // 0: 不进行判断,无论是否有疑似同一人在库中均完成入库; 783 // 1:较低的同一人判断要求(百一误识别率); 784 // 2: 一般的同一人判断要求(千一误识别率); 785 // 3: 较高的同一人判断要求(万一误识别率); 786 // 4: 很高的同一人判断要求(十万一误识别率)。 787 // 默认 0。 788 // 注: 要求越高,则疑似同一人的概率越小。不同要求对应的误识别率仅为参考值,您可以根据实际情况调整。 789 UniquePersonControl *uint64 `json:"UniquePersonControl,omitempty" name:"UniquePersonControl"` 790 791 // 图片质量控制。 792 // 0: 不进行控制; 793 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 794 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 795 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 796 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 797 // 默认 0。 798 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 799 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 800 801 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 802 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 803} 804 805func (r *CreatePersonRequest) ToJsonString() string { 806 b, _ := json.Marshal(r) 807 return string(b) 808} 809 810// It is highly **NOT** recommended to use this function 811// because it has no param check, nor strict type check 812func (r *CreatePersonRequest) FromJsonString(s string) error { 813 f := make(map[string]interface{}) 814 if err := json.Unmarshal([]byte(s), &f); err != nil { 815 return err 816 } 817 delete(f, "GroupId") 818 delete(f, "PersonName") 819 delete(f, "PersonId") 820 delete(f, "Gender") 821 delete(f, "PersonExDescriptionInfos") 822 delete(f, "Image") 823 delete(f, "Url") 824 delete(f, "UniquePersonControl") 825 delete(f, "QualityControl") 826 delete(f, "NeedRotateDetection") 827 if len(f) > 0 { 828 return errors.New("CreatePersonRequest has unknown keys!") 829 } 830 return json.Unmarshal([]byte(s), &r) 831} 832 833type CreatePersonResponse struct { 834 *tchttp.BaseResponse 835 Response *struct { 836 837 // 人脸图片唯一标识。 838 FaceId *string `json:"FaceId,omitempty" name:"FaceId"` 839 840 // 检测出的人脸框的位置。 841 // 注意:此字段可能返回 null,表示取不到有效值。 842 FaceRect *FaceRect `json:"FaceRect,omitempty" name:"FaceRect"` 843 844 // 疑似同一人的PersonId。 845 // 当 UniquePersonControl 参数不为0且人员库中有疑似的同一人,此参数才有意义。 846 SimilarPersonId *string `json:"SimilarPersonId,omitempty" name:"SimilarPersonId"` 847 848 // 人脸识别所用的算法模型版本。 849 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 850 851 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 852 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 853 } `json:"Response"` 854} 855 856func (r *CreatePersonResponse) ToJsonString() string { 857 b, _ := json.Marshal(r) 858 return string(b) 859} 860 861// It is highly **NOT** recommended to use this function 862// because it has no param check, nor strict type check 863func (r *CreatePersonResponse) FromJsonString(s string) error { 864 return json.Unmarshal([]byte(s), &r) 865} 866 867type DeleteFaceRequest struct { 868 *tchttp.BaseRequest 869 870 // 人员ID,取值为创建人员接口中的PersonId 871 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 872 873 // 待删除的人脸ID列表,数组元素取值为增加人脸接口返回的FaceId 874 FaceIds []*string `json:"FaceIds,omitempty" name:"FaceIds" list` 875} 876 877func (r *DeleteFaceRequest) ToJsonString() string { 878 b, _ := json.Marshal(r) 879 return string(b) 880} 881 882// It is highly **NOT** recommended to use this function 883// because it has no param check, nor strict type check 884func (r *DeleteFaceRequest) FromJsonString(s string) error { 885 f := make(map[string]interface{}) 886 if err := json.Unmarshal([]byte(s), &f); err != nil { 887 return err 888 } 889 delete(f, "PersonId") 890 delete(f, "FaceIds") 891 if len(f) > 0 { 892 return errors.New("DeleteFaceRequest has unknown keys!") 893 } 894 return json.Unmarshal([]byte(s), &r) 895} 896 897type DeleteFaceResponse struct { 898 *tchttp.BaseResponse 899 Response *struct { 900 901 // 删除成功的人脸数量 902 SucDeletedNum *uint64 `json:"SucDeletedNum,omitempty" name:"SucDeletedNum"` 903 904 // 删除成功的人脸ID列表 905 SucFaceIds []*string `json:"SucFaceIds,omitempty" name:"SucFaceIds" list` 906 907 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 908 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 909 } `json:"Response"` 910} 911 912func (r *DeleteFaceResponse) ToJsonString() string { 913 b, _ := json.Marshal(r) 914 return string(b) 915} 916 917// It is highly **NOT** recommended to use this function 918// because it has no param check, nor strict type check 919func (r *DeleteFaceResponse) FromJsonString(s string) error { 920 return json.Unmarshal([]byte(s), &r) 921} 922 923type DeleteGroupRequest struct { 924 *tchttp.BaseRequest 925 926 // 人员库ID,取值为创建人员库接口中的GroupId 927 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 928} 929 930func (r *DeleteGroupRequest) ToJsonString() string { 931 b, _ := json.Marshal(r) 932 return string(b) 933} 934 935// It is highly **NOT** recommended to use this function 936// because it has no param check, nor strict type check 937func (r *DeleteGroupRequest) FromJsonString(s string) error { 938 f := make(map[string]interface{}) 939 if err := json.Unmarshal([]byte(s), &f); err != nil { 940 return err 941 } 942 delete(f, "GroupId") 943 if len(f) > 0 { 944 return errors.New("DeleteGroupRequest has unknown keys!") 945 } 946 return json.Unmarshal([]byte(s), &r) 947} 948 949type DeleteGroupResponse struct { 950 *tchttp.BaseResponse 951 Response *struct { 952 953 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 954 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 955 } `json:"Response"` 956} 957 958func (r *DeleteGroupResponse) ToJsonString() string { 959 b, _ := json.Marshal(r) 960 return string(b) 961} 962 963// It is highly **NOT** recommended to use this function 964// because it has no param check, nor strict type check 965func (r *DeleteGroupResponse) FromJsonString(s string) error { 966 return json.Unmarshal([]byte(s), &r) 967} 968 969type DeletePersonFromGroupRequest struct { 970 *tchttp.BaseRequest 971 972 // 人员ID,取值为创建人员接口中的PersonId 973 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 974 975 // 人员库ID,取值为创建人员库接口中的GroupId 976 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 977} 978 979func (r *DeletePersonFromGroupRequest) ToJsonString() string { 980 b, _ := json.Marshal(r) 981 return string(b) 982} 983 984// It is highly **NOT** recommended to use this function 985// because it has no param check, nor strict type check 986func (r *DeletePersonFromGroupRequest) FromJsonString(s string) error { 987 f := make(map[string]interface{}) 988 if err := json.Unmarshal([]byte(s), &f); err != nil { 989 return err 990 } 991 delete(f, "PersonId") 992 delete(f, "GroupId") 993 if len(f) > 0 { 994 return errors.New("DeletePersonFromGroupRequest has unknown keys!") 995 } 996 return json.Unmarshal([]byte(s), &r) 997} 998 999type DeletePersonFromGroupResponse struct { 1000 *tchttp.BaseResponse 1001 Response *struct { 1002 1003 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1004 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1005 } `json:"Response"` 1006} 1007 1008func (r *DeletePersonFromGroupResponse) ToJsonString() string { 1009 b, _ := json.Marshal(r) 1010 return string(b) 1011} 1012 1013// It is highly **NOT** recommended to use this function 1014// because it has no param check, nor strict type check 1015func (r *DeletePersonFromGroupResponse) FromJsonString(s string) error { 1016 return json.Unmarshal([]byte(s), &r) 1017} 1018 1019type DeletePersonRequest struct { 1020 *tchttp.BaseRequest 1021 1022 // 人员ID,取值为创建人员接口中的PersonId 1023 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 1024} 1025 1026func (r *DeletePersonRequest) ToJsonString() string { 1027 b, _ := json.Marshal(r) 1028 return string(b) 1029} 1030 1031// It is highly **NOT** recommended to use this function 1032// because it has no param check, nor strict type check 1033func (r *DeletePersonRequest) FromJsonString(s string) error { 1034 f := make(map[string]interface{}) 1035 if err := json.Unmarshal([]byte(s), &f); err != nil { 1036 return err 1037 } 1038 delete(f, "PersonId") 1039 if len(f) > 0 { 1040 return errors.New("DeletePersonRequest has unknown keys!") 1041 } 1042 return json.Unmarshal([]byte(s), &r) 1043} 1044 1045type DeletePersonResponse struct { 1046 *tchttp.BaseResponse 1047 Response *struct { 1048 1049 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1050 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1051 } `json:"Response"` 1052} 1053 1054func (r *DeletePersonResponse) ToJsonString() string { 1055 b, _ := json.Marshal(r) 1056 return string(b) 1057} 1058 1059// It is highly **NOT** recommended to use this function 1060// because it has no param check, nor strict type check 1061func (r *DeletePersonResponse) FromJsonString(s string) error { 1062 return json.Unmarshal([]byte(s), &r) 1063} 1064 1065type DenseFaceShape struct { 1066 1067 // 人脸框左上角横坐标。 1068 X *int64 `json:"X,omitempty" name:"X"` 1069 1070 // 人脸框左上角纵坐标。 1071 Y *int64 `json:"Y,omitempty" name:"Y"` 1072 1073 // 人脸框宽度。 1074 Width *int64 `json:"Width,omitempty" name:"Width"` 1075 1076 // 人脸框高度。 1077 Height *int64 `json:"Height,omitempty" name:"Height"` 1078 1079 // 描述左侧眼睛轮廓的 XX 点。 1080 LeftEye []*Point `json:"LeftEye,omitempty" name:"LeftEye" list` 1081 1082 // 描述右侧眼睛轮廓的 XX 点。 1083 RightEye []*Point `json:"RightEye,omitempty" name:"RightEye" list` 1084 1085 // 描述左侧眉毛轮廓的 XX 点。 1086 LeftEyeBrow []*Point `json:"LeftEyeBrow,omitempty" name:"LeftEyeBrow" list` 1087 1088 // 描述右侧眉毛轮廓的 XX 点。 1089 RightEyeBrow []*Point `json:"RightEyeBrow,omitempty" name:"RightEyeBrow" list` 1090 1091 // 描述外嘴巴轮廓的 XX 点, 从左侧开始逆时针返回。 1092 MouthOutside []*Point `json:"MouthOutside,omitempty" name:"MouthOutside" list` 1093 1094 // 描述内嘴巴轮廓的 XX 点,从左侧开始逆时针返回。 1095 MouthInside []*Point `json:"MouthInside,omitempty" name:"MouthInside" list` 1096 1097 // 描述鼻子轮廓的 XX 点。 1098 Nose []*Point `json:"Nose,omitempty" name:"Nose" list` 1099 1100 // 左瞳孔轮廓的 XX 个点。 1101 LeftPupil []*Point `json:"LeftPupil,omitempty" name:"LeftPupil" list` 1102 1103 // 右瞳孔轮廓的 XX 个点。 1104 RightPupil []*Point `json:"RightPupil,omitempty" name:"RightPupil" list` 1105 1106 // 中轴线轮廓的 XX 个点。 1107 CentralAxis []*Point `json:"CentralAxis,omitempty" name:"CentralAxis" list` 1108 1109 // 下巴轮廓的 XX 个点。 1110 Chin []*Point `json:"Chin,omitempty" name:"Chin" list` 1111 1112 // 左眼袋的 XX 个点。 1113 LeftEyeBags []*Point `json:"LeftEyeBags,omitempty" name:"LeftEyeBags" list` 1114 1115 // 右眼袋的 XX 个点。 1116 RightEyeBags []*Point `json:"RightEyeBags,omitempty" name:"RightEyeBags" list` 1117 1118 // 额头的 XX 个点。 1119 Forehead []*Point `json:"Forehead,omitempty" name:"Forehead" list` 1120} 1121 1122type DetectFaceAttributesRequest struct { 1123 *tchttp.BaseRequest 1124 1125 // 最多处理的人脸数目。 1126 // 默认值为1(仅检测图片中面积最大的那张人脸),最大值为120。 1127 // 此参数用于控制处理待检测图片中的人脸个数,值越小,处理速度越快。 1128 MaxFaceNum *uint64 `json:"MaxFaceNum,omitempty" name:"MaxFaceNum"` 1129 1130 // 图片 base64 数据,base64 编码后大小不可超过5M。 1131 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1132 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1133 Image *string `json:"Image,omitempty" name:"Image"` 1134 1135 // 图片的 Url 。 1136 // 对应图片 base64 编码后大小不可超过5M。 1137 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1138 // Url、Image必须提供一个,如果都提供,只使用 Url。 1139 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 1140 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 1141 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1142 Url *string `json:"Url,omitempty" name:"Url"` 1143 1144 // 是否返回年龄、性别、情绪等属性。 1145 // 合法值为(大小写不敏感):None、Age、Beauty、Emotion、Eye、Eyebrow 1146 // Gender、Hair、Hat、Headpose、Mask、Mouth、Moustache、Nose、Shape、Skin、Smile。 1147 // None为不需要返回。默认为 None。 1148 // 需要将属性组成一个用逗号分隔的字符串,属性之间的顺序没有要求。 1149 // 关于各属性的详细描述,参见下文出参。 1150 // 最多返回面积最大的 5 张人脸属性信息,超过 5 张人脸(第 6 张及以后的人脸)的 AttributesInfo 不具备参考意义。 1151 FaceAttributesType *string `json:"FaceAttributesType,omitempty" name:"FaceAttributesType"` 1152 1153 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 1154 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 1155 1156 // 人脸识别服务所用的算法模型版本。本接口仅支持“3.0”输入 1157 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1158} 1159 1160func (r *DetectFaceAttributesRequest) ToJsonString() string { 1161 b, _ := json.Marshal(r) 1162 return string(b) 1163} 1164 1165// It is highly **NOT** recommended to use this function 1166// because it has no param check, nor strict type check 1167func (r *DetectFaceAttributesRequest) FromJsonString(s string) error { 1168 f := make(map[string]interface{}) 1169 if err := json.Unmarshal([]byte(s), &f); err != nil { 1170 return err 1171 } 1172 delete(f, "MaxFaceNum") 1173 delete(f, "Image") 1174 delete(f, "Url") 1175 delete(f, "FaceAttributesType") 1176 delete(f, "NeedRotateDetection") 1177 delete(f, "FaceModelVersion") 1178 if len(f) > 0 { 1179 return errors.New("DetectFaceAttributesRequest has unknown keys!") 1180 } 1181 return json.Unmarshal([]byte(s), &r) 1182} 1183 1184type DetectFaceAttributesResponse struct { 1185 *tchttp.BaseResponse 1186 Response *struct { 1187 1188 // 请求的图片宽度。 1189 ImageWidth *uint64 `json:"ImageWidth,omitempty" name:"ImageWidth"` 1190 1191 // 请求的图片高度。 1192 ImageHeight *uint64 `json:"ImageHeight,omitempty" name:"ImageHeight"` 1193 1194 // 人脸信息列表。 1195 FaceDetailInfos []*FaceDetailInfo `json:"FaceDetailInfos,omitempty" name:"FaceDetailInfos" list` 1196 1197 // 人脸识别所用的算法模型版本。 1198 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1199 1200 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1201 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1202 } `json:"Response"` 1203} 1204 1205func (r *DetectFaceAttributesResponse) ToJsonString() string { 1206 b, _ := json.Marshal(r) 1207 return string(b) 1208} 1209 1210// It is highly **NOT** recommended to use this function 1211// because it has no param check, nor strict type check 1212func (r *DetectFaceAttributesResponse) FromJsonString(s string) error { 1213 return json.Unmarshal([]byte(s), &r) 1214} 1215 1216type DetectFaceRequest struct { 1217 *tchttp.BaseRequest 1218 1219 // 最多处理的人脸数目。默认值为1(仅检测图片中面积最大的那张人脸),最大值为120。 1220 // 此参数用于控制处理待检测图片中的人脸个数,值越小,处理速度越快。 1221 MaxFaceNum *uint64 `json:"MaxFaceNum,omitempty" name:"MaxFaceNum"` 1222 1223 // 人脸长和宽的最小尺寸,单位为像素。 1224 // 默认为34。建议不低于34。 1225 // 低于MinFaceSize值的人脸不会被检测。 1226 MinFaceSize *uint64 `json:"MinFaceSize,omitempty" name:"MinFaceSize"` 1227 1228 // 图片 base64 数据,base64 编码后大小不可超过5M。 1229 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1230 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1231 Image *string `json:"Image,omitempty" name:"Image"` 1232 1233 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 1234 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1235 // Url、Image必须提供一个,如果都提供,只使用 Url。 1236 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 1237 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 1238 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1239 Url *string `json:"Url,omitempty" name:"Url"` 1240 1241 // 是否需要返回人脸属性信息(FaceAttributesInfo)。0 为不需要返回,1 为需要返回。默认为 0。 1242 // 非 1 值均视为不需要返回,此时 FaceAttributesInfo 不具备参考意义。 1243 // 最多返回面积最大的 5 张人脸属性信息,超过 5 张人脸(第 6 张及以后的人脸)的 FaceAttributesInfo 不具备参考意义。 1244 // 提取人脸属性信息较为耗时,如不需要人脸属性信息,建议关闭此项功能,加快人脸检测速度。 1245 NeedFaceAttributes *uint64 `json:"NeedFaceAttributes,omitempty" name:"NeedFaceAttributes"` 1246 1247 // 是否开启质量检测。0 为关闭,1 为开启。默认为 0。 1248 // 非 1 值均视为不进行质量检测。 1249 // 最多返回面积最大的 30 张人脸质量分信息,超过 30 张人脸(第 31 张及以后的人脸)的 FaceQualityInfo不具备参考意义。 1250 // 建议:人脸入库操作建议开启此功能。 1251 NeedQualityDetection *uint64 `json:"NeedQualityDetection,omitempty" name:"NeedQualityDetection"` 1252 1253 // 人脸识别服务所用的算法模型版本。 1254 // 1255 // 目前入参支持 “2.0”和“3.0“ 两个输入。 1256 // 1257 // 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。 1258 // 1259 // 2020年11月26日后开通服务的账号仅支持输入“3.0”。 1260 // 1261 // 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。 1262 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1263 1264 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 1265 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 1266} 1267 1268func (r *DetectFaceRequest) ToJsonString() string { 1269 b, _ := json.Marshal(r) 1270 return string(b) 1271} 1272 1273// It is highly **NOT** recommended to use this function 1274// because it has no param check, nor strict type check 1275func (r *DetectFaceRequest) FromJsonString(s string) error { 1276 f := make(map[string]interface{}) 1277 if err := json.Unmarshal([]byte(s), &f); err != nil { 1278 return err 1279 } 1280 delete(f, "MaxFaceNum") 1281 delete(f, "MinFaceSize") 1282 delete(f, "Image") 1283 delete(f, "Url") 1284 delete(f, "NeedFaceAttributes") 1285 delete(f, "NeedQualityDetection") 1286 delete(f, "FaceModelVersion") 1287 delete(f, "NeedRotateDetection") 1288 if len(f) > 0 { 1289 return errors.New("DetectFaceRequest has unknown keys!") 1290 } 1291 return json.Unmarshal([]byte(s), &r) 1292} 1293 1294type DetectFaceResponse struct { 1295 *tchttp.BaseResponse 1296 Response *struct { 1297 1298 // 请求的图片宽度。 1299 ImageWidth *int64 `json:"ImageWidth,omitempty" name:"ImageWidth"` 1300 1301 // 请求的图片高度。 1302 ImageHeight *int64 `json:"ImageHeight,omitempty" name:"ImageHeight"` 1303 1304 // 人脸信息列表。包含人脸坐标信息、属性信息(若需要)、质量分信息(若需要)。 1305 FaceInfos []*FaceInfo `json:"FaceInfos,omitempty" name:"FaceInfos" list` 1306 1307 // 人脸识别所用的算法模型版本。 1308 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1309 1310 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1311 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1312 } `json:"Response"` 1313} 1314 1315func (r *DetectFaceResponse) ToJsonString() string { 1316 b, _ := json.Marshal(r) 1317 return string(b) 1318} 1319 1320// It is highly **NOT** recommended to use this function 1321// because it has no param check, nor strict type check 1322func (r *DetectFaceResponse) FromJsonString(s string) error { 1323 return json.Unmarshal([]byte(s), &r) 1324} 1325 1326type DetectLiveFaceAccurateRequest struct { 1327 *tchttp.BaseRequest 1328 1329 // 图片 base64 数据,base64 编码后大小不可超过5M。 1330 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1331 // 图片的宽高比请接近 3:4,手机拍摄比例最佳。 1332 // 人脸尺寸大于100X100像素。 1333 // 图片格式支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1334 Image *string `json:"Image,omitempty" name:"Image"` 1335 1336 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 1337 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1338 // Url、Image必须提供一个,如果都提供,只使用 Url。 1339 // 图片的宽高比请接近 3:4,手机拍摄比例最佳。 1340 // 人脸尺寸大于100X100像素。 1341 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的Url速度和稳定性可能受一定影响。 1342 // 图片格式支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1343 Url *string `json:"Url,omitempty" name:"Url"` 1344 1345 // 人脸识别服务所用的算法模型版本。目前入参支持“3.0“。 1346 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1347} 1348 1349func (r *DetectLiveFaceAccurateRequest) ToJsonString() string { 1350 b, _ := json.Marshal(r) 1351 return string(b) 1352} 1353 1354// It is highly **NOT** recommended to use this function 1355// because it has no param check, nor strict type check 1356func (r *DetectLiveFaceAccurateRequest) FromJsonString(s string) error { 1357 f := make(map[string]interface{}) 1358 if err := json.Unmarshal([]byte(s), &f); err != nil { 1359 return err 1360 } 1361 delete(f, "Image") 1362 delete(f, "Url") 1363 delete(f, "FaceModelVersion") 1364 if len(f) > 0 { 1365 return errors.New("DetectLiveFaceAccurateRequest has unknown keys!") 1366 } 1367 return json.Unmarshal([]byte(s), &r) 1368} 1369 1370type DetectLiveFaceAccurateResponse struct { 1371 *tchttp.BaseResponse 1372 Response *struct { 1373 1374 // 活体打分,取值范围 [0,100],根据活体分数对应的阈值区间来判断是否为翻拍。目前阈值可分为[5,10,40,70,90],其中推荐阈值为40。 1375 Score *float64 `json:"Score,omitempty" name:"Score"` 1376 1377 // 人脸识别所用的算法模型版本。 1378 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1379 1380 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1381 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1382 } `json:"Response"` 1383} 1384 1385func (r *DetectLiveFaceAccurateResponse) ToJsonString() string { 1386 b, _ := json.Marshal(r) 1387 return string(b) 1388} 1389 1390// It is highly **NOT** recommended to use this function 1391// because it has no param check, nor strict type check 1392func (r *DetectLiveFaceAccurateResponse) FromJsonString(s string) error { 1393 return json.Unmarshal([]byte(s), &r) 1394} 1395 1396type DetectLiveFaceRequest struct { 1397 *tchttp.BaseRequest 1398 1399 // 图片 base64 数据,base64 编码后大小不可超过5M。 1400 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。(图片的宽高比请接近3:4,不符合宽高比的图片返回的分值不具备参考意义)。 1401 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1402 Image *string `json:"Image,omitempty" name:"Image"` 1403 1404 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 1405 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 1406 // Url、Image必须提供一个,如果都提供,只使用 Url。 1407 // (图片的宽高比请接近 3:4,不符合宽高比的图片返回的分值不具备参考意义) 1408 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 1409 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 1410 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 1411 Url *string `json:"Url,omitempty" name:"Url"` 1412 1413 // 人脸识别服务所用的算法模型版本。 1414 // 1415 // 目前入参支持 “2.0”和“3.0“ 两个输入。 1416 // 1417 // 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。 1418 // 1419 // 2020年11月26日后开通服务的账号仅支持输入“3.0”。 1420 // 1421 // 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。 1422 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1423} 1424 1425func (r *DetectLiveFaceRequest) ToJsonString() string { 1426 b, _ := json.Marshal(r) 1427 return string(b) 1428} 1429 1430// It is highly **NOT** recommended to use this function 1431// because it has no param check, nor strict type check 1432func (r *DetectLiveFaceRequest) FromJsonString(s string) error { 1433 f := make(map[string]interface{}) 1434 if err := json.Unmarshal([]byte(s), &f); err != nil { 1435 return err 1436 } 1437 delete(f, "Image") 1438 delete(f, "Url") 1439 delete(f, "FaceModelVersion") 1440 if len(f) > 0 { 1441 return errors.New("DetectLiveFaceRequest has unknown keys!") 1442 } 1443 return json.Unmarshal([]byte(s), &r) 1444} 1445 1446type DetectLiveFaceResponse struct { 1447 *tchttp.BaseResponse 1448 Response *struct { 1449 1450 // 活体打分,取值范围 [0,100],分数一般落于[80, 100]区间内,0分也为常见值。推荐相大于 87 时可判断为活体。可根据具体场景自行调整阈值。 1451 // 本字段当且仅当FaceModelVersion为2.0时才具备参考意义。 1452 Score *float64 `json:"Score,omitempty" name:"Score"` 1453 1454 // 人脸识别所用的算法模型版本。 1455 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1456 1457 // 活体检测是否通过。 1458 // 本字段只有FaceModelVersion为3.0时才具备参考意义。 1459 IsLiveness *bool `json:"IsLiveness,omitempty" name:"IsLiveness"` 1460 1461 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1462 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1463 } `json:"Response"` 1464} 1465 1466func (r *DetectLiveFaceResponse) ToJsonString() string { 1467 b, _ := json.Marshal(r) 1468 return string(b) 1469} 1470 1471// It is highly **NOT** recommended to use this function 1472// because it has no param check, nor strict type check 1473func (r *DetectLiveFaceResponse) FromJsonString(s string) error { 1474 return json.Unmarshal([]byte(s), &r) 1475} 1476 1477type EstimateCheckSimilarPersonCostTimeRequest struct { 1478 *tchttp.BaseRequest 1479 1480 // 待整理的人员库列表。 1481 // 人员库总人数不可超过200万,人员库个数不可超过10个。 1482 // 数组元素取值为创建人员库接口中的GroupId 1483 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 1484} 1485 1486func (r *EstimateCheckSimilarPersonCostTimeRequest) ToJsonString() string { 1487 b, _ := json.Marshal(r) 1488 return string(b) 1489} 1490 1491// It is highly **NOT** recommended to use this function 1492// because it has no param check, nor strict type check 1493func (r *EstimateCheckSimilarPersonCostTimeRequest) FromJsonString(s string) error { 1494 f := make(map[string]interface{}) 1495 if err := json.Unmarshal([]byte(s), &f); err != nil { 1496 return err 1497 } 1498 delete(f, "GroupIds") 1499 if len(f) > 0 { 1500 return errors.New("EstimateCheckSimilarPersonCostTimeRequest has unknown keys!") 1501 } 1502 return json.Unmarshal([]byte(s), &r) 1503} 1504 1505type EstimateCheckSimilarPersonCostTimeResponse struct { 1506 *tchttp.BaseResponse 1507 Response *struct { 1508 1509 // 人员查重任务预估需要耗费时间。 单位为分钟。 1510 EstimatedTimeCost *uint64 `json:"EstimatedTimeCost,omitempty" name:"EstimatedTimeCost"` 1511 1512 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1513 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1514 } `json:"Response"` 1515} 1516 1517func (r *EstimateCheckSimilarPersonCostTimeResponse) ToJsonString() string { 1518 b, _ := json.Marshal(r) 1519 return string(b) 1520} 1521 1522// It is highly **NOT** recommended to use this function 1523// because it has no param check, nor strict type check 1524func (r *EstimateCheckSimilarPersonCostTimeResponse) FromJsonString(s string) error { 1525 return json.Unmarshal([]byte(s), &r) 1526} 1527 1528type Eye struct { 1529 1530 // 识别是否佩戴眼镜。 1531 // AttributeItem对应的Type为 —— 0:无眼镜,1:普通眼镜,2:墨镜 1532 Glass *AttributeItem `json:"Glass,omitempty" name:"Glass"` 1533 1534 // 识别眼睛的睁开、闭合状态。 1535 // AttributeItem对应的Type为 —— 0:睁开,1:闭眼 1536 EyeOpen *AttributeItem `json:"EyeOpen,omitempty" name:"EyeOpen"` 1537 1538 // 识别是否双眼皮。 1539 // AttributeItem对应的Type为 —— 0:无,1:有。 1540 EyelidType *AttributeItem `json:"EyelidType,omitempty" name:"EyelidType"` 1541 1542 // 眼睛大小。 1543 // AttributeItem对应的Type为 —— 0:小眼睛,1:普通眼睛,2:大眼睛。 1544 EyeSize *AttributeItem `json:"EyeSize,omitempty" name:"EyeSize"` 1545} 1546 1547type Eyebrow struct { 1548 1549 // 眉毛浓密。 1550 // AttributeItem对应的Type为 —— 0:淡眉,1:浓眉。 1551 EyebrowDensity *AttributeItem `json:"EyebrowDensity,omitempty" name:"EyebrowDensity"` 1552 1553 // 眉毛弯曲。 1554 // AttributeItem对应的Type为 —— 0:不弯,1:弯眉。 1555 EyebrowCurve *AttributeItem `json:"EyebrowCurve,omitempty" name:"EyebrowCurve"` 1556 1557 // 眉毛长短。 1558 // AttributeItem对应的Type为 —— 0:短眉毛,1:长眉毛。 1559 EyebrowLength *AttributeItem `json:"EyebrowLength,omitempty" name:"EyebrowLength"` 1560} 1561 1562type FaceAttributesInfo struct { 1563 1564 // 性别[0~49]为女性,[50,100]为男性,越接近0和100表示置信度越高。NeedFaceAttributes 不为 1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1565 Gender *int64 `json:"Gender,omitempty" name:"Gender"` 1566 1567 // 年龄 [0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1568 Age *int64 `json:"Age,omitempty" name:"Age"` 1569 1570 // 微笑[0(normal,正常)~50(smile,微笑)~100(laugh,大笑)]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1571 Expression *int64 `json:"Expression,omitempty" name:"Expression"` 1572 1573 // 是否有眼镜 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1574 Glass *bool `json:"Glass,omitempty" name:"Glass"` 1575 1576 // 上下偏移[-30,30],单位角度。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1577 // 建议:人脸入库选择[-10,10]的图片。 1578 Pitch *int64 `json:"Pitch,omitempty" name:"Pitch"` 1579 1580 // 左右偏移[-30,30],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1581 // 建议:人脸入库选择[-10,10]的图片。 1582 Yaw *int64 `json:"Yaw,omitempty" name:"Yaw"` 1583 1584 // 平面旋转[-180,180],单位角度。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1585 // 建议:人脸入库选择[-20,20]的图片。 1586 Roll *int64 `json:"Roll,omitempty" name:"Roll"` 1587 1588 // 魅力[0~100]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1589 Beauty *int64 `json:"Beauty,omitempty" name:"Beauty"` 1590 1591 // 是否有帽子 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1592 // 注意:此字段可能返回 null,表示取不到有效值。 1593 Hat *bool `json:"Hat,omitempty" name:"Hat"` 1594 1595 // 是否有口罩 [true,false]。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1596 // 注意:此字段可能返回 null,表示取不到有效值。 1597 Mask *bool `json:"Mask,omitempty" name:"Mask"` 1598 1599 // 头发信息,包含头发长度(length)、有无刘海(bang)、头发颜色(color)。NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1600 // 注意:此字段可能返回 null,表示取不到有效值。 1601 Hair *FaceHairAttributesInfo `json:"Hair,omitempty" name:"Hair"` 1602 1603 // 双眼是否睁开 [true,false]。只要有超过一只眼睛闭眼,就返回false。 NeedFaceAttributes 不为1 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1604 // 注意:此字段可能返回 null,表示取不到有效值。 1605 EyeOpen *bool `json:"EyeOpen,omitempty" name:"EyeOpen"` 1606} 1607 1608type FaceDetailAttributesInfo struct { 1609 1610 // 年龄 [0,65],其中65代表“65岁及以上”。 1611 // FaceAttributesType 不为含Age 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1612 Age *int64 `json:"Age,omitempty" name:"Age"` 1613 1614 // 美丑打分[0,100]。 1615 // FaceAttributesType 不含 Beauty 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1616 Beauty *int64 `json:"Beauty,omitempty" name:"Beauty"` 1617 1618 // 情绪,可识别自然、高兴、惊讶、生气、悲伤、厌恶、害怕。 1619 // AttributeItem对应的Type为 —— 0:自然,1:高兴,2:惊讶,3:生气,4:悲伤,5:厌恶,6:害怕 1620 // FaceAttributesType 不含Emotion 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1621 Emotion *AttributeItem `json:"Emotion,omitempty" name:"Emotion"` 1622 1623 // 眼睛相关信息,可识别是否戴眼镜、是否闭眼、是否双眼皮和眼睛大小。 1624 // FaceAttributesType 不含Eye 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1625 Eye *Eye `json:"Eye,omitempty" name:"Eye"` 1626 1627 // 眉毛相关信息,可识别眉毛浓密、弯曲、长短信息。 1628 // FaceAttributesType 不含Eyebrow 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1629 Eyebrow *Eyebrow `json:"Eyebrow,omitempty" name:"Eyebrow"` 1630 1631 // 性别信息。 1632 // AttributeItem对应的Type为 —— 0:男性,1:女性。 1633 // FaceAttributesType 不含Gender 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1634 Gender *AttributeItem `json:"Gender,omitempty" name:"Gender"` 1635 1636 // 头发信息,包含头发长度、有无刘海、头发颜色。 1637 // FaceAttributesType 不含Hair 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1638 Hair *Hair `json:"Hair,omitempty" name:"Hair"` 1639 1640 // 帽子信息,可识别是否佩戴帽子、帽子款式、帽子颜色。 1641 // FaceAttributesType 不含Hat 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1642 Hat *Hat `json:"Hat,omitempty" name:"Hat"` 1643 1644 // 姿态信息,包含人脸的上下偏移、左右偏移、平面旋转信息。 1645 // FaceAttributesType 不含Headpose 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1646 HeadPose *HeadPose `json:"HeadPose,omitempty" name:"HeadPose"` 1647 1648 // 口罩佩戴信息。 1649 // AttributeItem对应的Type为 —— 0: 无口罩, 1: 有口罩不遮脸,2: 有口罩遮下巴,3: 有口罩遮嘴,4: 正确佩戴口罩。 1650 // FaceAttributesType 不含Mask 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1651 Mask *AttributeItem `json:"Mask,omitempty" name:"Mask"` 1652 1653 // 嘴巴信息,可识别是否张嘴、嘴唇厚度。 1654 // FaceAttributesType 不含 Mouth 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1655 Mouth *Mouth `json:"Mouth,omitempty" name:"Mouth"` 1656 1657 // 胡子信息。 1658 // AttributeItem对应的Type为 —— 0:无胡子,1:有胡子。 1659 // FaceAttributesType 不含 Moustache 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1660 Moustache *AttributeItem `json:"Moustache,omitempty" name:"Moustache"` 1661 1662 // 鼻子信息。 1663 // AttributeItem对应的Type为 —— 0:朝天鼻,1:鹰钩鼻,2:普通,3:圆鼻头 1664 // FaceAttributesType 不含 Nose 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1665 Nose *AttributeItem `json:"Nose,omitempty" name:"Nose"` 1666 1667 // 脸型信息。 1668 // AttributeItem对应的Type为 —— 0:方脸,1:三角脸,2:鹅蛋脸,3:心形脸,4:圆脸。 1669 // FaceAttributesType 不含 Shape 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1670 Shape *AttributeItem `json:"Shape,omitempty" name:"Shape"` 1671 1672 // 肤色信息。 1673 // AttributeItem对应的Type为 —— 0:黄色皮肤,1:棕色皮肤,2:黑色皮肤,3:白色皮肤。 1674 // FaceAttributesType 不含 Skin 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1675 Skin *AttributeItem `json:"Skin,omitempty" name:"Skin"` 1676 1677 // 微笑程度,[0,100]。 1678 // FaceAttributesType 不含 Smile 或检测超过 5 张人脸时,此参数仍返回,但不具备参考意义。 1679 Smile *int64 `json:"Smile,omitempty" name:"Smile"` 1680} 1681 1682type FaceDetailInfo struct { 1683 1684 // 检测出的人脸框位置。 1685 FaceRect *FaceRect `json:"FaceRect,omitempty" name:"FaceRect"` 1686 1687 // 人脸属性信息,根据 FaceAttributesType 输入的类型,返回年龄(Age)、颜值(Beauty) 1688 // 情绪(Emotion)、眼睛信息(Eye)、眉毛(Eyebrow)、性别(Gender) 1689 // 头发(Hair)、帽子(Hat)、姿态(Headpose)、口罩(Mask)、嘴巴(Mouse)、胡子(Moustache) 1690 // 鼻子(Nose)、脸型(Shape)、肤色(Skin)、微笑(Smile)等人脸属性信息。 1691 // 若 FaceAttributesType 没有输入相关类型,则FaceDetaiAttributesInfo返回的细项不具备参考意义。 1692 FaceDetailAttributesInfo *FaceDetailAttributesInfo `json:"FaceDetailAttributesInfo,omitempty" name:"FaceDetailAttributesInfo"` 1693} 1694 1695type FaceHairAttributesInfo struct { 1696 1697 // 0:光头,1:短发,2:中发,3:长发,4:绑发 1698 // 注意:此字段可能返回 null,表示取不到有效值。 1699 Length *int64 `json:"Length,omitempty" name:"Length"` 1700 1701 // 0:有刘海,1:无刘海 1702 // 注意:此字段可能返回 null,表示取不到有效值。 1703 Bang *int64 `json:"Bang,omitempty" name:"Bang"` 1704 1705 // 0:黑色,1:金色,2:棕色,3:灰白色 1706 // 注意:此字段可能返回 null,表示取不到有效值。 1707 Color *int64 `json:"Color,omitempty" name:"Color"` 1708} 1709 1710type FaceInfo struct { 1711 1712 // 人脸框左上角横坐标。 1713 // 人脸框包含人脸五官位置并在此基础上进行一定的扩展,若人脸框超出图片范围,会导致坐标负值。 1714 // 若需截取完整人脸,可以在完整分completeness满足需求的情况下,将负值坐标取0。 1715 X *int64 `json:"X,omitempty" name:"X"` 1716 1717 // 人脸框左上角纵坐标。 1718 // 人脸框包含人脸五官位置并在此基础上进行一定的扩展,若人脸框超出图片范围,会导致坐标负值。 1719 // 若需截取完整人脸,可以在完整分completeness满足需求的情况下,将负值坐标取0。 1720 Y *int64 `json:"Y,omitempty" name:"Y"` 1721 1722 // 人脸框宽度。 1723 Width *int64 `json:"Width,omitempty" name:"Width"` 1724 1725 // 人脸框高度。 1726 Height *int64 `json:"Height,omitempty" name:"Height"` 1727 1728 // 人脸属性信息,包含性别( gender )、年龄( age )、表情( expression )、 1729 // 魅力( beauty )、眼镜( glass )、口罩(mask)、头发(hair)和姿态 (pitch,roll,yaw )。只有当 NeedFaceAttributes 设为 1 时才返回有效信息。 1730 FaceAttributesInfo *FaceAttributesInfo `json:"FaceAttributesInfo,omitempty" name:"FaceAttributesInfo"` 1731 1732 // 人脸质量信息,包含质量分(score)、模糊分(sharpness)、光照分(brightness)、遮挡分(completeness)。只有当NeedFaceDetection设为1时才返回有效信息。 1733 // 注意:此字段可能返回 null,表示取不到有效值。 1734 FaceQualityInfo *FaceQualityInfo `json:"FaceQualityInfo,omitempty" name:"FaceQualityInfo"` 1735} 1736 1737type FaceQualityCompleteness struct { 1738 1739 // 眉毛的遮挡分数[0,100],分数越高遮挡越少。 1740 // 参考范围:[0,80]表示发生遮挡。 1741 // 注意:此字段可能返回 null,表示取不到有效值。 1742 Eyebrow *int64 `json:"Eyebrow,omitempty" name:"Eyebrow"` 1743 1744 // 眼睛的遮挡分数[0,100],分数越高遮挡越少。 1745 // 参考范围:[0,80]表示发生遮挡。 1746 // 注意:此字段可能返回 null,表示取不到有效值。 1747 Eye *int64 `json:"Eye,omitempty" name:"Eye"` 1748 1749 // 鼻子的遮挡分数[0,100],分数越高遮挡越少。 1750 // 参考范围:[0,60]表示发生遮挡。 1751 // 注意:此字段可能返回 null,表示取不到有效值。 1752 Nose *int64 `json:"Nose,omitempty" name:"Nose"` 1753 1754 // 脸颊的遮挡分数[0,100],分数越高遮挡越少。 1755 // 参考范围:[0,70]表示发生遮挡。 1756 // 注意:此字段可能返回 null,表示取不到有效值。 1757 Cheek *int64 `json:"Cheek,omitempty" name:"Cheek"` 1758 1759 // 嘴巴的遮挡分数[0,100],分数越高遮挡越少。 1760 // 参考范围:[0,50]表示发生遮挡。 1761 // 注意:此字段可能返回 null,表示取不到有效值。 1762 Mouth *int64 `json:"Mouth,omitempty" name:"Mouth"` 1763 1764 // 下巴的遮挡分数[0,100],分数越高遮挡越少。 1765 // 参考范围:[0,70]表示发生遮挡。 1766 // 注意:此字段可能返回 null,表示取不到有效值。 1767 Chin *int64 `json:"Chin,omitempty" name:"Chin"` 1768} 1769 1770type FaceQualityInfo struct { 1771 1772 // 质量分: [0,100],综合评价图像质量是否适合人脸识别,分数越高质量越好。 1773 // 正常情况,只需要使用Score作为质量分总体的判断标准即可。Sharpness、Brightness、Completeness等细项分仅供参考。 1774 // 参考范围:[0,40]较差,[40,60] 一般,[60,80]较好,[80,100]很好。 1775 // 建议:人脸入库选取70以上的图片。 1776 // 注意:此字段可能返回 null,表示取不到有效值。 1777 Score *int64 `json:"Score,omitempty" name:"Score"` 1778 1779 // 清晰分:[0,100],评价图片清晰程度,分数越高越清晰。 1780 // 参考范围:[0,40]特别模糊,[40,60]模糊,[60,80]一般,[80,100]清晰。 1781 // 建议:人脸入库选取80以上的图片。 1782 // 注意:此字段可能返回 null,表示取不到有效值。 1783 Sharpness *int64 `json:"Sharpness,omitempty" name:"Sharpness"` 1784 1785 // 光照分:[0,100],评价图片光照程度,分数越高越亮。 1786 // 参考范围: [0,30]偏暗,[30,70]光照正常,[70,100]偏亮。 1787 // 建议:人脸入库选取[30,70]的图片。 1788 // 注意:此字段可能返回 null,表示取不到有效值。 1789 Brightness *int64 `json:"Brightness,omitempty" name:"Brightness"` 1790 1791 // 五官遮挡分,评价眉毛(Eyebrow)、眼睛(Eye)、鼻子(Nose)、脸颊(Cheek)、嘴巴(Mouth)、下巴(Chin)的被遮挡程度。 1792 // 注意:此字段可能返回 null,表示取不到有效值。 1793 Completeness *FaceQualityCompleteness `json:"Completeness,omitempty" name:"Completeness"` 1794} 1795 1796type FaceRect struct { 1797 1798 // 人脸框左上角横坐标。 1799 // 人脸框包含人脸五官位置并在此基础上进行一定的扩展,若人脸框超出图片范围,会导致坐标负值。 1800 // 若需截取完整人脸,可以在完整分completess满足需求的情况下,将负值坐标取0。 1801 X *int64 `json:"X,omitempty" name:"X"` 1802 1803 // 人脸框左上角纵坐标。 1804 // 人脸框包含人脸五官位置并在此基础上进行一定的扩展,若人脸框超出图片范围,会导致坐标负值。 1805 // 若需截取完整人脸,可以在完整分completess满足需求的情况下,将负值坐标取0。 1806 Y *int64 `json:"Y,omitempty" name:"Y"` 1807 1808 // 人脸宽度 1809 Width *uint64 `json:"Width,omitempty" name:"Width"` 1810 1811 // 人脸高度 1812 Height *uint64 `json:"Height,omitempty" name:"Height"` 1813} 1814 1815type FaceShape struct { 1816 1817 // 描述脸型轮廓的 21 点。 1818 FaceProfile []*Point `json:"FaceProfile,omitempty" name:"FaceProfile" list` 1819 1820 // 描述左侧眼睛轮廓的 8 点。 1821 LeftEye []*Point `json:"LeftEye,omitempty" name:"LeftEye" list` 1822 1823 // 描述右侧眼睛轮廓的 8 点。 1824 RightEye []*Point `json:"RightEye,omitempty" name:"RightEye" list` 1825 1826 // 描述左侧眉毛轮廓的 8 点。 1827 LeftEyeBrow []*Point `json:"LeftEyeBrow,omitempty" name:"LeftEyeBrow" list` 1828 1829 // 描述右侧眉毛轮廓的 8 点。 1830 RightEyeBrow []*Point `json:"RightEyeBrow,omitempty" name:"RightEyeBrow" list` 1831 1832 // 描述嘴巴轮廓的 22 点。 1833 Mouth []*Point `json:"Mouth,omitempty" name:"Mouth" list` 1834 1835 // 描述鼻子轮廓的 13 点。 1836 Nose []*Point `json:"Nose,omitempty" name:"Nose" list` 1837 1838 // 左瞳孔轮廓的 1 个点。 1839 LeftPupil []*Point `json:"LeftPupil,omitempty" name:"LeftPupil" list` 1840 1841 // 右瞳孔轮廓的 1 个点。 1842 RightPupil []*Point `json:"RightPupil,omitempty" name:"RightPupil" list` 1843} 1844 1845type GetCheckSimilarPersonJobIdListRequest struct { 1846 *tchttp.BaseRequest 1847 1848 // 起始序号,默认值为0。 1849 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 1850 1851 // 返回数量,默认值为10,最大值为1000。 1852 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 1853} 1854 1855func (r *GetCheckSimilarPersonJobIdListRequest) ToJsonString() string { 1856 b, _ := json.Marshal(r) 1857 return string(b) 1858} 1859 1860// It is highly **NOT** recommended to use this function 1861// because it has no param check, nor strict type check 1862func (r *GetCheckSimilarPersonJobIdListRequest) FromJsonString(s string) error { 1863 f := make(map[string]interface{}) 1864 if err := json.Unmarshal([]byte(s), &f); err != nil { 1865 return err 1866 } 1867 delete(f, "Offset") 1868 delete(f, "Limit") 1869 if len(f) > 0 { 1870 return errors.New("GetCheckSimilarPersonJobIdListRequest has unknown keys!") 1871 } 1872 return json.Unmarshal([]byte(s), &r) 1873} 1874 1875type GetCheckSimilarPersonJobIdListResponse struct { 1876 *tchttp.BaseResponse 1877 Response *struct { 1878 1879 // 人员查重任务信息列表。 1880 JobIdInfos []*JobIdInfo `json:"JobIdInfos,omitempty" name:"JobIdInfos" list` 1881 1882 // 查重任务总数量。 1883 JobIdNum *uint64 `json:"JobIdNum,omitempty" name:"JobIdNum"` 1884 1885 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1886 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1887 } `json:"Response"` 1888} 1889 1890func (r *GetCheckSimilarPersonJobIdListResponse) ToJsonString() string { 1891 b, _ := json.Marshal(r) 1892 return string(b) 1893} 1894 1895// It is highly **NOT** recommended to use this function 1896// because it has no param check, nor strict type check 1897func (r *GetCheckSimilarPersonJobIdListResponse) FromJsonString(s string) error { 1898 return json.Unmarshal([]byte(s), &r) 1899} 1900 1901type GetGroupInfoRequest struct { 1902 *tchttp.BaseRequest 1903 1904 // 人员库 ID,取值为创建人员库接口中的GroupId 1905 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 1906} 1907 1908func (r *GetGroupInfoRequest) ToJsonString() string { 1909 b, _ := json.Marshal(r) 1910 return string(b) 1911} 1912 1913// It is highly **NOT** recommended to use this function 1914// because it has no param check, nor strict type check 1915func (r *GetGroupInfoRequest) FromJsonString(s string) error { 1916 f := make(map[string]interface{}) 1917 if err := json.Unmarshal([]byte(s), &f); err != nil { 1918 return err 1919 } 1920 delete(f, "GroupId") 1921 if len(f) > 0 { 1922 return errors.New("GetGroupInfoRequest has unknown keys!") 1923 } 1924 return json.Unmarshal([]byte(s), &r) 1925} 1926 1927type GetGroupInfoResponse struct { 1928 *tchttp.BaseResponse 1929 Response *struct { 1930 1931 // 人员库名称 1932 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 1933 1934 // 人员库ID 1935 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 1936 1937 // 人员库自定义描述字段 1938 GroupExDescriptions []*string `json:"GroupExDescriptions,omitempty" name:"GroupExDescriptions" list` 1939 1940 // 人员库信息备注 1941 Tag *string `json:"Tag,omitempty" name:"Tag"` 1942 1943 // 人脸识别所用的算法模型版本。 1944 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 1945 1946 // Group的创建时间和日期 CreationTimestamp。CreationTimestamp 的值是自 Unix 纪元时间到Group创建时间的毫秒数。 1947 CreationTimestamp *uint64 `json:"CreationTimestamp,omitempty" name:"CreationTimestamp"` 1948 1949 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 1950 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 1951 } `json:"Response"` 1952} 1953 1954func (r *GetGroupInfoResponse) ToJsonString() string { 1955 b, _ := json.Marshal(r) 1956 return string(b) 1957} 1958 1959// It is highly **NOT** recommended to use this function 1960// because it has no param check, nor strict type check 1961func (r *GetGroupInfoResponse) FromJsonString(s string) error { 1962 return json.Unmarshal([]byte(s), &r) 1963} 1964 1965type GetGroupListRequest struct { 1966 *tchttp.BaseRequest 1967 1968 // 起始序号,默认值为0 1969 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 1970 1971 // 返回数量,默认值为10,最大值为1000 1972 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 1973} 1974 1975func (r *GetGroupListRequest) ToJsonString() string { 1976 b, _ := json.Marshal(r) 1977 return string(b) 1978} 1979 1980// It is highly **NOT** recommended to use this function 1981// because it has no param check, nor strict type check 1982func (r *GetGroupListRequest) FromJsonString(s string) error { 1983 f := make(map[string]interface{}) 1984 if err := json.Unmarshal([]byte(s), &f); err != nil { 1985 return err 1986 } 1987 delete(f, "Offset") 1988 delete(f, "Limit") 1989 if len(f) > 0 { 1990 return errors.New("GetGroupListRequest has unknown keys!") 1991 } 1992 return json.Unmarshal([]byte(s), &r) 1993} 1994 1995type GetGroupListResponse struct { 1996 *tchttp.BaseResponse 1997 Response *struct { 1998 1999 // 返回的人员库信息 2000 GroupInfos []*GroupInfo `json:"GroupInfos,omitempty" name:"GroupInfos" list` 2001 2002 // 人员库总数量 2003 // 注意:此字段可能返回 null,表示取不到有效值。 2004 GroupNum *uint64 `json:"GroupNum,omitempty" name:"GroupNum"` 2005 2006 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2007 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2008 } `json:"Response"` 2009} 2010 2011func (r *GetGroupListResponse) ToJsonString() string { 2012 b, _ := json.Marshal(r) 2013 return string(b) 2014} 2015 2016// It is highly **NOT** recommended to use this function 2017// because it has no param check, nor strict type check 2018func (r *GetGroupListResponse) FromJsonString(s string) error { 2019 return json.Unmarshal([]byte(s), &r) 2020} 2021 2022type GetPersonBaseInfoRequest struct { 2023 *tchttp.BaseRequest 2024 2025 // 人员ID,创建人员接口中的PersonId 2026 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 2027} 2028 2029func (r *GetPersonBaseInfoRequest) ToJsonString() string { 2030 b, _ := json.Marshal(r) 2031 return string(b) 2032} 2033 2034// It is highly **NOT** recommended to use this function 2035// because it has no param check, nor strict type check 2036func (r *GetPersonBaseInfoRequest) FromJsonString(s string) error { 2037 f := make(map[string]interface{}) 2038 if err := json.Unmarshal([]byte(s), &f); err != nil { 2039 return err 2040 } 2041 delete(f, "PersonId") 2042 if len(f) > 0 { 2043 return errors.New("GetPersonBaseInfoRequest has unknown keys!") 2044 } 2045 return json.Unmarshal([]byte(s), &r) 2046} 2047 2048type GetPersonBaseInfoResponse struct { 2049 *tchttp.BaseResponse 2050 Response *struct { 2051 2052 // 人员名称 2053 PersonName *string `json:"PersonName,omitempty" name:"PersonName"` 2054 2055 // 人员性别,0代表未填写,1代表男性,2代表女性 2056 Gender *int64 `json:"Gender,omitempty" name:"Gender"` 2057 2058 // 包含的人脸 ID 列表 2059 FaceIds []*string `json:"FaceIds,omitempty" name:"FaceIds" list` 2060 2061 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2062 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2063 } `json:"Response"` 2064} 2065 2066func (r *GetPersonBaseInfoResponse) ToJsonString() string { 2067 b, _ := json.Marshal(r) 2068 return string(b) 2069} 2070 2071// It is highly **NOT** recommended to use this function 2072// because it has no param check, nor strict type check 2073func (r *GetPersonBaseInfoResponse) FromJsonString(s string) error { 2074 return json.Unmarshal([]byte(s), &r) 2075} 2076 2077type GetPersonGroupInfoRequest struct { 2078 *tchttp.BaseRequest 2079 2080 // 人员ID,取值为创建人员接口中的PersonId 2081 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 2082 2083 // 起始序号,默认值为0 2084 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 2085 2086 // 返回数量,默认值为10,最大值为100 2087 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 2088} 2089 2090func (r *GetPersonGroupInfoRequest) ToJsonString() string { 2091 b, _ := json.Marshal(r) 2092 return string(b) 2093} 2094 2095// It is highly **NOT** recommended to use this function 2096// because it has no param check, nor strict type check 2097func (r *GetPersonGroupInfoRequest) FromJsonString(s string) error { 2098 f := make(map[string]interface{}) 2099 if err := json.Unmarshal([]byte(s), &f); err != nil { 2100 return err 2101 } 2102 delete(f, "PersonId") 2103 delete(f, "Offset") 2104 delete(f, "Limit") 2105 if len(f) > 0 { 2106 return errors.New("GetPersonGroupInfoRequest has unknown keys!") 2107 } 2108 return json.Unmarshal([]byte(s), &r) 2109} 2110 2111type GetPersonGroupInfoResponse struct { 2112 *tchttp.BaseResponse 2113 Response *struct { 2114 2115 // 包含此人员的人员库及描述字段内容列表 2116 PersonGroupInfos []*PersonGroupInfo `json:"PersonGroupInfos,omitempty" name:"PersonGroupInfos" list` 2117 2118 // 人员库总数量 2119 // 注意:此字段可能返回 null,表示取不到有效值。 2120 GroupNum *uint64 `json:"GroupNum,omitempty" name:"GroupNum"` 2121 2122 // 人脸识别服务所用的算法模型版本。 2123 // 注意:此字段可能返回 null,表示取不到有效值。 2124 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 2125 2126 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2127 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2128 } `json:"Response"` 2129} 2130 2131func (r *GetPersonGroupInfoResponse) ToJsonString() string { 2132 b, _ := json.Marshal(r) 2133 return string(b) 2134} 2135 2136// It is highly **NOT** recommended to use this function 2137// because it has no param check, nor strict type check 2138func (r *GetPersonGroupInfoResponse) FromJsonString(s string) error { 2139 return json.Unmarshal([]byte(s), &r) 2140} 2141 2142type GetPersonListNumRequest struct { 2143 *tchttp.BaseRequest 2144 2145 // 人员库ID,取值为创建人员库接口中的GroupId 2146 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2147} 2148 2149func (r *GetPersonListNumRequest) ToJsonString() string { 2150 b, _ := json.Marshal(r) 2151 return string(b) 2152} 2153 2154// It is highly **NOT** recommended to use this function 2155// because it has no param check, nor strict type check 2156func (r *GetPersonListNumRequest) FromJsonString(s string) error { 2157 f := make(map[string]interface{}) 2158 if err := json.Unmarshal([]byte(s), &f); err != nil { 2159 return err 2160 } 2161 delete(f, "GroupId") 2162 if len(f) > 0 { 2163 return errors.New("GetPersonListNumRequest has unknown keys!") 2164 } 2165 return json.Unmarshal([]byte(s), &r) 2166} 2167 2168type GetPersonListNumResponse struct { 2169 *tchttp.BaseResponse 2170 Response *struct { 2171 2172 // 人员数量 2173 PersonNum *uint64 `json:"PersonNum,omitempty" name:"PersonNum"` 2174 2175 // 人脸数量 2176 FaceNum *uint64 `json:"FaceNum,omitempty" name:"FaceNum"` 2177 2178 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2179 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2180 } `json:"Response"` 2181} 2182 2183func (r *GetPersonListNumResponse) ToJsonString() string { 2184 b, _ := json.Marshal(r) 2185 return string(b) 2186} 2187 2188// It is highly **NOT** recommended to use this function 2189// because it has no param check, nor strict type check 2190func (r *GetPersonListNumResponse) FromJsonString(s string) error { 2191 return json.Unmarshal([]byte(s), &r) 2192} 2193 2194type GetPersonListRequest struct { 2195 *tchttp.BaseRequest 2196 2197 // 人员库ID,取值为创建人员库接口中的GroupId 2198 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2199 2200 // 起始序号,默认值为0 2201 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 2202 2203 // 返回数量,默认值为10,最大值为1000 2204 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 2205} 2206 2207func (r *GetPersonListRequest) ToJsonString() string { 2208 b, _ := json.Marshal(r) 2209 return string(b) 2210} 2211 2212// It is highly **NOT** recommended to use this function 2213// because it has no param check, nor strict type check 2214func (r *GetPersonListRequest) FromJsonString(s string) error { 2215 f := make(map[string]interface{}) 2216 if err := json.Unmarshal([]byte(s), &f); err != nil { 2217 return err 2218 } 2219 delete(f, "GroupId") 2220 delete(f, "Offset") 2221 delete(f, "Limit") 2222 if len(f) > 0 { 2223 return errors.New("GetPersonListRequest has unknown keys!") 2224 } 2225 return json.Unmarshal([]byte(s), &r) 2226} 2227 2228type GetPersonListResponse struct { 2229 *tchttp.BaseResponse 2230 Response *struct { 2231 2232 // 返回的人员信息 2233 PersonInfos []*PersonInfo `json:"PersonInfos,omitempty" name:"PersonInfos" list` 2234 2235 // 该人员库的人员数量 2236 // 注意:此字段可能返回 null,表示取不到有效值。 2237 PersonNum *uint64 `json:"PersonNum,omitempty" name:"PersonNum"` 2238 2239 // 该人员库的人脸数量 2240 // 注意:此字段可能返回 null,表示取不到有效值。 2241 FaceNum *uint64 `json:"FaceNum,omitempty" name:"FaceNum"` 2242 2243 // 人脸识别所用的算法模型版本。 2244 // 注意:此字段可能返回 null,表示取不到有效值。 2245 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 2246 2247 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2248 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2249 } `json:"Response"` 2250} 2251 2252func (r *GetPersonListResponse) ToJsonString() string { 2253 b, _ := json.Marshal(r) 2254 return string(b) 2255} 2256 2257// It is highly **NOT** recommended to use this function 2258// because it has no param check, nor strict type check 2259func (r *GetPersonListResponse) FromJsonString(s string) error { 2260 return json.Unmarshal([]byte(s), &r) 2261} 2262 2263type GetSimilarPersonResultRequest struct { 2264 *tchttp.BaseRequest 2265 2266 // 查重任务ID,用于查询、获取查重的进度和结果。取值为人员查重接口返回的JobId 2267 JobId *string `json:"JobId,omitempty" name:"JobId"` 2268} 2269 2270func (r *GetSimilarPersonResultRequest) ToJsonString() string { 2271 b, _ := json.Marshal(r) 2272 return string(b) 2273} 2274 2275// It is highly **NOT** recommended to use this function 2276// because it has no param check, nor strict type check 2277func (r *GetSimilarPersonResultRequest) FromJsonString(s string) error { 2278 f := make(map[string]interface{}) 2279 if err := json.Unmarshal([]byte(s), &f); err != nil { 2280 return err 2281 } 2282 delete(f, "JobId") 2283 if len(f) > 0 { 2284 return errors.New("GetSimilarPersonResultRequest has unknown keys!") 2285 } 2286 return json.Unmarshal([]byte(s), &r) 2287} 2288 2289type GetSimilarPersonResultResponse struct { 2290 *tchttp.BaseResponse 2291 Response *struct { 2292 2293 // 查重任务完成进度。取值[0.0,100.0]。当且仅当值为100时,SimilarPersons才有意义。 2294 Progress *float64 `json:"Progress,omitempty" name:"Progress"` 2295 2296 // 疑似同一人的人员信息文件临时下载链接, 有效时间为5分钟,结果文件实际保存90天。 2297 // 文件内容由 SimilarPerson 的数组组成。 2298 SimilarPersonsUrl *string `json:"SimilarPersonsUrl,omitempty" name:"SimilarPersonsUrl"` 2299 2300 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2301 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2302 } `json:"Response"` 2303} 2304 2305func (r *GetSimilarPersonResultResponse) ToJsonString() string { 2306 b, _ := json.Marshal(r) 2307 return string(b) 2308} 2309 2310// It is highly **NOT** recommended to use this function 2311// because it has no param check, nor strict type check 2312func (r *GetSimilarPersonResultResponse) FromJsonString(s string) error { 2313 return json.Unmarshal([]byte(s), &r) 2314} 2315 2316type GetUpgradeGroupFaceModelVersionJobListRequest struct { 2317 *tchttp.BaseRequest 2318 2319 // 起始序号,默认值为0。 2320 Offset *uint64 `json:"Offset,omitempty" name:"Offset"` 2321 2322 // 返回数量,默认值为10,最大值为1000。 2323 Limit *uint64 `json:"Limit,omitempty" name:"Limit"` 2324} 2325 2326func (r *GetUpgradeGroupFaceModelVersionJobListRequest) ToJsonString() string { 2327 b, _ := json.Marshal(r) 2328 return string(b) 2329} 2330 2331// It is highly **NOT** recommended to use this function 2332// because it has no param check, nor strict type check 2333func (r *GetUpgradeGroupFaceModelVersionJobListRequest) FromJsonString(s string) error { 2334 f := make(map[string]interface{}) 2335 if err := json.Unmarshal([]byte(s), &f); err != nil { 2336 return err 2337 } 2338 delete(f, "Offset") 2339 delete(f, "Limit") 2340 if len(f) > 0 { 2341 return errors.New("GetUpgradeGroupFaceModelVersionJobListRequest has unknown keys!") 2342 } 2343 return json.Unmarshal([]byte(s), &r) 2344} 2345 2346type GetUpgradeGroupFaceModelVersionJobListResponse struct { 2347 *tchttp.BaseResponse 2348 Response *struct { 2349 2350 // 人员库升级任务信息列表。 2351 JobInfos []*UpgradeJobInfo `json:"JobInfos,omitempty" name:"JobInfos" list` 2352 2353 // 升级任务总数量。 2354 JobNum *uint64 `json:"JobNum,omitempty" name:"JobNum"` 2355 2356 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2357 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2358 } `json:"Response"` 2359} 2360 2361func (r *GetUpgradeGroupFaceModelVersionJobListResponse) ToJsonString() string { 2362 b, _ := json.Marshal(r) 2363 return string(b) 2364} 2365 2366// It is highly **NOT** recommended to use this function 2367// because it has no param check, nor strict type check 2368func (r *GetUpgradeGroupFaceModelVersionJobListResponse) FromJsonString(s string) error { 2369 return json.Unmarshal([]byte(s), &r) 2370} 2371 2372type GetUpgradeGroupFaceModelVersionResultRequest struct { 2373 *tchttp.BaseRequest 2374 2375 // 升级任务ID,用于查询、获取人员库升级的进度和结果。 2376 JobId *string `json:"JobId,omitempty" name:"JobId"` 2377} 2378 2379func (r *GetUpgradeGroupFaceModelVersionResultRequest) ToJsonString() string { 2380 b, _ := json.Marshal(r) 2381 return string(b) 2382} 2383 2384// It is highly **NOT** recommended to use this function 2385// because it has no param check, nor strict type check 2386func (r *GetUpgradeGroupFaceModelVersionResultRequest) FromJsonString(s string) error { 2387 f := make(map[string]interface{}) 2388 if err := json.Unmarshal([]byte(s), &f); err != nil { 2389 return err 2390 } 2391 delete(f, "JobId") 2392 if len(f) > 0 { 2393 return errors.New("GetUpgradeGroupFaceModelVersionResultRequest has unknown keys!") 2394 } 2395 return json.Unmarshal([]byte(s), &r) 2396} 2397 2398type GetUpgradeGroupFaceModelVersionResultResponse struct { 2399 *tchttp.BaseResponse 2400 Response *struct { 2401 2402 // 人员升级任务预估结束时间。 StartTimestamp的值是自 Unix 纪元时间到人员查重任务预估结束的毫秒数。 2403 // Unix 纪元时间是 1970 年 1 月 1 日星期四,协调世界时 (UTC) 00:00:00。 2404 // 如果为0表示这个任务已经执行完毕。 2405 EndTimestamp *uint64 `json:"EndTimestamp,omitempty" name:"EndTimestamp"` 2406 2407 // 升级任务完成进度。取值[0.0,100.0]。 2408 Progress *float64 `json:"Progress,omitempty" name:"Progress"` 2409 2410 // 0表示升级中,1表示升级完毕,2表示回滚完毕,3表示升级失败。 2411 Status *int64 `json:"Status,omitempty" name:"Status"` 2412 2413 // 升级起始时间。 2414 // StartTime的值是自 Unix 纪元时间到Group创建时间的毫秒数。 2415 // Unix 纪元时间是 1970 年 1 月 1 日星期四,协调世界时 (UTC) 00:00:00。 2416 // 有关更多信息,请参阅 Unix 时间。 2417 StartTime *uint64 `json:"StartTime,omitempty" name:"StartTime"` 2418 2419 // 当前算法模型版本。 2420 FromFaceModelVersion *string `json:"FromFaceModelVersion,omitempty" name:"FromFaceModelVersion"` 2421 2422 // 目标算法模型版本。 2423 ToFaceModelVersion *string `json:"ToFaceModelVersion,omitempty" name:"ToFaceModelVersion"` 2424 2425 // 人员库ID。 2426 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2427 2428 // 无法升级的人脸Id信息,文件格式 2429 FailedFacesUrl *string `json:"FailedFacesUrl,omitempty" name:"FailedFacesUrl"` 2430 2431 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2432 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2433 } `json:"Response"` 2434} 2435 2436func (r *GetUpgradeGroupFaceModelVersionResultResponse) ToJsonString() string { 2437 b, _ := json.Marshal(r) 2438 return string(b) 2439} 2440 2441// It is highly **NOT** recommended to use this function 2442// because it has no param check, nor strict type check 2443func (r *GetUpgradeGroupFaceModelVersionResultResponse) FromJsonString(s string) error { 2444 return json.Unmarshal([]byte(s), &r) 2445} 2446 2447type GroupCandidate struct { 2448 2449 // 人员库ID 。 2450 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2451 2452 // 识别出的最相似候选人。 2453 Candidates []*Candidate `json:"Candidates,omitempty" name:"Candidates" list` 2454} 2455 2456type GroupExDescriptionInfo struct { 2457 2458 // 人员库自定义描述字段Index,从0开始 2459 // 注意:此字段可能返回 null,表示取不到有效值。 2460 GroupExDescriptionIndex *uint64 `json:"GroupExDescriptionIndex,omitempty" name:"GroupExDescriptionIndex"` 2461 2462 // 需要更新的人员库自定义描述字段内容 2463 GroupExDescription *string `json:"GroupExDescription,omitempty" name:"GroupExDescription"` 2464} 2465 2466type GroupInfo struct { 2467 2468 // 人员库名称 2469 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 2470 2471 // 人员库ID 2472 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2473 2474 // 人员库自定义描述字段 2475 // 注意:此字段可能返回 null,表示取不到有效值。 2476 GroupExDescriptions []*string `json:"GroupExDescriptions,omitempty" name:"GroupExDescriptions" list` 2477 2478 // 人员库信息备注 2479 // 注意:此字段可能返回 null,表示取不到有效值。 2480 Tag *string `json:"Tag,omitempty" name:"Tag"` 2481 2482 // 人脸识别所用的算法模型版本。 2483 // 注意:此字段可能返回 null,表示取不到有效值。 2484 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 2485 2486 // Group的创建时间和日期 CreationTimestamp。CreationTimestamp 的值是自 Unix 纪元时间到Group创建时间的毫秒数。 2487 // Unix 纪元时间是 1970 年 1 月 1 日星期四,协调世界时 (UTC) 00:00:00。有关更多信息,请参阅 Unix 时间。 2488 // 注意:此字段可能返回 null,表示取不到有效值。 2489 CreationTimestamp *uint64 `json:"CreationTimestamp,omitempty" name:"CreationTimestamp"` 2490} 2491 2492type Hair struct { 2493 2494 // 头发长度信息。 2495 // AttributeItem对应的Type为 —— 0:光头,1:短发,2:中发,3:长发,4:绑发。 2496 Length *AttributeItem `json:"Length,omitempty" name:"Length"` 2497 2498 // 刘海信息。 2499 // AttributeItem对应的Type为 —— 0:无刘海,1:有刘海。 2500 Bang *AttributeItem `json:"Bang,omitempty" name:"Bang"` 2501 2502 // 头发颜色信息。 2503 // AttributeItem对应的Type为 —— 0:黑色,1:金色,2:棕色,3:灰白色。 2504 Color *AttributeItem `json:"Color,omitempty" name:"Color"` 2505} 2506 2507type Hat struct { 2508 2509 // 帽子佩戴状态信息。 2510 // AttributeItem对应的Type为 —— 0:不戴帽子,1:普通帽子,2:头盔,3:保安帽。 2511 Style *AttributeItem `json:"Style,omitempty" name:"Style"` 2512 2513 // 帽子颜色。 2514 // AttributeItem对应的Type为 —— 0:不戴帽子,1:红色系,2:黄色系,3:蓝色系,4:黑色系,5:灰白色系,6:混色系子。 2515 Color *AttributeItem `json:"Color,omitempty" name:"Color"` 2516} 2517 2518type HeadPose struct { 2519 2520 // 上下偏移[-30,30]。 2521 Pitch *int64 `json:"Pitch,omitempty" name:"Pitch"` 2522 2523 // 左右偏移[-30,30]。 2524 Yaw *int64 `json:"Yaw,omitempty" name:"Yaw"` 2525 2526 // 平面旋转[-180,180]。 2527 Roll *int64 `json:"Roll,omitempty" name:"Roll"` 2528} 2529 2530type JobIdInfo struct { 2531 2532 // 查重任务ID,用于查询、获取查重的进度和结果。 2533 JobId *string `json:"JobId,omitempty" name:"JobId"` 2534 2535 // 查重起始时间。 2536 // StartTime的值是自 Unix 纪元时间到Group创建时间的毫秒数。 2537 // Unix 纪元时间是 1970 年 1 月 1 日星期四,协调世界时 (UTC) 00:00:00。 2538 // 有关更多信息,请参阅 Unix 时间。 2539 StartTime *uint64 `json:"StartTime,omitempty" name:"StartTime"` 2540 2541 // 查重任务是否已完成。0: 成功 1: 未完成 2: 失败 2542 JobStatus *int64 `json:"JobStatus,omitempty" name:"JobStatus"` 2543} 2544 2545type ModifyGroupRequest struct { 2546 *tchttp.BaseRequest 2547 2548 // 人员库ID,取值为创建人员库接口中的GroupId 2549 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2550 2551 // 人员库名称 2552 GroupName *string `json:"GroupName,omitempty" name:"GroupName"` 2553 2554 // 需要修改的人员库自定义描述字段,key-value 2555 GroupExDescriptionInfos []*GroupExDescriptionInfo `json:"GroupExDescriptionInfos,omitempty" name:"GroupExDescriptionInfos" list` 2556 2557 // 人员库信息备注 2558 Tag *string `json:"Tag,omitempty" name:"Tag"` 2559} 2560 2561func (r *ModifyGroupRequest) ToJsonString() string { 2562 b, _ := json.Marshal(r) 2563 return string(b) 2564} 2565 2566// It is highly **NOT** recommended to use this function 2567// because it has no param check, nor strict type check 2568func (r *ModifyGroupRequest) FromJsonString(s string) error { 2569 f := make(map[string]interface{}) 2570 if err := json.Unmarshal([]byte(s), &f); err != nil { 2571 return err 2572 } 2573 delete(f, "GroupId") 2574 delete(f, "GroupName") 2575 delete(f, "GroupExDescriptionInfos") 2576 delete(f, "Tag") 2577 if len(f) > 0 { 2578 return errors.New("ModifyGroupRequest has unknown keys!") 2579 } 2580 return json.Unmarshal([]byte(s), &r) 2581} 2582 2583type ModifyGroupResponse struct { 2584 *tchttp.BaseResponse 2585 Response *struct { 2586 2587 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2588 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2589 } `json:"Response"` 2590} 2591 2592func (r *ModifyGroupResponse) ToJsonString() string { 2593 b, _ := json.Marshal(r) 2594 return string(b) 2595} 2596 2597// It is highly **NOT** recommended to use this function 2598// because it has no param check, nor strict type check 2599func (r *ModifyGroupResponse) FromJsonString(s string) error { 2600 return json.Unmarshal([]byte(s), &r) 2601} 2602 2603type ModifyPersonBaseInfoRequest struct { 2604 *tchttp.BaseRequest 2605 2606 // 人员ID,取值为创建人员接口中的PersonId 2607 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 2608 2609 // 需要修改的人员名称 2610 PersonName *string `json:"PersonName,omitempty" name:"PersonName"` 2611 2612 // 需要修改的人员性别,1代表男性,2代表女性 2613 Gender *int64 `json:"Gender,omitempty" name:"Gender"` 2614} 2615 2616func (r *ModifyPersonBaseInfoRequest) ToJsonString() string { 2617 b, _ := json.Marshal(r) 2618 return string(b) 2619} 2620 2621// It is highly **NOT** recommended to use this function 2622// because it has no param check, nor strict type check 2623func (r *ModifyPersonBaseInfoRequest) FromJsonString(s string) error { 2624 f := make(map[string]interface{}) 2625 if err := json.Unmarshal([]byte(s), &f); err != nil { 2626 return err 2627 } 2628 delete(f, "PersonId") 2629 delete(f, "PersonName") 2630 delete(f, "Gender") 2631 if len(f) > 0 { 2632 return errors.New("ModifyPersonBaseInfoRequest has unknown keys!") 2633 } 2634 return json.Unmarshal([]byte(s), &r) 2635} 2636 2637type ModifyPersonBaseInfoResponse struct { 2638 *tchttp.BaseResponse 2639 Response *struct { 2640 2641 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2642 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2643 } `json:"Response"` 2644} 2645 2646func (r *ModifyPersonBaseInfoResponse) ToJsonString() string { 2647 b, _ := json.Marshal(r) 2648 return string(b) 2649} 2650 2651// It is highly **NOT** recommended to use this function 2652// because it has no param check, nor strict type check 2653func (r *ModifyPersonBaseInfoResponse) FromJsonString(s string) error { 2654 return json.Unmarshal([]byte(s), &r) 2655} 2656 2657type ModifyPersonGroupInfoRequest struct { 2658 *tchttp.BaseRequest 2659 2660 // 人员库ID,取值为创建人员库接口中的GroupId 2661 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2662 2663 // 人员ID,取值为创建人员接口中的PersonId 2664 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 2665 2666 // 需要修改的人员描述字段内容,key-value 2667 PersonExDescriptionInfos []*PersonExDescriptionInfo `json:"PersonExDescriptionInfos,omitempty" name:"PersonExDescriptionInfos" list` 2668} 2669 2670func (r *ModifyPersonGroupInfoRequest) ToJsonString() string { 2671 b, _ := json.Marshal(r) 2672 return string(b) 2673} 2674 2675// It is highly **NOT** recommended to use this function 2676// because it has no param check, nor strict type check 2677func (r *ModifyPersonGroupInfoRequest) FromJsonString(s string) error { 2678 f := make(map[string]interface{}) 2679 if err := json.Unmarshal([]byte(s), &f); err != nil { 2680 return err 2681 } 2682 delete(f, "GroupId") 2683 delete(f, "PersonId") 2684 delete(f, "PersonExDescriptionInfos") 2685 if len(f) > 0 { 2686 return errors.New("ModifyPersonGroupInfoRequest has unknown keys!") 2687 } 2688 return json.Unmarshal([]byte(s), &r) 2689} 2690 2691type ModifyPersonGroupInfoResponse struct { 2692 *tchttp.BaseResponse 2693 Response *struct { 2694 2695 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2696 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2697 } `json:"Response"` 2698} 2699 2700func (r *ModifyPersonGroupInfoResponse) ToJsonString() string { 2701 b, _ := json.Marshal(r) 2702 return string(b) 2703} 2704 2705// It is highly **NOT** recommended to use this function 2706// because it has no param check, nor strict type check 2707func (r *ModifyPersonGroupInfoResponse) FromJsonString(s string) error { 2708 return json.Unmarshal([]byte(s), &r) 2709} 2710 2711type Mouth struct { 2712 2713 // 是否张嘴信息。 2714 // AttributeItem对应的Type为 —— 0:不张嘴,1:张嘴。 2715 MouthOpen *AttributeItem `json:"MouthOpen,omitempty" name:"MouthOpen"` 2716} 2717 2718type PersonExDescriptionInfo struct { 2719 2720 // 人员描述字段Index,从0开始 2721 // 注意:此字段可能返回 null,表示取不到有效值。 2722 PersonExDescriptionIndex *uint64 `json:"PersonExDescriptionIndex,omitempty" name:"PersonExDescriptionIndex"` 2723 2724 // 需要更新的人员描述字段内容 2725 PersonExDescription *string `json:"PersonExDescription,omitempty" name:"PersonExDescription"` 2726} 2727 2728type PersonGroupInfo struct { 2729 2730 // 包含此人员的人员库ID 2731 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 2732 2733 // 人员描述字段内容 2734 PersonExDescriptions []*string `json:"PersonExDescriptions,omitempty" name:"PersonExDescriptions" list` 2735} 2736 2737type PersonInfo struct { 2738 2739 // 人员名称 2740 PersonName *string `json:"PersonName,omitempty" name:"PersonName"` 2741 2742 // 人员Id 2743 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 2744 2745 // 人员性别 2746 Gender *int64 `json:"Gender,omitempty" name:"Gender"` 2747 2748 // 人员描述字段内容 2749 PersonExDescriptions []*string `json:"PersonExDescriptions,omitempty" name:"PersonExDescriptions" list` 2750 2751 // 包含的人脸照片列表 2752 FaceIds []*string `json:"FaceIds,omitempty" name:"FaceIds" list` 2753 2754 // 人员的创建时间和日期 CreationTimestamp。CreationTimestamp 的值是自 Unix 纪元时间到Person创建时间的毫秒数。 2755 // Unix 纪元时间是 1970 年 1 月 1 日星期四,协调世界时 (UTC) 00:00:00。有关更多信息,请参阅 Unix 时间。 2756 CreationTimestamp *uint64 `json:"CreationTimestamp,omitempty" name:"CreationTimestamp"` 2757} 2758 2759type Point struct { 2760 2761 // x坐标 2762 X *int64 `json:"X,omitempty" name:"X"` 2763 2764 // Y坐标 2765 Y *int64 `json:"Y,omitempty" name:"Y"` 2766} 2767 2768type Result struct { 2769 2770 // 识别出的最相似候选人 2771 Candidates []*Candidate `json:"Candidates,omitempty" name:"Candidates" list` 2772 2773 // 检测出的人脸框位置 2774 FaceRect *FaceRect `json:"FaceRect,omitempty" name:"FaceRect"` 2775 2776 // 检测出的人脸图片状态返回码。0 表示正常。 2777 // -1601代表不符合图片质量控制要求,此时Candidate内容为空。 2778 RetCode *int64 `json:"RetCode,omitempty" name:"RetCode"` 2779} 2780 2781type ResultsReturnsByGroup struct { 2782 2783 // 检测出的人脸框位置。 2784 FaceRect *FaceRect `json:"FaceRect,omitempty" name:"FaceRect"` 2785 2786 // 识别结果。 2787 GroupCandidates []*GroupCandidate `json:"GroupCandidates,omitempty" name:"GroupCandidates" list` 2788 2789 // 检测出的人脸图片状态返回码。0 表示正常。 2790 // -1601代表不符合图片质量控制要求,此时Candidate内容为空。 2791 RetCode *int64 `json:"RetCode,omitempty" name:"RetCode"` 2792} 2793 2794type RevertGroupFaceModelVersionRequest struct { 2795 *tchttp.BaseRequest 2796 2797 // 需要回滚的升级任务ID。 2798 JobId *string `json:"JobId,omitempty" name:"JobId"` 2799} 2800 2801func (r *RevertGroupFaceModelVersionRequest) ToJsonString() string { 2802 b, _ := json.Marshal(r) 2803 return string(b) 2804} 2805 2806// It is highly **NOT** recommended to use this function 2807// because it has no param check, nor strict type check 2808func (r *RevertGroupFaceModelVersionRequest) FromJsonString(s string) error { 2809 f := make(map[string]interface{}) 2810 if err := json.Unmarshal([]byte(s), &f); err != nil { 2811 return err 2812 } 2813 delete(f, "JobId") 2814 if len(f) > 0 { 2815 return errors.New("RevertGroupFaceModelVersionRequest has unknown keys!") 2816 } 2817 return json.Unmarshal([]byte(s), &r) 2818} 2819 2820type RevertGroupFaceModelVersionResponse struct { 2821 *tchttp.BaseResponse 2822 Response *struct { 2823 2824 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2825 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2826 } `json:"Response"` 2827} 2828 2829func (r *RevertGroupFaceModelVersionResponse) ToJsonString() string { 2830 b, _ := json.Marshal(r) 2831 return string(b) 2832} 2833 2834// It is highly **NOT** recommended to use this function 2835// because it has no param check, nor strict type check 2836func (r *RevertGroupFaceModelVersionResponse) FromJsonString(s string) error { 2837 return json.Unmarshal([]byte(s), &r) 2838} 2839 2840type SearchFacesRequest struct { 2841 *tchttp.BaseRequest 2842 2843 // 希望搜索的人员库列表,上限100个。数组元素取值为创建人员库接口中的GroupId。 2844 // 不可同时搜索不同算法模型版本(FaceModelVersion)的人员库。 2845 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 2846 2847 // 图片 base64 数据,base64 编码后大小不可超过5M。 2848 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 2849 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 2850 Image *string `json:"Image,omitempty" name:"Image"` 2851 2852 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 2853 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 2854 // Url、Image必须提供一个,如果都提供,只使用 Url。 2855 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 2856 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 2857 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 2858 Url *string `json:"Url,omitempty" name:"Url"` 2859 2860 // 最多识别的人脸数目。默认值为1(仅检测图片中面积最大的那张人脸),最大值为10。 2861 // MaxFaceNum用于,当输入的待识别图片包含多张人脸时,设定要搜索的人脸的数量。 2862 // 例:输入的Image或Url中的图片包含多张人脸,设MaxFaceNum=5,则会识别图片中面积最大的5张人脸。 2863 MaxFaceNum *uint64 `json:"MaxFaceNum,omitempty" name:"MaxFaceNum"` 2864 2865 // 人脸长和宽的最小尺寸,单位为像素。默认为34。低于34的人脸图片无法被识别。建议设置为80。 2866 MinFaceSize *uint64 `json:"MinFaceSize,omitempty" name:"MinFaceSize"` 2867 2868 // 单张被识别的人脸返回的最相似人员数量。默认值为5,最大值为100。 2869 // 例,设MaxFaceNum为1,MaxPersonNum为8,则返回Top8相似的人员信息。 2870 // 值越大,需要处理的时间越长。建议不要超过10。 2871 MaxPersonNum *uint64 `json:"MaxPersonNum,omitempty" name:"MaxPersonNum"` 2872 2873 // 是否返回人员具体信息。0 为关闭,1 为开启。默认为 0。其他非0非1值默认为0 2874 NeedPersonInfo *int64 `json:"NeedPersonInfo,omitempty" name:"NeedPersonInfo"` 2875 2876 // 图片质量控制。 2877 // 0: 不进行控制; 2878 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 2879 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 2880 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 2881 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 2882 // 默认 0。 2883 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 2884 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 2885 2886 // 出参Score中,只有超过FaceMatchThreshold值的结果才会返回。默认为0。 2887 FaceMatchThreshold *float64 `json:"FaceMatchThreshold,omitempty" name:"FaceMatchThreshold"` 2888 2889 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 2890 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 2891} 2892 2893func (r *SearchFacesRequest) ToJsonString() string { 2894 b, _ := json.Marshal(r) 2895 return string(b) 2896} 2897 2898// It is highly **NOT** recommended to use this function 2899// because it has no param check, nor strict type check 2900func (r *SearchFacesRequest) FromJsonString(s string) error { 2901 f := make(map[string]interface{}) 2902 if err := json.Unmarshal([]byte(s), &f); err != nil { 2903 return err 2904 } 2905 delete(f, "GroupIds") 2906 delete(f, "Image") 2907 delete(f, "Url") 2908 delete(f, "MaxFaceNum") 2909 delete(f, "MinFaceSize") 2910 delete(f, "MaxPersonNum") 2911 delete(f, "NeedPersonInfo") 2912 delete(f, "QualityControl") 2913 delete(f, "FaceMatchThreshold") 2914 delete(f, "NeedRotateDetection") 2915 if len(f) > 0 { 2916 return errors.New("SearchFacesRequest has unknown keys!") 2917 } 2918 return json.Unmarshal([]byte(s), &r) 2919} 2920 2921type SearchFacesResponse struct { 2922 *tchttp.BaseResponse 2923 Response *struct { 2924 2925 // 识别结果。 2926 Results []*Result `json:"Results,omitempty" name:"Results" list` 2927 2928 // 搜索的人员库中包含的人脸数。 2929 FaceNum *uint64 `json:"FaceNum,omitempty" name:"FaceNum"` 2930 2931 // 人脸识别所用的算法模型版本。 2932 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 2933 2934 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 2935 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 2936 } `json:"Response"` 2937} 2938 2939func (r *SearchFacesResponse) ToJsonString() string { 2940 b, _ := json.Marshal(r) 2941 return string(b) 2942} 2943 2944// It is highly **NOT** recommended to use this function 2945// because it has no param check, nor strict type check 2946func (r *SearchFacesResponse) FromJsonString(s string) error { 2947 return json.Unmarshal([]byte(s), &r) 2948} 2949 2950type SearchFacesReturnsByGroupRequest struct { 2951 *tchttp.BaseRequest 2952 2953 // 希望搜索的人员库列表,上限60个。数组元素取值为创建人员库接口中的GroupId。 2954 // 不可同时搜索不同算法模型版本(FaceModelVersion)的人员库。 2955 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 2956 2957 // 图片 base64 数据,base64 编码后大小不可超过5M。 2958 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 2959 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 2960 Image *string `json:"Image,omitempty" name:"Image"` 2961 2962 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 2963 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 2964 // Url、Image必须提供一个,如果都提供,只使用 Url。 2965 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 2966 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 2967 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 2968 Url *string `json:"Url,omitempty" name:"Url"` 2969 2970 // 最多识别的人脸数目。默认值为1(仅检测图片中面积最大的那张人脸),最大值为10。 2971 // MaxFaceNum用于,当输入的待识别图片包含多张人脸时,设定要搜索的人脸的数量。 2972 // 例:输入的Image或Url中的图片包含多张人脸,设MaxFaceNum=5,则会识别图片中面积最大的5张人脸。 2973 MaxFaceNum *uint64 `json:"MaxFaceNum,omitempty" name:"MaxFaceNum"` 2974 2975 // 人脸长和宽的最小尺寸,单位为像素。默认为34。低于34将影响搜索精度。建议设置为80。 2976 MinFaceSize *uint64 `json:"MinFaceSize,omitempty" name:"MinFaceSize"` 2977 2978 // 被检测到的人脸,对应最多返回的最相似人员数目。默认值为5,最大值为10。 2979 // 例,设MaxFaceNum为3,MaxPersonNum为5,则最多可能返回3*5=15个人员。 2980 MaxPersonNumPerGroup *uint64 `json:"MaxPersonNumPerGroup,omitempty" name:"MaxPersonNumPerGroup"` 2981 2982 // 是否返回人员具体信息。0 为关闭,1 为开启。默认为 0。其他非0非1值默认为0 2983 NeedPersonInfo *int64 `json:"NeedPersonInfo,omitempty" name:"NeedPersonInfo"` 2984 2985 // 图片质量控制。 2986 // 0: 不进行控制; 2987 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 2988 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 2989 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 2990 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 2991 // 默认 0。 2992 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 2993 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 2994 2995 // 出参Score中,只有大于等于FaceMatchThreshold值的结果才会返回。 2996 // 默认为0。 2997 // 取值范围[0.0,100.0) 。 2998 FaceMatchThreshold *float64 `json:"FaceMatchThreshold,omitempty" name:"FaceMatchThreshold"` 2999 3000 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 3001 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 3002} 3003 3004func (r *SearchFacesReturnsByGroupRequest) ToJsonString() string { 3005 b, _ := json.Marshal(r) 3006 return string(b) 3007} 3008 3009// It is highly **NOT** recommended to use this function 3010// because it has no param check, nor strict type check 3011func (r *SearchFacesReturnsByGroupRequest) FromJsonString(s string) error { 3012 f := make(map[string]interface{}) 3013 if err := json.Unmarshal([]byte(s), &f); err != nil { 3014 return err 3015 } 3016 delete(f, "GroupIds") 3017 delete(f, "Image") 3018 delete(f, "Url") 3019 delete(f, "MaxFaceNum") 3020 delete(f, "MinFaceSize") 3021 delete(f, "MaxPersonNumPerGroup") 3022 delete(f, "NeedPersonInfo") 3023 delete(f, "QualityControl") 3024 delete(f, "FaceMatchThreshold") 3025 delete(f, "NeedRotateDetection") 3026 if len(f) > 0 { 3027 return errors.New("SearchFacesReturnsByGroupRequest has unknown keys!") 3028 } 3029 return json.Unmarshal([]byte(s), &r) 3030} 3031 3032type SearchFacesReturnsByGroupResponse struct { 3033 *tchttp.BaseResponse 3034 Response *struct { 3035 3036 // 搜索的人员库中包含的人脸数。 3037 FaceNum *uint64 `json:"FaceNum,omitempty" name:"FaceNum"` 3038 3039 // 识别结果。 3040 ResultsReturnsByGroup []*ResultsReturnsByGroup `json:"ResultsReturnsByGroup,omitempty" name:"ResultsReturnsByGroup" list` 3041 3042 // 人脸识别所用的算法模型版本。 3043 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 3044 3045 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3046 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3047 } `json:"Response"` 3048} 3049 3050func (r *SearchFacesReturnsByGroupResponse) ToJsonString() string { 3051 b, _ := json.Marshal(r) 3052 return string(b) 3053} 3054 3055// It is highly **NOT** recommended to use this function 3056// because it has no param check, nor strict type check 3057func (r *SearchFacesReturnsByGroupResponse) FromJsonString(s string) error { 3058 return json.Unmarshal([]byte(s), &r) 3059} 3060 3061type SearchPersonsRequest struct { 3062 *tchttp.BaseRequest 3063 3064 // 希望搜索的人员库列表,上限100个。数组元素取值为创建人员库接口中的GroupId 3065 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 3066 3067 // 图片 base64 数据,base64 编码后大小不可超过5M。 3068 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3069 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 3070 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3071 Image *string `json:"Image,omitempty" name:"Image"` 3072 3073 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 3074 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3075 // Url、Image必须提供一个,如果都提供,只使用 Url。 3076 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 3077 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 3078 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3079 Url *string `json:"Url,omitempty" name:"Url"` 3080 3081 // 最多识别的人脸数目。默认值为1(仅检测图片中面积最大的那张人脸),最大值为10。 3082 // MaxFaceNum用于,当输入的待识别图片包含多张人脸时,设定要搜索的人脸的数量。 3083 // 例:输入的Image或Url中的图片包含多张人脸,设MaxFaceNum=5,则会识别图片中面积最大的5张人脸。 3084 MaxFaceNum *uint64 `json:"MaxFaceNum,omitempty" name:"MaxFaceNum"` 3085 3086 // 人脸长和宽的最小尺寸,单位为像素。默认为34。低于34将影响搜索精度。建议设置为80。 3087 MinFaceSize *uint64 `json:"MinFaceSize,omitempty" name:"MinFaceSize"` 3088 3089 // 单张被识别的人脸返回的最相似人员数量。默认值为5,最大值为100。 3090 // 例,设MaxFaceNum为1,MaxPersonNum为8,则返回Top8相似的人员信息。 3091 // 值越大,需要处理的时间越长。建议不要超过10。 3092 MaxPersonNum *uint64 `json:"MaxPersonNum,omitempty" name:"MaxPersonNum"` 3093 3094 // 图片质量控制。 3095 // 0: 不进行控制; 3096 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 3097 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 3098 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 3099 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 3100 // 默认 0。 3101 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 3102 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 3103 3104 // 出参Score中,只有大于等于FaceMatchThreshold值的结果才会返回。默认为0。取值范围[0.0,100.0) 。 3105 FaceMatchThreshold *float64 `json:"FaceMatchThreshold,omitempty" name:"FaceMatchThreshold"` 3106 3107 // 是否返回人员具体信息。0 为关闭,1 为开启。默认为 0。其他非0非1值默认为0 3108 NeedPersonInfo *int64 `json:"NeedPersonInfo,omitempty" name:"NeedPersonInfo"` 3109 3110 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 3111 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 3112} 3113 3114func (r *SearchPersonsRequest) ToJsonString() string { 3115 b, _ := json.Marshal(r) 3116 return string(b) 3117} 3118 3119// It is highly **NOT** recommended to use this function 3120// because it has no param check, nor strict type check 3121func (r *SearchPersonsRequest) FromJsonString(s string) error { 3122 f := make(map[string]interface{}) 3123 if err := json.Unmarshal([]byte(s), &f); err != nil { 3124 return err 3125 } 3126 delete(f, "GroupIds") 3127 delete(f, "Image") 3128 delete(f, "Url") 3129 delete(f, "MaxFaceNum") 3130 delete(f, "MinFaceSize") 3131 delete(f, "MaxPersonNum") 3132 delete(f, "QualityControl") 3133 delete(f, "FaceMatchThreshold") 3134 delete(f, "NeedPersonInfo") 3135 delete(f, "NeedRotateDetection") 3136 if len(f) > 0 { 3137 return errors.New("SearchPersonsRequest has unknown keys!") 3138 } 3139 return json.Unmarshal([]byte(s), &r) 3140} 3141 3142type SearchPersonsResponse struct { 3143 *tchttp.BaseResponse 3144 Response *struct { 3145 3146 // 识别结果。 3147 Results []*Result `json:"Results,omitempty" name:"Results" list` 3148 3149 // 搜索的人员库中包含的人员数。若输入图片中所有人脸均不符合质量要求,则返回0。 3150 PersonNum *uint64 `json:"PersonNum,omitempty" name:"PersonNum"` 3151 3152 // 人脸识别所用的算法模型版本。 3153 // 注意:此字段可能返回 null,表示取不到有效值。 3154 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 3155 3156 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3157 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3158 } `json:"Response"` 3159} 3160 3161func (r *SearchPersonsResponse) ToJsonString() string { 3162 b, _ := json.Marshal(r) 3163 return string(b) 3164} 3165 3166// It is highly **NOT** recommended to use this function 3167// because it has no param check, nor strict type check 3168func (r *SearchPersonsResponse) FromJsonString(s string) error { 3169 return json.Unmarshal([]byte(s), &r) 3170} 3171 3172type SearchPersonsReturnsByGroupRequest struct { 3173 *tchttp.BaseRequest 3174 3175 // 希望搜索的人员库列表,上限60个。数组元素取值为创建人员库接口中的GroupId 3176 GroupIds []*string `json:"GroupIds,omitempty" name:"GroupIds" list` 3177 3178 // 图片 base64 数据,base64 编码后大小不可超过5M。 3179 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3180 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3181 Image *string `json:"Image,omitempty" name:"Image"` 3182 3183 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 3184 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3185 // Url、Image必须提供一个,如果都提供,只使用 Url。 3186 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 3187 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 3188 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3189 Url *string `json:"Url,omitempty" name:"Url"` 3190 3191 // 最多识别的人脸数目。默认值为1(仅检测图片中面积最大的那张人脸),最大值为10。 3192 // MaxFaceNum用于,当输入的待识别图片包含多张人脸时,设定要搜索的人脸的数量。 3193 // 例:输入的Image或Url中的图片包含多张人脸,设MaxFaceNum=5,则会识别图片中面积最大的5张人脸。 3194 MaxFaceNum *uint64 `json:"MaxFaceNum,omitempty" name:"MaxFaceNum"` 3195 3196 // 人脸长和宽的最小尺寸,单位为像素。默认为34。低于34将影响搜索精度。建议设置为80。 3197 MinFaceSize *uint64 `json:"MinFaceSize,omitempty" name:"MinFaceSize"` 3198 3199 // 被检测到的人脸,对应最多返回的最相似人员数目。默认值为5,最大值为10。 3200 // 例,设MaxFaceNum为3,MaxPersonNumPerGroup为5,GroupIds长度为3,则最多可能返回3*5*3=45个人员。 3201 MaxPersonNumPerGroup *uint64 `json:"MaxPersonNumPerGroup,omitempty" name:"MaxPersonNumPerGroup"` 3202 3203 // 图片质量控制。 3204 // 0: 不进行控制; 3205 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 3206 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 3207 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 3208 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 3209 // 默认 0。 3210 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 3211 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 3212 3213 // 出参Score中,只有超过FaceMatchThreshold值的结果才会返回。默认为0。 3214 FaceMatchThreshold *float64 `json:"FaceMatchThreshold,omitempty" name:"FaceMatchThreshold"` 3215 3216 // 是否返回人员具体信息。0 为关闭,1 为开启。默认为 0。其他非0非1值默认为0 3217 NeedPersonInfo *int64 `json:"NeedPersonInfo,omitempty" name:"NeedPersonInfo"` 3218 3219 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 3220 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 3221} 3222 3223func (r *SearchPersonsReturnsByGroupRequest) ToJsonString() string { 3224 b, _ := json.Marshal(r) 3225 return string(b) 3226} 3227 3228// It is highly **NOT** recommended to use this function 3229// because it has no param check, nor strict type check 3230func (r *SearchPersonsReturnsByGroupRequest) FromJsonString(s string) error { 3231 f := make(map[string]interface{}) 3232 if err := json.Unmarshal([]byte(s), &f); err != nil { 3233 return err 3234 } 3235 delete(f, "GroupIds") 3236 delete(f, "Image") 3237 delete(f, "Url") 3238 delete(f, "MaxFaceNum") 3239 delete(f, "MinFaceSize") 3240 delete(f, "MaxPersonNumPerGroup") 3241 delete(f, "QualityControl") 3242 delete(f, "FaceMatchThreshold") 3243 delete(f, "NeedPersonInfo") 3244 delete(f, "NeedRotateDetection") 3245 if len(f) > 0 { 3246 return errors.New("SearchPersonsReturnsByGroupRequest has unknown keys!") 3247 } 3248 return json.Unmarshal([]byte(s), &r) 3249} 3250 3251type SearchPersonsReturnsByGroupResponse struct { 3252 *tchttp.BaseResponse 3253 Response *struct { 3254 3255 // 搜索的人员库中包含的人员数。若输入图片中所有人脸均不符合质量要求,则返回0。 3256 PersonNum *uint64 `json:"PersonNum,omitempty" name:"PersonNum"` 3257 3258 // 识别结果。 3259 ResultsReturnsByGroup []*ResultsReturnsByGroup `json:"ResultsReturnsByGroup,omitempty" name:"ResultsReturnsByGroup" list` 3260 3261 // 人脸识别所用的算法模型版本。 3262 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 3263 3264 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3265 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3266 } `json:"Response"` 3267} 3268 3269func (r *SearchPersonsReturnsByGroupResponse) ToJsonString() string { 3270 b, _ := json.Marshal(r) 3271 return string(b) 3272} 3273 3274// It is highly **NOT** recommended to use this function 3275// because it has no param check, nor strict type check 3276func (r *SearchPersonsReturnsByGroupResponse) FromJsonString(s string) error { 3277 return json.Unmarshal([]byte(s), &r) 3278} 3279 3280type UpgradeGroupFaceModelVersionRequest struct { 3281 *tchttp.BaseRequest 3282 3283 // 需要升级的人员库ID。 3284 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 3285 3286 // 需要升级至的算法模型版本。默认为最新版本。 3287 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 3288} 3289 3290func (r *UpgradeGroupFaceModelVersionRequest) ToJsonString() string { 3291 b, _ := json.Marshal(r) 3292 return string(b) 3293} 3294 3295// It is highly **NOT** recommended to use this function 3296// because it has no param check, nor strict type check 3297func (r *UpgradeGroupFaceModelVersionRequest) FromJsonString(s string) error { 3298 f := make(map[string]interface{}) 3299 if err := json.Unmarshal([]byte(s), &f); err != nil { 3300 return err 3301 } 3302 delete(f, "GroupId") 3303 delete(f, "FaceModelVersion") 3304 if len(f) > 0 { 3305 return errors.New("UpgradeGroupFaceModelVersionRequest has unknown keys!") 3306 } 3307 return json.Unmarshal([]byte(s), &r) 3308} 3309 3310type UpgradeGroupFaceModelVersionResponse struct { 3311 *tchttp.BaseResponse 3312 Response *struct { 3313 3314 // 升级任务ID,用于查询、获取升级的进度和结果。 3315 JobId *string `json:"JobId,omitempty" name:"JobId"` 3316 3317 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3318 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3319 } `json:"Response"` 3320} 3321 3322func (r *UpgradeGroupFaceModelVersionResponse) ToJsonString() string { 3323 b, _ := json.Marshal(r) 3324 return string(b) 3325} 3326 3327// It is highly **NOT** recommended to use this function 3328// because it has no param check, nor strict type check 3329func (r *UpgradeGroupFaceModelVersionResponse) FromJsonString(s string) error { 3330 return json.Unmarshal([]byte(s), &r) 3331} 3332 3333type UpgradeJobInfo struct { 3334 3335 // 人员库升级任务ID,用于查询、获取升级的进度和结果。 3336 JobId *string `json:"JobId,omitempty" name:"JobId"` 3337 3338 // 人员库ID。 3339 GroupId *string `json:"GroupId,omitempty" name:"GroupId"` 3340 3341 // 当前算法模型版本。 3342 FromFaceModelVersion *string `json:"FromFaceModelVersion,omitempty" name:"FromFaceModelVersion"` 3343 3344 // 目标算法模型版本。 3345 ToFaceModelVersion *string `json:"ToFaceModelVersion,omitempty" name:"ToFaceModelVersion"` 3346 3347 // 升级起始时间。 3348 // StartTime的值是自 Unix 纪元时间到Group创建时间的毫秒数。 3349 // Unix 纪元时间是 1970 年 1 月 1 日星期四,协调世界时 (UTC) 00:00:00。 3350 // 有关更多信息,请参阅 Unix 时间。 3351 StartTime *uint64 `json:"StartTime,omitempty" name:"StartTime"` 3352 3353 // 0表示升级中,1表示升级完毕,2表示回滚完毕,3表示升级失败。 3354 Status *uint64 `json:"Status,omitempty" name:"Status"` 3355} 3356 3357type VerifyFaceRequest struct { 3358 *tchttp.BaseRequest 3359 3360 // 待验证的人员ID。人员ID具体信息请参考人员库管理相关接口。 3361 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 3362 3363 // 图片 base64 数据,base64 编码后大小不可超过5M。 3364 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3365 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 3366 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3367 Image *string `json:"Image,omitempty" name:"Image"` 3368 3369 // 图片的 Url 。对应图片 base64 编码后大小不可超过5M。 3370 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3371 // Url、Image必须提供一个,如果都提供,只使用 Url。 3372 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 3373 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 3374 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 3375 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3376 Url *string `json:"Url,omitempty" name:"Url"` 3377 3378 // 图片质量控制。 3379 // 0: 不进行控制; 3380 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 3381 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 3382 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 3383 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 3384 // 默认 0。 3385 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 3386 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 3387 3388 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 3389 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 3390} 3391 3392func (r *VerifyFaceRequest) ToJsonString() string { 3393 b, _ := json.Marshal(r) 3394 return string(b) 3395} 3396 3397// It is highly **NOT** recommended to use this function 3398// because it has no param check, nor strict type check 3399func (r *VerifyFaceRequest) FromJsonString(s string) error { 3400 f := make(map[string]interface{}) 3401 if err := json.Unmarshal([]byte(s), &f); err != nil { 3402 return err 3403 } 3404 delete(f, "PersonId") 3405 delete(f, "Image") 3406 delete(f, "Url") 3407 delete(f, "QualityControl") 3408 delete(f, "NeedRotateDetection") 3409 if len(f) > 0 { 3410 return errors.New("VerifyFaceRequest has unknown keys!") 3411 } 3412 return json.Unmarshal([]byte(s), &r) 3413} 3414 3415type VerifyFaceResponse struct { 3416 *tchttp.BaseResponse 3417 Response *struct { 3418 3419 // 给定的人脸图片与 PersonId 对应人脸的相似度。若 PersonId 下有多张人脸(Face),返回相似度最大的分数。 3420 // 3421 // 不同算法版本返回的相似度分数不同。 3422 // 若需要验证两张图片中人脸是否为同一人,3.0版本误识率千分之一对应分数为40分,误识率万分之一对应分数为50分,误识率十万分之一对应分数为60分。 一般超过50分则可认定为同一人。 3423 // 2.0版本误识率千分之一对应分数为70分,误识率万分之一对应分数为80分,误识率十万分之一对应分数为90分。 一般超过80分则可认定为同一人。 3424 Score *float64 `json:"Score,omitempty" name:"Score"` 3425 3426 // 是否为同一人的判断。 3427 IsMatch *bool `json:"IsMatch,omitempty" name:"IsMatch"` 3428 3429 // 人脸识别所用的算法模型版本,是该 Person 所在的人员库的算法模型版本。在创建人员库时设置,详情可参考[算法模型版本](https://cloud.tencent.com/document/product/867/40042) 3430 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 3431 3432 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3433 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3434 } `json:"Response"` 3435} 3436 3437func (r *VerifyFaceResponse) ToJsonString() string { 3438 b, _ := json.Marshal(r) 3439 return string(b) 3440} 3441 3442// It is highly **NOT** recommended to use this function 3443// because it has no param check, nor strict type check 3444func (r *VerifyFaceResponse) FromJsonString(s string) error { 3445 return json.Unmarshal([]byte(s), &r) 3446} 3447 3448type VerifyPersonRequest struct { 3449 *tchttp.BaseRequest 3450 3451 // 待验证的人员ID。人员ID具体信息请参考人员库管理相关接口。 3452 PersonId *string `json:"PersonId,omitempty" name:"PersonId"` 3453 3454 // 图片 base64 数据。 3455 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。 3456 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 3457 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3458 Image *string `json:"Image,omitempty" name:"Image"` 3459 3460 // 图片的 Url 3461 // jpg格式长边像素不可超过4000,其他格式图片长边像素不可超2000。。 3462 // 图片的 Url、Image必须提供一个,如果都提供,只使用 Url。 3463 // 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。 3464 // 非腾讯云存储的Url速度和稳定性可能受一定影响。 3465 // 若图片中包含多张人脸,只选取其中人脸面积最大的人脸。 3466 // 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。 3467 Url *string `json:"Url,omitempty" name:"Url"` 3468 3469 // 图片质量控制。 3470 // 0: 不进行控制; 3471 // 1:较低的质量要求,图像存在非常模糊,眼睛鼻子嘴巴遮挡至少其中一种或多种的情况; 3472 // 2: 一般的质量要求,图像存在偏亮,偏暗,模糊或一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,至少其中三种的情况; 3473 // 3: 较高的质量要求,图像存在偏亮,偏暗,一般模糊,眉毛遮挡,脸颊遮挡,下巴遮挡,其中一到两种的情况; 3474 // 4: 很高的质量要求,各个维度均为最好或最多在某一维度上存在轻微问题; 3475 // 默认 0。 3476 // 若图片质量不满足要求,则返回结果中会提示图片质量检测不符要求。 3477 QualityControl *uint64 `json:"QualityControl,omitempty" name:"QualityControl"` 3478 3479 // 是否开启图片旋转识别支持。0为不开启,1为开启。默认为0。本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。 3480 NeedRotateDetection *uint64 `json:"NeedRotateDetection,omitempty" name:"NeedRotateDetection"` 3481} 3482 3483func (r *VerifyPersonRequest) ToJsonString() string { 3484 b, _ := json.Marshal(r) 3485 return string(b) 3486} 3487 3488// It is highly **NOT** recommended to use this function 3489// because it has no param check, nor strict type check 3490func (r *VerifyPersonRequest) FromJsonString(s string) error { 3491 f := make(map[string]interface{}) 3492 if err := json.Unmarshal([]byte(s), &f); err != nil { 3493 return err 3494 } 3495 delete(f, "PersonId") 3496 delete(f, "Image") 3497 delete(f, "Url") 3498 delete(f, "QualityControl") 3499 delete(f, "NeedRotateDetection") 3500 if len(f) > 0 { 3501 return errors.New("VerifyPersonRequest has unknown keys!") 3502 } 3503 return json.Unmarshal([]byte(s), &r) 3504} 3505 3506type VerifyPersonResponse struct { 3507 *tchttp.BaseResponse 3508 Response *struct { 3509 3510 // 给定的人脸照片与 PersonId 对应的相似度。若 PersonId 下有多张人脸(Face),会融合多张人脸信息进行验证。 3511 Score *float64 `json:"Score,omitempty" name:"Score"` 3512 3513 // 是否为同一人的判断。 3514 IsMatch *bool `json:"IsMatch,omitempty" name:"IsMatch"` 3515 3516 // 人脸识别所用的算法模型版本,是该 Person 所在的人员库的算法模型版本。在创建人员库时设置,详情可参考[算法模型版本](https://cloud.tencent.com/document/product/867/40042) 3517 FaceModelVersion *string `json:"FaceModelVersion,omitempty" name:"FaceModelVersion"` 3518 3519 // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 3520 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` 3521 } `json:"Response"` 3522} 3523 3524func (r *VerifyPersonResponse) ToJsonString() string { 3525 b, _ := json.Marshal(r) 3526 return string(b) 3527} 3528 3529// It is highly **NOT** recommended to use this function 3530// because it has no param check, nor strict type check 3531func (r *VerifyPersonResponse) FromJsonString(s string) error { 3532 return json.Unmarshal([]byte(s), &r) 3533} 3534