共用方式為


空間分析作業

空間分析可讓您即時分析攝影機裝置的影片串流。 針對您設定的每個攝影機裝置,空間分析作業會產生傳送至 Azure IoT 中樞執行個體的 JSON 訊息輸出資料流。

空間分析容器會實作下列作業。 您可以在容器的部署資訊清單中設定這些作業。

作業識別碼 描述
cognitiveservices.vision.spatialanalysis-personcount 計算攝影機視野中指定區域內的人數。 此區域必須由單一攝影機完全涵蓋,才能讓 PersonCount 記錄精確的總數。
發出初始 personCountEvent 事件,然後在計數變更時,發出 personCountEvent 事件。
cognitiveservices.vision.spatialanalysis-personcrossingline 追蹤某個人在攝影機的視野中跨越指定線的時間。
當該人跨越該線並提供方向資訊時,發出 personLineEvent 事件。
cognitiveservices.vision.spatialanalysis-personcrossingpolygon 當某個人員進入或離開指定區域時,會發出 personZoneEnterExitEvent 事件,並針對已穿過區域那端提供方向資訊。 當該人離開區域時,會發出 ppersonZoneDwellTimeEvent,並提供方向資訊,以及使用者在該區域內所花費的毫秒數。
cognitiveservices.vision.spatialanalysis-persondistance 追蹤人員違反最小距離規則的時間。
定期發出 personDistanceEvent 以及每個距離違規的位置。
cognitiveservices.vision.spatialanalysis 一般操作,可以用來執行上述所有案例。 當您想要在相同的攝影機上執行多個案例,或更有效率地使用系統資源 (例如 GPU) 時,此選項會更實用。

上述所有作業也適用於 .debug 服務版本 (例如 cognitiveservices.vision.spatialanalysis-personcount.debug)。 偵錯具有在處理影片畫面時將其視覺化的功能。 您必須在主機電腦上執行 xhost +,才能將視訊畫面和事件視覺化。

重要

Azure AI 視覺 AI 模型會在影片畫面中偵測並找出是否有人類存在,並輸出人體周圍的週框方塊。 AI 模型不會嘗試探索個人的身分識別或人口統計。

作業參數

以下是每個空間分析作業所需的參數。

