選項
首頁首頁 Skill 開發營運和 CI/CD vss-deploy-detection-tracking-3d

vss-deploy-detection-tracking-3d

NVIDIA/skills NVIDIA/skills

部署並運作 RTVI-CV-3D 微服務,用於多攝影機 3D 偵測與追蹤,支援範例資料集、自訂影片及 RTSP 串流。

...展開全部
0
更新時間 2026-09-28

目的

將 RTVI-CV-3D 微服務以 MV3DT(MODE=mv3dt)模式部署並運作——即針對每台相機的 DeepStream 感知,加上透過多台已校準相機進行的 BEV 融合——並適用於隨附的範例資料集、自訂影片或即時 RTSP 串流,無需完整的倉庫代理程式/ LLM / VLM 技術堆疊。

操作說明

請自上而下進行:先回答「路由」部分下的路由問題(Q0–Q3),然後依照所選路徑的參考指南操作。詳細的分步操作程序請參閱references/ 目錄(部署、校準鏈、相機配置、驗證、撤除、疑難排解)。

範例

  • 在範例資料集上啟用多鏡頭追蹤功能。
  • 將 RTVI-CV-3D 部署至此處的影片:<path/to/videos>。
  • 校準完成後,在 RTSP 串流上執行 MV3DT。

VSS 部署偵測與追蹤 — 3D(RTVI-CV-3D / MV3DT)

從倉庫藍圖中以 MV3DT 堆疊(MODE=mv3dt)的形式啟動 RTVI-CV-3D 微服務: 每台攝影機的 DeepStream 感知(vss-rtvi-cv-mv3dt)+ BEV 融合(vss-rtvi-cv-bev-fusion)+ mosquitto MQTT 總線 + 中介伺服器 + VST 感測器堆疊 — 不包含完整倉庫藍圖中附帶的代理程式 / LLM / VLM 堆疊(該堆疊隨完整倉庫藍圖一併提供)。

實際的組合機制位於deploy/docker/industry-profiles/warehouse-operations/warehouse-mv3dt-app/ 目錄中。此技能負責驅動環境變數覆寫、校準鏈及驗證。

路由

向使用者提問最多四個問題,然後進行分派。

Q0 — 配置檔規模(是否包含疊加層)

預設為「擴展」模式,除非使用者明確要求「最小」模式。擴展模式會部署 ELK +vss-video-analytics-api-mv3dt+vss-kibana-init-mv3dt+vss-import-calibration-output-mv3dt部署於 MV3DT 核心之上 — 這些是 VST 視訊牆渲染邊界框疊加層所需的元件。若缺少這些元件,視訊牆雖可運作,但會顯示未疊加的原始串流。

使用者回覆 MINIMAL_PROFILE 您將獲得 何時選擇
擴展(預設) "" MV3DT 核心 + ELK + 分析 API + Kibana。在 VST 視訊牆中支援疊加層功能。建議選用此方案以獲得完整的端到端(e2e)體驗。 「我想要完整的端到端體驗」、「我想看到邊界框」,或未特別指定偏好
精簡 "true" 僅 MV3DT 核心。減少約 5 個容器。VST 中無疊加層。元資料仍儲存於 Kafka/Redis。 「我只需要資料」、「邊緣/Thor 主機」、「最小佔用空間」

關於選擇性 ELK 的說明:在當前的組合方案中,沒有「精簡模式 + 僅 ELK」的中間選項。 每個${MINIMAL_PROFILE:+_extended} 受控服務都會一併啟動(ES、Logstash、Kibana、video-analytics-api、kibana-init、import-calibration)。 當設定MINIMAL_PROFILE時,bash 的 :+參數擴展會產生_extended後綴;extended 會將觸發條件字串切換回純粹的bp_wh_kafka_mv3dt,而這與當前的 Compose 配置檔已相符。您要麼接受完整的擴展套件,要麼維持最小配置。

Q1 — 資料來源

除非資料來源已在用戶的第一則訊息中明確指出,否則請提出此問題。像 「deploy rtvi-cv-3d」這樣的純請求會路由至此 MV3DT 技能(MODE=mv3dt),但 並不表示包含範例。

  • sample— 捆綁的 4 鏡頭合成資料集(warehouse-4cams-20mx20m-synthetic)。校準資料已內建於樹狀結構中;無需執行 AMC。
  • videos— 使用者擁有本機影片檔案(任何以相機名稱命名的*.mp4 檔案)。若缺少校準,將執行獨立的 AMC(auto_calib設定檔)。
  • rtsp— 使用者擁有即時 RTSP 網址。透過 VIOS 驅動的 AMC 進行校準;最終部署時還需提供包含這些 RTSP 網址的感測器資訊檔案 (camera_info.json)。

Q2 — 校準覆蓋範圍(範例請跳過)

對於影片和RTSP,請檢查校準資料是否已存在於感知容器預期的掛載路徑下:

DATASET="${SAMPLE_VIDEO_DATASET:?}"          # 使用者的資料集簡稱;參見 Q3
CAL_DIR="${VSS_APPS_DIR}/industry-profiles/warehouse-operations/warehouse-mv3dt-app/calibration/sample-data/${DATASET}"

