lib/v20190529/client.rb in tencentcloud-sdk-tiia-3.0.455 vs lib/v20190529/client.rb in tencentcloud-sdk-tiia-3.0.456
- old
+ new
@@ -209,10 +209,45 @@
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
+ # 可对图片中厨师穿戴进行识别,支持厨师服识别,厨师帽识别,赤膊识别和口罩识别,可应用于明厨亮灶场景。
+ # "被优选过滤"标签值在人体优选开关开启时才会返回。
+ # 厨师服:厨师服定义为白色上衣
+ # 厨师服识别(酒店版):厨师服定义为红色,白色,黑色上衣
+
+ # |序号 | 标签名称 | 标签值 |
+ # | :-----| :---------- |:----------------- |
+ # | 1 | 厨师服识别<div style="width: 70pt"> |无厨师服、有厨师服、被优选过滤|
+ # | 2 | 厨师服识别(酒店版)<div style="width: 70pt"> |无厨师服、有厨师服、被优选过滤|
+ # | 3 | 厨师帽识别<div style="width: 70pt"> |无厨师帽、有厨师帽、被优选过滤 |
+ # | 4 | 赤膊识别<div style="width: 70pt"> |非赤膊、赤膊、被优选过滤|
+ # | 5 | 口罩识别<div style="width: 70pt"> |无口罩、有口罩、口罩不确定、被优选过滤 |
+
+ # @param request: Request instance for DetectChefDress.
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectChefDressRequest`
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectChefDressResponse`
+ def DetectChefDress(request)
+ body = send_request('DetectChefDress', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = DetectChefDressResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
# 输入一张图片,返回AI针对一张图片是否是恶心的一系列判断值。
# 通过恶心图片识别, 可以判断一张图片是否令人恶心, 同时给出它属于的潜在类别, 让您能够过滤掉使人不愉快的图片。
# >
# - 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。
@@ -457,9 +492,46 @@
def DetectProductBeta(request)
body = send_request('DetectProductBeta', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DetectProductBetaResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
+ # 识别常安全属性识别可对图片中人体安全防护属性进行识别,支持识别安全帽,反光衣,护目镜,工服,手套,工地安全带,口罩,抽烟,玩手机等多种属性。
+ # "被优选过滤"标签值在人体优选开关开启时才会返回。
+
+ # |序号 | 标签名称 | 标签值 |
+ # | :-----| :---------- |:----------------- |
+ # | 1 | 安全帽识别<div style="width: 70pt"> |无安全帽、有安全帽、被优选过滤|
+ # | 2 | 玩手机识别<div style="width: 70pt"> |没有电话、打电话、玩手机、被优选过滤|
+ # | 3 | 抽烟识别<div style="width: 70pt"> |没有抽烟、抽烟、被优选过滤 |
+ # | 4 | 口罩识别<div style="width: 70pt"> |无口罩、有口罩、口罩不确定、被优选过滤|
+ # | 5 | 工地安全带识别<div style="width: 70pt"> |无工地安全带、工地安全带、被优选过滤 |
+ # | 6 | 手套识别<div style="width: 70pt"> |无手套、有手套、手套不确定、被优选过滤 |
+ # | 7 | 工服识别<div style="width: 70pt"> |无工服、有工服、被优选过滤|
+ # | 8 | 护目镜识别<div style="width: 70pt"> |无护目镜、有护目镜、被优选过滤|
+ # | 9 | 反光衣识别<div style="width: 70pt"> |无反光衣、有反光衣、被优选过滤|
+
+ # @param request: Request instance for DetectSecurity.
+ # @type request: :class:`Tencentcloud::tiia::V20190529::DetectSecurityRequest`
+ # @rtype: :class:`Tencentcloud::tiia::V20190529::DetectSecurityResponse`
+ def DetectSecurity(request)
+ body = send_request('DetectSecurity', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = DetectSecurityResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
\ No newline at end of file