作業參數 描述
Operation ID 上表中的作業識別碼。
enabled 布林值:true 或 false
VIDEO_URL 攝影機裝置的 RTSP URL (範例:rtsp://username:password@url)。 空間分析可透過 RTSP、http 或 mp4,支援 H.264 編碼的串流。 您可以使用 AES 加密,將 Video_URL 當作模糊化的 base64 字串值提供,如果影片 URL 經過模糊化,則 KEY_ENVIV_ENV 必須以環境變數的形式提供。 您可以在這裡找到產生金鑰和加密的範例公用程式。
VIDEO_SOURCE_ID 攝影機裝置或影片串流的易記名稱。 這會與事件 JSON 輸出一起傳回。
VIDEO_IS_LIVE True 表示攝影機裝置;false 表示錄製的影片。
VIDEO_DECODE_GPU_INDEX 要解碼視訊畫面的 GPU。 預設為 0。 應該與其他節點設定中的 gpu_index 相同,例如 DETECTOR_NODE_CONFIGCAMERACALIBRATOR_NODE_CONFIG
INPUT_VIDEO_WIDTH 輸入影片/串流的畫面寬度 (例如 1920)。 這是選擇性欄位,如果有提供,畫面將會調整到此尺寸,同時保留外觀比例。
DETECTOR_NODE_CONFIG JSON,指出對其執行偵測器節點的 GPU。 格式應如下:"{ \"gpu_index\": 0 }",
TRACKER_NODE_CONFIG JSON,指出是否要在追蹤器節點中計算速度。 格式應如下:"{ \"enable_speed\": true }",
CAMERA_CONFIG JSON,指出多個攝影機校正後的攝影機參數。 如果您使用的技能需要校正,且您已擁有攝影機參數,則可以使用此設定來直接提供它們。 格式應如下:"{ \"cameras\": [{\"source_id\": \"endcomputer.0.persondistancegraph.detector+end_computer1\", \"camera_height\": 13.105561256408691, \"camera_focal_length\": 297.60003662109375, \"camera_tiltup_angle\": 0.9738943576812744}] }"source_id 用來識別每個攝影機。 其可以從所發佈事件的 source_info 中取得。 只有 do_calibration=falseDETECTOR_NODE_CONFIG 中時才會生效。
CAMERACALIBRATOR_NODE_CONFIG JSON,指出要對其執行攝影機校正器節點的 GPU,以及是否要使用校正。 格式應如下:"{ \"gpu_index\": 0, \"do_calibration\": true, \"enable_orientation\": true}",
CALIBRATION_CONFIG JSON,指出用來控制攝影機校正運作方式的參數。 格式應如下:"{\"enable_recalibration\": true, \"quality_check_frequency_seconds\": 86400}",
SPACEANALYTICS_CONFIG 區域和線條的 JSON 設定,如下所述。
ENABLE_FACE_MASK_CLASSIFIER True 可啟用偵測影片串流中戴口罩的人,False 可將其停用。 此預設為停用狀態。 口罩偵測要求輸入影片寬度參數為 1920 "INPUT_VIDEO_WIDTH": 1920。 如果偵測到的人沒有面對攝影機或離攝影機太遠,就不會傳回口罩屬性。 如需詳細資訊,請參閱攝影機放置
STATIONARY_TARGET_REMOVER_CONFIG 該 JSON 指出固定目標移除的參數,而固定目標移除會新增學習和忽略長期固定誤判目標 (例如假人或圖片中的人) 的功能。 設定的格式應該如下:"{\"enable\": true, \"bbox_dist_threshold-in_pixels\": 5, \"buffer_length_in_seconds\": 3600, \"filter_ratio\": 0.2 }"

偵測器節點參數設定

以下是所有空間分析作業的 DETECTOR_NODE_CONFIG 參數範例。

{
"gpu_index": 0,
"enable_breakpad": false
}
名稱 類型​​ 描述
gpu_index string 將對其執行此作業的 GPU 索引。
enable_breakpad bool 指出是否要啟用 breakpad,這用來產生損毀傾印以供偵錯之用。 預設為 false。 如果您將其設定為 true,您也需要在 createOptions 容器的 HostConfig 部分新增 "CapAdd": ["SYS_PTRACE"]。 根據預設,損毀傾印會上傳至 RealTimePersonTracking AppCenter 應用程式,如果您希望將損毀傾印上傳至您自己的 AppCenter 應用程式,您可以使用應用程式的應用程式密碼覆寫環境變數 RTPT_APPCENTER_APP_SECRET

攝影機校正節點參數設定

以下是所有空間分析作業的 CAMERACALIBRATOR_NODE_CONFIG 參數範例。

{
  "gpu_index": 0,
  "do_calibration": true,
  "enable_breakpad": false,
  "enable_orientation": true
}
名稱 類型​​ 描述
do_calibration string 表示已開啟校正。 do_calibration 必須為 true,cognitiveservices.vision.spatialanalysis-persondistance 才能正常運作。 do_calibration 預設設為 True
enable_breakpad bool 指出是否要啟用 breakpad,這用來產生損毀傾印以供偵錯之用。 預設為 false。 如果您將其設定為 true,您也需要在 createOptions 容器的 HostConfig 部分新增 "CapAdd": ["SYS_PTRACE"]。 根據預設,損毀傾印會上傳至 RealTimePersonTracking AppCenter 應用程式,如果您希望將損毀傾印上傳至您自己的 AppCenter 應用程式,您可以使用應用程式的應用程式密碼覆寫環境變數 RTPT_APPCENTER_APP_SECRET
enable_orientation bool 指出您是否要計算所偵測到人員的方向。 enable_orientation 預設設為 True

校正設定

這是所有空間分析作業的 CALIBRATION_CONFIG 參數範例。

{
  "enable_recalibration": true,
  "calibration_quality_check_frequency_seconds": 86400,
  "calibration_quality_check_sample_collect_frequency_seconds": 300,
  "calibration_quality_check_one_round_sample_collect_num": 10,
  "calibration_quality_check_queue_max_size": 1000,
  "calibration_event_frequency_seconds": -1
}
名稱 類型​​ 描述
enable_recalibration bool 指出是否開啟自動重新校正。 預設值為 true
calibration_quality_check_frequency_seconds int 每次品質檢查以判斷是否需要重新校正之間的秒數下限。 預設為 86400 (24 小時)。 只有在 enable_recalibration=True 時使用。
calibration_quality_check_sample_collect_frequency_seconds int 收集新資料樣本以進行重新校正和品質檢查之間的秒數下限。 預設值為 300 (5 分鐘)。 只有在 enable_recalibration=True 時使用。
calibration_quality_check_one_round_sample_collect_num int 每回合樣本收集所要收集的新資料樣本數目下限。 預設值為 10。 只有在 enable_recalibration=True 時使用。
calibration_quality_check_queue_max_size int 校正攝影機模型時要儲存的資料樣本數上限。 預設值為 1000。 只有在 enable_recalibration=True 時使用。
calibration_event_frequency_seconds int 攝影機校正事件的輸出頻率 (秒)。 值為 -1 時,表示除非攝影機校正資訊已變更,否則不應傳送攝影機校正。 預設值為 -1

攝影機校正輸出

以下是攝影機校正輸出的範例 (若已啟用)。 省略符號表示清單中還有更多相同類型的物件。

{
  "type": "cameraCalibrationEvent",
  "sourceInfo": {
    "id": "camera1",
    "timestamp": "2021-04-20T21:15:59.100Z",
    "width": 512,
    "height": 288,
    "frameId": 531,
    "cameraCalibrationInfo": {
      "status": "Calibrated",
      "cameraHeight": 13.294151306152344,
      "focalLength": 372.0000305175781,
      "tiltupAngle": 0.9581864476203918,
      "lastCalibratedTime": "2021-04-20T21:15:59.058"
    }
  },
  "zonePlacementInfo": {
    "optimalZoneRegion": {
      "type": "POLYGON",
       "points": [
        {
          "x": 0.8403755868544601,
          "y": 0.5515320334261838
        },
        {
          "x": 0.15805946791862285,
          "y": 0.5487465181058496
        }
      ],
      "name": "optimal_zone_region"
    },
    "fairZoneRegion": {
      "type": "POLYGON",
      "points": [
        {
          "x": 0.7871674491392802,
          "y": 0.7437325905292479
        },
        {
          "x": 0.22065727699530516,
          "y": 0.7325905292479109
        }
      ],
      "name": "fair_zone_region"
    },
    "uniformlySpacedPersonBoundingBoxes": [
      {
        "type": "RECTANGLE",
        "points": [
          {
            "x": 0.0297339593114241,
            "y": 0.0807799442896936
          },
          {
            "x": 0.10015649452269171,
            "y": 0.2757660167130919
          }
        ]
      }
    ],
    "personBoundingBoxGroundPoints": [
      {
        "x": -22.944068908691406,
        "y": 31.487680435180664
      }
    ]
  }
}

如需有關 source_info 的詳細資訊,請參閱空間分析作業輸出

ZonePlacementInfo 欄位名稱 類型 描述
optimalZonePolygon object 攝影機影像中的多邊形,其中可放置作業的線條或區域以獲得最佳結果。
每個值組都代表多邊形頂點的 x,y。 多邊形表示追蹤或計算人員所在的區域,而多邊形點則是以正規化的坐標 (0-1) 為基礎,其中左上角為 (0.0, 0.0),右下角為 (1.0, 1.0)。
fairZonePolygon object 攝影機影像中的多邊形,其中可放置作業的線條或區域以獲得良好但可能不是最佳的結果。
如需內容的深入說明,請參閱上述的 optimalZonePolygon
uniformlySpacedPersonBoundingBoxes 清單 攝影機影像內人員的周框方塊清單,在真實空間中均勻分佈。 值是以正規化座標 (0-1) 為基礎。
personBoundingBoxGroundPoints 清單 地板平面相對於攝影機的座標清單。 每個座標都會對應到 uniformlySpacedPersonBoundingBoxes 中索引相同的周框方塊右下角。
如需有關如何計算地板平面座標的詳細資料,請參閱適用於 cognitiveservices.vision.spatialanalysis-persondistance 的 JSON 格式 AI 見解一節底下的 centerGroundPointX/centerGroundPointY 欄位。

在視訊畫面上視覺化的區域放置資訊輸出範例:區域放置資訊視覺效果

區域放置資訊可針對您的設定提供建議,但是仍然必須遵循攝影機設定中的指導方針,才能獲得最佳結果。

追蹤器節點參數設定

您可以透過追蹤器節點參數設定,設定速度計算。

{
"enable_speed": true,
"remove_stationary_objects": true,
"stationary_objects_dist_threshold_in_pixels": 5,
"stationary_objects_buffer_length_in_seconds": 3600,
"stationary_objects_filter_ratio": 0.2
}
名稱 類型​​ 描述
enable_speed bool 指出您是否要計算所偵測到人員的速度。 enable_speed 預設設為 True。 強烈建議您同時啟用速度和方向,以獲得最佳的估計值。
remove_stationary_objects bool 指出您是否要移除固定物件。 remove_stationary_objects 預設會設定為 True。
stationary_objects_dist_threshold_in_pixels int 判斷是否可以將兩個偵測方塊視為相同偵測的鄰近距離閾值。 stationary_objects_dist_threshold_in_pixels 預設設為 5。
stationary_objects_buffer_length_in_seconds int 系統必須回溯查看以決定目標是否為固定目標的最低秒數。 stationary_objects_buffer_length_in_seconds 預設設為 3600。
stationary_objects_filter_ratio float 如果針對某個目標在相同位置 (定義於 stationary_objects_dist_threshold_in_pixels) 重複偵測到比 stationary_objects_filter_ratio (0.2 代表 20%) 更大的 stationary_objects_buffer_length_in_seconds 時間間隔,那麼就會將該目標視為固定目標。 stationary_objects_filter_ratio 預設設為 0.2。

空間分析作業設定和輸出

personcount 的區域設定

以下是設定區域之 SPACEANALYTICS_CONFIG 參數的 JSON 輸入範例。 您可以為此作業設定多個區域。

{
  "zones": [
    {
      "name": "lobbycamera",
      "polygon": [[0.3,0.3], [0.3,0.9], [0.6,0.9], [0.6,0.3], [0.3,0.3]],
      "events": [
        {
          "type": "count",
          "config": {
            "trigger": "event",
            "focus": "footprint"
          }
        }
      ]
    }
  ]
}
名稱 類型​​ 描述
zones list 區域清單。
name string 此區域的易記名稱。
polygon 清單 每個值組都代表多邊形頂點的 x,y。 多邊形代表追蹤或計算人員所在的區域。 多邊形點是以正規化的坐標 (0-1) 為基礎,其中左上角為 (0.0, 0.0),右下角為 (1.0, 1.0)。
threshold float 當人在區域內大於此像素數時,就會輸出事件。 這是選擇性的欄位,且值為比例 (0-1)。 例如,影像寬度 = 512 (0.0253 X 512 = ~13) 的視訊上,值 0.0253 將會是 13 像素。
type string 針對 cognitiveservices.vision.spatialanalysis-personcount,這應該是 count
trigger string 傳送事件的觸發程序類型。 支援的值是 event (計數變更時用於傳送事件),或 interval (用於定期傳送事件) (不論計數是否已變更)。
output_frequency int 輸出事件的速率。 當 output_frequency = X 時,輸出每個 X 事件,例如 output_frequency = 2 表示輸出其他每個事件。 output_frequency 同時適用於 eventinterval
focus string 人員周框方塊內的點位置,用來計算事件。 焦點的值可以是 footprint (人員足跡)、bottom_center (人員周框方塊正下方)、center (人員周框方塊的中心)。

personcrossingline 的線條設定

以下是設定線條之 SPACEANALYTICS_CONFIG 參數的 JSON 輸入範例。 您可以為此作業設定多條交叉線。

{
   "lines": [
       {
           "name": "doorcamera",
           "line": {
               "start": {
                   "x": 0,
                   "y": 0.5
               },
               "end": {
                   "x": 1,
                   "y": 0.5
               }
           },
           "events": [
               {
                   "type": "linecrossing",
                   "config": {
                       "trigger": "event",
                       "focus": "footprint"
                   }
               }
           ]
       }
   ]
}
名稱 類型​​ 描述
lines list 線條清單。
name string 此線條的易記名稱。
line 清單 線條的定義。 這是一條方向線,可讓您了解「入口」與「出口」。
start 值組 線條起點的 x,y 座標。 浮點值代表頂點相對於左上角的位置。 若要計算絕對 x,y 值,您可以將這些值乘以畫面大小。
end 值組 線條終點的 x,y 座標。 浮點值代表頂點相對於左上角的位置。 若要計算絕對 x,y 值,您可以將這些值乘以畫面大小。
threshold float 當人在區域內大於此像素數時,就會輸出事件。 這是選擇性的欄位,且值為比例 (0-1)。 例如,影像寬度 = 512 (0.0253 X 512 = ~13) 的視訊上,值 0.0253 將會是 13 像素。
type string 針對 cognitiveservices.vision.spatialanalysis-personcrossingline,這應該是 linecrossing
trigger string 傳送事件的觸發程序類型。
支援的值:"event":有人跨越該線條時引發。
focus string 人員周框方塊內的點位置,用來計算事件。 焦點的值可以是 footprint (人員足跡)、bottom_center (人員周框方塊正下方)、center (人員周框方塊的中心)。 預設值為 footprint。

personcrossingpolygon 的區域設定

這是設定區域之 SPACEANALYTICS_CONFIG 參數的 JSON 輸入範例。 您可以為此作業設定多個區域。

{
"zones":[
   {
       "name": "queuecamera",
       "polygon": [[0.3,0.3], [0.3,0.9], [0.6,0.9], [0.6,0.3], [0.3,0.3]],
       "events":[{
           "type": "zonecrossing",
           "config":{
               "trigger": "event",
               "focus": "footprint"
               }
           }]
   },
   {
       "name": "queuecamera1",
       "polygon": [[0.3,0.3], [0.3,0.9], [0.6,0.9], [0.6,0.3], [0.3,0.3]],
       "events":[{
           "type": "zonedwelltime",
           "config":{
               "trigger": "event",
               "focus": "footprint"
               }
           }]
   }]
}
名稱 類型​​ 描述
zones list 區域清單。
name string 此區域的易記名稱。
polygon 清單 每個值組都代表多邊形頂點的 x,y。 多邊形代表追蹤或計算人員所在的區域。 浮點值代表頂點相對於左上角的位置。 若要計算絕對 x,y 值,您可以將這些值乘以畫面大小。
target_side int 指定 polygon 所定義區域的側邊,以測量使用者在區域中面對該側的時間長度。 'dwellTimeForTargetSide' 將會輸出該估計時間。 每一側都是多邊形的兩個頂點之間的編號邊緣,代表您的區域。 例如,多邊形前兩個頂點之間的邊緣代表第一側,'side'=1。 target_side 的值介於 [0,N-1] 之間,其中 Npolygon 的側邊數。 這是非必填欄位。
threshold float 當人在區域內大於此像素數時,就會輸出事件。 這是選擇性的欄位,且值為比例 (0-1)。 例如,影像寬度 = 512 (0.074 X 512 = ~38) 的視訊上,值 0.074 將會是 38 像素。
type string 針對 cognitiveservices.vision.spatialanalysis-personcrossingpolygon,這應該是 zonecrossingzonedwelltime
trigger string 傳送事件的觸發程序類型
支援的值:"event":有人進入或離開區域時引發。
focus string 人員周框方塊內的點位置,用來計算事件。 焦點的值可以是 footprint (人員足跡)、bottom_center (人員周框方塊正下方)、center (人員周框方塊的中心)。 預設值為 footprint。

persondistance 的區域設定

這是 SPACEANALYTICS_CONFIG 參數的 JSON 輸入範例,其會設定 cognitiveservices.vision.spatialanalysis-persondistance 的區域。 您可以為此作業設定多個區域。

{
"zones":[{
   "name": "lobbycamera",
   "polygon": [[0.3,0.3], [0.3,0.9], [0.6,0.9], [0.6,0.3], [0.3,0.3]],
   "events":[{
       "type": "persondistance",
       "config":{
           "trigger": "event",
           "output_frequency":1,
           "minimum_distance_threshold":6.0,
           "maximum_distance_threshold":35.0,
           "aggregation_method": "average",
           "focus": "footprint"
          }
          }]
   }]
}
名稱 類型​​ 描述
zones list 區域清單。
name string 此區域的易記名稱。
polygon 清單 每個值組都代表多邊形頂點的 x,y。 多邊形代表計算人員所在的區域,以及測量人員之間的距離。 浮點值代表頂點相對於左上角的位置。 若要計算絕對 x,y 值,您可以將這些值乘以畫面大小。
threshold float 當人在區域內大於此像素數時,就會輸出事件。 這是選擇性的欄位,且值為比例 (0-1)。 例如,影像寬度 = 512 (0.0253 X 512 = ~13) 的視訊上,值 0.0253 將會是 13 像素。
type string 針對 cognitiveservices.vision.spatialanalysis-persondistance,這應該是 persondistance
trigger string 傳送事件的觸發程序類型。 支援的值是 event (計數變更時用於傳送事件),或 interval (用於定期傳送事件) (不論計數是否已變更)。
output_frequency int 輸出事件的速率。 當 output_frequency = X 時,輸出每個 X 事件,例如 output_frequency = 2 表示輸出其他每個事件。 output_frequency 同時適用於 eventinterval
minimum_distance_threshold float 當人員小於該距離時,將會觸發 "TooClose" 事件的距離 (以英尺為單位)。
maximum_distance_threshold float 當人員大於該距離時,將會觸發 "TooFar" 事件的距離 (以英尺為單位)。
aggregation_method string 彙總 persondistance 結果的方法。 aggregation_method 適用於 modeaverage
focus string 人員周框方塊內的點位置,用來計算事件。 焦點的值可以是 footprint (人員足跡)、bottom_center (人員周框方塊正下方)、center (人員周框方塊的中心)。

spatialanalysis 的設定

以下是 SPACEANALYTICS_CONFIG 的 JSON 輸入範例,其會設定 cognitiveservices.vision.spatialanalysis 的線條和區域。 您可以為此作業設定多個線條/區域,而且每個線條/區域都可以有不同的事件。

{
  "lines": [
    {
      "name": "doorcamera",
      "line": {
        "start": {
          "x": 0,
          "y": 0.5
        },
        "end": {
          "x": 1,
          "y": 0.5
        }
      },
      "events": [
        {
          "type": "linecrossing",
          "config": {
            "trigger": "event",
            "focus": "footprint"
          }
        }
      ]
    }
  ],
  "zones": [
    {
      "name": "lobbycamera",
      "polygon": [[0.3, 0.3],[0.3, 0.9],[0.6, 0.9],[0.6, 0.3],[0.3, 0.3]],
      "events": [
        {
          "type": "persondistance",
          "config": {
            "trigger": "event",
            "output_frequency": 1,
            "minimum_distance_threshold": 6.0,
            "maximum_distance_threshold": 35.0,
            "focus": "footprint"
          }
        },
        {
          "type": "count",
          "config": {
            "trigger": "event",
            "output_frequency": 1,
            "focus": "footprint"
          }
        },
        {
          "type": "zonecrossing",
          "config": {
            "focus": "footprint"
          }
        },
        {
          "type": "zonedwelltime",
          "config": {
            "focus": "footprint"
          }
        }
      ]
    }
  ]
}

攝影機設定

請參閱攝影機放置指南,以深入了解如何設定區域和線條。

空間分析作業輸出

每個作業的事件都會以 JSON 格式輸出到 Azure IoT 中樞。

Personcount AI Insights 的 JSON 格式

此作業針對事件輸出的範例 JSON。

{
    "events": [
        {
            "id": "b013c2059577418caa826844223bb50b",
            "type": "personCountEvent",
            "detectionIds": [
                "bc796b0fc2534bc59f13138af3dd7027",
                "60add228e5274158897c135905b5a019"
            ],
            "properties": {
                "personCount": 2
            },
            "zone": "lobbycamera",
            "trigger": "event"
        }
    ],
    "sourceInfo": {
        "id": "camera_id",
        "timestamp": "2020-08-24T06:06:57.224Z",
        "width": 608,
        "height": 342,
        "frameId": "1400",
        "cameraCalibrationInfo": {
            "status": "Calibrated",
            "cameraHeight": 10.306597709655762,
            "focalLength": 385.3199462890625,
            "tiltupAngle": 1.0969393253326416
        },
        "imagePath": ""
    },
    "detections": [
        {
            "type": "person",
            "id": "bc796b0fc2534bc59f13138af3dd7027",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.612683747944079,
                        "y": 0.25340268765276636
                    },
                    {
                        "x": 0.7185954043739721,
                        "y": 0.6425260577285499
                    }
                ]
            },
            "confidence": 0.9559211134910583,
            "metadata": {
                "centerGroundPointX": "2.6310102939605713",
                "centerGroundPointY": "0.0",
		"groundOrientationAngle": "1.3",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            },
           "attributes": [
                {
                    "label": "face_mask",
                    "confidence": 0.99,
                    "task": ""
                }
            ]
        },
        {
            "type": "person",
            "id": "60add228e5274158897c135905b5a019",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.22326200886776573,
                        "y": 0.17830915618361087
                    },
                    {
                        "x": 0.34922296122500773,
                        "y": 0.6297955429344847
                    }
                ]
            },
            "confidence": 0.9389744400978088,
             "metadata": {
                "centerGroundPointX": "2.6310102939605713",
                "centerGroundPointY": "18.635927200317383",
		"groundOrientationAngle": "1.3",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            },
           "attributes": [
                {
                    "label": "face_mask",
                    "confidence": 0.99,
                    "task": ""
                }
            ]
       }
    ],
    "schemaVersion": "2.0"
}
事件欄位名稱 類型 描述
id string 事件識別碼
type string 事件類型
detectionsId 陣列 觸發此事件之人員偵測唯一識別碼的陣列大小 1
properties collection 值的集合
trackinId string 所偵測到人員的唯一識別碼
zone string 多邊形的 "name" 欄位,代表穿過的區域
trigger string 觸發程序類型為 'event' 或 'interval',端視 SPACEANALYTICS_CONFIG 中的值 trigger 而定
偵測欄位名稱 類型 描述
id string 偵測識別碼
type string 偵測類型
region collection 值的集合
type string 區域類型
points collection 當區域類型為 RECTANGLE 時,左上角和右下角的點
confidence float 演算法信賴度
attributes 陣列 屬性的陣列。 每個屬性都包含標籤、工作和信賴度
label string 屬性值 (例如 {label: face_mask} 表示偵測到的人員有戴口罩)
confidence (attribute) float 介於 0 到 1 的屬性信賴值 (例如 {confidence: 0.9, label: face_nomask} 表示偵測到的人員「沒有」戴口罩)
task string 屬性分類工作/類別
SourceInfo 欄位名稱 類型 描述
id string 相機識別碼
timestamp date 發出 JSON 承載時的 UTC 日期
width int 視訊畫面寬度
height int 視訊畫面高度
frameId int 畫面識別碼
cameraCallibrationInfo collection 值的集合
status string 校正的狀態,格式為 state[;progress description]。 狀態可以是 CalibratingRecalibrating (若已啟用重新校正) 或 Calibrated。 進度描述部分只有在處於 CalibratingRecalibrating 狀態時才有效,這是用來顯示目前校正程序的進度。
cameraHeight float 攝影機高於地面的高度 (以英尺為單位)。 這是從自動校正推斷而來。
focalLength float 攝影機的焦距長度 (以像素為單位)。 這是從自動校正推斷而來。
tiltUpAngle float 攝影機從垂直方向傾斜的角度。 這是從自動校正推斷而來。

