视频智能分析服务 VIAS-创建云上视频车辆作业:请求示例

时间:2025-02-12 14:54:47

请求示例

  • 云上视频车辆作业创建,使用输入源为video_source,输出为dis。

    POST /v2/{project_id}/services/c-vehicle-detection-cloud/tasks{  "name" : "vehicle-task",  "description" : "vehicle detection 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" : "{\"lines\":[{\"data\":[[50,756],[100,616]],\"properties\":{\"type\":0}},{\"data\":[[50,256],[100,116]],\"properties\":{\"type\":1}}],\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}",      "license_plate" : {        "local_city" : "B",        "local_province" : "津"      },      "output_image_sw" : 1,      "image_compression_ratio" : 100    }  }}
  • 云上视频车辆作业创建,使用输入源为url,输出为dis。

    POST /v2/{project_id}/services/c-vehicle-detection-cloud/tasks{  "name" : "vehicle-task",  "description" : "vehicle detection 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" : "{\"lines\":[{\"data\":[[50,756],[100,616]],\"properties\":{\"type\":0}},{\"data\":[[50,256],[100,116]],\"properties\":{\"type\":1}}],\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}",      "license_plate" : {        "local_city" : "B",        "local_province" : "津"      },      "output_image_sw" : 1,      "image_compression_ratio" : 100    }  }}
  • 云上视频车辆作业创建,使用输入源为obs,输出为dis。

    POST /v2/{project_id}/services/c-vehicle-detection-cloud/tasks{  "name" : "vehicle-task",  "description" : "vehicle detection 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" : "{\"lines\":[{\"data\":[[50,756],[100,616]],\"properties\":{\"type\":0}},{\"data\":[[50,256],[100,116]],\"properties\":{\"type\":1}}],\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}",      "license_plate" : {        "local_city" : "B",        "local_province" : "津"      },      "output_image_sw" : 1,      "image_compression_ratio" : 100    }  }}
support.huaweicloud.com/vias-api/CreateVehicleTasksCloud.html