[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71MBMPAAJXDZXE87E14BJAB":3,"skill-same:01M71MBMPAAJXDZXE87E14BJAB":107},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":14,"repositoryHtmlUrl":63,"repositoryHomepageUrl":64,"ownerHtmlUrl":65,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":66,"install":67,"resources":80},"01M71MBMPAAJXDZXE87E14BJAB","amc-run-video-calibration",null,"Calibrate a new dataset from pre-recorded video files via the AutoMagicCalib REST API. Use when user has local MP4s and says 'calibrate my videos', 'run AMC on these videos', or similar.","pattanation\u002FNorvik","pattanation","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235419268?v=4","01M71M5THHYYB15ME8R2E4FCZG","Patta","01M71M5TJM1NDM992M8PDKYR2K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"run","calibration","amc run video calibration","Video","use","magic","python","calibrate","NVIDIA","camera","my","2026","api","dataset","when","auto","files","new","local","rest-api","2026-11-10 10:56:23",false,"---\nname: \"amc-run-video-calibration\"\ndescription: \"Calibrate a new dataset from pre-recorded video files via the AutoMagicCalib REST API. Use when user has local MP4s and says 'calibrate my videos', 'run AMC on these videos', or similar.\"\nowner: \"NVIDIA CORPORATION\"\nservice: \"auto-magic-calib\"\nversion: \"1.0.0\"\nreviewed: \"2026-04-28\"\nlicense: \"Apache-2.0\"\ndata_classification: public\nmetadata:\n  tags: [amc, calibration, rest-api, camera, python]\n---\n\n# Skill: Calibrate from Video Files\n\n## When to Use This Skill\n\nActivate this skill when the user has pre-recorded MP4 files and wants to calibrate them via the AMC REST API. Typical prompts:\n\n- \"calibrate my videos\" \u002F \"run AMC on these videos\"\n- \"calibrate from video files\"\n\nDrives calibration through the REST API on user-supplied **pre-recorded MP4 files** — no CLI scripts or Docker bind-mounts required, just a running microservice and your files.\n\n## Prerequisites\n\n- [ ] AMC microservice **and** UI running (follow `skills\u002Famc-setup-calibration-stack\u002FSKILL.md`)\n- [ ] You know the microservice URL (e.g. `http:\u002F\u002F\u003CHOST_IP>:\u003CMS_PORT>`) and UI URL\n- [ ] Video files locally as `cam_00.mp4`, `cam_01.mp4`, … time-synchronized, ~1920×1080\n- [ ] Python 3 with `requests`\n\n## Data Privacy\n\nVideo files uploaded via this skill are transmitted to the AutoMagicCalib backend (REST endpoint). Only use this skill when the backend is deployed on a trusted platform \u002F network.\n\n## What to Ask the User\n\n### Required\n(Video-file naming and the microservice URL are specified under Prerequisites above — collect the inputs below.)\n1. **Videos directory** — the folder the skill globs for `cam_*.mp4`, uploaded sorted alphabetically.\n2. **Microservice URL**\n3. **Project name** — short descriptive string\n\n### Auto-Detected (ask only if not found)\n\nThe script searches the videos dir, its first-level subdirectories, and its parent. If exactly one match is found, it is used; otherwise the script prints the searched locations and continues to explicit path or UI fallback:\n\n| File | Candidate filenames | UI fallback |\n|---|---|---|\n| Calibration settings | `settings.json`, `config.json`, `calibration_config.json` | UI Step 3: Parameters |\n| Alignment JSON | `alignment_data.json` | UI Step 4: Alignment |\n| Layout PNG | `layout.png` | UI Step 4: Alignment |\n\nPosting the settings file replaces UI Step 3 and may pin the detector (`resnet`\u002F`transformer`), which is passed to `\u002Fcalibrate` separately — see Step 4.\n\n### Optional\n4. **Ground truth zip** — `GT.zip` with `_World_Cameras_Camera_XX\u002F` folders (enables evaluation metrics)\n5. **Focal lengths** — one per camera, e.g. `1269.0, 1099.5, 1099.5`\n6. **Detector type** — `resnet` (default, fast) or `transformer` (slower, better under occlusion)\n7. **Run VGGT refinement?** — if VGGT is ready after AMC completes, ask the user whether to run refinement (see setup skill)\n\nSee root `README.md` \"Custom Dataset\" section for input-video guidelines and ground-truth format.\n\n---\n\n## Instructions\n\nAll endpoints below are implemented end-to-end in the [Complete Python Script](#complete-python-script) — the prose is the workflow plus the decisions the agent must make; the script is the authoritative runnable.\n\n### Step 1 — Create Project\n\n`POST \u002Fv1\u002Fcreate_project` (form field `project_name`) → save the returned `project_id`.\n\n### Step 2 — Upload Videos (required)\n\n`POST \u002Fv1\u002Fupload_video_files\u002F\u003Cproject_id>` (multipart `files`). **Upload sorted alphabetically** — the server assigns camera indices by upload order.\n\n### Step 3 — Resolve Local Files (Auto-Scan, Ask, or UI)\n\nFor each of calibration-settings, alignment, and layout, run this resolution:\n\n1. **Auto-scan** `VIDEO_DIR`, one level of subdirectories under `VIDEO_DIR`, and `VIDEO_DIR.parent` for the candidate filenames (table above).\n2. If **exactly one match**, use it and print what was found.\n3. If **zero or multiple matches**, print the searched locations, then ask the user for an explicit path using the host's question mechanism; if none is available, ask in chat and wait. If they don't have the file, mark it for UI fallback.\n4. **UI fallback**: tell the user to complete the corresponding UI step; wait for confirmation; for alignment\u002Flayout also verify files landed in `projects\u002Fproject_\u003Cid>\u002Fmanual_adjustment\u002F`.\n\n### Step 4 — Upload Resolved Files\n\nUpload each file resolved locally:\n\n| File | Endpoint | Notes |\n|---|---|---|\n| Calibration settings | `POST \u002Fv1\u002Fconfig\u002F\u003Cproject_id>` (JSON, posted as-is) | Replaces UI Step 3 (rectification, bundle-adjustment, evaluation, detector, …). Non-2xx is surfaced — never silently fall back. Skip on the UI-fallback path. |\n| Alignment | `POST \u002Fv1\u002Fupload_alignment\u002F\u003Cproject_id>` (`alignment_data.json`) | |\n| Layout | `POST \u002Fv1\u002Fupload_layout\u002F\u003Cproject_id>` (`layout.png`) | |\n| Ground truth (optional) | `POST \u002Fv1\u002Fupload_gt_file\u002F\u003Cproject_id>` (`GT.zip`) | Enables evaluation metrics |\n| Focal lengths (optional) | `POST \u002Fv1\u002Fupload_focal_length\u002F\u003Cproject_id>` (repeated `focal_length=`) | Overrides GeoCalib estimates |\n\nAfter a successful settings POST, parse the file for `\"detector\"` \u002F `\"detector_type\"` — if it's `\"resnet\"` or `\"transformer\"`, use that value for the `\u002Fcalibrate` call in Step 7 (detector is a separate API parameter, not consumed by `\u002Fconfig`).\n\n### Step 5 — UI Fallback (only for files the user doesn't have locally)\n\nIf any of settings \u002F alignment \u002F layout was not resolved in Step 3, direct the user to the appropriate UI step:\n\n- **Settings missing** → \"Open UI project `\u003Cproject_id>`, go to **Step 3: Parameters**, tune via the settings dialog (or accept defaults), click Save.\" **Also**: before the `\u002Fcalibrate` call, ask the user which detector to use (`resnet` or `transformer`) using the host's question mechanism; if none is available, ask in chat and wait. UI Step 3 does not cover detector choice.\n- **Alignment or layout missing** → \"Open UI project `\u003Cproject_id>`, go to **Step 4: Alignment**, upload layout, mark correspondence points, click Save.\"\n\nWait for user confirmation. For non-interactive script runs, provide the needed files up front; the script exits with a clear message rather than waiting on input. For alignment\u002Flayout, verify on disk before continuing:\n\n```bash\nREPO_ROOT=$(git rev-parse --show-toplevel)\n# Resolve PROJECT_DIR from compose\u002F.env (default: projects\u002F at repo root).\nPROJECT_DIR_REL=$(grep ^PROJECT_DIR \"$REPO_ROOT\u002Fcompose\u002F.env\" 2>\u002Fdev\u002Fnull | cut -d= -f2 | tr -d '[:space:]')\nHOST_PROJECTS=$(cd \"$REPO_ROOT\u002Fcompose\" && realpath \"${PROJECT_DIR_REL:-..\u002F..\u002Fprojects}\")\n\nls \"$HOST_PROJECTS\u002Fproject_\u003Cproject_id>\u002Fmanual_adjustment\u002F\"\n# Expected: alignment_data.json, layout.png\n```\n\n### Step 6 — Verify Project\n\n`POST \u002Fv1\u002Fverify_project\u002F\u003Cproject_id>` → must return `{\"project_state\": \"READY\"}` before calibrating.\n\n### Step 7 — Start Calibration\n\n**Confirm the plan before calibrating.** Whether the settings file and detector were auto-detected or asked, present a short summary and get explicit user confirmation before `POST \u002Fcalibrate` using the host's question mechanism; if none is available, ask in chat and wait. The resolved values are the defaults, so confirming is one click, but the user can switch the detector or skip an auto-detected settings file. The standalone Python script prints the same plan and prompts only when stdin is interactive. Summarize:\n\n- **Detector** — `resnet` or `transformer` (the value to be sent).\n- **Calibration settings** — the file being applied (path), or \"defaults\" if none.\n- **Optional overrides** — ground-truth zip and focal lengths, if any.\n\n```\nPOST \u002Fv1\u002Fcalibrate\u002F\u003Cproject_id>\nContent-Type: application\u002Fjson\n\n{\"detector_type\": \"resnet\"}\n```\n\n### Step 8 — Poll for Completion\n\n`GET \u002Fv1\u002Fget_project_info\u002F\u003Cproject_id>` every 10 s — `project_info.project_state` goes `RUNNING` → `COMPLETED` (or `ERROR`, pull the log). Typical time: **10–60 min** depending on video length and detector.\n\n### Step 9 — Get Results\n\n`GET \u002Fv1\u002Fresult\u002F\u003Cproject_id>\u002Fevaluation_statistics` (only if GT was uploaded; includes `Average L2 distance(m)` and `Average reprojection error 0(px)`), and `GET \u002Fv1\u002Famc\u002Fcalibrate\u002F\u003Cproject_id>\u002Flog` for the calibration log.\n\n### Status Fields from `get_project_info`\n\n`project_info.project_state` is the AMC calibration lifecycle for the project: `RUNNING` → `COMPLETED` (or `ERROR`).\n\n`project_info.vggt_state` is also **per-project**, a project-scoped VGGT refinement lifecycle rather than a direct global service or model-load status. A newly created project can report `vggt_state: \"INIT\"` even when the VGGT model is present and mounted. The expected VGGT lifecycle is `INIT` → `READY` after AMC calibration completes → `RUNNING` while VGGT refinement runs → `COMPLETED` (or `ERROR`).\n\nUse `vggt_state == \"READY\"` only as the gate for optional VGGT refinement in Step 10. Interpret `INIT` on a new or uncalibrated project as normal project state. If AMC calibration is complete and the project remains in a non-ready VGGT state, confirm VGGT setup and model availability with the setup skill checks and service logs.\n\n### Step 10 — (Optional) VGGT Refinement\n\nAfter AMC calibration completes, read `vggt_state` from `GET \u002Fv1\u002Fget_project_info\u002F\u003Cproject_id>`.\n\n- If the project reports `vggt_state == \"READY\"`, ask the user whether to run VGGT refinement using the host's question mechanism; if none is available, ask in chat and wait.\n- If the user confirms, `POST \u002Fv1\u002Fvggt\u002Fcalibrate\u002F\u003Cproject_id>`, poll `vggt_state` via `get_project_info`, then `GET \u002Fv1\u002Fvggt_results\u002F\u003Cproject_id>\u002Fevaluation_statistics`.\n- If VGGT is not ready, skip refinement and explain that the user can set up VGGT with `amc-setup-calibration-stack` and rerun this optional step later.\n\nThe standalone Python script prompts only when stdin is interactive. In non-interactive runs, set `RUN_VGGT = True` to opt in; otherwise the script prints that VGGT is ready and continues without blocking.\n\n---\n\n## Complete Python Script\n\nUse `scripts\u002Frun_video_calibration.py` for the runnable implementation. Set `BASE_URL`, `PROJECT_NAME`, and `VIDEO_DIR`; optional env vars are `CONFIG_FILE`, `ALIGNMENT_JSON`, `LAYOUT_PNG`, `GT_ZIP`, `FOCAL_LENGTHS`, `DETECTOR_TYPE`, `RUN_VGGT`, `REPO_ROOT`, and `PROJECTS_DIR`. The script implements UI fallback, plan confirmation, VGGT prompt\u002Fopt-in behavior, polling, and refined statistics retrieval.\n\n## Success Criteria\n\n- `project_state == \"COMPLETED\"` after polling.\n- If manual alignment was used: `projects\u002Fproject_\u003Cid>\u002Fmanual_adjustment\u002F` contains `alignment_data.json` + `layout.png`.\n- If GT was uploaded: evaluation returns typical thresholds:\n  - `Average L2 distance(m)` \u003C 1.5\n  - `Average reprojection error 0(px)` \u003C 5\n- No `ERROR` state.\n\n## Key Output Files (on server)\n\n```\nprojects\u002Fproject_\u003Cproject_id>\u002F\n├── manual_adjustment\u002F\n│   ├── alignment_data.json\n│   └── layout.png\n├── output\u002F\n│   ├── single_view_results\u002Fcam_XX\u002F\n│   │   ├── camInfo_hyper_XX.yaml\n│   │   └── trajDump_Stream_0_3d.txt\n│   └── multi_view_results\u002FBA_output\u002Fresults_ba\u002F\n│       ├── initial\u002FcamInfo_XX.yaml\n│       └── refined\u002FcamInfo_XX.yaml          # ← final calibration\n└── calibration.log\n```\n\n## Troubleshooting\n\n| Issue | Fix |\n|---|---|\n| `verify_project` state not `READY` | Confirm videos uploaded and alignment + layout are present (either via API or via UI manual alignment) |\n| Manual alignment files missing after UI step | User didn't click Save; also verify `projects\u002Fproject_\u003Cid>\u002Fmanual_adjustment\u002F` exists |\n| Calibration stuck `RUNNING` > 90 min | `GET \u002Fv1\u002Famc\u002Fcalibrate\u002F\u003Cid>\u002Flog` — usually insufficient tracklets (scene too static). See \"Custom Dataset\" guidelines in root README. |\n| Immediate `ERROR` state | Check video naming: must be `cam_00.mp4`, `cam_01.mp4`, … contiguous |\n| Low L2 but high reprojection | Provide explicit `focal_length` override via Step 3 |\n| VGGT stays non-ready after AMC completes | `INIT` is expected for a new project. After AMC calibration reaches `COMPLETED`, the project should transition to `READY` before optional VGGT refinement when VGGT is configured. If refinement is required and the state remains `INIT` or otherwise non-ready, confirm VGGT setup and model availability with setup skill Step 2 and MS logs. |\n| Upload timeout | Large videos — bump `timeout=300` to e.g. `600` in the script |\n\n## For Downstream Skills — MV3DT Export\n\nA downstream Multi-View 3D Tracking skill fetches the MV3DT-format calibration directly from the microservice (this skill does **not** download it; it returns the `project_id`). After this skill reports `COMPLETED`:\n\n- `GET \u002Fv1\u002Fresult\u002F{project_id}\u002Fmv3dt_result?result_type=amc` → `mv3dt_output.zip` (contains `transforms.yml`).\n- If VGGT ran to `COMPLETED` (Step 10): `?result_type=vggt` → `vggt_mv3dt_output.zip`.\n\n## Related Skills\n\n- `skills\u002Famc-setup-calibration-stack\u002FSKILL.md` — start MS + UI first.\n- `skills\u002Famc-run-sample-calibration\u002FSKILL.md` — verify the stack with the bundled sample before trying your own.\n\nRoot `README.md` \"Custom Dataset\" and \"Calibration Workflow (UI)\" sections document input-video guidelines and the UI-driven alternative to this API flow.\n\n\u003C!-- signing marker -->\n","# Skill: Calibrate from Video Files\n\n## When to Use This Skill\n\nActivate this skill when the user has pre-recorded MP4 files and wants to calibrate them via the AMC REST API. Typical prompts:\n\n- \"calibrate my videos\" \u002F \"run AMC on these videos\"\n- \"calibrate from video files\"\n\nDrives calibration through the REST API on user-supplied **pre-recorded MP4 files** — no CLI scripts or Docker bind-mounts required, just a running microservice and your files.\n\n## Prerequisites\n\n- [ ] AMC microservice **and** UI running (follow `skills\u002Famc-setup-calibration-stack\u002FSKILL.md`)\n- [ ] You know the microservice URL (e.g. `http:\u002F\u002F\u003CHOST_IP>:\u003CMS_PORT>`) and UI URL\n- [ ] Video files locally as `cam_00.mp4`, `cam_01.mp4`, … time-synchronized, ~1920×1080\n- [ ] Python 3 with `requests`\n\n## Data Privacy\n\nVideo files uploaded via this skill are transmitted to the AutoMagicCalib backend (REST endpoint). Only use this skill when the backend is deployed on a trusted platform \u002F network.\n\n## What to Ask the User\n\n### Required\n(Video-file naming and the microservice URL are specified under Prerequisites above — collect the inputs below.)\n1. **Videos directory** — the folder the skill globs for `cam_*.mp4`, uploaded sorted alphabetically.\n2. **Microservice URL**\n3. **Project name** — short descriptive string\n\n### Auto-Detected (ask only if not found)\n\nThe script searches the videos dir, its first-level subdirectories, and its parent. If exactly one match is found, it is used; otherwise the script prints the searched locations and continues to explicit path or UI fallback:\n\n| File | Candidate filenames | UI fallback |\n|---|---|---|\n| Calibration settings | `settings.json`, `config.json`, `calibration_config.json` | UI Step 3: Parameters |\n| Alignment JSON | `alignment_data.json` | UI Step 4: Alignment |\n| Layout PNG | `layout.png` | UI Step 4: Alignment |\n\nPosting the settings file replaces UI Step 3 and may pin the detector (`resnet`\u002F`transformer`), which is passed to `\u002Fcalibrate` separately — see Step 4.\n\n### Optional\n4. **Ground truth zip** — `GT.zip` with `_World_Cameras_Camera_XX\u002F` folders (enables evaluation metrics)\n5. **Focal lengths** — one per camera, e.g. `1269.0, 1099.5, 1099.5`\n6. **Detector type** — `resnet` (default, fast) or `transformer` (slower, better under occlusion)\n7. **Run VGGT refinement?** — if VGGT is ready after AMC completes, ask the user whether to run refinement (see setup skill)\n\nSee root `README.md` \"Custom Dataset\" section for input-video guidelines and ground-truth format.\n\n---\n\n## Instructions\n\nAll endpoints below are implemented end-to-end in the [Complete Python Script](#complete-python-script) — the prose is the workflow plus the decisions the agent must make; the script is the authoritative runnable.\n\n### Step 1 — Create Project\n\n`POST \u002Fv1\u002Fcreate_project` (form field `project_name`) → save the returned `project_id`.\n\n### Step 2 — Upload Videos (required)\n\n`POST \u002Fv1\u002Fupload_video_files\u002F\u003Cproject_id>` (multipart `files`). **Upload sorted alphabetically** — the server assigns camera indices by upload order.\n\n### Step 3 — Resolve Local Files (Auto-Scan, Ask, or UI)\n\nFor each of calibration-settings, alignment, and layout, run this resolution:\n\n1. **Auto-scan** `VIDEO_DIR`, one level of subdirectories under `VIDEO_DIR`, and `VIDEO_DIR.parent` for the candidate filenames (table above).\n2. If **exactly one match**, use it and print what was found.\n3. If **zero or multiple matches**, print the searched locations, then ask the user for an explicit path using the host's question mechanism; if none is available, ask in chat and wait. If they don't have the file, mark it for UI fallback.\n4. **UI fallback**: tell the user to complete the corresponding UI step; wait for confirmation; for alignment\u002Flayout also verify files landed in `projects\u002Fproject_\u003Cid>\u002Fmanual_adjustment\u002F`.\n\n### Step 4 — Upload Resolved Files\n\nUpload each file resolved locally:\n\n| File | Endpoint | Notes |\n|---|---|---|\n| Calibration settings | `POST \u002Fv1\u002Fconfig\u002F\u003Cproject_id>` (JSON, posted as-is) | Replaces UI Step 3 (rectification, bundle-adjustment, evaluation, detector, …). Non-2xx is surfaced — never silently fall back. Skip on the UI-fallback path. |\n| Alignment | `POST \u002Fv1\u002Fupload_alignment\u002F\u003Cproject_id>` (`alignment_data.json`) | |\n| Layout | `POST \u002Fv1\u002Fupload_layout\u002F\u003Cproject_id>` (`layout.png`) | |\n| Ground truth (optional) | `POST \u002Fv1\u002Fupload_gt_file\u002F\u003Cproject_id>` (`GT.zip`) | Enables evaluation metrics |\n| Focal lengths (optional) | `POST \u002Fv1\u002Fupload_focal_length\u002F\u003Cproject_id>` (repeated `focal_length=`) | Overrides GeoCalib estimates |\n\nAfter a successful settings POST, parse the file for `\"detector\"` \u002F `\"detector_type\"` — if it's `\"resnet\"` or `\"transformer\"`, use that value for the `\u002Fcalibrate` call in Step 7 (detector is a separate API parameter, not consumed by `\u002Fconfig`).\n\n### Step 5 — UI Fallback (only for files the user doesn't have locally)\n\nIf any of settings \u002F alignment \u002F layout was not resolved in Step 3, direct the user to the appropriate UI step:\n\n- **Settings missing** → \"Open UI project `\u003Cproject_id>`, go to **Step 3: Parameters**, tune via the settings dialog (or accept defaults), click Save.\" **Also**: before the `\u002Fcalibrate` call, ask the user which detector to use (`resnet` or `transformer`) using the host's question mechanism; if none is available, ask in chat and wait. UI Step 3 does not cover detector choice.\n- **Alignment or layout missing** → \"Open UI project `\u003Cproject_id>`, go to **Step 4: Alignment**, upload layout, mark correspondence points, click Save.\"\n\nWait for user confirmation. For non-interactive script runs, provide the needed files up front; the script exits with a clear message rather than waiting on input. For alignment\u002Flayout, verify on disk before continuing:\n\n```bash\nREPO_ROOT=$(git rev-parse --show-toplevel)\n# Resolve PROJECT_DIR from compose\u002F.env (default: projects\u002F at repo root).\nPROJECT_DIR_REL=$(grep ^PROJECT_DIR \"$REPO_ROOT\u002Fcompose\u002F.env\" 2>\u002Fdev\u002Fnull | cut -d= -f2 | tr -d '[:space:]')\nHOST_PROJECTS=$(cd \"$REPO_ROOT\u002Fcompose\" && realpath \"${PROJECT_DIR_REL:-..\u002F..\u002Fprojects}\")\n\nls \"$HOST_PROJECTS\u002Fproject_\u003Cproject_id>\u002Fmanual_adjustment\u002F\"\n# Expected: alignment_data.json, layout.png\n```\n\n### Step 6 — Verify Project\n\n`POST \u002Fv1\u002Fverify_project\u002F\u003Cproject_id>` → must return `{\"project_state\": \"READY\"}` before calibrating.\n\n### Step 7 — Start Calibration\n\n**Confirm the plan before calibrating.** Whether the settings file and detector were auto-detected or asked, present a short summary and get explicit user confirmation before `POST \u002Fcalibrate` using the host's question mechanism; if none is available, ask in chat and wait. The resolved values are the defaults, so confirming is one click, but the user can switch the detector or skip an auto-detected settings file. The standalone Python script prints the same plan and prompts only when stdin is interactive. Summarize:\n\n- **Detector** — `resnet` or `transformer` (the value to be sent).\n- **Calibration settings** — the file being applied (path), or \"defaults\" if none.\n- **Optional overrides** — ground-truth zip and focal lengths, if any.\n\n```\nPOST \u002Fv1\u002Fcalibrate\u002F\u003Cproject_id>\nContent-Type: application\u002Fjson\n\n{\"detector_type\": \"resnet\"}\n```\n\n### Step 8 — Poll for Completion\n\n`GET \u002Fv1\u002Fget_project_info\u002F\u003Cproject_id>` every 10 s — `project_info.project_state` goes `RUNNING` → `COMPLETED` (or `ERROR`, pull the log). Typical time: **10–60 min** depending on video length and detector.\n\n### Step 9 — Get Results\n\n`GET \u002Fv1\u002Fresult\u002F\u003Cproject_id>\u002Fevaluation_statistics` (only if GT was uploaded; includes `Average L2 distance(m)` and `Average reprojection error 0(px)`), and `GET \u002Fv1\u002Famc\u002Fcalibrate\u002F\u003Cproject_id>\u002Flog` for the calibration log.\n\n### Status Fields from `get_project_info`\n\n`project_info.project_state` is the AMC calibration lifecycle for the project: `RUNNING` → `COMPLETED` (or `ERROR`).\n\n`project_info.vggt_state` is also **per-project**, a project-scoped VGGT refinement lifecycle rather than a direct global service or model-load status. A newly created project can report `vggt_state: \"INIT\"` even when the VGGT model is present and mounted. The expected VGGT lifecycle is `INIT` → `READY` after AMC calibration completes → `RUNNING` while VGGT refinement runs → `COMPLETED` (or `ERROR`).\n\nUse `vggt_state == \"READY\"` only as the gate for optional VGGT refinement in Step 10. Interpret `INIT` on a new or uncalibrated project as normal project state. If AMC calibration is complete and the project remains in a non-ready VGGT state, confirm VGGT setup and model availability with the setup skill checks and service logs.\n\n### Step 10 — (Optional) VGGT Refinement\n\nAfter AMC calibration completes, read `vggt_state` from `GET \u002Fv1\u002Fget_project_info\u002F\u003Cproject_id>`.\n\n- If the project reports `vggt_state == \"READY\"`, ask the user whether to run VGGT refinement using the host's question mechanism; if none is available, ask in chat and wait.\n- If the user confirms, `POST \u002Fv1\u002Fvggt\u002Fcalibrate\u002F\u003Cproject_id>`, poll `vggt_state` via `get_project_info`, then `GET \u002Fv1\u002Fvggt_results\u002F\u003Cproject_id>\u002Fevaluation_statistics`.\n- If VGGT is not ready, skip refinement and explain that the user can set up VGGT with `amc-setup-calibration-stack` and rerun this optional step later.\n\nThe standalone Python script prompts only when stdin is interactive. In non-interactive runs, set `RUN_VGGT = True` to opt in; otherwise the script prints that VGGT is ready and continues without blocking.\n\n---\n\n## Complete Python Script\n\nUse `scripts\u002Frun_video_calibration.py` for the runnable implementation. Set `BASE_URL`, `PROJECT_NAME`, and `VIDEO_DIR`; optional env vars are `CONFIG_FILE`, `ALIGNMENT_JSON`, `LAYOUT_PNG`, `GT_ZIP`, `FOCAL_LENGTHS`, `DETECTOR_TYPE`, `RUN_VGGT`, `REPO_ROOT`, and `PROJECTS_DIR`. The script implements UI fallback, plan confirmation, VGGT prompt\u002Fopt-in behavior, polling, and refined statistics retrieval.\n\n## Success Criteria\n\n- `project_state == \"COMPLETED\"` after polling.\n- If manual alignment was used: `projects\u002Fproject_\u003Cid>\u002Fmanual_adjustment\u002F` contains `alignment_data.json` + `layout.png`.\n- If GT was uploaded: evaluation returns typical thresholds:\n  - `Average L2 distance(m)` \u003C 1.5\n  - `Average reprojection error 0(px)` \u003C 5\n- No `ERROR` state.\n\n## Key Output Files (on server)\n\n```\nprojects\u002Fproject_\u003Cproject_id>\u002F\n├── manual_adjustment\u002F\n│   ├── alignment_data.json\n│   └── layout.png\n├── output\u002F\n│   ├── single_view_results\u002Fcam_XX\u002F\n│   │   ├── camInfo_hyper_XX.yaml\n│   │   └── trajDump_Stream_0_3d.txt\n│   └── multi_view_results\u002FBA_output\u002Fresults_ba\u002F\n│       ├── initial\u002FcamInfo_XX.yaml\n│       └── refined\u002FcamInfo_XX.yaml          # ← final calibration\n└── calibration.log\n```\n\n## Troubleshooting\n\n| Issue | Fix |\n|---|---|\n| `verify_project` state not `READY` | Confirm videos uploaded and alignment + layout are present (either via API or via UI manual alignment) |\n| Manual alignment files missing after UI step | User didn't click Save; also verify `projects\u002Fproject_\u003Cid>\u002Fmanual_adjustment\u002F` exists |\n| Calibration stuck `RUNNING` > 90 min | `GET \u002Fv1\u002Famc\u002Fcalibrate\u002F\u003Cid>\u002Flog` — usually insufficient tracklets (scene too static). See \"Custom Dataset\" guidelines in root README. |\n| Immediate `ERROR` state | Check video naming: must be `cam_00.mp4`, `cam_01.mp4`, … contiguous |\n| Low L2 but high reprojection | Provide explicit `focal_length` override via Step 3 |\n| VGGT stays non-ready after AMC completes | `INIT` is expected for a new project. After AMC calibration reaches `COMPLETED`, the project should transition to `READY` before optional VGGT refinement when VGGT is configured. If refinement is required and the state remains `INIT` or otherwise non-ready, confirm VGGT setup and model availability with setup skill Step 2 and MS logs. |\n| Upload timeout | Large videos — bump `timeout=300` to e.g. `600` in the script |\n\n## For Downstream Skills — MV3DT Export\n\nA downstream Multi-View 3D Tracking skill fetches the MV3DT-format calibration directly from the microservice (this skill does **not** download it; it returns the `project_id`). After this skill reports `COMPLETED`:\n\n- `GET \u002Fv1\u002Fresult\u002F{project_id}\u002Fmv3dt_result?result_type=amc` → `mv3dt_output.zip` (contains `transforms.yml`).\n- If VGGT ran to `COMPLETED` (Step 10): `?result_type=vggt` → `vggt_mv3dt_output.zip`.\n\n## Related Skills\n\n- `skills\u002Famc-setup-calibration-stack\u002FSKILL.md` — start MS + UI first.\n- `skills\u002Famc-run-sample-calibration\u002FSKILL.md` — verify the stack with the bundled sample before trying your own.\n\nRoot `README.md` \"Custom Dataset\" and \"Calibration Workflow (UI)\" sections document input-video guidelines and the UI-driven alternative to this API flow.\n\n\u003C!-- signing marker -->\n",{"name":5,"owner":52,"license":15,"service":53,"version":54,"metadata":55,"reviewed":58,"description":7,"data_classification":59},"NVIDIA CORPORATION","auto-magic-calib","1.0.0",{"tags":56},[57,28,46,36,33],"amc","2026-04-28","public","claude\u002Finstall-gsd-build-foQdV","d86cd127f527124b5fd0fd0bc679a4d79b7d01d7",".agents\u002Fskills\u002Famc-run-video-calibration","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik","https:\u002F\u002Fnorvik-orpin.vercel.app","https:\u002F\u002Fgithub.com\u002Fpattanation","2026-07-17 11:17:04",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add pattanation\u002FNorvik --skill amc-run-video-calibration",{"tool":73,"command":74},"bunx","bunx skills add pattanation\u002FNorvik --skill amc-run-video-calibration",{"tool":76,"command":77},"pnpm","pnpm dlx skills add pattanation\u002FNorvik --skill amc-run-video-calibration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002FSKILL.md",true,[81,87,91,97,101],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"BENCHMARK.md","REFERENCE","参考文档",4493,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002FBENCHMARK.md",{"path":88,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":89,"sourceHtmlUrl":90},"evals\u002Fevals.json",6171,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002Fevals\u002Fevals.json",{"path":92,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"scripts\u002Frun_video_calibration.py","SCRIPT","脚本",11758,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002Fscripts\u002Frun_video_calibration.py",{"path":98,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":99,"sourceHtmlUrl":100},"skill-card.md",3625,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002Fskill-card.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"skill.oms.sig","OTHER","其他",4929,"https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Famc-run-video-calibration\u002Fskill.oms.sig",[108,139,164,188,210,225],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":121,"publishedAt":138},"01M71QDV4DM8T19HEHWATEF1K4","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[115,118],{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[122,123,124,125,126,45,127,128,129,130,131,132,133,134,135,136,137],"webapp","testing","webapp testing","for","applications","frontend","debugging","toolkit","logs","browser","with","playwright","web","behavior","ui","screenshots","2026-11-10 13:02:02",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":143,"sourceHtmlUrl":144,"categories":145,"keywords":147,"publishedAt":138},"01M71QDH2GGMXGA9105C9W1N7B","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[146],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[148,149,150,134,151,152,153,125,154,155,127,156,31,157,158,159,160,161,162,163],"builder","artifacts builder","artifacts","web artifacts builder","single-file","css","Tailwind","ui components","single","file","components","react","multi","state","routing","state management",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":168,"licenseFileUrl":169,"sourceHtmlUrl":170,"categories":171,"keywords":173,"publishedAt":138},"01M71QD9T2XC3EWMQNN9ACNWQ1","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","MIT","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvueuse-functions\u002FSKILL.md",[172],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[174,175,176,177,178,179,180,181,182,183,184,185,186,187],"functions","vueuse","vueuse functions","project","nuxt","apply","github","concise","build","https","features","vue","js","composables",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":168,"licenseFileUrl":192,"sourceHtmlUrl":193,"categories":194,"keywords":197,"publishedAt":138},"01M71QD51HWSGYMCMB7RW7PGK8","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-testing-best-practices\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-testing-best-practices\u002FSKILL.md",[195,196],{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[198,123,199,185,200,133,201,202,203,180,204,125,205,206,207,31,208,186,209],"vue testing best practices","testing best practices","best practices","test","testing patterns","component","vitest","mocking","e2e","utils","patterns","e2e testing",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":168,"licenseFileUrl":214,"sourceHtmlUrl":215,"categories":216,"keywords":218,"publishedAt":138},"01M71QD358H2DJ9THJRBP77T3T","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-router-best-practices\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-router-best-practices\u002FSKILL.md",[217],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[219,185,220,200,221,203,222,180,208,223,224],"router","vue router best practices","route","guards","navigation","lifecycle",{"skillNo":226,"name":227,"nameZh":6,"description":228,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":168,"licenseFileUrl":229,"sourceHtmlUrl":230,"categories":231,"keywords":233,"publishedAt":138},"01M71QCYPNWDE2MQZ1TF3ED5S4","vue-best-practices","MUST be used for Vue.js tasks. Strongly recommends Composition API with `\u003Cscript setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-best-practices\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Fpattanation\u002FNorvik\u002Fblob\u002Fclaude\u002Finstall-gsd-build-foQdV\u002F.agents\u002Fskills\u002Fvue-best-practices\u002FSKILL.md",[232],{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},[234,185,200,235,177,43,236,39,219,237,238,239,240,241,242,125,243,31,244,245],"vue best practices","Composition","tasks","pinia","work","options","ssr","typescript","as","vite","load","standard"]