personcrossingline AI Insights 的 JSON 格式

此作業針對偵測輸出的範例 JSON。

{
    "events": [
        {
            "id": "3733eb36935e4d73800a9cf36185d5a2",
            "type": "personLineEvent",
            "detectionIds": [
                "90d55bfc64c54bfd98226697ad8445ca"
            ],
            "properties": {
                "trackingId": "90d55bfc64c54bfd98226697ad8445ca",
                "status": "CrossLeft"
            },
            "zone": "doorcamera"
        }
    ],
    "sourceInfo": {
        "id": "camera_id",
        "timestamp": "2020-08-24T06:06:53.261Z",
        "width": 608,
        "height": 342,
        "frameId": "1340",
        "imagePath": ""
    },
    "detections": [
        {
            "type": "person",
            "id": "90d55bfc64c54bfd98226697ad8445ca",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.491627341822574,
                        "y": 0.2385801348769874
                    },
                    {
                        "x": 0.588894994635331,
                        "y": 0.6395559924387793
                    }
                ]
            },
            "confidence": 0.9005028605461121,
            "metadata": {
                "centerGroundPointX": "2.6310102939605713",
                "centerGroundPointY": "18.635927200317383",
		"groundOrientationAngle": "1.3",
                "trackingId": "90d55bfc64c54bfd98226697ad8445ca",
                "speed": "1.2",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            },
           "attributes": [
                {
                    "label": "face_mask",
                    "confidence": 0.99,
                    "task": ""
                }
            ]
        }
    ],
    "schemaVersion": "2.0"
}
事件欄位名稱 類型 描述
id string 事件識別碼
type string 事件類型
detectionsId 陣列 觸發此事件之人員偵測唯一識別碼的陣列大小 1
properties collection 值的集合
trackinId string 所偵測到人員的唯一識別碼
status string 線條交叉的方向,也就是 'CrossLeft' 或 'CrossRight'。 方向是以想像站在「起點」面對「終點」為基礎。 CrossRight 是從左向右交叉。 CrossLeft 是從右向左交叉。
orientationDirection string 偵測到的人員穿過線條後的方位方向。 值可以是 'Left'、'Right’ 或 'Straight'。 如果 enable_orientationCAMERACALIBRATOR_NODE_CONFIG 中設定為 True,則此值為輸出
zone string 穿過的線條的 "name" 欄位
偵測欄位名稱 類型 描述
id string 偵測識別碼
type string 偵測類型
region collection 值的集合
type string 區域類型
points collection 當區域類型為 RECTANGLE 時,左上角和右下角的點
groundOrientationAngle float 在推斷的地平面上,人員方向的順時針弧度角度
mappedImageOrientation float 在 2D 影像空間上,人員方向的順時針投射弧度角度
speed float 偵測到之人員的預估速度。 單位為 foot per second (ft/s)
confidence float 演算法信賴度
attributes 陣列 屬性的陣列。 每個屬性都包含標籤、工作和信賴度
label string 屬性值 (例如 {label: face_mask} 表示偵測到的人員有戴口罩)
confidence (attribute) float 介於 0 到 1 的屬性信賴值 (例如 {confidence: 0.9, label: face_nomask} 表示偵測到的人員「沒有」戴口罩)
task string 屬性分類工作/類別
SourceInfo 欄位名稱 類型 描述
id string 相機識別碼
timestamp date 發出 JSON 承載時的 UTC 日期
width int 視訊畫面寬度
height int 視訊畫面高度
frameId int 畫面識別碼

