tencentcloud-sdk-python-faceid 3.0.1026__tar.gz → 3.0.1027__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tencentcloud-sdk-python-faceid might be problematic. Click here for more details.

Files changed (16) hide show
  1. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/PKG-INFO +1 -1
  2. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/setup.py +1 -1
  3. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/errorcodes.py +15 -0
  5. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/faceid_client.py +23 -0
  6. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/models.py +156 -0
  7. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud_sdk_python_faceid.egg-info/PKG-INFO +1 -1
  8. tencentcloud-sdk-python-faceid-3.0.1027/tencentcloud_sdk_python_faceid.egg-info/requires.txt +1 -0
  9. tencentcloud-sdk-python-faceid-3.0.1026/tencentcloud_sdk_python_faceid.egg-info/requires.txt +0 -1
  10. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/README.rst +0 -0
  11. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/setup.cfg +0 -0
  12. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/__init__.py +0 -0
  13. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/__init__.py +0 -0
  14. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud_sdk_python_faceid.egg-info/SOURCES.txt +0 -0
  15. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud_sdk_python_faceid.egg-info/dependency_links.txt +0 -0
  16. {tencentcloud-sdk-python-faceid-3.0.1026 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud_sdk_python_faceid.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-faceid
3
- Version: 3.0.1026
3
+ Version: 3.0.1027
4
4
  Summary: Tencent Cloud Faceid SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-faceid',
11
- install_requires=["tencentcloud-sdk-python-common==3.0.1026"],
11
+ install_requires=["tencentcloud-sdk-python-common==3.0.1027"],
12
12
  version=tencentcloud.__version__,
13
13
  description='Tencent Cloud Faceid SDK for Python',
14
14
  long_description=open('README.rst').read(),
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1026'
17
+ __version__ = '3.0.1027'
@@ -59,12 +59,18 @@ FAILEDOPERATION_COMPARELOWSIMILARITY = 'FailedOperation.CompareLowSimilarity'
59
59
  # 调用比对引擎接口出错。
60
60
  FAILEDOPERATION_COMPARESYSTEMERROR = 'FailedOperation.CompareSystemError'
61
61
 
62
+ # 图中人脸存在遮挡,请传入无遮挡人脸图片
63
+ FAILEDOPERATION_COVEREDFACE = 'FailedOperation.CoveredFace'
64
+
62
65
  # 数据库异常。
63
66
  FAILEDOPERATION_DBERROR = 'FailedOperation.DbError'
64
67
 
65
68
  # 解密失败。
66
69
  FAILEDOPERATION_DECRYPTSYSTEMERROR = 'FailedOperation.DecryptSystemError'
67
70
 
71
+ # 服务引擎调用失败,请重试
72
+ FAILEDOPERATION_DETECTENGINESYSTEMERROR = 'FailedOperation.DetectEngineSystemError'
73
+
68
74
  # 文件下载失败。
69
75
  FAILEDOPERATION_DOWNLOADERROR = 'FailedOperation.DownLoadError'
70
76
 
@@ -113,6 +119,9 @@ FAILEDOPERATION_IMAGENOIDCARD = 'FailedOperation.ImageNoIdCard'
113
119
  # 图片尺寸过大。
114
120
  FAILEDOPERATION_IMAGESIZETOOLARGE = 'FailedOperation.ImageSizeTooLarge'
115
121
 
122
+ # 未检测到完整人脸,请传入完整人脸图片
123
+ FAILEDOPERATION_INCOMPLETEFACE = 'FailedOperation.IncompleteFace'
124
+
116
125
  # 检测到多张人脸。
117
126
  FAILEDOPERATION_LIFEPHOTODETECTFACES = 'FailedOperation.LifePhotoDetectFaces'
118
127
 
@@ -176,6 +185,9 @@ FAILEDOPERATION_NAMEFORMATERROR = 'FailedOperation.NameFormatError'
176
185
  # Ocr识别失败。
177
186
  FAILEDOPERATION_OCRFAILED = 'FailedOperation.OcrFailed'
178
187
 
188
+ # 图片质量过差,请检查图片质量
189
+ FAILEDOPERATION_POORIMAGEQUALITY = 'FailedOperation.PoorImageQuality'
190
+
179
191
  # 调用次数超出限制。
180
192
  FAILEDOPERATION_REQUESTLIMITEXCEEDED = 'FailedOperation.RequestLimitExceeded'
181
193
 
@@ -221,6 +233,9 @@ FAILEDOPERATION_UNREGISTEREDEID = 'FailedOperation.UnregisteredEid'
221
233
  # 认证不通过。
222
234
  FAILEDOPERATION_VERIFICATIONFAIL = 'FailedOperation.VerificationFail'
223
235
 
236
+ # 视频解码异常
237
+ FAILEDOPERATION_VIDEODECODEFAILED = 'FailedOperation.VideoDecodeFailed'
238
+
224
239
  # 内部错误。
225
240
  INTERNALERROR = 'InternalError'
226
241
 
@@ -210,6 +210,29 @@ class FaceidClient(AbstractClient):
210
210
  raise TencentCloudSDKException(type(e).__name__, str(e))
211
211
 
212
212
 
213
+ def DetectAIFakeFaces(self, request):
214
+ """提供对人脸图片/视频的AI合成、翻拍、水印等攻击痕迹的检测,增强图片/视频防伪能力
215
+
216
+ :param request: Request instance for DetectAIFakeFaces.
217
+ :type request: :class:`tencentcloud.faceid.v20180301.models.DetectAIFakeFacesRequest`
218
+ :rtype: :class:`tencentcloud.faceid.v20180301.models.DetectAIFakeFacesResponse`
219
+
220
+ """
221
+ try:
222
+ params = request._serialize()
223
+ headers = request.headers
224
+ body = self.call("DetectAIFakeFaces", params, headers=headers)
225
+ response = json.loads(body)
226
+ model = models.DetectAIFakeFacesResponse()
227
+ model._deserialize(response["Response"])
228
+ return model
229
+ except Exception as e:
230
+ if isinstance(e, TencentCloudSDKException):
231
+ raise
232
+ else:
233
+ raise TencentCloudSDKException(type(e).__name__, str(e))
234
+
235
+
213
236
  def DetectAuth(self, request):
214
237
  """每次调用人脸核身SaaS化服务前,需先调用本接口获取BizToken,用来串联核身流程,在验证完成后,用于获取验证结果信息。
215
238
 
@@ -18,6 +18,47 @@ import warnings
18
18
  from tencentcloud.common.abstract_model import AbstractModel
19
19
 
20
20
 
21
+ class AttackRiskDetail(AbstractModel):
22
+ """疑似攻击风险详情
23
+
24
+ """
25
+
26
+ def __init__(self):
27
+ r"""
28
+ :param _Type: 疑似的攻击痕迹类型
29
+ SuspectedSpoofingAttack:翻拍攻击
30
+ SuspectedSynthesisImage:疑似合成图片
31
+ SuspectedSynthesisVideo:疑似合成视频
32
+ SuspectedeAnomalyAttack:人脸特征疑似非真人
33
+ SuspectedAdversarialAttack:疑似对抗样本攻击
34
+ SuspectedBlackIndustry:疑似黑产攻击
35
+ SuspectedWatermark:疑似存在水印
36
+ 注意:此字段可能返回 null,表示取不到有效值。
37
+ :type Type: str
38
+ """
39
+ self._Type = None
40
+
41
+ @property
42
+ def Type(self):
43
+ return self._Type
44
+
45
+ @Type.setter
46
+ def Type(self, Type):
47
+ self._Type = Type
48
+
49
+
50
+ def _deserialize(self, params):
51
+ self._Type = params.get("Type")
52
+ memeber_set = set(params.keys())
53
+ for name, value in vars(self).items():
54
+ property_name = name[1:]
55
+ if property_name in memeber_set:
56
+ memeber_set.remove(property_name)
57
+ if len(memeber_set) > 0:
58
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
59
+
60
+
61
+
21
62
  class BankCard2EVerificationRequest(AbstractModel):
22
63
  """BankCard2EVerification请求参数结构体
23
64
 
@@ -1352,6 +1393,121 @@ class CheckPhoneAndNameResponse(AbstractModel):
1352
1393
  self._RequestId = params.get("RequestId")
1353
1394
 
1354
1395
 
1396
+ class DetectAIFakeFacesRequest(AbstractModel):
1397
+ """DetectAIFakeFaces请求参数结构体
1398
+
1399
+ """
1400
+
1401
+ def __init__(self):
1402
+ r"""
1403
+ :param _FaceInput: 传入需要进行检测的带有人脸的图片或视频,使用base64编码的形式。
1404
+
1405
+ 图片的Base64值:
1406
+ 建议整体图像480x640的分辨率,脸部 大小 100X100 以上;
1407
+ Base64编码后的图片数据大小不超过3M,仅支持jpg、png格式。请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。
1408
+
1409
+ 视频的Base64值:
1410
+ Base64编码后的大小不超过8M,支持mp4、avi、flv格式。
1411
+ 请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。
1412
+ :type FaceInput: str
1413
+ :param _FaceInputType: 传入的类型
1414
+ 1- 传入的是图片类型
1415
+ 2- 传入的是视频类型
1416
+ 其他 - 返回错误码InvalidParameter
1417
+ :type FaceInputType: int
1418
+ """
1419
+ self._FaceInput = None
1420
+ self._FaceInputType = None
1421
+
1422
+ @property
1423
+ def FaceInput(self):
1424
+ return self._FaceInput
1425
+
1426
+ @FaceInput.setter
1427
+ def FaceInput(self, FaceInput):
1428
+ self._FaceInput = FaceInput
1429
+
1430
+ @property
1431
+ def FaceInputType(self):
1432
+ return self._FaceInputType
1433
+
1434
+ @FaceInputType.setter
1435
+ def FaceInputType(self, FaceInputType):
1436
+ self._FaceInputType = FaceInputType
1437
+
1438
+
1439
+ def _deserialize(self, params):
1440
+ self._FaceInput = params.get("FaceInput")
1441
+ self._FaceInputType = params.get("FaceInputType")
1442
+ memeber_set = set(params.keys())
1443
+ for name, value in vars(self).items():
1444
+ property_name = name[1:]
1445
+ if property_name in memeber_set:
1446
+ memeber_set.remove(property_name)
1447
+ if len(memeber_set) > 0:
1448
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1449
+
1450
+
1451
+
1452
+ class DetectAIFakeFacesResponse(AbstractModel):
1453
+ """DetectAIFakeFaces返回参数结构体
1454
+
1455
+ """
1456
+
1457
+ def __init__(self):
1458
+ r"""
1459
+ :param _AttackRiskLevel: 检测到的图片是否存在攻击:
1460
+ Low:无攻击风险
1461
+ Mid:中度疑似攻击
1462
+ High:高度疑似攻击
1463
+ :type AttackRiskLevel: str
1464
+ :param _AttackRiskDetailList: 检测到疑似的攻击痕迹列表
1465
+ 说明:未检测到攻击痕迹时,返回空数组
1466
+ 此出参仅作为结果判断的参考,实际应用仍建议使用AttackRiskLevel的结果。
1467
+ :type AttackRiskDetailList: list of AttackRiskDetail
1468
+ :param _RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1469
+ :type RequestId: str
1470
+ """
1471
+ self._AttackRiskLevel = None
1472
+ self._AttackRiskDetailList = None
1473
+ self._RequestId = None
1474
+
1475
+ @property
1476
+ def AttackRiskLevel(self):
1477
+ return self._AttackRiskLevel
1478
+
1479
+ @AttackRiskLevel.setter
1480
+ def AttackRiskLevel(self, AttackRiskLevel):
1481
+ self._AttackRiskLevel = AttackRiskLevel
1482
+
1483
+ @property
1484
+ def AttackRiskDetailList(self):
1485
+ return self._AttackRiskDetailList
1486
+
1487
+ @AttackRiskDetailList.setter
1488
+ def AttackRiskDetailList(self, AttackRiskDetailList):
1489
+ self._AttackRiskDetailList = AttackRiskDetailList
1490
+
1491
+ @property
1492
+ def RequestId(self):
1493
+ return self._RequestId
1494
+
1495
+ @RequestId.setter
1496
+ def RequestId(self, RequestId):
1497
+ self._RequestId = RequestId
1498
+
1499
+
1500
+ def _deserialize(self, params):
1501
+ self._AttackRiskLevel = params.get("AttackRiskLevel")
1502
+ if params.get("AttackRiskDetailList") is not None:
1503
+ self._AttackRiskDetailList = []
1504
+ for item in params.get("AttackRiskDetailList"):
1505
+ obj = AttackRiskDetail()
1506
+ obj._deserialize(item)
1507
+ self._AttackRiskDetailList.append(obj)
1508
+ self._RequestId = params.get("RequestId")
1509
+
1510
+
1355
1511
  class DetectAuthRequest(AbstractModel):
1356
1512
  """DetectAuth请求参数结构体
1357
1513
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-faceid
3
- Version: 3.0.1026
3
+ Version: 3.0.1027
4
4
  Summary: Tencent Cloud Faceid SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common==3.0.1027
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common==3.0.1026