视频智能分析服务 VIAS-创建云上关键岗位检测作业:请求示例

时间:2024-09-25 18:58:46

请求示例

  • 云上关键岗位检测作业创建,使用输入源为video_source,输出为dis。

    POST /v2/{project_id}/services/c-staffonduty-cloud/tasks
    
    {
      "name" : "staffonduty-task",
      "description" : "staffonduty task test",
      "input" : {
        "type" : "video_source",
        "data" : [ {
          "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx"
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]},{\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}",
          "image_compression_ratio" : 90,
          "key_region_detection_sw" : 1,
          "key_region_detect_interval" : 2,
          "key_region_detect_threshold" : 2,
          "key_region_person_count" : 50
        }
      }
    }
  • 云上关键岗位检测作业创建,使用输入源为url,输出为dis。

    POST /v2/{project_id}/services/c-staffonduty-cloud/tasks
    
    {
      "name" : "staffonduty-task",
      "description" : "staffonduty task test",
      "input" : {
        "type" : "url",
        "data" : [ {
          "url" : "https://obs_test/test.mp4",
          "index" : 0
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]},{\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}",
          "image_compression_ratio" : 90,
          "key_region_detection_sw" : 1,
          "key_region_detect_interval" : 2,
          "key_region_detect_threshold" : 2,
          "key_region_person_count" : 50
        }
      }
    }
  • 云上关键岗位检测作业创建,使用输入源为obs,输出为dis。

    POST /v2/{project_id}/services/c-staffonduty-cloud/tasks
    
    {
      "name" : "staffonduty-task",
      "description" : "staffonduty task test",
      "input" : {
        "type" : "obs",
        "data" : [ {
          "bucket" : "obs_test_video",
          "path" : "test.mp4",
          "index" : 0
        } ]
      },
      "output" : {
        "dis" : {
          "stream_name" : "dis-test"
        }
      },
      "service_version" : "3.0",
      "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
      "config" : {
        "common" : {
          "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]},{\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}",
          "image_compression_ratio" : 90,
          "key_region_detection_sw" : 1,
          "key_region_detect_interval" : 2,
          "key_region_detect_threshold" : 2,
          "key_region_person_count" : 50
        }
      }
    }
support.huaweicloud.com/vias-api/CreateStaffOnDutyTasksCloud.html