重要

AI 模型可以偵測到人,不論該人是否面向攝影機都能夠偵測到。 AI 模型不會執行臉部辨識,也不會發出任何生物特徵辨識資訊。

personcrossingpolygon AI Insights 的 JSON 格式

此作業針對偵測輸出的 JSON 範例,其 zonecrossing 類型為 SPACEANALYTICS_CONFIG。

{
    "events": [
        {
            "id": "f095d6fe8cfb4ffaa8c934882fb257a5",
            "type": "personZoneEnterExitEvent",
            "detectionIds": [
                "afcc2e2a32a6480288e24381f9c5d00e"
            ],
            "properties": {
                "trackingId": "afcc2e2a32a6480288e24381f9c5d00e",
                "status": "Enter",
                "side": "1"
            },
            "zone": "queuecamera"
        }
    ],
    "sourceInfo": {
        "id": "camera_id",
        "timestamp": "2020-08-24T06:15:09.680Z",
        "width": 608,
        "height": 342,
        "frameId": "428",
        "imagePath": ""
    },
    "detections": [
        {
            "type": "person",
            "id": "afcc2e2a32a6480288e24381f9c5d00e",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.8135572734631991,
                        "y": 0.6653949670624315
                    },
                    {
                        "x": 0.9937645761590255,
                        "y": 0.9925406829655519
                    }
                ]
            },
            "confidence": 0.6267998814582825,
            "metadata": {
                "centerGroundPointX": "2.6310102939605713",
                "centerGroundPointY": "18.635927200317383",
		"groundOrientationAngle": "1.3",
                "trackingId": "afcc2e2a32a6480288e24381f9c5d00e",
                "speed": "1.2",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            },
           "attributes": [
		{
		    "label": "face_mask",
		    "confidence": 0.99,
		    "task": ""
		}
            ]
	}
    ],
    "schemaVersion": "2.0"
}

