内容审核 MODERATION-查询视频内容审核作业
时间:2024-10-10 14:37:00
查询视频 内容审核 作业
- 本章节对查询 视频审核 AK/SK方式使用SDK进行示例说明。
示例代码中需要配置使用RunQueryVideoModerationJobRequest类的withJobId配置审核任务的id,配置完成后运行即可。
服务所在的应用区域和终端节点,详情请查看 地区和终端节点 。
# coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkmoderation.v3.region.moderation_region import ModerationRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkmoderation.v3 import * import os if __name__ == "__main__": # 认证用的ak和sk硬编码到代码中或者明文存储都有很大的安全风险,建议在配置文件或者环境变量中密文存放,使用时解密,确保安全; # 本示例以ak和sk保存在环境变量中来实现身份验证为例,运行本示例前请先在本地环境中设置环境变量HUAWEICLOUD_SDK_AK和HUAWEICLOUD_SDK_SK。 ak = os.getenv("HUAWEICLOUD_SDK_AK") sk = os.getenv("HUAWEICLOUD_SDK_SK") credentials = BasicCredentials(ak, sk) \ client = ModerationClient.new_builder() \ .with_credentials(credentials) \ .with_region(ModerationRegion.value_of("xxx")) \ //把xxx替换成服务所在的区域,例如北京四:cn-north-4。 .build() try: request = RunQueryVideoModerationJobRequest() request.job_id = "xxx" //此处需要输入您的jobID response = client.run_query_video_moderation_job(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg)
- 控制台输出查询视频内容审核作业的结果,查询视频内容审核结果输出到控制台。
{"request_id":"xxxx","job_id":"xxx","status":"succeeded","request_params":{"data":{"url":"xxxx","frame_interval":5},"event_type":"default","image_categories":["porn","terrorism","image_text"],"audio_categories":["porn","ad","moan","abuse"],"callback":"xxx"},"create_time":"2022-07-30T08:57:11.011Z","update_time":"2022-07-30T08:57:14.014Z","result":{"suggestion":"block","image_detail":[{"suggestion":"block","category":"porn","ocr_text":"123","time":0,"detail":[{"confidence":0.676015138626099,"category":"porn","suggestion":"block","label":"pornography"},{"confidence":0.666015138626099,"category":"porn","suggestion":"review","label":"sexy_female"},{"confidence":0.666015138626099,"category":"xxx","suggestion":"block","label":"leader"},{"confidence":0.691423773765564,"category":"xxx","suggestion":"block","face_location":{"top_left_x":12,"top_left_y":13,"bottom_right_x":200,"bottom_right_y":240},"label":"leader"},{"confidence":0.691423773765564,"category":"porn","suggestion":"block","face_location":{"top_left_x":12,"top_left_y":13,"bottom_right_x":100,"bottom_right_y":2000},"label":"leader"},{"confidence":0.891423773765564,"category":"image_text","suggestion":"block","label":"qr_code"},{"confidence":0.891423773765564,"category":"image_text","suggestion":"block","label":"qr_code","qr_content":"xxxxxxxxx","qr_location":{"top_left_x":12,"top_left_y":13,"bottom_right_x":100,"bottom_right_y":2000}},{"confidence":0.891423773765564,"category":"image_text","suggestion":"block","label":"porn","segments":[{"segment":"xxx"},{"segment":"xx"}]}]}],"audio_detail":[{"suggestion":"block","label":"porn","audio_text":"xxxxx","end_time":10,"start_time":0,"detail":[{"confidence":0.999117187582349,"label":"porn","suggestion":"block","segments":[{"segment":"xxx"}]},{"confidence":0.885117187582349,"label":"porn","suggestion":"block"}]}]}}
父主题: 视频审核
support.huaweicloud.com/sdkreference-moderation/moderation_04_0084.html
看了此文的人还看了
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格
推荐文章