云服务器内容精选

  • 响应 响应样例(VIS输入+DIS输出) { "id":"5c127c7844674d2382b7daae07794152", "name":"c-highpoint-crowdcount-cloud-test", "creator":"user_test", "project_id":"1f793beac00d4801874db741cbfe10fa", "description":"c-highpoint-crowdcount-cloud task test", "service_version":"3.0", "resource_order_id":"840a5cf90d4a4bbaa71f251dfe8fe64e", "created_at":"2020-09-22T08:08:39Z", "updated_at":"2020-09-22T08:08:39Z", "state":"PENDING", "input":{ "type":"vis", "data":[ { "stream_name":"intrusiondetectio", "index":0 } ] }, "output":{ "dis":{ "stream_name":"dis-intrusion" } }, "service_config":{ "common":{ "image_compression_ratio": 90, "roadside_stall_detect_sw": 1, "outstore_stall _detect_sw": 0, "render_roi_sw": 1, "render_result_sw": 1, "target_roi": "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}" } } } 响应参数说明 请参考作业详情参数。
  • 请求 请求样例(VIS输入+DIS输出) POST /v2/6204a5bd270343b5885144cf9c8c158d/services/c-urban-roadside-stall-cloud/tasks{ "name":"c-urban-roadside-stall-cloud-task", "description":"c-urban-roadside-stall-cloud task test", "input":{ "type":"vis", "data":[ { "stream_name":"vis-input", "index":0 } ] }, "output":{ "dis":{ "stream_name":"dis-output" } }, "service_version":"3.0", "resource_order_id":"840a5cf90d4a4bbaa71f251dfe8fe64e", "service_config":{ "common":{ "image_compression_ratio": 90, "roadside_stall_detect_sw": 1, "outstore_stall_detect_sw": 0, "render_roi_sw": 1, "render_result_sw": 1, "target_roi": "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]],\"name\":\"a\"}]}" } }} 参数说明 参数 是否必选 类型 说明 name 是 String 作业名称,只能由中文、字母(a~zA~Z)、数字(0~9)、中划线(-)、下划线(_)组成,长度范围为[1,100]。 description 否 String 作业描述信息,最大长度为500字符长度。 input 是 Object 视频数据输入列表,目前云上城管事件-占道经营检测支持以下输入类型: vis:从视频接入服务中读取视频数据。 详细参数定义参见task.input(任务输入参数)。 service_version 是 String 功能版本号,版本号为3.0。 resource_order_id 是 String 购买的算法能力包ID,在服务界面购买算法能力包获取。 output 是 Object 结果数据的输出列表,目前支持将结果输出到您指定的通道中,输出类型为“dis”。 详细参数定义参见task.output(任务输出参数)。 service_config 否 Object 服务的算法配置,配置参数见ServiceConfig参数说明。 service_config中common的参数说明 字段 是否必选 类型 说明 image_compression_ratio 否 Int 对应控制台的界面参数“图片压缩比”。 图片压缩百分比,取值范围为[20,100]。 默认值:90,表示图片压缩比为90%。 roadside_stall_detect_sw 否 Int 对应控制台的界面参数“占道经营开关”。 "0":表示不检测占道经营; "1":表示检测占道经营。 默认值为1。 outstore_stall_detect_sw 否 Int 对应控制台的界面参数“出店经营开关”。 "0":表示不检测出店经营; "1":表示检测出店经营。 默认值为0。 render_result_sw 否 Int 对应控制台的界面参数“目标框渲染开关”。 输出图像是否绘制告警目标边框,取值范围: "0":表示不绘制; "1":表示用红色绘制告警目标边框。 默认值为0。 render_roi_sw 否 Int 对应控制台的界面参数“检测区域渲染开关”。 输出图像是否绘制检测区域,取值范围: "0":表示不绘制; "1":表示用黄色绘制用户设定区域。 默认值为0。 target_roi 否 String 对应控制台的界面参数“检测区域设置”。 表示检测区域,该字段为JSON格式的字符串,API调用时需要加转义符。详细JSON格式参见target_roi(目标区域)。 例如: {"polygons":[{"data":[[84,389],[1840,349],[1824,526],[78,526]],"name":"polygon"}]} 可为每个区域设置名称,后续输出结果时会连带输出区域名称。 参数没有携带时,默认区域为整个视频帧,默认区域名称为空字符串。 repeat_alert_sw 否 Int 对应控制台的界面参数“重复告警开关”。 是否对同一目标进行重复告警,取值范围: "0":表示关闭,不重复告警; "1":表示开启,重复告警。 默认值为0。 重复告警开关开启后,周期性的告警所有目标,同一目标每次告警的detection_id相同,参数repeat_alert_interval才会生效。 repeat_alert_interval 否 Int 对应控制台的界面参数“重复告警间隔”。 在参数repeat_alert_sw为1时才会生效。 控制重复告警的时间间隔,单位为秒。取值范围:[30, 86400],最长时间间隔为24小时。 默认值为30。每30秒告警一次,同一个告警目标detection_id相同。