# 搜尋以下任一檔案:calibration.json,以及 camInfo/*.yml 或 *.yaml,且檔案名稱中包含
# 'cam_*' 或 'Camera*'(隨附範例使用 Camera*.yml,AMC 可能會
# 產生 cam_*.yml — 請據此擴大搜尋範圍)
test -f "${CAL_DIR}/calibration.json" \
  && ls "${CAL_DIR}/camInfo/"*.{yml,yaml} 2>/dev/null

若使用者自行提供了校準路徑,請驗證該路徑而非重新計算。有關相機名稱的標準化處理及權威性相機數量偵測(解析calibration.json),請參閱configure-cameras.md。

Q3 — 偵測器 + 資料集代號(僅當 Q2 觸發 AMC 時)

  • resnet(預設,快速)或transformer(較慢,但在遮擋情況下表現更佳)—— 於步驟 B 傳遞至 AMC/v1/calibrate/API(參見vss-generate-video-calibration/SKILL.md:48-62)。
  • 用作SAMPLE_VIDEO_DATASET的簡短 kebab-case 資料集代號(例如customer-aisle-4cams)。此參數決定校準安裝路徑,並會儲存至.env 檔案中。

路由表

Q1 Q2 結果 路徑
樣本 (cal 已包含於樹狀結構中且已進行正規化) 直接參閱references/deploy-rtvi-cv-3d-stack.md
影片 校準資料已存在 references/configure-cameras.md→references/deploy-rtvi-cv-3d-stack.md
影片 校準缺失 references/calibration-workflow.md(影片模式) →references/configure-cameras.md→references/deploy-rtvi-cv-3d-stack.md
RTSP 校準存在 references/configure-cameras.md→references/deploy-rtvi-cv-3d-stack.md
rtsp cal 缺失 references/calibration-workflow.md(rtsp 模式)→references/configure-cameras.md→references/deploy-rtvi-cv-3d-stack.md

一旦up -d完成,所有路徑都會匯聚至references/verify-and-view.md。references/troubleshooting.md和references/teardown.md雖有連結,但不在正常流程中。

消歧規則。在此技能中,「RTVI-CV-3D」指 MV3DT 微服務部署,並使用MODE=mv3dt。 僅當使用者要求完整的倉庫藍圖、Sparse4D、MODE=3d 或warehouse-3d-app 時,才會導向../vss-deploy-profile/references/warehouse.md。此技能僅適用於MV3DT,不包含代理程式堆疊 / LLM / VLM。

先決條件

1. 儲存庫路徑

請在磁碟上定位video-search-and-summarization/ 目錄。所有 compose 指令皆從/deploy/docker/ 執行。若路徑未知,請詢問使用者。

2. NGC CLI + 金鑰

