tencentcloud-sdk-python-faceid 3.0.1015__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.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/PKG-INFO +1 -1
  2. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/setup.py +1 -1
  3. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/errorcodes.py +15 -0
  5. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/faceid_client.py +23 -0
  6. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/models.py +181 -0
  7. {tencentcloud-sdk-python-faceid-3.0.1015 → 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.1015/tencentcloud_sdk_python_faceid.egg-info/requires.txt +0 -1
  10. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/README.rst +0 -0
  11. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/setup.cfg +0 -0
  12. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/__init__.py +0 -0
  13. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud/faceid/v20180301/__init__.py +0 -0
  14. {tencentcloud-sdk-python-faceid-3.0.1015 → tencentcloud-sdk-python-faceid-3.0.1027}/tencentcloud_sdk_python_faceid.egg-info/SOURCES.txt +0 -0
  15. {tencentcloud-sdk-python-faceid-3.0.1015 → 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.1015 → 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.1015
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.1015"],
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.1015'
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
 
@@ -2814,6 +2970,8 @@ class GetDetectInfoEnhancedRequest(AbstractModel):
2814
2970
  :type IsEncrypt: bool
2815
2971
  :param _Encryption: 是否需要对返回中的敏感信息进行加密。仅指定加密算法Algorithm即可,其余字段传入默认值。其中敏感信息包括:Response.Text.IdCard、Response.Text.Name、Response.Text.OcrIdCard、Response.Text.OcrName
2816
2972
  :type Encryption: :class:`tencentcloud.faceid.v20180301.models.Encryption`
2973
+ :param _IsEncryptResponse: 是否对回包整体进行加密
2974
+ :type IsEncryptResponse: bool
2817
2975
  """
2818
2976
  self._BizToken = None
2819
2977
  self._RuleId = None
@@ -2823,6 +2981,7 @@ class GetDetectInfoEnhancedRequest(AbstractModel):
2823
2981
  self._IsNeedIdCardAvatar = None
2824
2982
  self._IsEncrypt = None
2825
2983
  self._Encryption = None
2984
+ self._IsEncryptResponse = None
2826
2985
 
2827
2986
  @property
2828
2987
  def BizToken(self):
@@ -2888,6 +3047,14 @@ class GetDetectInfoEnhancedRequest(AbstractModel):
2888
3047
  def Encryption(self, Encryption):
2889
3048
  self._Encryption = Encryption
2890
3049
 
3050
+ @property
3051
+ def IsEncryptResponse(self):
3052
+ return self._IsEncryptResponse
3053
+
3054
+ @IsEncryptResponse.setter
3055
+ def IsEncryptResponse(self, IsEncryptResponse):
3056
+ self._IsEncryptResponse = IsEncryptResponse
3057
+
2891
3058
 
2892
3059
  def _deserialize(self, params):
2893
3060
  self._BizToken = params.get("BizToken")
@@ -2900,6 +3067,7 @@ class GetDetectInfoEnhancedRequest(AbstractModel):
2900
3067
  if params.get("Encryption") is not None:
2901
3068
  self._Encryption = Encryption()
2902
3069
  self._Encryption._deserialize(params.get("Encryption"))
3070
+ self._IsEncryptResponse = params.get("IsEncryptResponse")
2903
3071
  memeber_set = set(params.keys())
2904
3072
  for name, value in vars(self).items():
2905
3073
  property_name = name[1:]
@@ -2941,6 +3109,9 @@ class GetDetectInfoEnhancedResponse(AbstractModel):
2941
3109
  :param _IntentionActionResult: 意愿核身点头确认模式的结果信息,若未使用该意愿核身功能,该字段返回值可以不处理。
2942
3110
  注意:此字段可能返回 null,表示取不到有效值。
2943
3111
  :type IntentionActionResult: :class:`tencentcloud.faceid.v20180301.models.IntentionActionResult`
3112
+ :param _EncryptedBody: 加密后的数据
3113
+ 注意:此字段可能返回 null,表示取不到有效值。
3114
+ :type EncryptedBody: str
2944
3115
  :param _RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2945
3116
  :type RequestId: str
2946
3117
  """
@@ -2952,6 +3123,7 @@ class GetDetectInfoEnhancedResponse(AbstractModel):
2952
3123
  self._IntentionVerifyData = None
2953
3124
  self._IntentionQuestionResult = None
2954
3125
  self._IntentionActionResult = None
3126
+ self._EncryptedBody = None
2955
3127
  self._RequestId = None
2956
3128
 
2957
3129
  @property
@@ -3018,6 +3190,14 @@ class GetDetectInfoEnhancedResponse(AbstractModel):
3018
3190
  def IntentionActionResult(self, IntentionActionResult):
3019
3191
  self._IntentionActionResult = IntentionActionResult
3020
3192
 
3193
+ @property
3194
+ def EncryptedBody(self):
3195
+ return self._EncryptedBody
3196
+
3197
+ @EncryptedBody.setter
3198
+ def EncryptedBody(self, EncryptedBody):
3199
+ self._EncryptedBody = EncryptedBody
3200
+
3021
3201
  @property
3022
3202
  def RequestId(self):
3023
3203
  return self._RequestId
@@ -3052,6 +3232,7 @@ class GetDetectInfoEnhancedResponse(AbstractModel):
3052
3232
  if params.get("IntentionActionResult") is not None:
3053
3233
  self._IntentionActionResult = IntentionActionResult()
3054
3234
  self._IntentionActionResult._deserialize(params.get("IntentionActionResult"))
3235
+ self._EncryptedBody = params.get("EncryptedBody")
3055
3236
  self._RequestId = params.get("RequestId")
3056
3237
 
3057
3238
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-faceid
3
- Version: 3.0.1015
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.1015