此作業針對偵測輸出的 JSON 範例,其 zonedwelltime 類型為 SPACEANALYTICS_CONFIG。

{
    "events": [
        {
            "id": "f095d6fe8cfb4ffaa8c934882fb257a5",
            "type": "personZoneDwellTimeEvent",
            "detectionIds": [
                "afcc2e2a32a6480288e24381f9c5d00e"
            ],
            "properties": {
                "trackingId": "afcc2e2a32a6480288e24381f9c5d00e",
                "status": "Exit",
                "side": "1",
	        "dwellTime": 7132.0,
	        "dwellFrames": 20            
            },
            "zone": "queuecamera"
        }
    ],
    "sourceInfo": {
        "id": "camera_id",
        "timestamp": "2020-08-24T06:15:09.680Z",
        "width": 608,
        "height": 342,
        "frameId": "428",
        "imagePath": ""
    },
    "detections": [
        {
            "type": "person",
            "id": "afcc2e2a32a6480288e24381f9c5d00e",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.8135572734631991,
                        "y": 0.6653949670624315
                    },
                    {
                        "x": 0.9937645761590255,
                        "y": 0.9925406829655519
                    }
                ]
            },
            "confidence": 0.6267998814582825,
	    "metadata": {
                "centerGroundPointX": "2.6310102939605713",
                "centerGroundPointY": "18.635927200317383",
		"groundOrientationAngle": "1.2",
		"mappedImageOrientation": "0.3",
		"speed": "1.2",
		 "trackingId": "afcc2e2a32a6480288e24381f9c5d00e",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            }
        }
    ],
    "schemaVersion": "2.0"
}
事件欄位名稱 類型 描述
id string 事件識別碼
type string 事件類型。 此值可以是 personZoneDwellTimeEventpersonZoneEnterExitEvent
detectionsId 陣列 觸發此事件之人員偵測唯一識別碼的陣列大小 1
properties collection 值的集合
trackinId string 所偵測到人員的唯一識別碼
status string 多邊形交叉的方向,也就是 'Enter' 或 'Exit'
side int 該人穿過的多邊形的側邊數。 每一側都是多邊形的兩個頂點之間的編號邊緣,代表您的區域。 多邊形前兩個頂點之間的邊緣代表第一側。 當事件因為遮蔽而未與特定側邊相關聯時,'Side' 是空的。 例如,當某個人消失但沒有看到穿過區域的一側時,表示離開;當某個人出現但沒有看到穿過區域的一側時,表示進入。
dwellTime float 代表人員在區域中所花費時間的毫秒數。 當事件類型為 personZoneDwellTimeEvent 時,會提供此欄位
dwellFrames int 人員在區域中所花費的畫面數目。 當事件類型為 personZoneDwellTimeEvent 時,會提供此欄位
dwellTimeForTargetSide float 代表人員在區域中且面向 target_side 所花費時間的毫秒數。 當 enable_orientationCAMERACALIBRATOR_NODE_CONFIG 中為 True,並在 SPACEANALYTICS_CONFIG 中設定 target_side 的值時,會提供此欄位
avgSpeed float 人員在區域中的平均速度。 單位為 foot per second (ft/s)
minSpeed float 人員在區域中的速度下限。 單位為 foot per second (ft/s)
zone string 多邊形的 "name" 欄位,代表穿過的區域
偵測欄位名稱 類型 描述
id string 偵測識別碼
type string 偵測類型
region collection 值的集合
type string 區域類型
points collection 當區域類型為 RECTANGLE 時,左上角和右下角的點
groundOrientationAngle float 在推斷的地平面上,人員方向的順時針弧度角度
mappedImageOrientation float 在 2D 影像空間上,人員方向的順時針投射弧度角度
speed float 偵測到之人員的預估速度。 單位為 foot per second (ft/s)
confidence float 演算法信賴度
attributes 陣列 屬性的陣列。 每個屬性都包含標籤、工作和信賴度
label string 屬性值 (例如 {label: face_mask} 表示偵測到的人員有戴口罩)
confidence (attribute) float 介於 0 到 1 的屬性信賴值 (例如 {confidence: 0.9, label: face_nomask} 表示偵測到的人員「沒有」戴口罩)
task string 屬性分類工作/類別

