Skip to content
Agentmart
Submit a tool

amc-run-video-calibration

Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API.

Skill by Shubham Agrawal <shuagrawal@nvidia.com>

IndexedApache-2.0★ 3,718
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/nvidia-amc-run-video-calibration

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to `amc-run-rtsp-calibration`.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/amc-run-video-calibration

What's inside

Skill name
amc-run-video-calibration
Description
Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to `amc-run-rtsp-calibration`.
License
Apache-2.0
Metadata
author: Shubham Agrawal <shuagrawal@nvidia.com> · version: 1.0.0
Instructions
296 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (6)

  • BENCHMARK.md
  • SKILL.md
  • evals.json · evals/
  • run_video_calibration.py · scripts/
  • skill-card.md
  • skill.oms.sig

SKILL.md (first lines)

# Skill: Calibrate from Video Files

## When to Use This Skill

Activate this skill when the user has pre-recorded MP4 files and wants to calibrate them via the AMC REST API. Typical prompts:

- "calibrate my videos" / "run AMC on these videos"
- "calibrate from video files"

Drives 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.

Do not use this skill for live RTSP streams or `rtsp://...` URLs; route those requests to `skills/amc-run-rtsp-calibration/SKILL.md`.

## Purpose

Guide the agent through project creation, sorted MP4 upload, local asset resolution, UI fallback only when necessary, project verification, calibration, polling, evaluation, and optional VGGT refinement for a user-provided multi-camera dataset.

## Prerequisites

- [ ] AMC microservice **and** UI running (follow `skills/amc-setup-calibration-stack/SKILL.md`)
- [ ] You know the microservice URL (use `https://<HOST_IP>:<MS_PORT>` for remote AMC, or `http://localhost:<MS_PORT>` on loopback) and UI URL
- [ ] Video files locally as contiguous `cam_00.mp4`, `cam_01.mp4`, … time-synchronized, ~1920×1080
- [ ] Python 3 with `requests`
- [ ] If AMC stores project outputs outside the default `projects/` directory, you know the host `PROJECTS_DIR`

## Interaction Model

- The "host's question mechanism" means the runtime's built-in prompt API for short user decisions, such as terminal stdin, an IDE ask tool, or an equivalent interactive dialog.
- If that mechanism is unavailable, ask in chat and wait before any guarded step that requires user confirmation or a missing-file decision.
- For unattended runs, the bundled script requires all non-UI inputs up front and exits before `/calibrate` unless `CONFIRM_CALIBRATION=true` is set. `RUN_VGGT=true` remains a separate opt-in for the optional VGGT step.

## Data Privacy

Video 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 / network.

## Inputs

- Required inputs: `VIDEO_DIR`, `BASE_URL`, and `PROJECT_NAME`.
- Optional local inputs: `CONFIG_FILE`, `ALIGNMENT_JSON`, `LAYOUT_PNG`, `GT_ZIP`, `FOCAL_LENGTHS`, and `DETECTOR_TYPE`.
- Optional control inputs: `CONFIRM_CALIBRATION`, `RUN_VGGT`, `PROJECTS_DIR`, `CALIBRATION_TIMEOUT_SECONDS`, and `VGGT_TIMEOUT_SECONDS`.
- `BASE_URL` should use HTTPS for non-loopback hosts. Set `ALLOW_INSECURE_HTTP=true` only for trusted development setups that intentionally use remote plain HTTP.
- Resolution precedence for settings, alignment, and layout: explicit path, single local auto-detected match, then UI fallback.

## What to Ask the User

### Required
(Video-file naming and the microservice URL are specified under Prerequisites above — collect the inputs below.)
1. **Videos directory** — the folder the skill globs for `cam_*.mp4`, uploaded sorted alphabetically.
2. **Microservice URL**
3. **Project name** — short descriptive string

### Auto-Detected (ask only if not found)

The 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:

| File | Candidate filenames | UI fallback |
|---|---|---|
| Calibration settings | `settings.json`, `config.json`, `calibration_config.json` | UI Step 3: Parameters |
| Alignment JSON | `alignment_data.json` | UI Step 4: Alignment |
| Layout PNG | `layout.png` | UI Step 4: Alignment |

Posting the settings file replaces UI Step 3 and may pin the detector (`resnet`/`transformer`), which is passed to `/calibrate` separately — see Step 4.

