云服务器内容精选
-
请求 请求样例(摄像头输入+DIS/Webhook输出) POST /v2/6204a5bd270343b5885144cf9c8c158d/services/c-crowdcount-edge/tasks { "name": "crowdcount-edge-task", "description": "Crowdcounttedetection task test", "input": { "type": "edgecamera", "data": [ { "id": "aec5857c-222f-4aa9-be39-23654e118886", "index": 0 } ] }, "output": { "dis": { "stream_name": "crowdcount-edge" }, "webhook": { "url": "https://apigw.huawei.com/api/event/callback", "headers": { "content-type": "application/json" } } }, "service_version": "3.0", "resource_order_id": "840a5cf90d4a4bbaa71f251dfe8fe64e", "edge_pool_id": "8dcf5ec7bc4d4a26aa1d3e1bb5ed2b5a", "service_config": { "common": { "banner_detection_sw": 1, "banner_threshold": "2", "alarm_threshold": "5", "sampling_time_interval": 8, "density_sw": 1, "visualization_output_sw": 1, "image_compression_ratio": 80, "target_roi": "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 请求样例2(edgerestful输入+DIS/Webhook输出) POST /v2/6204a5bd270343b5885144cf9c8c158d/services/c-crowdcount-edge/tasks { "name": "crowdcount-edge-task", "description": "Crowdcounttedetection task test", "input": { "type": "edgerestful", "data": [ { "index": 0, "url":"https://100.127.134.69:554/test/data", "certificate_check": false, "rtsp_path_in_response": "data/url" } ] }, "output": { "dis": { "stream_name": "crowdcount-edge" }, "webhook": { "url": "https://apigw.huawei.com/api/event/callback", "headers": { "content-type": "application/json" } } }, "service_version": "3.0", "resource_order_id": "840a5cf90d4a4bbaa71f251dfe8fe64e", "edge_pool_id": "8dcf5ec7bc4d4a26aa1d3e1bb5ed2b5a", "service_config": { "common": { "banner_detection_sw": 1, "banner_threshold": "2", "alarm_threshold": "5", "sampling_time_interval": 8, "density_sw": 1, "visualization_output_sw": 1, "image_compression_ratio": 80, "target_roi": "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 请求样例3(VCN输入+DIS/Webhook输出) POST /v2/6204a5bd270343b5885144cf9c8c158d/services/c-crowdcount-edge/tasks { "name": "crowdcount-edge-task", "description": "Crowdcounttedetection task test", "input": { "type": "vcn", "vcn":{ "ip":"172.100.119.6", "password":"CQeNfcRLwyMvH77AkDBaPS+BKXdFu/1bAXtIMNTx3QPbVewjipNq06nNodxWI28I1lCUsvv2+wB1joepzynLVW3g2nz0k9vaCRDoK6=", "port":"4675", "username":"testname" }, "data": [ { "index": 0, "stream_type": 1, "device_id":"07211540881586160101#f7964493ff764bbf9294d58b22e63de6" } ] }, "output": { "dis": { "stream_name": "crowdcount-edge" }, "webhook": { "url": "https://apigw.huawei.com/api/event/callback", "headers": { "content-type": "application/json" } } }, "service_version": "3.0", "resource_order_id": "840a5cf90d4a4bbaa71f251dfe8fe64e", "edge_pool_id": "8dcf5ec7bc4d4a26aa1d3e1bb5ed2b5a", "service_config": { "common": { "banner_detection_sw": 1, "banner_threshold": "2", "alarm_threshold": "5", "sampling_time_interval": 8, "visualization_output_sw": 1, "density_sw": 1, "image_compression_ratio": 80, "target_roi": "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 参数说明 参数 是否必选 类型 说明 name 是 String 作业名称,只能由字母(a~zA~Z)、数字(0~9)、中划线(-)、下划线(_)组成,长度范围为[1,100]。 description 否 String 作业描述信息,最大长度为500字符长度。 input 是 Object 视频数据输入列表,支持从指定的边缘摄像头读取数据,即输入类型为“edgecamera”,“edgerestful”,“VCN”。 详细参数定义参见task.input(任务输入参数)。 service_version 是 String 功能版本号,版本号为3.0。边缘算法版本支持的显卡硬件为T4和Davinci芯片。 resource_order_id 是 String 购买的算法能力包ID,在服务界面购买算法能力包获取。 edge_pool_id 是 String 边缘运行池ID,获取方法参见创建边缘运行池。 output 是 Object 结果数据的输出列表,目前支持以下输出类型: DIS:将结果输出到您指定的DIS通道 。 Webhook:将结果输出到Webhook URL。 Localpath:将作业的运行结果保存在边缘节点本地(节点必须为linux系统),必须为linux路径,例如“/opt/cloud/”。 详细参数定义见task.output(任务输出参数)。 service_config 否 Object 服务的算法配置,配置参数见•service_config参数说明。 service_config中common参数说明 字段 是否必选 类型 说明 alarm_threshold 否 String 人数告警阈值列表,默认值:50人,取值范围为正整数。当视频帧中出现大于等于该阈值的人数时,通过JSON输出告警图片。该字段的输入情况如下:可以针对每个ROI区域输入不同的告警阈值,每个输入用空格进行分隔。 若用户输入的人数告警阈值列表多于实际的ROI个数,则取前边的人数。 如果输入的人数告警阈值列表少于实际的ROI个数,则比ROI个数少的部分用默认值补齐。 举例:ROI有3个,当输入25 30 20,只要有其中一个ROI告警,则发送图片。当输入25 15时,则第三个ROI会用默认值50补齐,也即变成25 15 50。当输入25 36 23 40时,算法自动选择前3个,也即25 36 23。 sampling_time_interval 否 Int 视频采样处理时间间隔,默认值:10s,取值范围[1, 30],单位秒。默认10秒采样一次视频画面,两次处理将会间隔N帧画面。 N的计算方式:sampling_time_interval * 视频fps。例如:视频fps=25,采样时间1秒,则两次处理之间会跳过25帧画面。 alert_mode 否 String 告警模式。默认值:"single"。共有两种告警模式: "single": 表示事件告警模式,只有出现满足人数告警阈值的新的告警事件时,才会上报告警信息。 "periodic": 表示周期告警模式,每当经过一个视频采样处理时间间隔,就会上报告警信息。 banner_detection_sw 否 Int 横幅检测开关,默认值0,取值范围[0,1]。当打开横幅检测开关时,会对视频画面中的ROI区域进行横幅检测。 banner_threshold 否 String 横幅告警阈值列表,默认值1,取值范围为正整数。该参数的用法可以参考alarm_threshold字段。 visualization_output_sw 否 Int 可视化输出开关,默认是0,取值范围[0 1]。默认每个ROI区域检测到的人数大于告警阈值时,只会发送原图信息。只有打开可视化开关后,才会将检测到的行人和横幅进行可视化输出。可视化场景如下: 检测到单个行人,会用红色框进行标注。 检测到游行示威的横幅,会用红色框标注。 如果检测到密集人群,会对该区域进行颜色渲染。 每个ROI框会用黄色多边形在画面中标注。 image_compression_ratio 否 Int 对应控制台的界面参数“图片压缩比”。 图片压缩百分比,取值范围为[20,100]。 默认值:90,表示图片压缩比为90% density_sw 否 Int 密度估计开关。用户可自定义是否启用密度估计模型来评估人数统计结果。推荐当人数较多、告警人数阈值较大的场景启用密度估计模型;当人数较少、告警人数阈值较低的场景可不用密度估计模型。 默认启用密度估计模型,取值为1,取值范围是[0, 1] target_roi 否 String 对应控制台的界面参数“检测区域设置”。 表示检测区域,该字段为JSON格式的字符串,API调用时需要加转义符。详细JSON格式参见target_roi(目标区域)。 例如: {"polygons":[{"data":[[84,389],[1840,349],[1824,526],[78,526]]}]} 参数没有携带时,默认区域为整个视频帧。
-
响应 响应样例 { "id":"d1cde51e12eb47aaaafa36c2b4584b5c", "name":"c-crowdcount-edge_0", "creator":"user_test", "project_id":"1f793beac00d4801874db741cbfe10fa", "description":"c-crowdcount-edge", "service_version":"3.0", "edge_pool_id":"626402fe7eb8446dbf23b35412877d76", "resource_order_id":"840a5cf90d4a4bbaa71f251dfe8fe64e", "created_at":"2020-09-19T03:39:22Z", "updated_at":"2020-09-19T03:39:22Z", "state":"RUNNING", "input":{ "type":"edgecamera", "data":[ { "id":"6233039b-698f-4347-8ced-ef0d14605c0b", "index":0 } ] }, "output": { "webhook":{ "url":"https://apigw.xx.com/api/mqs/sit", "headers":{ "content-type":"application/json" } } }, "service_config":{ "common":{ "banner_detection_sw":1, "banner_threshold":"2", "alarm_threshold":"5", "sampling_time_interval":8, "density_sw":1, "visualization_output_sw":1, "target_roi": "{"polygons":[{"data":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}", "image_compression_ratio":80 } }} 响应参数说明 参数名称 类型 描述信息 task Object task详情,定义见Task参数结构说明。
更多精彩内容
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格