個人化 AI 深入解析的 JSON 格式

此作業針對偵測輸出的範例 JSON。

{
    "events": [
        {
            "id": "9c15619926ef417aa93c1faf00717d36",
            "type": "personDistanceEvent",
            "detectionIds": [
                "9037c65fa3b74070869ee5110fcd23ca",
                "7ad7f43fd1a64971ae1a30dbeeffc38a"
            ],
            "properties": {
                "personCount": 5,
                "averageDistance": 20.807043981552123,
                "minimumDistanceThreshold": 6.0,
                "maximumDistanceThreshold": "Infinity",
                "eventName": "TooClose",
                "distanceViolationPersonCount": 2
            },
            "zone": "lobbycamera",
            "trigger": "event"
        }
    ],
    "sourceInfo": {
        "id": "camera_id",
        "timestamp": "2020-08-24T06:17:25.309Z",
        "width": 608,
        "height": 342,
        "frameId": "1199",
        "cameraCalibrationInfo": {
            "status": "Calibrated",
            "cameraHeight": 12.9940824508667,
            "focalLength": 401.2800598144531,
            "tiltupAngle": 1.057669997215271
        },
        "imagePath": ""
    },
    "detections": [
        {
            "type": "person",
            "id": "9037c65fa3b74070869ee5110fcd23ca",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.39988183975219727,
                        "y": 0.2719132942065858
                    },
                    {
                        "x": 0.5051516984638414,
                        "y": 0.6488402517218339
                    }
                ]
            },
            "confidence": 0.948630690574646,
	    "metadata": {
                "centerGroundPointX": "-1.4638760089874268",
                "centerGroundPointY": "18.29732322692871",
		"groundOrientationAngle": "1.3",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            }
        },
        {
            "type": "person",
            "id": "7ad7f43fd1a64971ae1a30dbeeffc38a",
            "region": {
                "type": "RECTANGLE",
                "points": [
                    {
                        "x": 0.5200299714740954,
                        "y": 0.2875368218672903
                    },
                    {
                        "x": 0.6457497446160567,
                        "y": 0.6183311060855263
                    }
                ]
            },
            "confidence": 0.8235412240028381,
            "metadata": {
                "centerGroundPointX": "2.6310102939605713",
                "centerGroundPointY": "18.635927200317383",
		"groundOrientationAngle": "1.3",
                "footprintX": "0.7306610584259033",
                "footprintY": "0.8814966493381893"
            }
        }
    ],
    "schemaVersion": "2.0"
}
事件欄位名稱 類型 描述
id string 事件識別碼
type string 事件類型
detectionsId 陣列 觸發此事件之人員偵測唯一識別碼的陣列大小 1
properties collection 值的集合
personCount int 發出事件時偵測到的人數
averageDistance float 所有偵測到的人之間的平均距離 (以英尺為單位)
minimumDistanceThreshold float 當人員小於該距離時,將會觸發 "TooClose" 事件的距離 (以英尺為單位)。
maximumDistanceThreshold float 當人員大於該距離時,將會觸發 "TooFar" 事件的距離 (以英尺為單位)。
eventName string 事件名稱為 TooClose (違反 minimumDistanceThreshold 時)、TooFar (違反 maximumDistanceThreshold 時) 或 unknown (自動校正尚未完成時)
distanceViolationPersonCount int 偵測到違反 minimumDistanceThresholdmaximumDistanceThreshold 的人數
zone string 多邊形的 "name" 欄位,代表在人員之間距離受到監視的區域
trigger string 觸發程序類型為 'event' 或 'interval',端視 SPACEANALYTICS_CONFIG 中的值 trigger 而定
偵測欄位名稱 類型 描述
id string 偵測識別碼
type string 偵測類型
region collection 值的集合
type string 區域類型
points collection 當區域類型為 RECTANGLE 時,左上角和右下角的點
confidence float 演算法信賴度
centerGroundPointX/centerGroundPointY 2 個浮點值 xy 值,其中包含人在地面上的推斷位置的座標 (以英尺為單位)。 xy 是地板平面上的座標 (假設地板是水平的)。 攝影機的位置是原點。

