tencentcloud-sdk-bda 1.0.200
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.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-bda.rb +11 -0
- data/lib/v20200324/client.rb +495 -0
- data/lib/v20200324/models.rb +1789 -0
- metadata +66 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: e15fa9e092cea9c8f8285946ecee625340dd6230
|
|
4
|
+
data.tar.gz: 75e1b2b8fef8caee8b06c777c13445387ebcb95e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 07ae1e2fcbe6ea7b4c65a79c3e692dc033c92e2a33baf553a3b96437b301e0811e365d4f68b2e83c715b52d09560064dfe417aeeeb4d6f36f97660357513ecdf
|
|
7
|
+
data.tar.gz: f100b0c9e01cb7cbbde1b9b65235cc58ecdc48473bda8b762b2585e3bdd95047a11688aa2fe51b6b25ad3e2fe957e7c2c059056ad1323e83122a0e7ce8747862
|
data/lib/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.200
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
require 'json'
|
|
18
|
+
|
|
19
|
+
module TencentCloud
|
|
20
|
+
module Bda
|
|
21
|
+
module V20200324
|
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
|
23
|
+
|
|
24
|
+
def initialize(credential, region, profile = nil)
|
|
25
|
+
api_version = '2020-03-24'
|
|
26
|
+
api_endpoint = 'bda.tencentcloudapi.com'
|
|
27
|
+
sdk_version = 'BDA_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# 用于创建一个空的人体库,如果人体库已存在返回错误。
|
|
33
|
+
|
|
34
|
+
# 1个APPID下最多有2000W个人体轨迹(Trace),最多1W个人体库(Group)。
|
|
35
|
+
|
|
36
|
+
# 单个人体库(Group)最多10W个人体轨迹(Trace)。
|
|
37
|
+
|
|
38
|
+
# 单个人员(Person)最多添加 5 个人体轨迹(Trace)。
|
|
39
|
+
|
|
40
|
+
# @param request: Request instance for CreateGroup.
|
|
41
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::CreateGroupRequest`
|
|
42
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::CreateGroupResponse`
|
|
43
|
+
def CreateGroup(request)
|
|
44
|
+
body = send_request('CreateGroup', request.serialize)
|
|
45
|
+
response = JSON.parse(body)
|
|
46
|
+
if response['Response'].key?('Error') == false
|
|
47
|
+
model = CreateGroupResponse.new
|
|
48
|
+
model.deserialize(response['Response'])
|
|
49
|
+
model
|
|
50
|
+
else
|
|
51
|
+
code = response['Response']['Error']['Code']
|
|
52
|
+
message = response['Response']['Error']['Message']
|
|
53
|
+
reqid = response['Response']['RequestId']
|
|
54
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
55
|
+
end
|
|
56
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
57
|
+
raise e
|
|
58
|
+
rescue StandardError => e
|
|
59
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# 创建人员,添加对应人员的人体轨迹信息。
|
|
63
|
+
|
|
64
|
+
# 请注意:
|
|
65
|
+
# - 我们希望您的输入为 严格符合轨迹图片 要求的图片。如果您输入的图片不符合轨迹图片要求,会对最终效果产生较大负面影响。请您尽量保证一个Trace中的图片人体清晰、无遮挡、连贯;
|
|
66
|
+
# - 一个人体轨迹(Trace)可以包含1-5张人体图片。提供越多质量高的人体图片有助于提升最终识别结果;
|
|
67
|
+
# - 无论您在单个Trace中提供了多少张人体图片,我们都将生成一个对应的轨迹(Trace)信息。即,Trace仅和本次输入的图片序列相关,和图片的个数无关;
|
|
68
|
+
# - 输入的图片组中,若有部分图片输入不合法(如图片大小过大、分辨率过大、无法解码等),我们将舍弃这部分图片,确保合法图片被正确搜索。即,我们将尽可能保证请求成功,去除不合法的输入;
|
|
69
|
+
# - 构成人体轨迹单张图片大小不得超过2M,分辨率不得超过1920*1080。
|
|
70
|
+
|
|
71
|
+
# @param request: Request instance for CreatePerson.
|
|
72
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::CreatePersonRequest`
|
|
73
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::CreatePersonResponse`
|
|
74
|
+
def CreatePerson(request)
|
|
75
|
+
body = send_request('CreatePerson', request.serialize)
|
|
76
|
+
response = JSON.parse(body)
|
|
77
|
+
if response['Response'].key?('Error') == false
|
|
78
|
+
model = CreatePersonResponse.new
|
|
79
|
+
model.deserialize(response['Response'])
|
|
80
|
+
model
|
|
81
|
+
else
|
|
82
|
+
code = response['Response']['Error']['Code']
|
|
83
|
+
message = response['Response']['Error']['Message']
|
|
84
|
+
reqid = response['Response']['RequestId']
|
|
85
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
86
|
+
end
|
|
87
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
88
|
+
raise e
|
|
89
|
+
rescue StandardError => e
|
|
90
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# 本接口为离线人像分割处理接口组中的提交任务接口,可以对提交的资源进行处理视频流/图片流识别视频作品中的人像区域,进行一键抠像、背景替换、人像虚化等后期处理。
|
|
94
|
+
|
|
95
|
+
# @param request: Request instance for CreateSegmentationTask.
|
|
96
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::CreateSegmentationTaskRequest`
|
|
97
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::CreateSegmentationTaskResponse`
|
|
98
|
+
def CreateSegmentationTask(request)
|
|
99
|
+
body = send_request('CreateSegmentationTask', request.serialize)
|
|
100
|
+
response = JSON.parse(body)
|
|
101
|
+
if response['Response'].key?('Error') == false
|
|
102
|
+
model = CreateSegmentationTaskResponse.new
|
|
103
|
+
model.deserialize(response['Response'])
|
|
104
|
+
model
|
|
105
|
+
else
|
|
106
|
+
code = response['Response']['Error']['Code']
|
|
107
|
+
message = response['Response']['Error']['Message']
|
|
108
|
+
reqid = response['Response']['RequestId']
|
|
109
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
110
|
+
end
|
|
111
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
112
|
+
raise e
|
|
113
|
+
rescue StandardError => e
|
|
114
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# 将一个人体轨迹添加到一个人员中。一个人员最多允许包含 5 个人体轨迹。同一人的人体轨迹越多,搜索识别效果越好。
|
|
118
|
+
|
|
119
|
+
# >请注意:
|
|
120
|
+
# - 我们希望您的输入为 严格符合轨迹图片 要求的图片。如果您输入的图片不符合轨迹图片要求,会对最终效果产生较大负面影响。请您尽量保证一个Trace中的图片人体清晰、无遮挡、连贯。
|
|
121
|
+
# - 一个人体轨迹(Trace)可以包含1-5张人体图片。提供越多质量高的人体图片有助于提升最终识别结果。
|
|
122
|
+
# - 无论您在单个Trace中提供了多少张人体图片,我们都将生成一个对应的轨迹(Trace)信息。即,Trace仅和本次输入的图片序列相关,和图片的个数无关。
|
|
123
|
+
# - 输入的图片组中,若有部分图片输入不合法(如图片大小过大、分辨率过大、无法解码等),我们将舍弃这部分图片,确保合法图片被正确搜索。即,我们将尽可能保证请求成功,去除不合法的输入;
|
|
124
|
+
# - 构成人体轨迹单张图片大小限制为2M,分辨率限制为1920*1080。
|
|
125
|
+
|
|
126
|
+
# @param request: Request instance for CreateTrace.
|
|
127
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::CreateTraceRequest`
|
|
128
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::CreateTraceResponse`
|
|
129
|
+
def CreateTrace(request)
|
|
130
|
+
body = send_request('CreateTrace', request.serialize)
|
|
131
|
+
response = JSON.parse(body)
|
|
132
|
+
if response['Response'].key?('Error') == false
|
|
133
|
+
model = CreateTraceResponse.new
|
|
134
|
+
model.deserialize(response['Response'])
|
|
135
|
+
model
|
|
136
|
+
else
|
|
137
|
+
code = response['Response']['Error']['Code']
|
|
138
|
+
message = response['Response']['Error']['Message']
|
|
139
|
+
reqid = response['Response']['RequestId']
|
|
140
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
141
|
+
end
|
|
142
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
143
|
+
raise e
|
|
144
|
+
rescue StandardError => e
|
|
145
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# 删除该人体库及包含的所有的人员。
|
|
149
|
+
|
|
150
|
+
# @param request: Request instance for DeleteGroup.
|
|
151
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::DeleteGroupRequest`
|
|
152
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::DeleteGroupResponse`
|
|
153
|
+
def DeleteGroup(request)
|
|
154
|
+
body = send_request('DeleteGroup', request.serialize)
|
|
155
|
+
response = JSON.parse(body)
|
|
156
|
+
if response['Response'].key?('Error') == false
|
|
157
|
+
model = DeleteGroupResponse.new
|
|
158
|
+
model.deserialize(response['Response'])
|
|
159
|
+
model
|
|
160
|
+
else
|
|
161
|
+
code = response['Response']['Error']['Code']
|
|
162
|
+
message = response['Response']['Error']['Message']
|
|
163
|
+
reqid = response['Response']['RequestId']
|
|
164
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
165
|
+
end
|
|
166
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
167
|
+
raise e
|
|
168
|
+
rescue StandardError => e
|
|
169
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# 删除人员。
|
|
173
|
+
|
|
174
|
+
# @param request: Request instance for DeletePerson.
|
|
175
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::DeletePersonRequest`
|
|
176
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::DeletePersonResponse`
|
|
177
|
+
def DeletePerson(request)
|
|
178
|
+
body = send_request('DeletePerson', request.serialize)
|
|
179
|
+
response = JSON.parse(body)
|
|
180
|
+
if response['Response'].key?('Error') == false
|
|
181
|
+
model = DeletePersonResponse.new
|
|
182
|
+
model.deserialize(response['Response'])
|
|
183
|
+
model
|
|
184
|
+
else
|
|
185
|
+
code = response['Response']['Error']['Code']
|
|
186
|
+
message = response['Response']['Error']['Message']
|
|
187
|
+
reqid = response['Response']['RequestId']
|
|
188
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
189
|
+
end
|
|
190
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
191
|
+
raise e
|
|
192
|
+
rescue StandardError => e
|
|
193
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# 可以查看单条任务的处理情况,包括处理状态,处理结果。
|
|
197
|
+
|
|
198
|
+
# @param request: Request instance for DescribeSegmentationTask.
|
|
199
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::DescribeSegmentationTaskRequest`
|
|
200
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::DescribeSegmentationTaskResponse`
|
|
201
|
+
def DescribeSegmentationTask(request)
|
|
202
|
+
body = send_request('DescribeSegmentationTask', request.serialize)
|
|
203
|
+
response = JSON.parse(body)
|
|
204
|
+
if response['Response'].key?('Error') == false
|
|
205
|
+
model = DescribeSegmentationTaskResponse.new
|
|
206
|
+
model.deserialize(response['Response'])
|
|
207
|
+
model
|
|
208
|
+
else
|
|
209
|
+
code = response['Response']['Error']['Code']
|
|
210
|
+
message = response['Response']['Error']['Message']
|
|
211
|
+
reqid = response['Response']['RequestId']
|
|
212
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
213
|
+
end
|
|
214
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
215
|
+
raise e
|
|
216
|
+
rescue StandardError => e
|
|
217
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# 检测给定图片中的人体(Body)的位置信息及属性信息。
|
|
221
|
+
|
|
222
|
+
# @param request: Request instance for DetectBody.
|
|
223
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::DetectBodyRequest`
|
|
224
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::DetectBodyResponse`
|
|
225
|
+
def DetectBody(request)
|
|
226
|
+
body = send_request('DetectBody', request.serialize)
|
|
227
|
+
response = JSON.parse(body)
|
|
228
|
+
if response['Response'].key?('Error') == false
|
|
229
|
+
model = DetectBodyResponse.new
|
|
230
|
+
model.deserialize(response['Response'])
|
|
231
|
+
model
|
|
232
|
+
else
|
|
233
|
+
code = response['Response']['Error']['Code']
|
|
234
|
+
message = response['Response']['Error']['Message']
|
|
235
|
+
reqid = response['Response']['RequestId']
|
|
236
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
237
|
+
end
|
|
238
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
239
|
+
raise e
|
|
240
|
+
rescue StandardError => e
|
|
241
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# 检测图片中人体的14个关键点。建议用于人体图像清晰、无遮挡的场景。支持一张图片中存在多个人体的识别。
|
|
245
|
+
|
|
246
|
+
# @param request: Request instance for DetectBodyJoints.
|
|
247
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::DetectBodyJointsRequest`
|
|
248
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::DetectBodyJointsResponse`
|
|
249
|
+
def DetectBodyJoints(request)
|
|
250
|
+
body = send_request('DetectBodyJoints', request.serialize)
|
|
251
|
+
response = JSON.parse(body)
|
|
252
|
+
if response['Response'].key?('Error') == false
|
|
253
|
+
model = DetectBodyJointsResponse.new
|
|
254
|
+
model.deserialize(response['Response'])
|
|
255
|
+
model
|
|
256
|
+
else
|
|
257
|
+
code = response['Response']['Error']['Code']
|
|
258
|
+
message = response['Response']['Error']['Message']
|
|
259
|
+
reqid = response['Response']['RequestId']
|
|
260
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
261
|
+
end
|
|
262
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
263
|
+
raise e
|
|
264
|
+
rescue StandardError => e
|
|
265
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# 获取人体库列表。
|
|
269
|
+
|
|
270
|
+
# @param request: Request instance for GetGroupList.
|
|
271
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::GetGroupListRequest`
|
|
272
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::GetGroupListResponse`
|
|
273
|
+
def GetGroupList(request)
|
|
274
|
+
body = send_request('GetGroupList', request.serialize)
|
|
275
|
+
response = JSON.parse(body)
|
|
276
|
+
if response['Response'].key?('Error') == false
|
|
277
|
+
model = GetGroupListResponse.new
|
|
278
|
+
model.deserialize(response['Response'])
|
|
279
|
+
model
|
|
280
|
+
else
|
|
281
|
+
code = response['Response']['Error']['Code']
|
|
282
|
+
message = response['Response']['Error']['Message']
|
|
283
|
+
reqid = response['Response']['RequestId']
|
|
284
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
285
|
+
end
|
|
286
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
287
|
+
raise e
|
|
288
|
+
rescue StandardError => e
|
|
289
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# 获取指定人体库中的人员列表。
|
|
293
|
+
|
|
294
|
+
# @param request: Request instance for GetPersonList.
|
|
295
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::GetPersonListRequest`
|
|
296
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::GetPersonListResponse`
|
|
297
|
+
def GetPersonList(request)
|
|
298
|
+
body = send_request('GetPersonList', request.serialize)
|
|
299
|
+
response = JSON.parse(body)
|
|
300
|
+
if response['Response'].key?('Error') == false
|
|
301
|
+
model = GetPersonListResponse.new
|
|
302
|
+
model.deserialize(response['Response'])
|
|
303
|
+
model
|
|
304
|
+
else
|
|
305
|
+
code = response['Response']['Error']['Code']
|
|
306
|
+
message = response['Response']['Error']['Message']
|
|
307
|
+
reqid = response['Response']['RequestId']
|
|
308
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
309
|
+
end
|
|
310
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
311
|
+
raise e
|
|
312
|
+
rescue StandardError => e
|
|
313
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# 获取人体库汇总信息。
|
|
317
|
+
|
|
318
|
+
# @param request: Request instance for GetSummaryInfo.
|
|
319
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::GetSummaryInfoRequest`
|
|
320
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::GetSummaryInfoResponse`
|
|
321
|
+
def GetSummaryInfo(request)
|
|
322
|
+
body = send_request('GetSummaryInfo', request.serialize)
|
|
323
|
+
response = JSON.parse(body)
|
|
324
|
+
if response['Response'].key?('Error') == false
|
|
325
|
+
model = GetSummaryInfoResponse.new
|
|
326
|
+
model.deserialize(response['Response'])
|
|
327
|
+
model
|
|
328
|
+
else
|
|
329
|
+
code = response['Response']['Error']['Code']
|
|
330
|
+
message = response['Response']['Error']['Message']
|
|
331
|
+
reqid = response['Response']['RequestId']
|
|
332
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
333
|
+
end
|
|
334
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
335
|
+
raise e
|
|
336
|
+
rescue StandardError => e
|
|
337
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# 修改人体库名称、备注。
|
|
341
|
+
|
|
342
|
+
# @param request: Request instance for ModifyGroup.
|
|
343
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::ModifyGroupRequest`
|
|
344
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::ModifyGroupResponse`
|
|
345
|
+
def ModifyGroup(request)
|
|
346
|
+
body = send_request('ModifyGroup', request.serialize)
|
|
347
|
+
response = JSON.parse(body)
|
|
348
|
+
if response['Response'].key?('Error') == false
|
|
349
|
+
model = ModifyGroupResponse.new
|
|
350
|
+
model.deserialize(response['Response'])
|
|
351
|
+
model
|
|
352
|
+
else
|
|
353
|
+
code = response['Response']['Error']['Code']
|
|
354
|
+
message = response['Response']['Error']['Message']
|
|
355
|
+
reqid = response['Response']['RequestId']
|
|
356
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
357
|
+
end
|
|
358
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
359
|
+
raise e
|
|
360
|
+
rescue StandardError => e
|
|
361
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# 修改人员信息。
|
|
365
|
+
|
|
366
|
+
# @param request: Request instance for ModifyPersonInfo.
|
|
367
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::ModifyPersonInfoRequest`
|
|
368
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::ModifyPersonInfoResponse`
|
|
369
|
+
def ModifyPersonInfo(request)
|
|
370
|
+
body = send_request('ModifyPersonInfo', request.serialize)
|
|
371
|
+
response = JSON.parse(body)
|
|
372
|
+
if response['Response'].key?('Error') == false
|
|
373
|
+
model = ModifyPersonInfoResponse.new
|
|
374
|
+
model.deserialize(response['Response'])
|
|
375
|
+
model
|
|
376
|
+
else
|
|
377
|
+
code = response['Response']['Error']['Code']
|
|
378
|
+
message = response['Response']['Error']['Message']
|
|
379
|
+
reqid = response['Response']['RequestId']
|
|
380
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
381
|
+
end
|
|
382
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
383
|
+
raise e
|
|
384
|
+
rescue StandardError => e
|
|
385
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# 本接口用于对一组待识别的人体轨迹(Trace)图片,在人体库中识别出最相似的 TopK 人体,按照相似度从大到小排列。
|
|
389
|
+
|
|
390
|
+
# 人体轨迹(Trace)图片要求:图片中当且仅包含一个人体。人体完整、无遮挡。
|
|
391
|
+
|
|
392
|
+
# > 请注意:
|
|
393
|
+
# - 我们希望您的输入为严格符合轨迹图片要求的图片。如果您输入的图片不符合轨迹图片要求,会对最终效果产生较大负面影响;
|
|
394
|
+
# - 人体轨迹,是一个包含1-5张图片的图片序列。您可以输入1张图片作为轨迹,也可以输入多张。单个轨迹中包含越多符合质量的图片,搜索效果越好。
|
|
395
|
+
# - 构成人体轨迹单张图片大小不得超过2M,分辨率不得超过1920*1080。
|
|
396
|
+
|
|
397
|
+
# @param request: Request instance for SearchTrace.
|
|
398
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::SearchTraceRequest`
|
|
399
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::SearchTraceResponse`
|
|
400
|
+
def SearchTrace(request)
|
|
401
|
+
body = send_request('SearchTrace', request.serialize)
|
|
402
|
+
response = JSON.parse(body)
|
|
403
|
+
if response['Response'].key?('Error') == false
|
|
404
|
+
model = SearchTraceResponse.new
|
|
405
|
+
model.deserialize(response['Response'])
|
|
406
|
+
model
|
|
407
|
+
else
|
|
408
|
+
code = response['Response']['Error']['Code']
|
|
409
|
+
message = response['Response']['Error']['Message']
|
|
410
|
+
reqid = response['Response']['RequestId']
|
|
411
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
412
|
+
end
|
|
413
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
414
|
+
raise e
|
|
415
|
+
rescue StandardError => e
|
|
416
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# 在前后景分割的基础上优化多分类分割,支持对头发、五官等的分割,既作为换发型、挂件等底层技术,也可用于抠人头、抠人脸等玩法
|
|
420
|
+
|
|
421
|
+
# @param request: Request instance for SegmentCustomizedPortraitPic.
|
|
422
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::SegmentCustomizedPortraitPicRequest`
|
|
423
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::SegmentCustomizedPortraitPicResponse`
|
|
424
|
+
def SegmentCustomizedPortraitPic(request)
|
|
425
|
+
body = send_request('SegmentCustomizedPortraitPic', request.serialize)
|
|
426
|
+
response = JSON.parse(body)
|
|
427
|
+
if response['Response'].key?('Error') == false
|
|
428
|
+
model = SegmentCustomizedPortraitPicResponse.new
|
|
429
|
+
model.deserialize(response['Response'])
|
|
430
|
+
model
|
|
431
|
+
else
|
|
432
|
+
code = response['Response']['Error']['Code']
|
|
433
|
+
message = response['Response']['Error']['Message']
|
|
434
|
+
reqid = response['Response']['RequestId']
|
|
435
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
436
|
+
end
|
|
437
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
438
|
+
raise e
|
|
439
|
+
rescue StandardError => e
|
|
440
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# 即二分类人像分割,识别传入图片中人体的完整轮廓,进行抠像。
|
|
444
|
+
|
|
445
|
+
# @param request: Request instance for SegmentPortraitPic.
|
|
446
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::SegmentPortraitPicRequest`
|
|
447
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::SegmentPortraitPicResponse`
|
|
448
|
+
def SegmentPortraitPic(request)
|
|
449
|
+
body = send_request('SegmentPortraitPic', request.serialize)
|
|
450
|
+
response = JSON.parse(body)
|
|
451
|
+
if response['Response'].key?('Error') == false
|
|
452
|
+
model = SegmentPortraitPicResponse.new
|
|
453
|
+
model.deserialize(response['Response'])
|
|
454
|
+
model
|
|
455
|
+
else
|
|
456
|
+
code = response['Response']['Error']['Code']
|
|
457
|
+
message = response['Response']['Error']['Message']
|
|
458
|
+
reqid = response['Response']['RequestId']
|
|
459
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
460
|
+
end
|
|
461
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
462
|
+
raise e
|
|
463
|
+
rescue StandardError => e
|
|
464
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# 终止指定视频人像分割处理任务
|
|
468
|
+
|
|
469
|
+
# @param request: Request instance for TerminateSegmentationTask.
|
|
470
|
+
# @type request: :class:`Tencentcloud::bda::V20200324::TerminateSegmentationTaskRequest`
|
|
471
|
+
# @rtype: :class:`Tencentcloud::bda::V20200324::TerminateSegmentationTaskResponse`
|
|
472
|
+
def TerminateSegmentationTask(request)
|
|
473
|
+
body = send_request('TerminateSegmentationTask', request.serialize)
|
|
474
|
+
response = JSON.parse(body)
|
|
475
|
+
if response['Response'].key?('Error') == false
|
|
476
|
+
model = TerminateSegmentationTaskResponse.new
|
|
477
|
+
model.deserialize(response['Response'])
|
|
478
|
+
model
|
|
479
|
+
else
|
|
480
|
+
code = response['Response']['Error']['Code']
|
|
481
|
+
message = response['Response']['Error']['Message']
|
|
482
|
+
reqid = response['Response']['RequestId']
|
|
483
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
484
|
+
end
|
|
485
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
486
|
+
raise e
|
|
487
|
+
rescue StandardError => e
|
|
488
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
end
|