视频鉴定

更新时间:2023-08-17 17:36:50

网宿视频鉴定服务提供对指定视频资源(URL)进行智能鉴定的功能,支持涉黄识别、涉恐识别、政治人物识别、OCR文件识别。

注:视频文件大小不能超过20M*

请求说明

POST /videoDetect
Host: <MgrDomain>
Authorization:<accessToken>

头部说明

参数 必填 描述
Host 管理域名,可在用户管理界面获取
Authorization 管理凭证

参数说明

参数 必填 类型 描述
video string 视频URL,单次只支持一个URL的鉴定,需经过URL安全的Base64编码,多个图片编码后使用;分隔。
type string 鉴定类型,porn-鉴黄,terror-暴恐,political-政治人物识别,ocr-文件识别鉴定,不同类型使用逗号分隔。
eg:
porn–只鉴黄
porn,terror-同时鉴黄和鉴恐
porn,terror,political,ocr—同时鉴黄、鉴恐和政治人物识别、文字识别鉴定
interval internal 视频截帧间隔,有效值【0.5-50】秒,默认1秒
bucket string 空间名,云存储空间名。

响应说明

如果请求成功,则返回如下内容的Json串。

{
    "results":[{
        "video":"video", 
        "errMessage":xxx,
        "pornDetect": {
            "reviewCount":2, // 需要review的数量
            "statistic":{"sex":1,"porn":1,"normal":1}, //分别代表鉴定为性感、色情、正常的数量
            "fileList":[{
                "name": "screenshot-0.jpg",
                "label":2, // 0:色情 1: 性感 2:正常
                "rate":0.99, // 概率值,介于0-1
                "review":false // 是否需要人工复审,true-需要 false-不需要
            }]
        }, // 仅type=porn时返回
 
 
        "terrorDetect": {
            "reviewCount":2, // 需要review的数量
            "statistic":{"terror":1,"normal":1}, //分别代表鉴定为暴恐、正常的数量
            "fileList":[{
                "name":"screenshot-0.jpg",
                "label":0, // 0:非暴恐 1:暴恐
                "rate": 0.99,
                "review":false
            }]
        }, // 仅type=terror时返回
 
 
        "politicalDetect": {
            "fileList":[{
                "name": "screenshot-0.jpg",
                "label":0, // 0:非政治人物 1:政治人物
                "persons":[{
                     "name": '政治人物名字',
                     "rate":0.99,
                     "review":false,
                     "faceUrl":"https://www.chinanetcenter.com/lts/image/xxx"
                }]
            }]
        }, // 仅type=political时返回
 
 
        "ocrDetect": {
            "fileList":[{
                "name": "screenshot-0.jpg",
                "label":3, // 0:正常 1:暴恐 2:色情 3:涉政 4:敏感 5:⼴告 6:谩骂 7:灌水 8:自定义 ;注:该label为按涉政优先返回的label,如图片同时包含涉政和涉黄文字,label为3
                "rate":0.99, // 概率值,介于0-1
                "review":false, // 是否需要人工复审,true-需要 false-不需要
                "objects": [{
                     "text": "xxx",
                     "scores": 0.9384796222050985,
                     "label": 3,
                     "review": false,
                     "rate": 1
                },{
                     "text": "这是测试 这是测试",
                     "scores": 0.9956928292910258,
                     "label": 0,
                     "review": false,
                     "rate": 1
                }]
            }]
       }
    },
...
]
}

返回字段说明

字段名 父元素 类型 描述
results - array 鉴定结果
video results string 请求鉴定的视频
errMessage results string 错误信息,鉴定成功返回空值
pornDetect results node 鉴黄信息,仅type=porn时返回该节点
reviewCount pornDetect int 需要review的数量
statistic pornDetect object 分别代表鉴定为sex-性感、porn-色情、normal-正常的数量
fileList pornDetect array 截图鉴定明细
name fileList string 截图名称,格式为screenshot-x.jpg,x为按顺序排列的数字
label fileList int 图片鉴黄结果分类;0-色情, 1-性感, 2-正常
rate fileList float 介于0-1间的概率值,概率越高,鉴定结果越肯定
review fileList boolean 是否需要人工复审该图片;true-需要,false-不需要
-
terrorDetect results node 鉴恐信息,仅type=terror时返回该节点
reviewCount pornDetect int 需要review的数量
statistic pornDetect object 分别代表鉴定为terror-暴恐、normal-正常的数量
fileList pornDetect array 截图鉴定明细
name fileList string 截图名称,格式为screenshot-x.jpg,x为按顺序排列的数字
label fileList int 图片鉴恐结果分类;0-非暴恐, 1-暴恐
rate fileList float 介于0-1间的概率值,概率越高,鉴定结果越肯定
review fileList boolean 是否需要人工复审该图片;true-需要,false-不需要
-
politicalDetect results node 政治人物识别信息,仅type=political时返回该节点
fileList pornDetect array 截图鉴定明细
name fileList string 截图名称,格式为screenshot-x.jpg,x为按顺序排列的数字
label fileList int 图片政治人物识别结果分类;0-非政治人物, 1-政治人物
persons fileList array 政治人物信息
name persons string 政治人物名字
rate persons float 介于0-1间的概率值,概率越高,鉴定结果越肯定
review persons boolean 是否需要人工复审该图片;true-需要,false-不需要
-
ocrDetect results node ocr鉴定信息,仅type=ocr时返回该节点
fileList pornDetect array 截图鉴定明细
name fileList string 截图名称,格式为screenshot-x.jpg,x为按顺序排列的数字
label fileList int ocr鉴定结果分类;0:正常 1:暴恐 2:色情 3:涉政 4:敏感 5:⼴告 6:谩骂 7:灌水 8:自定义 ;注:该label为按涉政优先返回的label,如图片同时包含涉政和涉黄文字,label为3
rate fileList float 介于0-1间的概率值,概率越高,鉴定结果越肯定
review fileList boolean 是否需要人工复审该图片;true-需要,false-不需要
objects fileList array ocr识别信息
text objects string 文字内容
scores objects float 介于0-1间的概率值,概率越高,文本识别结果越可靠
label objects int ocr鉴定结果分类;0:正常 1:暴恐 2:色情 3:涉政 4:敏感 5:⼴告 6:谩骂 7:灌水 8:自定义 ;注:该label为按涉政优先返回的label,如图片同时包含涉政和涉黄文字,label为3
review objects float 介于0-1间的概率值,概率越高,鉴定结果越肯定
rate objects boolean 是否需要人工复审该图片;true-需要,false-不需要

如果请求失败,则返回如下内容的Json字符串。

{
    "code": <code string>,
    "message": <message string>
}
字段名 描述
code HTTP请求响应码,参见HTTP响应状态码
message 请求失败的提示信息

范例

curl –X POST –d "type=porn,terror&image=aHR0cDovL3d3dy5iYWlkdS5jb20=;aHR0cDovL3d3dy5iYWlkdS5jb21=&bucket=bucketName&interval=2" –H "Authorization:86622e227a50d4543c24945bc123542e4ac543a7:Y2JmMGY0YTNsdfQxZmBMHGM2ZTA0==" http://apitestuser.mgr0.v1.wcsapi.com/videoDetect
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!