必須設定$NGC_CLI_API_KEY,且該金鑰必須具備存取nvidia/vss-core/*映像檔的權限。若未設定,請參閱vss-deploy-profile/references/ngc.md進行設定。

若使用者先前已執行過ngc config set,但此 Shell 中未匯出$NGC_CLI_API_KEY,則金鑰已儲存於磁碟上:

NGC_CLI_API_KEY=$(awk -F'= ' '/^apikey/{print $2}' ~/.ngc/config 2>/dev/null)
test -n "${NGC_CLI_API_KEY}" && echo "金鑰取自 ~/.ngc/config"

請確保金鑰值也會寫入industry-profiles/warehouse-operations/.env:164(NGC_CLI_API_KEY=...)—— Compose 僅會在系統運行時從該處讀取,而非從您的 shell 環境變數中讀取。

3.HARDWARE_PROFILE標籤

MV3DT 支援的公開串流數量列於《Warehouse 快速入門指南》中的「MV3DT 視覺 AI 配置檔支援的部署選項」一節。請使用下方的對應HARDWARE_PROFILE標籤。

請從nvidia-smi --query-gpu=name --format=csv,noheader 中選取:

GPU 名稱 HARDWARE_PROFILE MV3DT 支援的串流數
RTX PRO 6000 Blackwell RTXPRO6000BW 18
H100 (NVL, SXM HBM3) H100 13
L40S L40S 7
IGX Thor IGX-THOR 4
DGX Spark DGX-SPARK 4

若使用者的 GPU 未列於此處,請先查閱industry-profiles/warehouse-operations/.env 檔案以確認可用的HARDWARE_PROFILE值,並在使用前確認blueprint-configurator/blueprint_config.yml檔案中是否存在相應的設定檔。請勿僅根據 slug 推斷流數。

每張 GPU 的 MV3DT 上限會在部署時強制執行。 vss-configurator-mv3dt會計算final_stream_count = min(NUM_STREAMS, max_streams_supported),並對${VSS_DATA_DIR}/videos/${SAMPLE_VIDEO_DATASET}/套用keep_count檔案管理操作,僅保留final_stream_count 個 .mp4檔案(依字典順序排序,保留最後 N 個)。 若您的 GPU 所支援的 MV3DT 串流數(參見上表)低於您的攝影機數量,則 perception /mdx-raw/mdx-bev將以該支援串流數執行。請選擇支援更高串流數的 GPU,或明確向使用者顯示此上限,使其知悉哪些串流將會被處理。

4. 磁碟上的應用程式資料

VSS_DATA_DIR必須指向已解壓縮的vss-warehouse-app-data目錄(與儲存庫分開)。 若將其指向儲存庫的deploy/docker/目錄,將導致部署停滯:配置程式無法找到資料集、Redis 無法開啟其日誌檔案,且「感知」狀態會停留在「已建立」狀態。請在部署前確認路徑是否正確。

部署前的預檢:

DATA_DIR="${VSS_DATA_DIR:?VSS_DATA_DIR 未在 .env 中設定}"
DATASET="${SAMPLE_VIDEO_DATASET:-warehouse-4cams-20mx20m-synthetic}"

for sub in videos models data_log; do
  test -d "${DATA_DIR}/${sub}" || { echo "錯誤:${DATA_DIR}/${sub} 缺失"; exit 1; }
done

# 針對 sample / videos 模式 — 必須存在 videos 目錄
test -d "${DATA_DIR}/videos/${DATASET}" \
  || { echo "錯誤:${DATA_DIR}/videos/${DATASET} 缺失 — 標籤不正確或未提取應用程式資料"; exit 1; }

# 合理性檢查:影片數量應與校準數量相符。
# 已知部分已發布的應用程式資料 tarball 所附帶的樣本資料集
# 影片數量少於資料集名稱所暗示的數量 — 請核實並分別載入任何缺失的
# 攝影機資料,前提是您的 GPU 的 mv3dt 處理能力足以處理所有影片。
ls "${DATA_DIR}/videos/${DATASET}/"*.mp4 2>/dev/null | wc -l

# 確保 data_log/ 下的每個服務子目錄均存在。kafka / elasticsearch /
# redis / postgres 以及影片分析 API 上傳路徑 (`/web-api-app/files`)
# 請以非 root 使用者 ID 對這些綁定掛載點執行操作。若無寫入權限,守護程式
# 或校準/影像匯入程序可能會因權限錯誤而失敗。
mkdir -p \
  "${DATA_DIR}/data_log/analytics_cache" \
  "${DATA_DIR}/data_log/calibration_toolkit" \
  "${DATA_DIR}/data_log/elastic/data" \
  "${DATA_DIR}/data_log/elastic/logs" \
  "${DATA_DIR}/data_log/kafka" \
  "${DATA_DIR}/data_log/redis/data" \
  "${DATA_DIR}/data_log/redis/log" \
  "${DATA_DIR}/data_log/vss_video_analytics_api"

# 僅授予特定容器 UID 寫入權限 — 範圍限定 ACL,切勿設定為 777 且
# 切勿使用 chown。UID(依據 data-directory.md):postgres=70、redis=999、elasticsearch / VST /
# kafka=1000。 第一個呼叫適用於現有檔案;第二個呼叫則設定 *預設* 存取控制清單 (ACL),因此
# 守護程式在執行時所建立的檔案/目錄(例如 postgres 的 PGDATA)將繼承此存取權限。
ACL='u:70:rwx,u:999:rwx,u:1000:rwx'
setfacl -R    -m "$ACL" "${DATA_DIR}/data_log"
setfacl -R -d -m "$ACL" "${DATA_DIR}/data_log"

使用範圍限定 ACL,而非chmod 777。這僅授予已知的容器 UID 存取權限 —— 它 不會讓 data_log對所有使用者可寫入,也不會執行chown(否則會導致 PostgreSQL / Elasticsearch 運作異常,因為它們在首次啟動時會重新擁有其目錄)。建議在代理程式驅動的執行環境及 共用主機上採用此方法。 標準文件../vss-deploy-profile/references/data-directory.md 記載了廣泛的chmod -R 777設定以及按容器 UID 劃分的表格;此技能則改用範圍限定 ACL 的等效設定。在變更主機權限前,請先徵求使用者確認。

需具備 POSIX-ACL 檔案系統(ext4 / xfs — 預設值)以及acl套件(setfacl)。 若某個 守護程式在部署後仍記錄權限錯誤,請找出其 UID (docker inspect --format '{{.Config.User}}'),並在兩個呼叫中皆加入-m u::rwx。

若 app-data 尚未解壓縮:請透過ngc 註冊表資源 download-version "nvidia/vss-warehouse/vss-warehouse-app-data:" 並執行 tar -xvf(有關標籤偵測與完整步驟,請參閱references/deploy-rtvi-cv-3d-stack.md)。

5. 預檢 (系統)

nvidia-smi、NVIDIA Docker 執行環境可見(docker info | grep -i runtimes),且執行docker run --rm --gpus all ubuntu:24.04 時,nvidia-smi所有項目皆為綠色。 完整的驅動程式/核心/sysctl 檢查內容請參閱vss-deploy-profile/references/prerequisites.md。

若任何檢查失敗,請先修正後再繼續 — 切勿直接進行部署。

6. 瀏覽器連通性(僅限雲端/企業 VPN 主機)

若使用者將透過瀏覽器,在與部署主機不同的網路環境(雲端虛擬機器、企業 VPN、SSH 隧道連線)中瀏覽 VST 視訊牆,上游防火牆規則可能會阻擋 VST WebRTC(STUN 連線至stun.l.google.com:19302,以及媒體傳輸所需的隨機 UDP 通訊)。 有關症狀及解決方法,請參閱references/verify-and-view.md#browser-reachability。 此外:部分主機可能封鎖 AMC 微服務的預設埠(TCP/8010);若使用者回報 AMC UI 在:5000埠上運作正常,但資料呼叫失敗,請嘗試使用不同的VSS_AUTO_CALIBRATION_PORT 重新嘗試。

疑難排解

當任何部署、校準或驗證步驟失敗時,請先停止並釐清失敗原因,再進行重試。以下快速檢查涵蓋了最常見的 MV3DT 錯誤; 請參閱references/troubleshooting.md以取得完整的診斷指令與解決方案;../vss-generate-video-calibration/SKILL.md適用於 AMC 工作流程失敗;以及../vss-deploy-profile/references/warehouse-debug.md適用於更廣泛的倉庫堆疊問題。

症狀 可能原因 初步檢查或解決方法
vss-rtvi-cv-bev-fusion狀態異常或/tmp/fusion_ready檔案缺失 中介伺服器尚未就緒、MAX_EXPECTED_SENSORS不匹配,或STREAM_TYPE不匹配 檢查broker-health-check,並執行docker inspect --format '{{.State.Health.Status}}' vss-rtvi-cv-bev-fusion,以及mdx-raw/mdx-bev;若串流數量不符,請重新執行references/configure-cameras.md
Perception 顯示「Active sources : 0」、無 FPS,或相機數量少於預期 VST 感測器狀態過時、資料集 slug 錯誤、缺少校準,或受 GPU 每組串流上限限制 請驗證SAMPLE_VIDEO_DATASET、NUM_STREAMS、camInfo/ 以及 VST 感測器清單;若仍有舊感測器殘留,請在重新部署前依照references/teardown.md進行操作
vss-rtvi-cv-mv3dt因MqttCommunicator出現「無效節點」錯誤或追蹤器提交失敗而終止 影片中、calibration.json 及camInfo/中的攝影機名稱不符合Camera、Camera_01、... 的命名規範 請參照references/configure-cameras.md第 0 步驟,將所有相機名稱統一標準化,接著清除過期的 VST 狀態並重新部署
AMC 專案建立、上傳、校準或 MV3DT 匯出失敗 此 MV3DT 部署路徑以外的 AutoMagicCalib 服務/API 問題 請使用../vss-generate-video-calibration/SKILL.md來部署/除錯 AMC,待匯出成功後再返回references/calibration-workflow.md
vss-behavior-analytics-mv3dt因校準模式驗證錯誤而重新啟動 AMC 匯出檔案中的群組、區域或 位置欄位為空 請套用references/calibration-workflow.md中「步驟 4a」的佔位符修補程式,或在匯出前於 AMC 中填入這些欄位
擴展設定檔中沒有疊加層,且vss-import-calibration-output-mv3dt記錄「找不到 imageMetadata.json」 AMC MV3DT 匯出未產生images/Top.png和images/imageMetadata.json檔案 請依照references/calibration-workflow.md第 4b 步驟合成這兩份檔案,然後重新啟動一次性匯入程式
影像擷取、模型載入或首次啟動引擎建置失敗 缺少 / 過期的NGC_CLI_API_KEY、VSS_DATA_DIR 設定錯誤、缺少 BodyPose3DNet 檔案,或 GPU 記憶體不足 (OOM) 請重新檢查 NGC 授權,確認${VSS_DATA_DIR}/models/mv3dt/BodyPose3DNet/ 目錄是否完整,檢視vss-rtvi-cv-mv3dt日誌末尾內容,若 GPU 資源耗盡,請釋放記憶體或變更RT_CV_DEVICE_ID

在執行破壞性復原(docker compose down -v、清除data_log、刪除 VST 感測器狀態,或變更主機存取控制清單)之前,請說明其影響並取得使用者確認。在執行狀態重置變更之前,請記錄失敗的指令、相關的.env值、docker compose ps 結果,以及最後一個容器的日誌。

整體架構

SKILL.md(此檔案 — Q0/Q1/Q2/Q3 路由)
  └─ 若缺少校準 ─> calibration-workflow.md
  │                     └─ 串接至 vss-generate-video-calibration(部署 + 驅動 API)
  │                     └─ 擷取 /v1/result/{project_id}/mv3dt_result?result_type=amc(若啟用精細化,則額外包含 vggt)
  │                     └─ 將校準檔案儲存至 warehouse-mv3dt-app/calibration/sample-data//
  ├─> configure-cameras.md(相機名稱正規化、NUM_STREAMS 同步、VST 感測器修剪)
  └─> deploy-rtvi-cv-3d-stack.md(透過 bp_wh_kafka_mv3dt 搭配 extended/minimal 模式進行組建)
        └─> verify-and-view.md(幀率(FPS)、融合就緒狀態(fusion_ready)、MDX-BEV、VST 視訊牆 + WebRTC 檢查)

相關技能

  • vss-generate-video-calibration— AMC 技能。負責 AMC 部署、RTSP 擷取、校準 API,以及此技能所使用的/v1/result/.../mv3dt_result匯出掛鉤。calibration-workflow.md會串接至此技能。
  • vss-deploy-profile— 跨配置檔的統籌模組。當使用者需要完整的倉庫藍圖(包含代理程式 / LLM / VLM),而不僅是 MV3DT 時,請改用此模組。
  • vss-manage-video-io-storage— VIOS / VST API 技能。適用於 VST 視訊牆(疊加視覺化)以及 `configure-cameras.md` 中提及的感測器管理。

此儲存庫中位於../vss-deploy-profile/references/warehouse.md的權威性 warehouse-blueprint 參考文件,涵蓋完整倉庫堆疊中的 2D / 3D / MV3DT —— 此技能是僅支援 MV3DT的配套方案,省略了代理程式 / LLM / VLM 層。

在 GitHub 上查看
---
name: vss-deploy-detection-tracking-3d
description: Deploy and operate the RTVI-CV-3D microservice for multi-camera 3D detection and tracking, supporting sample datasets, custom videos, and RTSP streams.
license: Apache-2.0
---

## Purpose

Deploy and operate the RTVI-CV-3D microservice as MV3DT (`MODE=mv3dt`) — per-camera DeepStream perception plus BEV Fusion over multiple calibrated cameras — on the bundled sample dataset, custom videos, or live RTSP, without the full warehouse agent / LLM / VLM stack.

## Instructions

Work top-to-bottom: answer the routing questions (Q0–Q3) under [Routing](#routing), then follow the reference for the chosen path. Detailed step-by-step procedures live in `references/` (deploy, calibration chain, camera configuration, verification, teardown, troubleshooting).

## Examples

- Enable multi-camera tracking on the sample dataset.
- Deploy RTVI-CV-3D on my videos here: `<path/to/videos>`.
- Run MV3DT on RTSP streams after calibration.

# VSS Deploy Detection & Tracking — 3D (RTVI-CV-3D / MV3DT)

Bring up the RTVI-CV-3D microservice as the MV3DT stack (`MODE=mv3dt`) from the warehouse blueprint: per-camera DeepStream perception (`vss-rtvi-cv-mv3dt`) + BEV Fusion (`vss-rtvi-cv-bev-fusion`) + mosquitto MQTT bus + broker + VST sensor stack — without the agent / LLM / VLM stack that comes with the full warehouse blueprint.

The actual compose machinery lives in `deploy/docker/industry-profiles/warehouse-operations/warehouse-mv3dt-app/`. This skill drives the env overrides, calibration chain, and verification.

## Routing

Ask the user **at most four questions**, then dispatch.

### Q0 — Profile size (overlays or not)

Default to **extended** unless the user explicitly asks for minimal. Extended deploys ELK + `vss-video-analytics-api-mv3dt` + `vss-kibana-init-mv3dt` + `vss-import-calibration-output-mv3dt` on top of MV3DT core — these are what the VST video wall needs to render bounding-box overlays. Without them, the video wall works but shows raw streams without overlays.

| User answer | `MINIMAL_PROFILE` | What you get | When to choose |
|---|---|---|---|
| **extended** (default) | `""` | MV3DT core + ELK + analytics API + Kibana. **Overlays work in VST video wall.** Recommended for a complete e2e experience. | "I want the full e2e experience", "I want to see bounding boxes", or no preference stated |
| **minimal** | `"true"` | MV3DT core only. ~5 fewer containers. **No overlays in VST.** Metadata still on Kafka/Redis. | "I only need the data", "edge / Thor host", "minimum footprint" |

> **Note on selective ELK:** there's no "minimal + ELK only" middle path in the current compose. Every `${MINIMAL_PROFILE:+_extended}`-gated service comes up together (ES, Logstash, Kibana, video-analytics-api, kibana-init, import-calibration). `bash`'s `:+` parameter expansion produces the `_extended` suffix when `MINIMAL_PROFILE` is set; extended switches the gating string back to plain `bp_wh_kafka_mv3dt` which the active compose profile already matches. Either you accept the full extended bundle or you stay minimal.

### Q1 — Data source

Ask this unless the source is explicit in the user's first message. A bare request
like "deploy rtvi-cv-3d" routes to this MV3DT skill (`MODE=mv3dt`), but does
**not** imply `sample`.

- **sample** — the bundled 4-camera synthetic dataset (`warehouse-4cams-20mx20m-synthetic`). Calibration ships in-tree; no AMC run needed.
- **videos** — the user has local video files (any `*.mp4` named after their cameras). Standalone AMC (`auto_calib` profile) will run if calibration is missing.
- **rtsp** — the user has live RTSP URLs. Calibration via VIOS-driven AMC; final deploy also needs a Sensor Info File (`camera_info.json`) with those RTSP URLs.

### Q2 — Calibration coverage (skip for `sample`)

For `videos` and `rtsp`, check whether calibration is already on disk at the mount path the perception container expects:

```bash
DATASET="${SAMPLE_VIDEO_DATASET:?}"          # the user's dataset slug; see Q3
CAL_DIR="${VSS_APPS_DIR}/industry-profiles/warehouse-operations/warehouse-mv3dt-app/calibration/sample-data/${DATASET}"

# Look for ANY of: calibration.json, plus camInfo/*.yml or *.yaml with either
# 'cam_*' or 'Camera*' naming (the shipped sample uses Camera*.yml, AMC may
# produce cam_*.yaml — broaden accordingly)
test -f "${CAL_DIR}/calibration.json" \
  && ls "${CAL_DIR}/camInfo/"*.{yml,yaml} 2>/dev/null
```

If the user supplied a calibration path themselves, validate that path instead — don't recompute. See `configure-cameras.md` for camera-name normalization and authoritative camera-count discovery (parses `calibration.json`).

### Q3 — Detector + dataset slug (only when Q2 triggers AMC)

- `resnet` (default, fast) or `transformer` (slower, better under occlusion) — passed to the AMC `/v1/calibrate/<id>` API at Step B (see `vss-generate-video-calibration/SKILL.md:48-62`).
- A short kebab-case dataset slug used as `SAMPLE_VIDEO_DATASET` (e.g. `customer-aisle-4cams`). This drives the calibration mount path and gets persisted in `.env`.

### Routing table

| Q1 | Q2 result | Path |
|---|---|---|
| `sample` | (cal ships in-tree and already normalized) | [`references/deploy-rtvi-cv-3d-stack.md`](references/deploy-rtvi-cv-3d-stack.md) directly |
| `videos` | cal present | [`references/configure-cameras.md`](references/configure-cameras.md) → [`references/deploy-rtvi-cv-3d-stack.md`](references/deploy-rtvi-cv-3d-stack.md) |
| `videos` | cal missing | [`references/calibration-workflow.md`](references/calibration-workflow.md) (videos mode) → [`references/configure-cameras.md`](references/configure-cameras.md) → [`references/deploy-rtvi-cv-3d-stack.md`](references/deploy-rtvi-cv-3d-stack.md) |
| `rtsp` | cal present | [`references/configure-cameras.md`](references/configure-cameras.md) → [`references/deploy-rtvi-cv-3d-stack.md`](references/deploy-rtvi-cv-3d-stack.md) |
| `rtsp` | cal missing | [`references/calibration-workflow.md`](references/calibration-workflow.md) (rtsp mode) → [`references/configure-cameras.md`](references/configure-cameras.md) → [`references/deploy-rtvi-cv-3d-stack.md`](references/deploy-rtvi-cv-3d-stack.md) |

Every path converges on [`references/verify-and-view.md`](references/verify-and-view.md) once `up -d` completes. [`references/troubleshooting.md`](references/troubleshooting.md) and [`references/teardown.md`](references/teardown.md) are linked but off the happy path.

**Disambiguation rule.** In this skill, "RTVI-CV-3D" means the MV3DT microservice deployment and uses `MODE=mv3dt`. Route to [`../vss-deploy-profile/references/warehouse.md`](../vss-deploy-profile/references/warehouse.md) only when the user asks for the full warehouse blueprint, Sparse4D, `MODE=3d`, or `warehouse-3d-app`. This skill is for **MV3DT only** without the agent stack / LLM / VLM.

## Prerequisites

### 1. Repo path

Locate `video-search-and-summarization/` on disk. All compose commands run from `<repo>/deploy/docker/`. If unknown, ask the user.

### 2. NGC CLI + key

`$NGC_CLI_API_KEY` must be set and must have access to `nvidia/vss-core/*` images. See `vss-deploy-profile/references/ngc.md` for setup if missing.

If the user previously ran `ngc config set` but `$NGC_CLI_API_KEY` isn't exported in this shell, the key is already on disk:

```bash
NGC_CLI_API_KEY=$(awk -F'= ' '/^apikey/{print $2}' ~/.ngc/config 2>/dev/null)
test -n "${NGC_CLI_API_KEY}" && echo "key sourced from ~/.ngc/config"
```

Make sure the key value also lands in `industry-profiles/warehouse-operations/.env:164` (`NGC_CLI_API_KEY=...`) — compose only reads it from there at `up` time, not from your shell env.

### 3. `HARDWARE_PROFILE` slug

> The public MV3DT supported stream counts are listed in the Warehouse Quickstart Guide under "MV3DT Vision AI Profile Supported Deployment Options." Use the matching `HARDWARE_PROFILE` slug below.

Pick from `nvidia-smi --query-gpu=name --format=csv,noheader`:

| GPU name | `HARDWARE_PROFILE` | MV3DT supported streams |
|---|---|---|
| RTX PRO 6000 Blackwell | `RTXPRO6000BW` | 18 |
| H100 (NVL, SXM HBM3) | `H100` | 13 |
| L40S | `L40S` | 7 |
| IGX Thor | `IGX-THOR` | 4 |
| DGX Spark | `DGX-SPARK` | 4 |

If the user's GPU is not listed here, check `industry-profiles/warehouse-operations/.env` for available `HARDWARE_PROFILE` values, then confirm the matching profile exists in `blueprint-configurator/blueprint_config.yml` before using it. Do not infer a stream count from the slug alone.

**The per-GPU MV3DT cap is enforced at deploy time.** `vss-configurator-mv3dt` computes `final_stream_count = min(NUM_STREAMS, max_streams_supported)` and applies a `keep_count` file-management op against `${VSS_DATA_DIR}/videos/${SAMPLE_VIDEO_DATASET}/` so only `final_stream_count` `.mp4` files remain (sorted lexicographically, last N kept). If your GPU's MV3DT supported stream count (above table) is below your camera count, perception / `mdx-raw` / `mdx-bev` run with the supported stream count. Either pick a GPU with a higher supported stream count or surface the cap explicitly to the user so they're aware which streams will be processed.

### 4. App data on disk

`VSS_DATA_DIR` must point at the **extracted `vss-warehouse-app-data` directory** (separate from the repo). Pointing it at the repo's `deploy/docker/` causes the deploy to stall: the configurator can't find the dataset, redis can't open its log file, and perception stays in `Created`. Verify the path before deploy.

Pre-flight check before deploy:

```bash
DATA_DIR="${VSS_DATA_DIR:?VSS_DATA_DIR not set in .env}"
DATASET="${SAMPLE_VIDEO_DATASET:-warehouse-4cams-20mx20m-synthetic}"

for sub in videos models data_log; do
  test -d "${DATA_DIR}/${sub}" || { echo "ERROR: ${DATA_DIR}/${sub} missing"; exit 1; }
done

# For sample / videos modes — videos directory must exist
test -d "${DATA_DIR}/videos/${DATASET}" \
  || { echo "ERROR: ${DATA_DIR}/videos/${DATASET} missing — wrong slug or app-data not extracted"; exit 1; }

# Sanity: video count should match calibration count.
# Some published app-data tarballs are known to ship the sample dataset with
# fewer videos than the dataset name implies — verify and source any missing
# cams separately if your GPU's mv3dt cap is high enough to use them all.
ls "${DATA_DIR}/videos/${DATASET}/"*.mp4 2>/dev/null | wc -l

# Ensure every per-service subdir under data_log/ exists. kafka / elasticsearch /
# redis / postgres and the video-analytics API upload path (`/web-api-app/files`)
# run as non-root UIDs against these bind mounts. Without write access the daemons
# or calibration/image import can fail with permission errors.
mkdir -p \
  "${DATA_DIR}/data_log/analytics_cache" \
  "${DATA_DIR}/data_log/calibration_toolkit" \
  "${DATA_DIR}/data_log/elastic/data" \
  "${DATA_DIR}/data_log/elastic/logs" \
  "${DATA_DIR}/data_log/kafka" \
  "${DATA_DIR}/data_log/redis/data" \
  "${DATA_DIR}/data_log/redis/log" \
  "${DATA_DIR}/data_log/vss_video_analytics_api"

# Grant write access to the specific container UIDs only — scoped ACLs, NOT 777 and
# NOT chown. UIDs (per data-directory.md): postgres=70, redis=999, elasticsearch / VST /
# kafka=1000. The first call covers existing files; the second sets *default* ACLs so
# files/dirs the daemons create at runtime (e.g. postgres PGDATA) inherit the access.
ACL='u:70:rwx,u:999:rwx,u:1000:rwx'
setfacl -R    -m "$ACL" "${DATA_DIR}/data_log"
setfacl -R -d -m "$ACL" "${DATA_DIR}/data_log"
```

> **Scoped ACLs, not `chmod 777`.** This grants only the known container UIDs access — it does
> **not** make `data_log` world-writable, and it does **not** `chown` (which would break postgres /
> Elasticsearch, since they re-own their dirs on first start). Prefer this for agent-driven runs and
> shared hosts. The canonical [`../vss-deploy-profile/references/data-directory.md`](../vss-deploy-profile/references/data-directory.md)
> documents the broad `chmod -R 777` and the per-container UID table; this skill uses the scoped-ACL
> equivalent instead. **Ask the user for confirmation before changing host permissions.**
>
> Requires a POSIX-ACL filesystem (ext4 / xfs — the default) and the `acl` package (`setfacl`). If a
> daemon still logs a permission error after deploy, find its UID
> (`docker inspect <container> --format '{{.Config.User}}'`) and add `-m u:<uid>:rwx` to both calls.

If app-data isn't extracted yet: download via `ngc registry resource download-version "nvidia/vss-warehouse/vss-warehouse-app-data:<version>"` and `tar -xvf` (see [`references/deploy-rtvi-cv-3d-stack.md`](references/deploy-rtvi-cv-3d-stack.md) for tag discovery and full steps).

### 5. Pre-flight (system)

`nvidia-smi`, NVIDIA Docker runtime visible (`docker info | grep -i runtimes`), and `docker run --rm --gpus all ubuntu:24.04 nvidia-smi` all green. Full driver / kernel / sysctl checks live in `vss-deploy-profile/references/prerequisites.md`.

If any check fails, fix before continuing — don't proceed to deploy.

### 6. Browser reachability (cloud / corp-VPN hosts only)

If the user will view the VST video wall through a browser on a different network than the deploy host (cloud VM, corp VPN, ssh-tunnelled session), upstream firewall rules may block VST WebRTC (STUN to `stun.l.google.com:19302`, plus random UDP for media). See [`references/verify-and-view.md#browser-reachability`](references/verify-and-view.md) for symptoms and workarounds. Also: some hosts block the AMC microservice's default port (TCP/8010); if the user reports the AMC UI on `:5000` works but its data calls fail, retry with a different `VSS_AUTO_CALIBRATION_PORT`.

## Troubleshooting

When any deploy, calibration, or verification step fails, stop and classify the failure before retrying. The quick checks below cover the most common MV3DT errors; use [`references/troubleshooting.md`](references/troubleshooting.md) for full diagnostic commands and fixes, [`../vss-generate-video-calibration/SKILL.md`](../vss-generate-video-calibration/SKILL.md) for AMC workflow failures, and [`../vss-deploy-profile/references/warehouse-debug.md`](../vss-deploy-profile/references/warehouse-debug.md) for broader warehouse-stack issues.

| Symptom | Likely cause | First check or fix |
|---|---|---|
| `vss-rtvi-cv-bev-fusion` is unhealthy or `/tmp/fusion_ready` is missing | Broker not ready, `MAX_EXPECTED_SENSORS` mismatch, or `STREAM_TYPE` mismatch | Check `broker-health-check`, `docker inspect --format '{{.State.Health.Status}}' vss-rtvi-cv-bev-fusion`, and `mdx-raw` / `mdx-bev`; then re-run [`references/configure-cameras.md`](references/configure-cameras.md) if stream counts differ |
| Perception shows `Active sources : 0`, no FPS, or fewer cameras than expected | Stale VST sensor state, wrong dataset slug, missing calibration, or per-GPU stream cap | Verify `SAMPLE_VIDEO_DATASET`, `NUM_STREAMS`, `camInfo/`, and the VST sensor list; if old sensors remain, follow [`references/teardown.md`](references/teardown.md) before redeploying |
| `vss-rtvi-cv-mv3dt` exits with `MqttCommunicator` "invalid node" or tracker submit failures | Camera names in videos, `calibration.json`, and `camInfo/` do not match the `Camera`, `Camera_01`, ... convention | Normalize all camera names together with [`references/configure-cameras.md`](references/configure-cameras.md) Step 0, then clear stale VST state and redeploy |
| AMC project creation, upload, calibration, or MV3DT export fails | AutoMagicCalib service/API issue outside this MV3DT deploy path | Use [`../vss-generate-video-calibration/SKILL.md`](../vss-generate-video-calibration/SKILL.md) to deploy/debug AMC, then return to [`references/calibration-workflow.md`](references/calibration-workflow.md) after export succeeds |
| `vss-behavior-analytics-mv3dt` restarts with calibration schema validation errors | AMC export has empty `group`, `region`, or `place` fields | Apply the placeholder patch in [`references/calibration-workflow.md`](references/calibration-workflow.md) Step 4a, or populate those fields in AMC before export |
| Extended profile has no overlays and `vss-import-calibration-output-mv3dt` logs `imageMetadata.json not found` | AMC MV3DT export did not produce `images/Top.png` and `images/imageMetadata.json` | Synthesize both files with [`references/calibration-workflow.md`](references/calibration-workflow.md) Step 4b, then restart the one-shot importer |
| Image pulls, model load, or first-start engine build fail | Missing / expired `NGC_CLI_API_KEY`, incorrect `VSS_DATA_DIR`, missing BodyPose3DNet files, or GPU OOM | Re-check NGC auth, confirm `${VSS_DATA_DIR}/models/mv3dt/BodyPose3DNet/`, tail `vss-rtvi-cv-mv3dt` logs, and free or change `RT_CV_DEVICE_ID` if the GPU is exhausted |

Before destructive recovery (`docker compose down -v`, clearing `data_log`, deleting VST sensor state, or changing host ACLs), explain the impact and get user confirmation. Capture the failing command, relevant `.env` values, `docker compose ps`, and the last container logs before making state-reset changes.

## How it fits together

```
SKILL.md (this file — Q0/Q1/Q2/Q3 routing)
  └─ if cal missing ─> calibration-workflow.md
  │                     └─ chains to vss-generate-video-calibration (deploy + drive API)
  │                     └─ fetches /v1/result/{project_id}/mv3dt_result?result_type=amc (plus vggt when refinement is enabled)
  │                     └─ lands calibration files at warehouse-mv3dt-app/calibration/sample-data/<slug>/
  ├─> configure-cameras.md (camera-name normalization, NUM_STREAMS sync, VST sensor trim)
  └─> deploy-rtvi-cv-3d-stack.md (compose up with bp_wh_kafka_mv3dt + extended/minimal)
        └─> verify-and-view.md (FPS, fusion_ready, mdx-bev, VST video wall + WebRTC checks)
```

## Related Skills

- [`vss-generate-video-calibration`](../vss-generate-video-calibration/SKILL.md) — the AMC skill. Owns AMC deployment, RTSP capture, calibration API, and the `/v1/result/.../mv3dt_result` export hook this skill consumes. `calibration-workflow.md` chains into it.
- [`vss-deploy-profile`](../vss-deploy-profile/SKILL.md) — cross-profile umbrella. Use that instead when the user wants the **full warehouse blueprint** (with agents / LLM / VLM), not just MV3DT.
- [`vss-manage-video-io-storage`](../vss-manage-video-io-storage/SKILL.md) — VIOS / VST API skill. Useful for the VST video wall (overlay viz) and for sensor management referenced in `configure-cameras.md`.

The repo's authoritative warehouse-blueprint reference at [`../vss-deploy-profile/references/warehouse.md`](../vss-deploy-profile/references/warehouse.md) covers 2D / 3D / MV3DT inside the full warehouse stack — this skill is the **MV3DT-only** companion that trims the agent / LLM / VLM layer.

安裝 vss-deploy-detection-tracking-3d

請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/NVIDIA/skills/tree/main/skills/vss-deploy-detection-tracking-3d # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/ Claude 會自動偵測並使用該技能
儲存庫 NVIDIA/skills

相關技能

klingai-upgrade-migration
更新時間 2026-07-03
Verification &amp; Quality Assurance
更新時間 2026-06-29
base44-cli
更新時間 2026-06-29
Railway CLI Management
更新時間 2026-07-02
OR