选项
首页首页 Skill 开发运营和 CI/CD vss-deploy-detection-tracking-3d

vss-deploy-detection-tracking-3d

NVIDIA/skills NVIDIA/skills

部署并运行用于多摄像头 3D 检测和跟踪的 RTVI-CV-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 堆栈(这些组件包含在完整的仓库蓝图中)。

实际的 Compose 机制位于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 视频墙中正常运行。推荐用于获得完整的端到端体验。 “我想要完整的端到端体验”、“我想查看边界框”,或未明确表示偏好
精简版 "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 配置文件已与之匹配。您要么接受完整的扩展包,要么保持最小配置。

问题 1 — 数据源

除非数据源在用户的第一条消息中已明确说明,否则请提出此问题。类似 “deploy rtvi-cv-3d”的简单请求会路由到此 MV3DT 技能(MODE=mv3dt),但 并不意味着包含样本。

  • sample— 捆绑的 4 摄像头合成数据集(warehouse-4cams-20mx20m-synthetic)。校准数据已包含在代码库中;无需运行 AMC。
  • videos— 用户拥有本地视频文件(任何以摄像头名称命名的*.mp4文件)。若缺少校准,将运行独立的 AMC(auto_calib配置文件)。
  • rtsp— 用户拥有实时 RTSP URL。通过 VIOS 驱动的 AMC 进行校准;最终部署还需提供包含这些 RTSP URL 的传感器信息文件(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的简短大写小写混合数据集别名(例如customer-aisle-4cams)。这将决定校准挂载路径,并保存在.env 文件中。

路由表

Q1 Q2 结果 路径
样本 (计算结果已包含在树中且已归一化) 直接参见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 支持的流数量已在《仓库快速入门指南》的“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 无法打开其日志文件,且 perception 状态将停留在“已创建”状态。请在部署前验证路径。

部署前的预检:

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 用户身份对这些绑定挂载进行操作。若无写入权限,守护进程
# 或校准/图像导入可能会因权限错误而失败。
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 界面在: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 显示活动源:0,无帧率,或摄像头数量少于预期 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 进行组合,包含扩展/精简模式)
        └─> verify-and-view.md(帧率、融合就绪状态、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的权威仓库蓝图参考文档涵盖了完整仓库堆栈中的 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