tencentcloud-sdk-python-ocr 3.1.88__tar.gz → 3.1.91__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.
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/PKG-INFO +2 -2
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/setup.py +1 -1
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/__init__.py +1 -1
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/ocr/v20181119/models.py +899 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/ocr/v20181119/ocr_client.py +48 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/ocr/v20181119/ocr_client_async.py +38 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
- tencentcloud_sdk_python_ocr-3.1.91/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
- tencentcloud_sdk_python_ocr-3.1.88/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/README.rst +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/setup.cfg +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/ocr/__init__.py +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/ocr/v20181119/__init__.py +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
- {tencentcloud_sdk_python_ocr-3.1.88 → tencentcloud_sdk_python_ocr-3.1.91}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-ocr
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.91
|
|
4
4
|
Summary: Tencent Cloud Ocr SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.91
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-ocr',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common>=3.1.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.1.91,<4.0.0"],
|
|
12
12
|
|
|
13
13
|
version=tencentcloud.__version__,
|
|
14
14
|
description='Tencent Cloud Ocr SDK for Python',
|
|
@@ -4530,6 +4530,95 @@ class Coord(AbstractModel):
|
|
|
4530
4530
|
|
|
4531
4531
|
|
|
4532
4532
|
|
|
4533
|
+
class CoordList(AbstractModel):
|
|
4534
|
+
r"""坐标数组
|
|
4535
|
+
|
|
4536
|
+
"""
|
|
4537
|
+
|
|
4538
|
+
def __init__(self):
|
|
4539
|
+
r"""
|
|
4540
|
+
:param _TopLeft: <p>左上角坐标。</p>
|
|
4541
|
+
:type TopLeft: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4542
|
+
:param _TopRight: <p>右上角坐标。</p>
|
|
4543
|
+
:type TopRight: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4544
|
+
:param _BottomLeft: <p>左下角坐标。</p>
|
|
4545
|
+
:type BottomLeft: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4546
|
+
:param _BottomRight: <p>右下角坐标。</p>
|
|
4547
|
+
:type BottomRight: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4548
|
+
"""
|
|
4549
|
+
self._TopLeft = None
|
|
4550
|
+
self._TopRight = None
|
|
4551
|
+
self._BottomLeft = None
|
|
4552
|
+
self._BottomRight = None
|
|
4553
|
+
|
|
4554
|
+
@property
|
|
4555
|
+
def TopLeft(self):
|
|
4556
|
+
r"""<p>左上角坐标。</p>
|
|
4557
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4558
|
+
"""
|
|
4559
|
+
return self._TopLeft
|
|
4560
|
+
|
|
4561
|
+
@TopLeft.setter
|
|
4562
|
+
def TopLeft(self, TopLeft):
|
|
4563
|
+
self._TopLeft = TopLeft
|
|
4564
|
+
|
|
4565
|
+
@property
|
|
4566
|
+
def TopRight(self):
|
|
4567
|
+
r"""<p>右上角坐标。</p>
|
|
4568
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4569
|
+
"""
|
|
4570
|
+
return self._TopRight
|
|
4571
|
+
|
|
4572
|
+
@TopRight.setter
|
|
4573
|
+
def TopRight(self, TopRight):
|
|
4574
|
+
self._TopRight = TopRight
|
|
4575
|
+
|
|
4576
|
+
@property
|
|
4577
|
+
def BottomLeft(self):
|
|
4578
|
+
r"""<p>左下角坐标。</p>
|
|
4579
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4580
|
+
"""
|
|
4581
|
+
return self._BottomLeft
|
|
4582
|
+
|
|
4583
|
+
@BottomLeft.setter
|
|
4584
|
+
def BottomLeft(self, BottomLeft):
|
|
4585
|
+
self._BottomLeft = BottomLeft
|
|
4586
|
+
|
|
4587
|
+
@property
|
|
4588
|
+
def BottomRight(self):
|
|
4589
|
+
r"""<p>右下角坐标。</p>
|
|
4590
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.Coord`
|
|
4591
|
+
"""
|
|
4592
|
+
return self._BottomRight
|
|
4593
|
+
|
|
4594
|
+
@BottomRight.setter
|
|
4595
|
+
def BottomRight(self, BottomRight):
|
|
4596
|
+
self._BottomRight = BottomRight
|
|
4597
|
+
|
|
4598
|
+
|
|
4599
|
+
def _deserialize(self, params):
|
|
4600
|
+
if params.get("TopLeft") is not None:
|
|
4601
|
+
self._TopLeft = Coord()
|
|
4602
|
+
self._TopLeft._deserialize(params.get("TopLeft"))
|
|
4603
|
+
if params.get("TopRight") is not None:
|
|
4604
|
+
self._TopRight = Coord()
|
|
4605
|
+
self._TopRight._deserialize(params.get("TopRight"))
|
|
4606
|
+
if params.get("BottomLeft") is not None:
|
|
4607
|
+
self._BottomLeft = Coord()
|
|
4608
|
+
self._BottomLeft._deserialize(params.get("BottomLeft"))
|
|
4609
|
+
if params.get("BottomRight") is not None:
|
|
4610
|
+
self._BottomRight = Coord()
|
|
4611
|
+
self._BottomRight._deserialize(params.get("BottomRight"))
|
|
4612
|
+
memeber_set = set(params.keys())
|
|
4613
|
+
for name, value in vars(self).items():
|
|
4614
|
+
property_name = name[1:]
|
|
4615
|
+
if property_name in memeber_set:
|
|
4616
|
+
memeber_set.remove(property_name)
|
|
4617
|
+
if len(memeber_set) > 0:
|
|
4618
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
4619
|
+
|
|
4620
|
+
|
|
4621
|
+
|
|
4533
4622
|
class CustomsDeclaration(AbstractModel):
|
|
4534
4623
|
r"""海关进/出口货物报关单
|
|
4535
4624
|
|
|
@@ -10063,6 +10152,124 @@ class ExtractDocMultiResponse(AbstractModel):
|
|
|
10063
10152
|
self._RequestId = params.get("RequestId")
|
|
10064
10153
|
|
|
10065
10154
|
|
|
10155
|
+
class FieldsInfo(AbstractModel):
|
|
10156
|
+
r"""用于展示抽取出的信息
|
|
10157
|
+
|
|
10158
|
+
"""
|
|
10159
|
+
|
|
10160
|
+
def __init__(self):
|
|
10161
|
+
r"""
|
|
10162
|
+
:param _KeyName: <p>用户自定义的提取字段名。</p>
|
|
10163
|
+
:type KeyName: str
|
|
10164
|
+
:param _KeyPrompt: <p>用户自定义的提取字段名的提示词。</p>
|
|
10165
|
+
:type KeyPrompt: str
|
|
10166
|
+
:param _KeyValue: <p>出参字段对应的值。</p><p>注意:此字段可能返回 null,表示取不到有效值。</p>
|
|
10167
|
+
:type KeyValue: str
|
|
10168
|
+
:param _KeyType: <p>出参类型。</p><p>注:与入参对应同个值。</p>
|
|
10169
|
+
:type KeyType: int
|
|
10170
|
+
:param _Polygon: <p>文本行坐标,以四个顶点坐标表示。</p><p>注:仅当入参EnableCoord不为null时生效,默认是false。</p>
|
|
10171
|
+
:type Polygon: :class:`tencentcloud.ocr.v20181119.models.CoordList`
|
|
10172
|
+
:param _SubItems: <p>嵌套FieldsInfo结构,仅当KeyType=1时有效。</p>
|
|
10173
|
+
:type SubItems: list of SubItemGroup
|
|
10174
|
+
"""
|
|
10175
|
+
self._KeyName = None
|
|
10176
|
+
self._KeyPrompt = None
|
|
10177
|
+
self._KeyValue = None
|
|
10178
|
+
self._KeyType = None
|
|
10179
|
+
self._Polygon = None
|
|
10180
|
+
self._SubItems = None
|
|
10181
|
+
|
|
10182
|
+
@property
|
|
10183
|
+
def KeyName(self):
|
|
10184
|
+
r"""<p>用户自定义的提取字段名。</p>
|
|
10185
|
+
:rtype: str
|
|
10186
|
+
"""
|
|
10187
|
+
return self._KeyName
|
|
10188
|
+
|
|
10189
|
+
@KeyName.setter
|
|
10190
|
+
def KeyName(self, KeyName):
|
|
10191
|
+
self._KeyName = KeyName
|
|
10192
|
+
|
|
10193
|
+
@property
|
|
10194
|
+
def KeyPrompt(self):
|
|
10195
|
+
r"""<p>用户自定义的提取字段名的提示词。</p>
|
|
10196
|
+
:rtype: str
|
|
10197
|
+
"""
|
|
10198
|
+
return self._KeyPrompt
|
|
10199
|
+
|
|
10200
|
+
@KeyPrompt.setter
|
|
10201
|
+
def KeyPrompt(self, KeyPrompt):
|
|
10202
|
+
self._KeyPrompt = KeyPrompt
|
|
10203
|
+
|
|
10204
|
+
@property
|
|
10205
|
+
def KeyValue(self):
|
|
10206
|
+
r"""<p>出参字段对应的值。</p><p>注意:此字段可能返回 null,表示取不到有效值。</p>
|
|
10207
|
+
:rtype: str
|
|
10208
|
+
"""
|
|
10209
|
+
return self._KeyValue
|
|
10210
|
+
|
|
10211
|
+
@KeyValue.setter
|
|
10212
|
+
def KeyValue(self, KeyValue):
|
|
10213
|
+
self._KeyValue = KeyValue
|
|
10214
|
+
|
|
10215
|
+
@property
|
|
10216
|
+
def KeyType(self):
|
|
10217
|
+
r"""<p>出参类型。</p><p>注:与入参对应同个值。</p>
|
|
10218
|
+
:rtype: int
|
|
10219
|
+
"""
|
|
10220
|
+
return self._KeyType
|
|
10221
|
+
|
|
10222
|
+
@KeyType.setter
|
|
10223
|
+
def KeyType(self, KeyType):
|
|
10224
|
+
self._KeyType = KeyType
|
|
10225
|
+
|
|
10226
|
+
@property
|
|
10227
|
+
def Polygon(self):
|
|
10228
|
+
r"""<p>文本行坐标,以四个顶点坐标表示。</p><p>注:仅当入参EnableCoord不为null时生效,默认是false。</p>
|
|
10229
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.CoordList`
|
|
10230
|
+
"""
|
|
10231
|
+
return self._Polygon
|
|
10232
|
+
|
|
10233
|
+
@Polygon.setter
|
|
10234
|
+
def Polygon(self, Polygon):
|
|
10235
|
+
self._Polygon = Polygon
|
|
10236
|
+
|
|
10237
|
+
@property
|
|
10238
|
+
def SubItems(self):
|
|
10239
|
+
r"""<p>嵌套FieldsInfo结构,仅当KeyType=1时有效。</p>
|
|
10240
|
+
:rtype: list of SubItemGroup
|
|
10241
|
+
"""
|
|
10242
|
+
return self._SubItems
|
|
10243
|
+
|
|
10244
|
+
@SubItems.setter
|
|
10245
|
+
def SubItems(self, SubItems):
|
|
10246
|
+
self._SubItems = SubItems
|
|
10247
|
+
|
|
10248
|
+
|
|
10249
|
+
def _deserialize(self, params):
|
|
10250
|
+
self._KeyName = params.get("KeyName")
|
|
10251
|
+
self._KeyPrompt = params.get("KeyPrompt")
|
|
10252
|
+
self._KeyValue = params.get("KeyValue")
|
|
10253
|
+
self._KeyType = params.get("KeyType")
|
|
10254
|
+
if params.get("Polygon") is not None:
|
|
10255
|
+
self._Polygon = CoordList()
|
|
10256
|
+
self._Polygon._deserialize(params.get("Polygon"))
|
|
10257
|
+
if params.get("SubItems") is not None:
|
|
10258
|
+
self._SubItems = []
|
|
10259
|
+
for item in params.get("SubItems"):
|
|
10260
|
+
obj = SubItemGroup()
|
|
10261
|
+
obj._deserialize(item)
|
|
10262
|
+
self._SubItems.append(obj)
|
|
10263
|
+
memeber_set = set(params.keys())
|
|
10264
|
+
for name, value in vars(self).items():
|
|
10265
|
+
property_name = name[1:]
|
|
10266
|
+
if property_name in memeber_set:
|
|
10267
|
+
memeber_set.remove(property_name)
|
|
10268
|
+
if len(memeber_set) > 0:
|
|
10269
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
10270
|
+
|
|
10271
|
+
|
|
10272
|
+
|
|
10066
10273
|
class FinanBillInfo(AbstractModel):
|
|
10067
10274
|
r"""金融票据整单识别单个字段的内容
|
|
10068
10275
|
|
|
@@ -16855,6 +17062,97 @@ class LineInfo(AbstractModel):
|
|
|
16855
17062
|
|
|
16856
17063
|
|
|
16857
17064
|
|
|
17065
|
+
class ListInfo(AbstractModel):
|
|
17066
|
+
r"""用于展示结构化提取出的结果与输入给模型的提示词和模型的输出
|
|
17067
|
+
|
|
17068
|
+
"""
|
|
17069
|
+
|
|
17070
|
+
def __init__(self):
|
|
17071
|
+
r"""
|
|
17072
|
+
:param _QueryInfo: <p>推理任务的完整提示词。注:仅当QueryType=1/2/3时有效,否则返回为null。</p>
|
|
17073
|
+
:type QueryInfo: str
|
|
17074
|
+
:param _Answer: <p>根据QueryType对应任务的返回内容。注:仅当QueryType=1/2/3时有效,其他情况为null。</p>
|
|
17075
|
+
:type Answer: str
|
|
17076
|
+
:param _ExtractFields: <p>结构化提取结果。注:仅当QueryType=4时有效,否则返回null。</p>
|
|
17077
|
+
:type ExtractFields: list of FieldsInfo
|
|
17078
|
+
:param _TextDetections: <p>检测到的文本信息,包括内容、坐标以及旋转纠正后的坐标等,具体内容请参见 TextDetection。注:仅当QueryType=0时TextDetections不为空,否则返回null。</p>
|
|
17079
|
+
:type TextDetections: list of TextDetection
|
|
17080
|
+
"""
|
|
17081
|
+
self._QueryInfo = None
|
|
17082
|
+
self._Answer = None
|
|
17083
|
+
self._ExtractFields = None
|
|
17084
|
+
self._TextDetections = None
|
|
17085
|
+
|
|
17086
|
+
@property
|
|
17087
|
+
def QueryInfo(self):
|
|
17088
|
+
r"""<p>推理任务的完整提示词。注:仅当QueryType=1/2/3时有效,否则返回为null。</p>
|
|
17089
|
+
:rtype: str
|
|
17090
|
+
"""
|
|
17091
|
+
return self._QueryInfo
|
|
17092
|
+
|
|
17093
|
+
@QueryInfo.setter
|
|
17094
|
+
def QueryInfo(self, QueryInfo):
|
|
17095
|
+
self._QueryInfo = QueryInfo
|
|
17096
|
+
|
|
17097
|
+
@property
|
|
17098
|
+
def Answer(self):
|
|
17099
|
+
r"""<p>根据QueryType对应任务的返回内容。注:仅当QueryType=1/2/3时有效,其他情况为null。</p>
|
|
17100
|
+
:rtype: str
|
|
17101
|
+
"""
|
|
17102
|
+
return self._Answer
|
|
17103
|
+
|
|
17104
|
+
@Answer.setter
|
|
17105
|
+
def Answer(self, Answer):
|
|
17106
|
+
self._Answer = Answer
|
|
17107
|
+
|
|
17108
|
+
@property
|
|
17109
|
+
def ExtractFields(self):
|
|
17110
|
+
r"""<p>结构化提取结果。注:仅当QueryType=4时有效,否则返回null。</p>
|
|
17111
|
+
:rtype: list of FieldsInfo
|
|
17112
|
+
"""
|
|
17113
|
+
return self._ExtractFields
|
|
17114
|
+
|
|
17115
|
+
@ExtractFields.setter
|
|
17116
|
+
def ExtractFields(self, ExtractFields):
|
|
17117
|
+
self._ExtractFields = ExtractFields
|
|
17118
|
+
|
|
17119
|
+
@property
|
|
17120
|
+
def TextDetections(self):
|
|
17121
|
+
r"""<p>检测到的文本信息,包括内容、坐标以及旋转纠正后的坐标等,具体内容请参见 TextDetection。注:仅当QueryType=0时TextDetections不为空,否则返回null。</p>
|
|
17122
|
+
:rtype: list of TextDetection
|
|
17123
|
+
"""
|
|
17124
|
+
return self._TextDetections
|
|
17125
|
+
|
|
17126
|
+
@TextDetections.setter
|
|
17127
|
+
def TextDetections(self, TextDetections):
|
|
17128
|
+
self._TextDetections = TextDetections
|
|
17129
|
+
|
|
17130
|
+
|
|
17131
|
+
def _deserialize(self, params):
|
|
17132
|
+
self._QueryInfo = params.get("QueryInfo")
|
|
17133
|
+
self._Answer = params.get("Answer")
|
|
17134
|
+
if params.get("ExtractFields") is not None:
|
|
17135
|
+
self._ExtractFields = []
|
|
17136
|
+
for item in params.get("ExtractFields"):
|
|
17137
|
+
obj = FieldsInfo()
|
|
17138
|
+
obj._deserialize(item)
|
|
17139
|
+
self._ExtractFields.append(obj)
|
|
17140
|
+
if params.get("TextDetections") is not None:
|
|
17141
|
+
self._TextDetections = []
|
|
17142
|
+
for item in params.get("TextDetections"):
|
|
17143
|
+
obj = TextDetection()
|
|
17144
|
+
obj._deserialize(item)
|
|
17145
|
+
self._TextDetections.append(obj)
|
|
17146
|
+
memeber_set = set(params.keys())
|
|
17147
|
+
for name, value in vars(self).items():
|
|
17148
|
+
property_name = name[1:]
|
|
17149
|
+
if property_name in memeber_set:
|
|
17150
|
+
memeber_set.remove(property_name)
|
|
17151
|
+
if len(memeber_set) > 0:
|
|
17152
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
17153
|
+
|
|
17154
|
+
|
|
17155
|
+
|
|
16858
17156
|
class MLIDCardOCRRequest(AbstractModel):
|
|
16859
17157
|
r"""MLIDCardOCR请求参数结构体
|
|
16860
17158
|
|
|
@@ -24556,6 +24854,215 @@ class RailwayTicketInfo(AbstractModel):
|
|
|
24556
24854
|
|
|
24557
24855
|
|
|
24558
24856
|
|
|
24857
|
+
class RecognizeAgentRequest(AbstractModel):
|
|
24858
|
+
r"""RecognizeAgent请求参数结构体
|
|
24859
|
+
|
|
24860
|
+
"""
|
|
24861
|
+
|
|
24862
|
+
def __init__(self):
|
|
24863
|
+
r"""
|
|
24864
|
+
:param _ImageUrl: <p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
|
|
24865
|
+
:type ImageUrl: str
|
|
24866
|
+
:param _ImageBase64: <p>图片/PDF的 Base64 值。要求图片经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
|
|
24867
|
+
:type ImageBase64: str
|
|
24868
|
+
:param _PdfPageNumber: <p>需识别的PDF页码。仅支持PDF单页识别,当上传文件为PDF时有效。</p><p>默认值:1</p>
|
|
24869
|
+
:type PdfPageNumber: int
|
|
24870
|
+
:param _SelectModel: <p>模型选择。</p><p>枚举值:</p><ul><li>0: 推理模型。</li><li>1: 识别、推理模型。</li></ul><p>默认值:0</p>
|
|
24871
|
+
:type SelectModel: int
|
|
24872
|
+
:param _QueryType: <p>任务类型。</p><p>枚举值:</p><ul><li><p>0: 全文识别。识别且输出全文内容。</p></li><li><p>1: 判断。判断输入图的内容是否为Query中的内容,返回结果为是或否。如Query:"增值税发票",该任务类型下,将判断输入图是否为增值税发票,返回"是"或"否"。</p></li><li><p>2: 分类。判断输入图属于Query中具体哪个分类项。如Query:["营业执照","合同","票据"],在该任务类型下,将判断输入图是否属于"营业执照"、"合同"、"票据",返回"营业执照"/"合同"/"票据"或"均不符合"。</p></li><li><p>3: 总结提炼。总结输入图与Query相关的内容。如Query:"工作经历",在该任务类型下,将输出输入图中和"工作经历"相关的内容,或"无相关内容"。</p></li><li><p>4: 信息提取。按照自定义字段提取Key-Value,且支持多层级提取,详见入参SchemaItems说明。入参可参考下面的接口示例QueryType=4场景</p></li></ul><p>默认值:0</p>
|
|
24873
|
+
:type QueryType: int
|
|
24874
|
+
:param _SchemaItems: <p>自定义提取字段的结构,详见SchemaList结构。仅当QueryType=4时生效。</p><p>注:.N表示数组型参数。</p>
|
|
24875
|
+
:type SchemaItems: list of SchemaList
|
|
24876
|
+
:param _Query: <p>推理任务的提示词。与QueryType搭配使用,具体说明见QueryType描述。1)仅当QueryType=1/2/3时生效,且QueryType=1/3时,长度必须为1;2)QueryType=2,Query长度必须符合2≤x≤5。</p><p>注:.N表示数组型参数。</p>
|
|
24877
|
+
:type Query: list of str
|
|
24878
|
+
:param _EnableCoord: <p>是否需要返回坐标。</p><p>默认值:false</p><p>注:仅对QueryType=4时生效,且坐标位置为 Response.ExtractFields.Polygon。</p>
|
|
24879
|
+
:type EnableCoord: bool
|
|
24880
|
+
"""
|
|
24881
|
+
self._ImageUrl = None
|
|
24882
|
+
self._ImageBase64 = None
|
|
24883
|
+
self._PdfPageNumber = None
|
|
24884
|
+
self._SelectModel = None
|
|
24885
|
+
self._QueryType = None
|
|
24886
|
+
self._SchemaItems = None
|
|
24887
|
+
self._Query = None
|
|
24888
|
+
self._EnableCoord = None
|
|
24889
|
+
|
|
24890
|
+
@property
|
|
24891
|
+
def ImageUrl(self):
|
|
24892
|
+
r"""<p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
|
|
24893
|
+
:rtype: str
|
|
24894
|
+
"""
|
|
24895
|
+
return self._ImageUrl
|
|
24896
|
+
|
|
24897
|
+
@ImageUrl.setter
|
|
24898
|
+
def ImageUrl(self, ImageUrl):
|
|
24899
|
+
self._ImageUrl = ImageUrl
|
|
24900
|
+
|
|
24901
|
+
@property
|
|
24902
|
+
def ImageBase64(self):
|
|
24903
|
+
r"""<p>图片/PDF的 Base64 值。要求图片经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
|
|
24904
|
+
:rtype: str
|
|
24905
|
+
"""
|
|
24906
|
+
return self._ImageBase64
|
|
24907
|
+
|
|
24908
|
+
@ImageBase64.setter
|
|
24909
|
+
def ImageBase64(self, ImageBase64):
|
|
24910
|
+
self._ImageBase64 = ImageBase64
|
|
24911
|
+
|
|
24912
|
+
@property
|
|
24913
|
+
def PdfPageNumber(self):
|
|
24914
|
+
r"""<p>需识别的PDF页码。仅支持PDF单页识别,当上传文件为PDF时有效。</p><p>默认值:1</p>
|
|
24915
|
+
:rtype: int
|
|
24916
|
+
"""
|
|
24917
|
+
return self._PdfPageNumber
|
|
24918
|
+
|
|
24919
|
+
@PdfPageNumber.setter
|
|
24920
|
+
def PdfPageNumber(self, PdfPageNumber):
|
|
24921
|
+
self._PdfPageNumber = PdfPageNumber
|
|
24922
|
+
|
|
24923
|
+
@property
|
|
24924
|
+
def SelectModel(self):
|
|
24925
|
+
r"""<p>模型选择。</p><p>枚举值:</p><ul><li>0: 推理模型。</li><li>1: 识别、推理模型。</li></ul><p>默认值:0</p>
|
|
24926
|
+
:rtype: int
|
|
24927
|
+
"""
|
|
24928
|
+
return self._SelectModel
|
|
24929
|
+
|
|
24930
|
+
@SelectModel.setter
|
|
24931
|
+
def SelectModel(self, SelectModel):
|
|
24932
|
+
self._SelectModel = SelectModel
|
|
24933
|
+
|
|
24934
|
+
@property
|
|
24935
|
+
def QueryType(self):
|
|
24936
|
+
r"""<p>任务类型。</p><p>枚举值:</p><ul><li><p>0: 全文识别。识别且输出全文内容。</p></li><li><p>1: 判断。判断输入图的内容是否为Query中的内容,返回结果为是或否。如Query:"增值税发票",该任务类型下,将判断输入图是否为增值税发票,返回"是"或"否"。</p></li><li><p>2: 分类。判断输入图属于Query中具体哪个分类项。如Query:["营业执照","合同","票据"],在该任务类型下,将判断输入图是否属于"营业执照"、"合同"、"票据",返回"营业执照"/"合同"/"票据"或"均不符合"。</p></li><li><p>3: 总结提炼。总结输入图与Query相关的内容。如Query:"工作经历",在该任务类型下,将输出输入图中和"工作经历"相关的内容,或"无相关内容"。</p></li><li><p>4: 信息提取。按照自定义字段提取Key-Value,且支持多层级提取,详见入参SchemaItems说明。入参可参考下面的接口示例QueryType=4场景</p></li></ul><p>默认值:0</p>
|
|
24937
|
+
:rtype: int
|
|
24938
|
+
"""
|
|
24939
|
+
return self._QueryType
|
|
24940
|
+
|
|
24941
|
+
@QueryType.setter
|
|
24942
|
+
def QueryType(self, QueryType):
|
|
24943
|
+
self._QueryType = QueryType
|
|
24944
|
+
|
|
24945
|
+
@property
|
|
24946
|
+
def SchemaItems(self):
|
|
24947
|
+
r"""<p>自定义提取字段的结构,详见SchemaList结构。仅当QueryType=4时生效。</p><p>注:.N表示数组型参数。</p>
|
|
24948
|
+
:rtype: list of SchemaList
|
|
24949
|
+
"""
|
|
24950
|
+
return self._SchemaItems
|
|
24951
|
+
|
|
24952
|
+
@SchemaItems.setter
|
|
24953
|
+
def SchemaItems(self, SchemaItems):
|
|
24954
|
+
self._SchemaItems = SchemaItems
|
|
24955
|
+
|
|
24956
|
+
@property
|
|
24957
|
+
def Query(self):
|
|
24958
|
+
r"""<p>推理任务的提示词。与QueryType搭配使用,具体说明见QueryType描述。1)仅当QueryType=1/2/3时生效,且QueryType=1/3时,长度必须为1;2)QueryType=2,Query长度必须符合2≤x≤5。</p><p>注:.N表示数组型参数。</p>
|
|
24959
|
+
:rtype: list of str
|
|
24960
|
+
"""
|
|
24961
|
+
return self._Query
|
|
24962
|
+
|
|
24963
|
+
@Query.setter
|
|
24964
|
+
def Query(self, Query):
|
|
24965
|
+
self._Query = Query
|
|
24966
|
+
|
|
24967
|
+
@property
|
|
24968
|
+
def EnableCoord(self):
|
|
24969
|
+
r"""<p>是否需要返回坐标。</p><p>默认值:false</p><p>注:仅对QueryType=4时生效,且坐标位置为 Response.ExtractFields.Polygon。</p>
|
|
24970
|
+
:rtype: bool
|
|
24971
|
+
"""
|
|
24972
|
+
return self._EnableCoord
|
|
24973
|
+
|
|
24974
|
+
@EnableCoord.setter
|
|
24975
|
+
def EnableCoord(self, EnableCoord):
|
|
24976
|
+
self._EnableCoord = EnableCoord
|
|
24977
|
+
|
|
24978
|
+
|
|
24979
|
+
def _deserialize(self, params):
|
|
24980
|
+
self._ImageUrl = params.get("ImageUrl")
|
|
24981
|
+
self._ImageBase64 = params.get("ImageBase64")
|
|
24982
|
+
self._PdfPageNumber = params.get("PdfPageNumber")
|
|
24983
|
+
self._SelectModel = params.get("SelectModel")
|
|
24984
|
+
self._QueryType = params.get("QueryType")
|
|
24985
|
+
if params.get("SchemaItems") is not None:
|
|
24986
|
+
self._SchemaItems = []
|
|
24987
|
+
for item in params.get("SchemaItems"):
|
|
24988
|
+
obj = SchemaList()
|
|
24989
|
+
obj._deserialize(item)
|
|
24990
|
+
self._SchemaItems.append(obj)
|
|
24991
|
+
self._Query = params.get("Query")
|
|
24992
|
+
self._EnableCoord = params.get("EnableCoord")
|
|
24993
|
+
memeber_set = set(params.keys())
|
|
24994
|
+
for name, value in vars(self).items():
|
|
24995
|
+
property_name = name[1:]
|
|
24996
|
+
if property_name in memeber_set:
|
|
24997
|
+
memeber_set.remove(property_name)
|
|
24998
|
+
if len(memeber_set) > 0:
|
|
24999
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
25000
|
+
|
|
25001
|
+
|
|
25002
|
+
|
|
25003
|
+
class RecognizeAgentResponse(AbstractModel):
|
|
25004
|
+
r"""RecognizeAgent返回参数结构体
|
|
25005
|
+
|
|
25006
|
+
"""
|
|
25007
|
+
|
|
25008
|
+
def __init__(self):
|
|
25009
|
+
r"""
|
|
25010
|
+
:param _Response: <p>返回内容。详见ListInfo。</p>
|
|
25011
|
+
:type Response: list of ListInfo
|
|
25012
|
+
:param _Angle: <p>图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。</p>
|
|
25013
|
+
:type Angle: float
|
|
25014
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
25015
|
+
:type RequestId: str
|
|
25016
|
+
"""
|
|
25017
|
+
self._Response = None
|
|
25018
|
+
self._Angle = None
|
|
25019
|
+
self._RequestId = None
|
|
25020
|
+
|
|
25021
|
+
@property
|
|
25022
|
+
def Response(self):
|
|
25023
|
+
r"""<p>返回内容。详见ListInfo。</p>
|
|
25024
|
+
:rtype: list of ListInfo
|
|
25025
|
+
"""
|
|
25026
|
+
return self._Response
|
|
25027
|
+
|
|
25028
|
+
@Response.setter
|
|
25029
|
+
def Response(self, Response):
|
|
25030
|
+
self._Response = Response
|
|
25031
|
+
|
|
25032
|
+
@property
|
|
25033
|
+
def Angle(self):
|
|
25034
|
+
r"""<p>图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。</p>
|
|
25035
|
+
:rtype: float
|
|
25036
|
+
"""
|
|
25037
|
+
return self._Angle
|
|
25038
|
+
|
|
25039
|
+
@Angle.setter
|
|
25040
|
+
def Angle(self, Angle):
|
|
25041
|
+
self._Angle = Angle
|
|
25042
|
+
|
|
25043
|
+
@property
|
|
25044
|
+
def RequestId(self):
|
|
25045
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
25046
|
+
:rtype: str
|
|
25047
|
+
"""
|
|
25048
|
+
return self._RequestId
|
|
25049
|
+
|
|
25050
|
+
@RequestId.setter
|
|
25051
|
+
def RequestId(self, RequestId):
|
|
25052
|
+
self._RequestId = RequestId
|
|
25053
|
+
|
|
25054
|
+
|
|
25055
|
+
def _deserialize(self, params):
|
|
25056
|
+
if params.get("Response") is not None:
|
|
25057
|
+
self._Response = []
|
|
25058
|
+
for item in params.get("Response"):
|
|
25059
|
+
obj = ListInfo()
|
|
25060
|
+
obj._deserialize(item)
|
|
25061
|
+
self._Response.append(obj)
|
|
25062
|
+
self._Angle = params.get("Angle")
|
|
25063
|
+
self._RequestId = params.get("RequestId")
|
|
25064
|
+
|
|
25065
|
+
|
|
24559
25066
|
class RecognizeContainerOCRRequest(AbstractModel):
|
|
24560
25067
|
r"""RecognizeContainerOCR请求参数结构体
|
|
24561
25068
|
|
|
@@ -29474,6 +29981,163 @@ class SaleInventory(AbstractModel):
|
|
|
29474
29981
|
|
|
29475
29982
|
|
|
29476
29983
|
|
|
29984
|
+
class SceneWarnInfo(AbstractModel):
|
|
29985
|
+
r"""用于风险提示和表示不同场景下的风险程度
|
|
29986
|
+
|
|
29987
|
+
"""
|
|
29988
|
+
|
|
29989
|
+
def __init__(self):
|
|
29990
|
+
r"""
|
|
29991
|
+
:param _IsWarn: <p>是否存在该提示</p>
|
|
29992
|
+
:type IsWarn: bool
|
|
29993
|
+
:param _RiskConfidence: <p>风险程度(0-1)</p>
|
|
29994
|
+
:type RiskConfidence: float
|
|
29995
|
+
:param _Polygon: <p>提示位置四点坐标,仅部分提示类型支持返回提示位置坐标</p>
|
|
29996
|
+
:type Polygon: list of Polygon
|
|
29997
|
+
"""
|
|
29998
|
+
self._IsWarn = None
|
|
29999
|
+
self._RiskConfidence = None
|
|
30000
|
+
self._Polygon = None
|
|
30001
|
+
|
|
30002
|
+
@property
|
|
30003
|
+
def IsWarn(self):
|
|
30004
|
+
r"""<p>是否存在该提示</p>
|
|
30005
|
+
:rtype: bool
|
|
30006
|
+
"""
|
|
30007
|
+
return self._IsWarn
|
|
30008
|
+
|
|
30009
|
+
@IsWarn.setter
|
|
30010
|
+
def IsWarn(self, IsWarn):
|
|
30011
|
+
self._IsWarn = IsWarn
|
|
30012
|
+
|
|
30013
|
+
@property
|
|
30014
|
+
def RiskConfidence(self):
|
|
30015
|
+
r"""<p>风险程度(0-1)</p>
|
|
30016
|
+
:rtype: float
|
|
30017
|
+
"""
|
|
30018
|
+
return self._RiskConfidence
|
|
30019
|
+
|
|
30020
|
+
@RiskConfidence.setter
|
|
30021
|
+
def RiskConfidence(self, RiskConfidence):
|
|
30022
|
+
self._RiskConfidence = RiskConfidence
|
|
30023
|
+
|
|
30024
|
+
@property
|
|
30025
|
+
def Polygon(self):
|
|
30026
|
+
r"""<p>提示位置四点坐标,仅部分提示类型支持返回提示位置坐标</p>
|
|
30027
|
+
:rtype: list of Polygon
|
|
30028
|
+
"""
|
|
30029
|
+
return self._Polygon
|
|
30030
|
+
|
|
30031
|
+
@Polygon.setter
|
|
30032
|
+
def Polygon(self, Polygon):
|
|
30033
|
+
self._Polygon = Polygon
|
|
30034
|
+
|
|
30035
|
+
|
|
30036
|
+
def _deserialize(self, params):
|
|
30037
|
+
self._IsWarn = params.get("IsWarn")
|
|
30038
|
+
self._RiskConfidence = params.get("RiskConfidence")
|
|
30039
|
+
if params.get("Polygon") is not None:
|
|
30040
|
+
self._Polygon = []
|
|
30041
|
+
for item in params.get("Polygon"):
|
|
30042
|
+
obj = Polygon()
|
|
30043
|
+
obj._deserialize(item)
|
|
30044
|
+
self._Polygon.append(obj)
|
|
30045
|
+
memeber_set = set(params.keys())
|
|
30046
|
+
for name, value in vars(self).items():
|
|
30047
|
+
property_name = name[1:]
|
|
30048
|
+
if property_name in memeber_set:
|
|
30049
|
+
memeber_set.remove(property_name)
|
|
30050
|
+
if len(memeber_set) > 0:
|
|
30051
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
30052
|
+
|
|
30053
|
+
|
|
30054
|
+
|
|
30055
|
+
class SchemaList(AbstractModel):
|
|
30056
|
+
r"""描述用户提供的出参结构的模板
|
|
30057
|
+
|
|
30058
|
+
"""
|
|
30059
|
+
|
|
30060
|
+
def __init__(self):
|
|
30061
|
+
r"""
|
|
30062
|
+
:param _KeyName: <p>自定义需提取的字段名称。注:若需提取多个字段,可定义多个KeyName。</p>
|
|
30063
|
+
:type KeyName: str
|
|
30064
|
+
:param _KeyType: <p>字段类型。</p><p>枚举值:</p><ul><li>0: 表示KeyName为简单字段(如姓名、性别等)。</li><li>1: 表示KeyName为数组对象(如工作经历、教育经历列表)。</li></ul>
|
|
30065
|
+
:type KeyType: int
|
|
30066
|
+
:param _KeyPrompt: <p>补充提取字段的描述。</p>
|
|
30067
|
+
:type KeyPrompt: str
|
|
30068
|
+
:param _SubItems: <p>嵌套SchemaList结构,最多支持嵌套三层。注:仅当KeyType=1时生效。</p>
|
|
30069
|
+
:type SubItems: list of SchemaList
|
|
30070
|
+
"""
|
|
30071
|
+
self._KeyName = None
|
|
30072
|
+
self._KeyType = None
|
|
30073
|
+
self._KeyPrompt = None
|
|
30074
|
+
self._SubItems = None
|
|
30075
|
+
|
|
30076
|
+
@property
|
|
30077
|
+
def KeyName(self):
|
|
30078
|
+
r"""<p>自定义需提取的字段名称。注:若需提取多个字段,可定义多个KeyName。</p>
|
|
30079
|
+
:rtype: str
|
|
30080
|
+
"""
|
|
30081
|
+
return self._KeyName
|
|
30082
|
+
|
|
30083
|
+
@KeyName.setter
|
|
30084
|
+
def KeyName(self, KeyName):
|
|
30085
|
+
self._KeyName = KeyName
|
|
30086
|
+
|
|
30087
|
+
@property
|
|
30088
|
+
def KeyType(self):
|
|
30089
|
+
r"""<p>字段类型。</p><p>枚举值:</p><ul><li>0: 表示KeyName为简单字段(如姓名、性别等)。</li><li>1: 表示KeyName为数组对象(如工作经历、教育经历列表)。</li></ul>
|
|
30090
|
+
:rtype: int
|
|
30091
|
+
"""
|
|
30092
|
+
return self._KeyType
|
|
30093
|
+
|
|
30094
|
+
@KeyType.setter
|
|
30095
|
+
def KeyType(self, KeyType):
|
|
30096
|
+
self._KeyType = KeyType
|
|
30097
|
+
|
|
30098
|
+
@property
|
|
30099
|
+
def KeyPrompt(self):
|
|
30100
|
+
r"""<p>补充提取字段的描述。</p>
|
|
30101
|
+
:rtype: str
|
|
30102
|
+
"""
|
|
30103
|
+
return self._KeyPrompt
|
|
30104
|
+
|
|
30105
|
+
@KeyPrompt.setter
|
|
30106
|
+
def KeyPrompt(self, KeyPrompt):
|
|
30107
|
+
self._KeyPrompt = KeyPrompt
|
|
30108
|
+
|
|
30109
|
+
@property
|
|
30110
|
+
def SubItems(self):
|
|
30111
|
+
r"""<p>嵌套SchemaList结构,最多支持嵌套三层。注:仅当KeyType=1时生效。</p>
|
|
30112
|
+
:rtype: list of SchemaList
|
|
30113
|
+
"""
|
|
30114
|
+
return self._SubItems
|
|
30115
|
+
|
|
30116
|
+
@SubItems.setter
|
|
30117
|
+
def SubItems(self, SubItems):
|
|
30118
|
+
self._SubItems = SubItems
|
|
30119
|
+
|
|
30120
|
+
|
|
30121
|
+
def _deserialize(self, params):
|
|
30122
|
+
self._KeyName = params.get("KeyName")
|
|
30123
|
+
self._KeyType = params.get("KeyType")
|
|
30124
|
+
self._KeyPrompt = params.get("KeyPrompt")
|
|
30125
|
+
if params.get("SubItems") is not None:
|
|
30126
|
+
self._SubItems = []
|
|
30127
|
+
for item in params.get("SubItems"):
|
|
30128
|
+
obj = SchemaList()
|
|
30129
|
+
obj._deserialize(item)
|
|
30130
|
+
self._SubItems.append(obj)
|
|
30131
|
+
memeber_set = set(params.keys())
|
|
30132
|
+
for name, value in vars(self).items():
|
|
30133
|
+
property_name = name[1:]
|
|
30134
|
+
if property_name in memeber_set:
|
|
30135
|
+
memeber_set.remove(property_name)
|
|
30136
|
+
if len(memeber_set) > 0:
|
|
30137
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
30138
|
+
|
|
30139
|
+
|
|
30140
|
+
|
|
29477
30141
|
class SealInfo(AbstractModel):
|
|
29478
30142
|
r"""印章信息
|
|
29479
30143
|
|
|
@@ -31440,6 +32104,47 @@ class StructuralItem(AbstractModel):
|
|
|
31440
32104
|
|
|
31441
32105
|
|
|
31442
32106
|
|
|
32107
|
+
class SubItemGroup(AbstractModel):
|
|
32108
|
+
r"""用于分层展示抽取出的信息
|
|
32109
|
+
|
|
32110
|
+
"""
|
|
32111
|
+
|
|
32112
|
+
def __init__(self):
|
|
32113
|
+
r"""
|
|
32114
|
+
:param _Groups: <p>子结构嵌套FieldsInfo结构</p>
|
|
32115
|
+
:type Groups: list of FieldsInfo
|
|
32116
|
+
"""
|
|
32117
|
+
self._Groups = None
|
|
32118
|
+
|
|
32119
|
+
@property
|
|
32120
|
+
def Groups(self):
|
|
32121
|
+
r"""<p>子结构嵌套FieldsInfo结构</p>
|
|
32122
|
+
:rtype: list of FieldsInfo
|
|
32123
|
+
"""
|
|
32124
|
+
return self._Groups
|
|
32125
|
+
|
|
32126
|
+
@Groups.setter
|
|
32127
|
+
def Groups(self, Groups):
|
|
32128
|
+
self._Groups = Groups
|
|
32129
|
+
|
|
32130
|
+
|
|
32131
|
+
def _deserialize(self, params):
|
|
32132
|
+
if params.get("Groups") is not None:
|
|
32133
|
+
self._Groups = []
|
|
32134
|
+
for item in params.get("Groups"):
|
|
32135
|
+
obj = FieldsInfo()
|
|
32136
|
+
obj._deserialize(item)
|
|
32137
|
+
self._Groups.append(obj)
|
|
32138
|
+
memeber_set = set(params.keys())
|
|
32139
|
+
for name, value in vars(self).items():
|
|
32140
|
+
property_name = name[1:]
|
|
32141
|
+
if property_name in memeber_set:
|
|
32142
|
+
memeber_set.remove(property_name)
|
|
32143
|
+
if len(memeber_set) > 0:
|
|
32144
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
32145
|
+
|
|
32146
|
+
|
|
32147
|
+
|
|
31443
32148
|
class SubmitExtractDocAgentJobRequest(AbstractModel):
|
|
31444
32149
|
r"""SubmitExtractDocAgentJob请求参数结构体
|
|
31445
32150
|
|
|
@@ -43033,6 +43738,200 @@ class VerifyOfdVatInvoiceOCRResponse(AbstractModel):
|
|
|
43033
43738
|
self._RequestId = params.get("RequestId")
|
|
43034
43739
|
|
|
43035
43740
|
|
|
43741
|
+
class VerifyScenePhotoRequest(AbstractModel):
|
|
43742
|
+
r"""VerifyScenePhoto请求参数结构体
|
|
43743
|
+
|
|
43744
|
+
"""
|
|
43745
|
+
|
|
43746
|
+
def __init__(self):
|
|
43747
|
+
r"""
|
|
43748
|
+
:param _Scene: <p>场景类型参数,如果场景无法细分请选用该大类的第一个子类,目前支持以下类型:<br><strong>经营场所照</strong><br>0101 门头照<br>0102 店内照<br>0103 流动经营照</p>
|
|
43749
|
+
:type Scene: str
|
|
43750
|
+
:param _ImageUrl: <p>图片的 Url 地址。要求图片经Base64编码后不超过 10M。</p>
|
|
43751
|
+
:type ImageUrl: str
|
|
43752
|
+
:param _ImageBase64: <p>图片的 Base64 值。要求图片经Base64编码后不超过 10M。</p>
|
|
43753
|
+
:type ImageBase64: str
|
|
43754
|
+
"""
|
|
43755
|
+
self._Scene = None
|
|
43756
|
+
self._ImageUrl = None
|
|
43757
|
+
self._ImageBase64 = None
|
|
43758
|
+
|
|
43759
|
+
@property
|
|
43760
|
+
def Scene(self):
|
|
43761
|
+
r"""<p>场景类型参数,如果场景无法细分请选用该大类的第一个子类,目前支持以下类型:<br><strong>经营场所照</strong><br>0101 门头照<br>0102 店内照<br>0103 流动经营照</p>
|
|
43762
|
+
:rtype: str
|
|
43763
|
+
"""
|
|
43764
|
+
return self._Scene
|
|
43765
|
+
|
|
43766
|
+
@Scene.setter
|
|
43767
|
+
def Scene(self, Scene):
|
|
43768
|
+
self._Scene = Scene
|
|
43769
|
+
|
|
43770
|
+
@property
|
|
43771
|
+
def ImageUrl(self):
|
|
43772
|
+
r"""<p>图片的 Url 地址。要求图片经Base64编码后不超过 10M。</p>
|
|
43773
|
+
:rtype: str
|
|
43774
|
+
"""
|
|
43775
|
+
return self._ImageUrl
|
|
43776
|
+
|
|
43777
|
+
@ImageUrl.setter
|
|
43778
|
+
def ImageUrl(self, ImageUrl):
|
|
43779
|
+
self._ImageUrl = ImageUrl
|
|
43780
|
+
|
|
43781
|
+
@property
|
|
43782
|
+
def ImageBase64(self):
|
|
43783
|
+
r"""<p>图片的 Base64 值。要求图片经Base64编码后不超过 10M。</p>
|
|
43784
|
+
:rtype: str
|
|
43785
|
+
"""
|
|
43786
|
+
return self._ImageBase64
|
|
43787
|
+
|
|
43788
|
+
@ImageBase64.setter
|
|
43789
|
+
def ImageBase64(self, ImageBase64):
|
|
43790
|
+
self._ImageBase64 = ImageBase64
|
|
43791
|
+
|
|
43792
|
+
|
|
43793
|
+
def _deserialize(self, params):
|
|
43794
|
+
self._Scene = params.get("Scene")
|
|
43795
|
+
self._ImageUrl = params.get("ImageUrl")
|
|
43796
|
+
self._ImageBase64 = params.get("ImageBase64")
|
|
43797
|
+
memeber_set = set(params.keys())
|
|
43798
|
+
for name, value in vars(self).items():
|
|
43799
|
+
property_name = name[1:]
|
|
43800
|
+
if property_name in memeber_set:
|
|
43801
|
+
memeber_set.remove(property_name)
|
|
43802
|
+
if len(memeber_set) > 0:
|
|
43803
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
43804
|
+
|
|
43805
|
+
|
|
43806
|
+
|
|
43807
|
+
class VerifyScenePhotoResponse(AbstractModel):
|
|
43808
|
+
r"""VerifyScenePhoto返回参数结构体
|
|
43809
|
+
|
|
43810
|
+
"""
|
|
43811
|
+
|
|
43812
|
+
def __init__(self):
|
|
43813
|
+
r"""
|
|
43814
|
+
:param _Tamper: <p>区域篡改提示</p>
|
|
43815
|
+
:type Tamper: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43816
|
+
:param _Synthesis: <p>AIGC合成提示</p>
|
|
43817
|
+
:type Synthesis: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43818
|
+
:param _RemakeScreen: <p>屏幕翻拍提示</p>
|
|
43819
|
+
:type RemakeScreen: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43820
|
+
:param _Screenshot: <p>截图提示</p>
|
|
43821
|
+
:type Screenshot: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43822
|
+
:param _TextWatermark: <p>文字水印提示</p>
|
|
43823
|
+
:type TextWatermark: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43824
|
+
:param _WatermarkContent: <p>水印内容,当未检测到文字水印时不返回,返回多组水印时以 | 分隔。</p>
|
|
43825
|
+
:type WatermarkContent: str
|
|
43826
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
43827
|
+
:type RequestId: str
|
|
43828
|
+
"""
|
|
43829
|
+
self._Tamper = None
|
|
43830
|
+
self._Synthesis = None
|
|
43831
|
+
self._RemakeScreen = None
|
|
43832
|
+
self._Screenshot = None
|
|
43833
|
+
self._TextWatermark = None
|
|
43834
|
+
self._WatermarkContent = None
|
|
43835
|
+
self._RequestId = None
|
|
43836
|
+
|
|
43837
|
+
@property
|
|
43838
|
+
def Tamper(self):
|
|
43839
|
+
r"""<p>区域篡改提示</p>
|
|
43840
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43841
|
+
"""
|
|
43842
|
+
return self._Tamper
|
|
43843
|
+
|
|
43844
|
+
@Tamper.setter
|
|
43845
|
+
def Tamper(self, Tamper):
|
|
43846
|
+
self._Tamper = Tamper
|
|
43847
|
+
|
|
43848
|
+
@property
|
|
43849
|
+
def Synthesis(self):
|
|
43850
|
+
r"""<p>AIGC合成提示</p>
|
|
43851
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43852
|
+
"""
|
|
43853
|
+
return self._Synthesis
|
|
43854
|
+
|
|
43855
|
+
@Synthesis.setter
|
|
43856
|
+
def Synthesis(self, Synthesis):
|
|
43857
|
+
self._Synthesis = Synthesis
|
|
43858
|
+
|
|
43859
|
+
@property
|
|
43860
|
+
def RemakeScreen(self):
|
|
43861
|
+
r"""<p>屏幕翻拍提示</p>
|
|
43862
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43863
|
+
"""
|
|
43864
|
+
return self._RemakeScreen
|
|
43865
|
+
|
|
43866
|
+
@RemakeScreen.setter
|
|
43867
|
+
def RemakeScreen(self, RemakeScreen):
|
|
43868
|
+
self._RemakeScreen = RemakeScreen
|
|
43869
|
+
|
|
43870
|
+
@property
|
|
43871
|
+
def Screenshot(self):
|
|
43872
|
+
r"""<p>截图提示</p>
|
|
43873
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43874
|
+
"""
|
|
43875
|
+
return self._Screenshot
|
|
43876
|
+
|
|
43877
|
+
@Screenshot.setter
|
|
43878
|
+
def Screenshot(self, Screenshot):
|
|
43879
|
+
self._Screenshot = Screenshot
|
|
43880
|
+
|
|
43881
|
+
@property
|
|
43882
|
+
def TextWatermark(self):
|
|
43883
|
+
r"""<p>文字水印提示</p>
|
|
43884
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SceneWarnInfo`
|
|
43885
|
+
"""
|
|
43886
|
+
return self._TextWatermark
|
|
43887
|
+
|
|
43888
|
+
@TextWatermark.setter
|
|
43889
|
+
def TextWatermark(self, TextWatermark):
|
|
43890
|
+
self._TextWatermark = TextWatermark
|
|
43891
|
+
|
|
43892
|
+
@property
|
|
43893
|
+
def WatermarkContent(self):
|
|
43894
|
+
r"""<p>水印内容,当未检测到文字水印时不返回,返回多组水印时以 | 分隔。</p>
|
|
43895
|
+
:rtype: str
|
|
43896
|
+
"""
|
|
43897
|
+
return self._WatermarkContent
|
|
43898
|
+
|
|
43899
|
+
@WatermarkContent.setter
|
|
43900
|
+
def WatermarkContent(self, WatermarkContent):
|
|
43901
|
+
self._WatermarkContent = WatermarkContent
|
|
43902
|
+
|
|
43903
|
+
@property
|
|
43904
|
+
def RequestId(self):
|
|
43905
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
43906
|
+
:rtype: str
|
|
43907
|
+
"""
|
|
43908
|
+
return self._RequestId
|
|
43909
|
+
|
|
43910
|
+
@RequestId.setter
|
|
43911
|
+
def RequestId(self, RequestId):
|
|
43912
|
+
self._RequestId = RequestId
|
|
43913
|
+
|
|
43914
|
+
|
|
43915
|
+
def _deserialize(self, params):
|
|
43916
|
+
if params.get("Tamper") is not None:
|
|
43917
|
+
self._Tamper = SceneWarnInfo()
|
|
43918
|
+
self._Tamper._deserialize(params.get("Tamper"))
|
|
43919
|
+
if params.get("Synthesis") is not None:
|
|
43920
|
+
self._Synthesis = SceneWarnInfo()
|
|
43921
|
+
self._Synthesis._deserialize(params.get("Synthesis"))
|
|
43922
|
+
if params.get("RemakeScreen") is not None:
|
|
43923
|
+
self._RemakeScreen = SceneWarnInfo()
|
|
43924
|
+
self._RemakeScreen._deserialize(params.get("RemakeScreen"))
|
|
43925
|
+
if params.get("Screenshot") is not None:
|
|
43926
|
+
self._Screenshot = SceneWarnInfo()
|
|
43927
|
+
self._Screenshot._deserialize(params.get("Screenshot"))
|
|
43928
|
+
if params.get("TextWatermark") is not None:
|
|
43929
|
+
self._TextWatermark = SceneWarnInfo()
|
|
43930
|
+
self._TextWatermark._deserialize(params.get("TextWatermark"))
|
|
43931
|
+
self._WatermarkContent = params.get("WatermarkContent")
|
|
43932
|
+
self._RequestId = params.get("RequestId")
|
|
43933
|
+
|
|
43934
|
+
|
|
43036
43935
|
class VinOCRRequest(AbstractModel):
|
|
43037
43936
|
r"""VinOCR请求参数结构体
|
|
43038
43937
|
|
|
@@ -1606,6 +1606,30 @@ class OcrClient(AbstractClient):
|
|
|
1606
1606
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1607
1607
|
|
|
1608
1608
|
|
|
1609
|
+
def RecognizeAgent(self, request):
|
|
1610
|
+
r"""支持对输入图的内容进行判断、分类以及总结;支持用户对通用文字识别输出结构进行自定义。
|
|
1611
|
+
默认接口请求频率限制:1次/秒
|
|
1612
|
+
|
|
1613
|
+
:param request: Request instance for RecognizeAgent.
|
|
1614
|
+
:type request: :class:`tencentcloud.ocr.v20181119.models.RecognizeAgentRequest`
|
|
1615
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.RecognizeAgentResponse`
|
|
1616
|
+
|
|
1617
|
+
"""
|
|
1618
|
+
try:
|
|
1619
|
+
params = request._serialize()
|
|
1620
|
+
headers = request.headers
|
|
1621
|
+
body = self.call("RecognizeAgent", params, headers=headers)
|
|
1622
|
+
response = json.loads(body)
|
|
1623
|
+
model = models.RecognizeAgentResponse()
|
|
1624
|
+
model._deserialize(response["Response"])
|
|
1625
|
+
return model
|
|
1626
|
+
except Exception as e:
|
|
1627
|
+
if isinstance(e, TencentCloudSDKException):
|
|
1628
|
+
raise
|
|
1629
|
+
else:
|
|
1630
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1631
|
+
|
|
1632
|
+
|
|
1609
1633
|
def RecognizeContainerOCR(self, request):
|
|
1610
1634
|
r"""本接口支持集装箱箱门信息识别,识别字段包括集装箱箱号、类型、总重量、有效承重、容量、自身重量,具备集装箱箱号、类型不完整或者不清晰的告警功能。
|
|
1611
1635
|
默认接口请求频率限制:5次/秒。
|
|
@@ -2752,6 +2776,30 @@ class OcrClient(AbstractClient):
|
|
|
2752
2776
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
2753
2777
|
|
|
2754
2778
|
|
|
2779
|
+
def VerifyScenePhoto(self, request):
|
|
2780
|
+
r"""提供针对特定场景(如商户门头照、车牌等)图片的PS篡改、AIGC合成、图片质量检测能力,可应用于业务流程中对特定场景图片真实性、有效性校验的场景。
|
|
2781
|
+
默认接口请求频率限制:10次/秒
|
|
2782
|
+
|
|
2783
|
+
:param request: Request instance for VerifyScenePhoto.
|
|
2784
|
+
:type request: :class:`tencentcloud.ocr.v20181119.models.VerifyScenePhotoRequest`
|
|
2785
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.VerifyScenePhotoResponse`
|
|
2786
|
+
|
|
2787
|
+
"""
|
|
2788
|
+
try:
|
|
2789
|
+
params = request._serialize()
|
|
2790
|
+
headers = request.headers
|
|
2791
|
+
body = self.call("VerifyScenePhoto", params, headers=headers)
|
|
2792
|
+
response = json.loads(body)
|
|
2793
|
+
model = models.VerifyScenePhotoResponse()
|
|
2794
|
+
model._deserialize(response["Response"])
|
|
2795
|
+
return model
|
|
2796
|
+
except Exception as e:
|
|
2797
|
+
if isinstance(e, TencentCloudSDKException):
|
|
2798
|
+
raise
|
|
2799
|
+
else:
|
|
2800
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
2801
|
+
|
|
2802
|
+
|
|
2755
2803
|
def VinOCR(self, request):
|
|
2756
2804
|
r"""本接口支持图片内车辆识别代号(VIN)的检测和识别。
|
|
2757
2805
|
默认接口请求频率限制:10次/秒。
|
|
@@ -1335,6 +1335,25 @@ class OcrClient(AbstractClient):
|
|
|
1335
1335
|
|
|
1336
1336
|
return await self.call_and_deserialize(**kwargs)
|
|
1337
1337
|
|
|
1338
|
+
async def RecognizeAgent(
|
|
1339
|
+
self,
|
|
1340
|
+
request: models.RecognizeAgentRequest,
|
|
1341
|
+
opts: Dict = None,
|
|
1342
|
+
) -> models.RecognizeAgentResponse:
|
|
1343
|
+
"""
|
|
1344
|
+
支持对输入图的内容进行判断、分类以及总结;支持用户对通用文字识别输出结构进行自定义。
|
|
1345
|
+
默认接口请求频率限制:1次/秒
|
|
1346
|
+
"""
|
|
1347
|
+
|
|
1348
|
+
kwargs = {}
|
|
1349
|
+
kwargs["action"] = "RecognizeAgent"
|
|
1350
|
+
kwargs["params"] = request._serialize()
|
|
1351
|
+
kwargs["resp_cls"] = models.RecognizeAgentResponse
|
|
1352
|
+
kwargs["headers"] = request.headers
|
|
1353
|
+
kwargs["opts"] = opts or {}
|
|
1354
|
+
|
|
1355
|
+
return await self.call_and_deserialize(**kwargs)
|
|
1356
|
+
|
|
1338
1357
|
async def RecognizeContainerOCR(
|
|
1339
1358
|
self,
|
|
1340
1359
|
request: models.RecognizeContainerOCRRequest,
|
|
@@ -2306,6 +2325,25 @@ class OcrClient(AbstractClient):
|
|
|
2306
2325
|
|
|
2307
2326
|
return await self.call_and_deserialize(**kwargs)
|
|
2308
2327
|
|
|
2328
|
+
async def VerifyScenePhoto(
|
|
2329
|
+
self,
|
|
2330
|
+
request: models.VerifyScenePhotoRequest,
|
|
2331
|
+
opts: Dict = None,
|
|
2332
|
+
) -> models.VerifyScenePhotoResponse:
|
|
2333
|
+
"""
|
|
2334
|
+
提供针对特定场景(如商户门头照、车牌等)图片的PS篡改、AIGC合成、图片质量检测能力,可应用于业务流程中对特定场景图片真实性、有效性校验的场景。
|
|
2335
|
+
默认接口请求频率限制:10次/秒
|
|
2336
|
+
"""
|
|
2337
|
+
|
|
2338
|
+
kwargs = {}
|
|
2339
|
+
kwargs["action"] = "VerifyScenePhoto"
|
|
2340
|
+
kwargs["params"] = request._serialize()
|
|
2341
|
+
kwargs["resp_cls"] = models.VerifyScenePhotoResponse
|
|
2342
|
+
kwargs["headers"] = request.headers
|
|
2343
|
+
kwargs["opts"] = opts or {}
|
|
2344
|
+
|
|
2345
|
+
return await self.call_and_deserialize(**kwargs)
|
|
2346
|
+
|
|
2309
2347
|
async def VinOCR(
|
|
2310
2348
|
self,
|
|
2311
2349
|
request: models.VinOCRRequest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-ocr
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.91
|
|
4
4
|
Summary: Tencent Cloud Ocr SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.91
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common<4.0.0,>=3.1.91
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common<4.0.0,>=3.1.88
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|