### Optional
4. **Ground truth zip** — `GT.zip` with `_World_Cameras_Camera_XX/` folders (enables evaluation metrics)
5. **Focal lengths** — one per camera, e.g. `1269.0, 1099.5, 1099.5`
6. **Detector type** — `resnet` (default, fast) or `transformer` (slower, better under occlusion)
7. **Run VGGT refinement?** — if VGGT is ready after AMC completes, ask the user whether to run refinement (see setup skill)

See root `README.md` "Custom Dataset" section for input-video guidelines and ground-truth format.

---

## Available Scripts

| Script | Purpose | Key inputs |
|---|---|---|
| [run_video_calibration.py](scripts/run_video_calibration.py) | Executes create-project, upload, verify, calibrate, poll, evaluate, and optional VGGT refinement for a local MP4 dataset. | Required: `BASE_URL`, `PROJECT_NAME`, `VIDEO_DIR`. Optional: `CONFIG_FILE`, `ALIGNMENT_JSON`, `LAYOUT_PNG`, `GT_ZIP`, `FOCAL_LENGTHS`, `DETECTOR_TYPE`, `CONFIRM_CALIBRATION`, `RUN_VGGT`, `PROJECTS_DIR`, `CALIBRATION_TIMEOUT_SECONDS`, `VGGT_TIMEOUT_SECONDS`, `ALLOW_INSECURE_HTTP`. |

## Instructions

All 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.

### Step 1 — Create Project

`POST /v1/create_project` (form field `project_name`) → save the returned `project_id`.

### Step 2 — Upload Videos (required)

`POST /v1/upload_video_files/<project_id>` (multipart `files`). **Upload sorted alphabetically** — the server assigns camera indices by upload order. The bundled script rejects non-contiguous or non-zero-based camera sequences up front; the directory must contain `cam_00.mp4`, `cam_01.mp4`, ... with no gaps.

### Step 3 — Resolve Local Files (Auto-Scan, Ask, or UI)

For each of calibration-settings, alignment, and layout, run this resolution:

**Auto-use rule:** if exactly one match is found, the script uses it automatically and prints the resolved path. No extra prompt occurs for that file.

1. **Auto-scan** `VIDEO_DIR`, one level of subdirectories under `VIDEO_DIR`, and `VIDEO_DIR.parent` for the candidate filenames (table above).
2. If **exactly one match**, use it and print what was found.
3. 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.
4. **UI fallback**: tell the user to complete the corresponding UI step; wait for confirmation; then continue to Step 6 and treat `verify_project` as the source of truth for whether the UI-supplied alignment/layout data is complete.

### Step 4 — Upload Resolved Files

Upload each file resolved locally:

| File | Endpoint | Notes |
|---|---|---|
| Calibration settings | `POST /v1/config/<project_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. |
| Alignment | `POST /v1/upload_alignment/<project_id>` (`alignment_data.json`) | |
| Layout | `POST /v1/upload_layout/<project_id>` (`layout.png`) | |
| Ground truth (optional) | `POST /v1/upload_gt_file/<project_id>` (`GT.zip`) | Enables evaluation metrics |
| Focal lengths (optional) | `POST /v1/upload_focal_length/<project_id>` (repeated `focal_length=`) | Overrides GeoCalib estimates |

Upload all resolved local files first, in any order. After the local uploads are complete, continue to Step 5 only for unresolved files, then run Step 6 exactly once to verify the assembled project.

After a successful settings POST, parse the file for `"detector"` / `"detector_type"` — if it's `"resnet"` or `"transformer"`, use that value for the `/calibrate` call in Step 7 (detector is a separate API parameter, not consumed by `/config`).

### Step 5 — UI Fallback (only for files the user doesn't have locally)

From NVIDIA/skills, Apache-2.0.

More from NVIDIA/skills

Compare and alternatives

    Featured in

    Signals

    Stars
    3,718
    Forks
    457
    Open issues
    8
    Last commit (this folder)
    Sep 4, 2026 (1 month ago)

    From GitHub (fetched Oct 24, 2026).

    Details

    Version
    1.0.0
    License
    Apache-2.0
    First seen
    Oct 24, 2026
    Last checked
    Oct 24, 2026

    More from Shubham Agrawal <shuagrawal@nvidia.com>

    Cite this page

    amc-run-video-calibration skill. Agent Mart. https://agentmart.dev/skills/nvidia-amc-run-video-calibration (last updated 2026-10-24)