centerGroundPoint 中,x 是攝影機與人之間距離的元件,而該人員會與攝影機影像平面垂直。 y 是與攝影機影像平面平行的距離元件。

範例地面中心點

在此範例中,centerGroundPoint{centerGroundPointX: 4, centerGroundPointY: 5}。 這表示有一個人在攝影機前方四英尺,距離右側五英尺,從上往下看著房間。

SourceInfo 欄位名稱 類型 描述
id string 相機識別碼
timestamp date 發出 JSON 承載時的 UTC 日期
width int 視訊畫面寬度
height int 視訊畫面高度
frameId int 畫面識別碼
cameraCallibrationInfo collection 值的集合
status string 校正的狀態,格式為 state[;progress description]。 狀態可以是 CalibratingRecalibrating (若已啟用重新校正) 或 Calibrated。 進度描述部分只有在處於 CalibratingRecalibrating 狀態時才有效,這是用來顯示目前校正程序的進度。
cameraHeight float 攝影機高於地面的高度 (以英尺為單位)。 這是從自動校正推斷而來。
focalLength float 攝影機的焦距長度 (以像素為單位)。 這是從自動校正推斷而來。
tiltUpAngle float 攝影機從垂直方向傾斜的角度。 這是從自動校正推斷而來。

spatialanalysis AI Insights 的 JSON 格式

