[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78CKBC6QWWEMMCQVBVVSPNG":3,"skill-same:01M78CKBC6QWWEMMCQVBVVSPNG":85},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":14,"repositoryHtmlUrl":39,"repositoryHomepageUrl":40,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M78CKBC6QWWEMMCQVBVVSPNG","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.","Solizardking\u002Fskillhub-main","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786NYYXSZK1D05WM8JQPC48",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":24,"license":15,"service":25,"version":26,"metadata":27,"reviewed":34,"description":7,"data_classification":35},"NVIDIA CORPORATION","auto-magic-calib","1.0.0",{"tags":28},[29,30,31,32,33],"amc","calibration","rest-api","camera","python","2026-04-28","public","main","be3de0244dc1a57e323d8160787ebb40fb64930e","skills\u002Fnvidia\u002Famc-run-video-calibration","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 23:20:13",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add Solizardking\u002Fskillhub-main --skill amc-run-video-calibration",{"tool":51,"command":52},"bunx","bunx skills add Solizardking\u002Fskillhub-main --skill amc-run-video-calibration",{"tool":54,"command":55},"pnpm","pnpm dlx skills add Solizardking\u002Fskillhub-main --skill amc-run-video-calibration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002FSKILL.md",true,[59,65,69,75,79],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"BENCHMARK.md","REFERENCE","参考文档",4493,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002FBENCHMARK.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"evals\u002Fevals.json",6171,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002Fevals\u002Fevals.json",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Frun_video_calibration.py","SCRIPT","脚本",11758,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002Fscripts\u002Frun_video_calibration.py",{"path":76,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":77,"sourceHtmlUrl":78},"skill-card.md",3625,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002Fskill-card.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"skill.oms.sig","OTHER","其他",4929,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Famc-run-video-calibration\u002Fskill.oms.sig",[86,94,101,108,115,123],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M78E0TGCAMNPS207BA3G07S7","zkrouter","Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.","MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzkrouter\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M78E0R1Z8BDT6EDTHY17MTNB","zk","For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M78E0P3ZTZ1YWF8MD5MM23QE","zk-omni-messaging","Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk-omni-messaging\u002FSKILL.md",[],[],{"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":90,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M78E0JXZ2PNB1896VXAGDBWD","zerion-wallet-data","Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzerion-wallet-data\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M78E0G14FH9GRRTQYMKD5E59","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":19},"01M78E0C2ZYA99CFFDNB7ZMK5S","yield-optimization","Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit\u002Fwithdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter\u002Fexit a position, or check portfolio balances.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyield-optimization\u002FSKILL.md",[],[]]