vss-generate-video-calibration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
用途
Run AutoMagicCalib end-to-end on local files, RTSP streams, or the bundled sample dataset and (when needed) deploy the AMC microservice.
在本地文件、RTSP流或捆绑的样本数据集上端到端运行AutoMagicCalib,并在需要时部署AMC微服务。
Instructions
说明
Follow the routing tables and step-by-step workflows below. Each section that ends in workflow, quick start, or flow is intended to be executed top-to-bottom. Detailed reference material lives in and helper scripts live in — call them via when the skill points to a script by name.
references/scripts/run_script遵循以下路由表和分步工作流程。每个以workflow、quick start或flow结尾的部分都需要从上到下执行。详细参考资料位于目录,辅助脚本位于目录——当技能指向某个脚本名称时,通过调用它们。
references/scripts/run_scriptExamples
示例
Worked end-to-end examples are kept under (each manifest contains a runnable scenario) and inline in the per-workflow blocks below. Run a Tier-3 evaluation with to replay them.
evals/*.jsoncurlnv-base validate <this-skill-dir> --agent-eval端到端的实操示例保存在目录下(每个清单包含一个可运行的场景),并内嵌在下方每个工作流程的块中。运行即可重放这些示例,完成Tier-3评估。
evals/*.jsoncurlnv-base validate <此技能目录> --agent-evalLimitations
限制
- Requires the matching VSS profile / microservice to be deployed and reachable from the caller.
- NGC-hosted models and NIMs may be subject to rate-limits, GPU memory requirements, and license restrictions.
- Concurrency, GPU memory, and storage limits depend on the host hardware and the profile's compose file.
- 需要已部署匹配的VSS配置文件/微服务,且调用方可访问该服务。
- NGC托管的模型和NIM可能受速率限制、GPU内存要求和许可证限制。
- 并发能力、GPU内存和存储限制取决于主机硬件和配置文件的compose文件。
Troubleshooting
故障排查
- Error: REST call returns connection refused. Cause: target microservice not running. Solution: probe or
/docs; redeploy via/healthor the matchingvss-deploy-profileskill.vss-deploy-* - Error: HTTP 401/403 from NGC pulls. Cause: missing/expired . Solution:
NGC_CLI_API_KEYand re-export the key before retrying.docker login nvcr.io - Error: container OOM or model fails to load. Cause: insufficient GPU memory for the selected profile. Solution: switch to a smaller variant or free GPUs via .
docker compose down
- 错误:REST调用返回连接拒绝。原因:目标微服务未运行。解决方案:探测或
/docs接口;通过/health或匹配的vss-deploy-profile技能重新部署。vss-deploy-* - 错误:从NGC拉取时出现HTTP 401/403。原因:缺失或过期。解决方案:执行
NGC_CLI_API_KEY并重新导出密钥后重试。docker login nvcr.io - 错误:容器内存不足(OOM)或模型加载失败。原因:所选配置文件所需的GPU内存不足。解决方案:切换到更小的变体,或通过释放GPU资源。
docker compose down
VSS Generate Video Calibration
VSS 生成视频校准
Run AutoMagicCalib over one of three input sources and drive the calibration through the microservice REST API. The input-resolution work differs per source; everything from onward is identical and lives in this file. Pick the right input-mode reference and pair it with the Shared Calibration Tail below.
verify_project在三种输入源之一上运行AutoMagicCalib,并通过微服务REST API驱动校准流程。不同输入源的输入分辨率处理工作有所不同;从开始的所有步骤都是相同的,且都记录在本文件中。选择合适的输入模式参考文档,并与下方的共享校准收尾流程配合使用。
verify_projectInput Routing
输入路由
Match the user's request to a mode, then load that mode's reference for input collection, mode-specific API calls, and the full Python script.
| User says / has | Mode | Reference |
|---|---|---|
| "launch AMC" / "deploy auto-calibration" / "set up auto-magic-calib" / "start AMC microservice" | | |
"calibrate my videos" / "calibrate from video files" / local | | |
| "calibrate RTSP streams" / "calibrate from live cameras" / live RTSP URLs | | |
| "test sample dataset" / "verify AMC install" / "launch and test" | | |
Disambiguation rule: if the user is asking to launch / deploy / set up AMC (no calibration verb) → . If they provide RTSP URLs → . If they mention local files / a videos directory → . If they ask to verify install or test the bundled sample → . Combined intents (e.g. "launch AMC and calibrate my videos") → walk first, then the calibration mode. When ambiguous, ask via .
deployrtspvideossample-datasetdeployAskUserQuestion将用户的请求匹配到对应模式,然后加载该模式的参考文档以进行输入收集、模式特定的API调用,以及获取完整的Python脚本。
| 用户表述/拥有的资源 | 模式 | 参考文档 |
|---|---|---|
| "启动AMC" / "部署自动校准" / "设置auto-magic-calib" / "启动AMC微服务" | | |
"校准我的视频" / "从视频文件校准" / 本地 | | |
| "校准RTSP流" / "从实时摄像头校准" / 实时RTSP地址 | | |
| "测试样本数据集" / "验证AMC安装" / "启动并测试" | | |
歧义消除规则:如果用户要求启动/部署/设置AMC(无校准动词)→ 使用模式。如果用户提供RTSP地址→ 使用模式。如果用户提到本地文件/视频目录→ 使用模式。如果用户要求验证安装或测试捆绑样本→ 使用模式。混合意图(例如“启动AMC并校准我的视频”)→ 先执行模式,再执行校准模式。存在歧义时,通过询问用户。
deployrtspvideossample-datasetdeployAskUserQuestionPrerequisites (shared across calibration modes)
先决条件(所有校准模式共享)
- AMC microservice + UI running. If not, walk first.
references/deploy-auto-calibration-service.md - Microservice reachable at →
http://<HOST_IP>:${VSS_AUTO_CALIBRATION_PORT:-8010}/v1/ready.{"code":0,...} - Python 3 with installed (each input-mode reference includes a self-healing venv fallback for direct runs).
requests
Mode-specific prerequisites (VIOS for , sample zip for ) live in the respective references.
rtspsample-dataset- AMC微服务和UI正在运行。如果未运行,请先执行中的步骤。
references/deploy-auto-calibration-service.md - 微服务可通过访问,且返回
http://<HOST_IP>:${VSS_AUTO_CALIBRATION_PORT:-8010}/v1/ready。{"code":0,...} - 安装了库的Python 3环境(每个输入模式的参考文档都包含一个用于直接运行的自修复venv备选方案)。
requests
模式特定的先决条件(模式需要VIOS,模式需要样本压缩包)位于各自的参考文档中。
rtspsample-datasetShared Calibration Tail
共享校准收尾流程
The verify → calibrate → poll → results sequence is identical regardless of input mode. After the mode-specific reference has uploaded videos / ingested RTSP clips / uploaded the bundled sample, run this tail.
无论输入模式如何,验证→校准→轮询→获取结果的流程都是相同的。在完成模式特定参考文档中的视频上传/RTSP片段采集/捆绑样本上传后,执行以下收尾流程。
Step A — Verify Project
步骤A — 验证项目
POST /v1/verify_project/<project_id>Response: — must be before calibrating. If not READY, re-check that videos + alignment + layout are present (either via API or via UI manual alignment).
{"project_state": "READY"}READYPOST /v1/verify_project/<project_id>响应: — 必须处于状态才能开始校准。如果未处于READY状态,请重新检查视频、对齐数据和布局文件是否存在(可通过API或UI手动对齐)。
{"project_state": "READY"}READYStep B — Start Calibration
步骤B — 启动校准
POST /v1/calibrate/<project_id>
Content-Type: application/json
{"detector_type": "resnet"} # or "transformer"detector_type/calibrate/v1/config/<id>"detector""detector_type"AskUserQuestion- — default, fast.
resnet - — slower, better under heavy occlusion.
transformer
UI Step 3 (Parameters) does NOT cover detector choice; never assume the user picked one in the UI.
POST /v1/calibrate/<project_id>
Content-Type: application/json
{"detector_type": "resnet"} # 或 "transformer"detector_type/calibrate/v1/config/<id>"detector""detector_type"AskUserQuestion- — 默认选项,速度快。
resnet - — 速度较慢,但在严重遮挡情况下表现更好。
transformer
UI的步骤3(参数设置)不包含检测器选择;请勿假设用户已在UI中选择了检测器。
Step C — Poll for Completion
步骤C — 轮询完成状态
GET /v1/get_project_info/<project_id>Poll every 10 s. :
project_info.project_state| State | Meaning |
|---|---|
| Calibration in progress |
| Finished |
| Failed — pull log via |
Typical time: 10–60 min (your-own videos), 10–30 min (bundled sample).
GET /v1/get_project_info/<project_id>每10秒轮询一次。的含义:
project_info.project_state| 状态 | 含义 |
|---|---|
| 校准进行中 |
| 已完成 |
| 失败 — 通过 |
典型耗时:10–60分钟(用户自有视频),10–30分钟(捆绑样本)。
Step D — Results
步骤D — 获取结果
GET /v1/get_project_info/<project_id> # project state
GET /v1/result/<project_id>/evaluation_statistics # only if GT uploaded
GET /v1/amc/calibrate/<project_id>/log # calibration logEvaluation response includes and .
Average L2 distance(m)Average reprojection error 0(px)GET /v1/get_project_info/<project_id> # 项目状态
GET /v1/result/<project_id>/evaluation_statistics # 仅当上传了GT数据时可用
GET /v1/amc/calibrate/<project_id>/log # 校准日志评估响应包含和。
Average L2 distance(m)Average reprojection error 0(px)Step E — (Optional) VGGT Refinement
步骤E — (可选)VGGT优化
Only if in project info (VGGT model must be staged — see Step 2):
vggt_state == "READY"references/deploy-auto-calibration-service.mdPOST /v1/vggt/calibrate/<project_id>
GET /v1/get_project_info/<project_id> # poll vggt_state
GET /v1/vggt_results/<project_id>/evaluation_statistics # VGGT metrics仅当项目信息中的时可用(必须已部署VGGT模型——请参阅的步骤2):
vggt_state == "READY"references/deploy-auto-calibration-service.mdPOST /v1/vggt/calibrate/<project_id>
GET /v1/get_project_info/<project_id> # 轮询vggt_state
GET /v1/vggt_results/<project_id>/evaluation_statistics # VGGT指标Settings File + Detector Pattern
设置文件与检测器模式
Optional across all three modes. When the user provides a JSON settings file (typically exported from UI Step 3 Download), POST it verbatim:
POST /v1/config/<project_id>
Content-Type: application/json
<file contents, posted as-is>The file replaces what the user would otherwise tune in UI Step 3 (rectification, bundle-adjustment, evaluation knobs, detector, …). After a successful POST, also parse the file for / — if it's or , use that value for the call in Step B (detector is a separate API parameter, not consumed by ).
"detector""detector_type""resnet""transformer"/calibrate/configNon-2xx is surfaced — do not silently fall back. Skip this call entirely if the user chose the UI-fallback path.
所有三种模式均支持此可选操作。当用户提供JSON设置文件(通常从UI步骤3的下载功能导出)时,直接按原样POST:
POST /v1/config/<project_id>
Content-Type: application/json
<文件内容,直接提交>该文件会替代用户原本在UI步骤3中调整的设置(校正、光束平差、评估参数、检测器等)。POST成功后,还需解析文件中的 / 字段——如果值为或,请将其用于步骤B中的调用(检测器是独立的API参数,不会被接口读取)。
"detector""detector_type""resnet""transformer"/calibrate/config如果返回非2xx状态码,请明确提示用户——不要静默回退。如果用户选择UI回退路径,请完全跳过此调用。
UI Fallback Pattern
UI回退模式
When alignment / layout files aren't on disk, direct the user to the appropriate AMC UI step:
- Settings missing → "Open UI project , go to Step 3: Parameters, tune via the settings dialog (or accept defaults), click Save." Also: before the
<project_id>call, ask the user via/calibratewhether to use theAskUserQuestionorresnetdetector — Step 3 doesn't cover detector choice.transformer - Layout missing → "Open UI project , go to Step 2: Video Configuration, upload
<project_id>only (do NOT re-upload videos — they're already attached via API/RTSP), click Save."layout.png - Alignment missing → "Open UI project , go to Step 4: Alignment, either upload
<project_id>or mark correspondence points on the layout, click Save."alignment_data.json
Wait for user confirmation. For alignment/layout, verify on disk before continuing:
bash
undefined当磁盘上没有对齐/布局文件时,请引导用户进入对应的AMC UI步骤:
- 设置缺失 → "打开UI项目,进入步骤3:参数设置,通过设置对话框调整参数(或接受默认值),点击保存。" 补充说明:在调用
<project_id>之前,请通过/calibrate询问用户是否使用AskUserQuestion或resnet检测器——步骤3不包含检测器选择。transformer - 布局缺失 → "打开UI项目,进入步骤2:视频配置,仅上传
<project_id>(请勿重新上传视频——已通过API/RTSP关联),点击保存。"layout.png - 对齐数据缺失 → "打开UI项目,进入步骤4:对齐,上传
<project_id>或在布局上标记对应点,点击保存。"alignment_data.json
等待用户确认。对于对齐/布局文件,继续操作前请在磁盘上验证:
bash
undefinedProject state lives under $VSS_APPS_DIR/services/auto-calibration/projects
项目状态存储在 $VSS_APPS_DIR/services/auto-calibration/projects 目录下
(the path bind-mounted into the MS container in
该路径在 deploy/docker/services/auto-calibration/ms/compose.yml 中被绑定挂载到微服务容器内。
deploy/docker/services/auto-calibration/ms/compose.yml).
—
HOST_PROJECTS="${VSS_APPS_DIR}/services/auto-calibration/projects"
ls "$HOST_PROJECTS/project_<project_id>/manual_adjustment/"
HOST_PROJECTS="${VSS_APPS_DIR}/services/auto-calibration/projects"
ls "$HOST_PROJECTS/project_<project_id>/manual_adjustment/"
Expected: alignment_data.json, layout.png
预期文件:alignment_data.json, layout.png
undefinedundefinedSuccess Criteria
成功标准
- after polling.
project_state == "COMPLETED" - If manual alignment was used: contains
${VSS_APPS_DIR}/services/auto-calibration/projects/project_<id>/manual_adjustment/+alignment_data.json.layout.png - If GT was uploaded: evaluation returns typical thresholds (< 1.5,
Average L2 distance(m)< 5 for your data; < 10 for the bundled sample).Average reprojection error 0(px) - No state.
ERROR
- 轮询后。
project_state == "COMPLETED" - 如果使用了手动对齐:目录下包含
${VSS_APPS_DIR}/services/auto-calibration/projects/project_<id>/manual_adjustment/和alignment_data.json。layout.png - 如果上传了GT数据:评估结果符合典型阈值(自有数据的< 1.5,
Average L2 distance(m)< 5;捆绑样本的对应值 < 10)。Average reprojection error 0(px) - 无状态。
ERROR
Key Output Files
关键输出文件
Under :
${VSS_APPS_DIR}/services/auto-calibration/projects/project_<project_id>/project_<project_id>/
├── manual_adjustment/
│ ├── alignment_data.json
│ └── layout.png
├── output/
│ ├── single_view_results/cam_XX/
│ │ ├── camInfo_hyper_XX.yaml
│ │ └── trajDump_Stream_0_3d.txt
│ └── multi_view_results/BA_output/results_ba/
│ ├── initial/camInfo_XX.yaml
│ └── refined/camInfo_XX.yaml # ← final calibration
└── calibration.log位于目录下:
${VSS_APPS_DIR}/services/auto-calibration/projects/project_<project_id>/project_<project_id>/
├── manual_adjustment/
│ ├── alignment_data.json
│ └── layout.png
├── output/
│ ├── single_view_results/cam_XX/
│ │ ├── camInfo_hyper_XX.yaml
│ │ └── trajDump_Stream_0_3d.txt
│ └── multi_view_results/BA_output/results_ba/
│ ├── initial/camInfo_XX.yaml
│ └── refined/camInfo_XX.yaml # ← 最终校准结果
└── calibration.logCross-cutting Troubleshooting
通用故障排查
Mode-specific issues live in each reference's own troubleshooting table.
| Issue | Fix |
|---|---|
| Confirm videos uploaded/ingested and alignment + layout are present (either via API or via UI manual alignment). Mode-specific upload steps in the reference. |
| Manual alignment files missing after UI step | User didn't click Save; also verify |
Calibration stuck | |
Immediate | Check video naming: must be |
| Low L2 but high reprojection | Provide explicit |
VGGT | VGGT model not loaded — see |
| Upload timeout | Large videos — bump |
| Port scan finds no backend | Backend not running — walk |
模式特定问题请查看各参考文档中的故障排查表。
| 问题 | 解决方法 |
|---|---|
| 确认视频已上传/采集,且对齐数据和布局文件存在(可通过API或UI手动对齐)。参考文档中包含模式特定的上传步骤。 |
| 执行UI步骤后手动对齐文件缺失 | 用户未点击保存;同时验证 |
校准停留在 | 调用 |
立即进入 | 检查视频命名:必须为 |
| L2距离低但重投影误差高 | 在输入上传期间提供明确的 |
VGGT处于 | VGGT模型未加载——请参阅 |
| 上传超时 | 视频文件过大——在对应模式的Python脚本中将 |
| 端口扫描未找到后端服务 | 后端服务未运行——先执行 |
For Downstream Skills — MV3DT Export
面向下游技能——MV3DT导出
Downstream consumers (e.g. a Multi-View 3D Tracking skill owned by another team) fetch the MV3DT-format calibration output directly from the microservice. This skill returns the ; the downstream skill calls:
project_idGET /v1/result/{project_id}/mv3dt_result?result_type=amc下游消费者(例如其他团队拥有的多视图3D跟踪技能)直接从微服务获取MV3DT格式的校准输出。本技能返回;下游技能调用:
project_idGET /v1/result/{project_id}/mv3dt_result?result_type=amcResponse: application/zip — mv3dt_output.zip containing transforms.yml
响应:application/zip — 包含transforms.yml的mv3dt_output.zip
For VGGT-refined output (only available if VGGT ran to `COMPLETED`, see Step E):
GET /v1/result/{project_id}/mv3dt_result?result_type=vggt
对于VGGT优化后的输出(仅当VGGT运行至`COMPLETED`状态时可用,请参阅步骤E):
GET /v1/result/{project_id}/mv3dt_result?result_type=vggt
Response: application/zip — vggt_mv3dt_output.zip
响应:application/zip — vggt_mv3dt_output.zip
Downstream skill flow:
1. Call this skill with the user's inputs; capture the printed `project_id`.
2. Wait for the skill to return (it polls until `COMPLETED` internally).
3. `GET /v1/result/{project_id}/mv3dt_result?result_type=amc` — save the ZIP locally.
4. If VGGT also ran, optionally fetch `?result_type=vggt` for the refined MV3DT.
下游技能流程:
1. 使用用户输入调用本技能;捕获输出的`project_id`。
2. 等待本技能返回(内部会轮询直到状态变为`COMPLETED`)。
3. 调用`GET /v1/result/{project_id}/mv3dt_result?result_type=amc` — 将ZIP文件保存到本地。
4. 如果VGGT也已运行,可选择获取`?result_type=vggt`以获取优化后的MV3DT结果。Related Skills
相关技能
- — VIOS API skill; only the
vss-manage-video-io-storagecalibration mode depends on VIOS being reachable.rtsp
Root "Custom Dataset" and "Calibration Workflow (UI)" sections document input-video guidelines and the UI-driven alternative to this API flow.
README.mdbump:1
- — VIOS API技能;仅
vss-manage-video-io-storage校准模式依赖可访问的VIOS。rtsp
根目录中的“自定义数据集”和“校准工作流程(UI)”部分记录了输入视频指南,以及本API流程的UI驱动替代方案。
README.mdbump:1