此作業的輸出取決於已設定的 events,例如,如果有一個針對此作業設定的 zonecrossing 事件,則輸出會與 cognitiveservices.vision.spatialanalysis-personcrossingpolygon 相同。

使用容器所產生的輸出

您可以將空間分析偵測或事件整合到您的應用程式中。 以下是要考慮的一些方法:

  • 針對您所選擇的程式設計語言使用 Azure 事件中樞 SDK,以連線至 Azure IoT 中樞端點並接收事件。 如需詳細資訊,請參閱從內建端點讀取裝置到雲端的訊息
  • 在您的 Azure IoT 中樞上設定訊息路由,以便將事件傳送至其他端點,或將事件儲存到您的資料儲存體。 如需詳細資訊,請參閱 IoT 中樞訊息路由
  • 設定 Azure 串流分析作業,以便在事件抵達時即時處理這些事件,並建立視覺效果。

大規模部署空間分析作業 (多個攝影機)

為了獲得 GPU 的最佳效能和使用率,您可以使用圖表執行個體,在多個攝影機上部署任何空間分析作業。 以下是在 15 個攝影機上執行 cognitiveservices.vision.spatialanalysis-personcrossingline 作業的範例設定。

  "properties.desired": {
      "globalSettings": {
          "PlatformTelemetryEnabled": false,
          "CustomerTelemetryEnabled": true
      },
      "graphs": {
        "personzonelinecrossing": {
        "operationId": "cognitiveservices.vision.spatialanalysis-personcrossingline",
        "version": 1,
        "enabled": true,
        "sharedNodes": {
            "shared_detector0": {
                "node": "PersonCrossingLineGraph.detector",
                "parameters": {
                    "DETECTOR_NODE_CONFIG": "{ \"gpu_index\": 0, \"batch_size\": 7, \"do_calibration\": true}",
                }
            },
            "shared_calibrator0": {
                "node": "PersonCrossingLineGraph/cameracalibrator",
                "parameters": {
                    "CAMERACALIBRATOR_NODE_CONFIG": "{ \"gpu_index\": 0, \"do_calibration\": true, \"enable_zone_placement\": true}",
                    "CALIBRATION_CONFIG": "{\"enable_recalibration\": true, \"quality_check_frequency_seconds\": 86400}",
                }
        },
        "parameters": {
            "VIDEO_DECODE_GPU_INDEX": 0,
            "VIDEO_IS_LIVE": true
        },
        "instances": {
            "1": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 1>",
                    "VIDEO_SOURCE_ID": "camera 1",
                    "SPACEANALYTICS_CONFIG": "{\"zones\":[{\"name\":\"queue\",\"polygon\":[[0,0],[1,0],[0,1],[1,1],[0,0]]}]}"
                }
            },
            "2": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 2>",
                    "VIDEO_SOURCE_ID": "camera 2",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "3": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 3>",
                    "VIDEO_SOURCE_ID": "camera 3",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "4": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 4>",
                    "VIDEO_SOURCE_ID": "camera 4",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "5": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 5>",
                    "VIDEO_SOURCE_ID": "camera 5",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "6": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 6>",
                    "VIDEO_SOURCE_ID": "camera 6",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "7": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 7>",
                    "VIDEO_SOURCE_ID": "camera 7",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "8": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 8>",
                    "VIDEO_SOURCE_ID": "camera 8",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "9": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 9>",
                    "VIDEO_SOURCE_ID": "camera 9",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "10": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 10>",
                    "VIDEO_SOURCE_ID": "camera 10",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "11": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 11>",
                    "VIDEO_SOURCE_ID": "camera 11",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "12": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 12>",
                    "VIDEO_SOURCE_ID": "camera 12",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "13": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 13>",
                    "VIDEO_SOURCE_ID": "camera 13",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "14": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 14>",
                    "VIDEO_SOURCE_ID": "camera 14",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            },
            "15": {
                "sharedNodeMap": {
                    "PersonCrossingLineGraph/detector": "shared_detector0",
		    "PersonCrossingLineGraph/cameracalibrator": "shared_calibrator0",
                },
                "parameters": {
                    "VIDEO_URL": "<Replace RTSP URL for camera 15>",
                    "VIDEO_SOURCE_ID": "camera 15",
                    "SPACEANALYTICS_CONFIG": "<Replace the zone config value, same format as above>"
                }
            }
          }
        },
      }
  }
名稱 類型​​ 描述
batch_size int 如果所有攝影機的解析度都相同,將 batch_size 設定為該作業將使用的攝影機數目,否則,將 batch_size 設定為 1,或將其保留為預設值 (1),表示不支援任何批次處理。

下一步