Technical reference

All model documents · source: docs/models/render_calib.md

Targetless link-silhouette calibration (spec §8.4)

dexvantage/core/calib/render_calib.py (the method), dexvantage/core/studies/silhouette_calib.py (the study, --silhouette-calib), dexvantage/ui/pages/silhouette.py (Calibrate ▸ Silhouette calibration), dexvantage/validation/checks_render_calib.py (two checks), tests/test_render_calib.py.

A static camera (one not on a robot link) is calibrated against the robot base with no board. The robot is rendered at the joint states logged with the frames, through MuJoCo's offscreen segmentation (core/sim/render.Renderer, the mount perturbed through extrinsic_delta). The rendered silhouette is then aligned with the recorded frame's edges and foreground mask. Run per episode, the estimate shows the mount's drift (a bracket knocked between episodes, a slow sag). The dataset auditor uses estimate for its mount-slip check.

API

estimate(dataset_or_episode, project, sensor_uid, frames=None, settings=None, *, renderer=None, progress=None,
         cancel=None) -> dict
drift(dataset, project, sensor_uid, episodes=None, settings=None, ...) -> {'episodes', 'steps', 'largest_step',
                                                                         'trend', 'step_rule'}
settings_of(project, given=None) -> dict
static_cameras(project), static_sensor(project, uid), match_stream(episode, sensor, key=None), status_of(doc, st)

dataset_or_episode takes a core.datasets Dataset (settings episode picks one; the default is the first), an Episode, or a path. frames lists indices into the camera's stored frames to choose from. Pass a renderer to reuse one MuJoCo worker across calls. The result is JSON-able:

key meaning
pose the recovered optical frame in the world (the primary robot's base), position and quaternion (x, y, z, w)
pose_before the same frame at the project's mount
mount {'parent_frame', 'robot_uid', 'pose'}: the recovered sensor body pose, which Apply writes
delta ΔT in the sensor body frame: position_m, rotation_deg (a rotation vector), norm_mm, angle_deg. The pose is T_world_sensor · ΔT · T_sensor_optical, the convention of the synthetic episodes' mount_slip fault and of extrinsic_delta
delta_optical the same correction in the optical frame
sigma position_mm, rotation_deg per axis (the largest of the three estimates below); hessian, cluster_robust, bootstrap; covariance (6 × 6, m and rad)
frames_used, frame_times_s the frames the estimate used
observable, why, observability the observability test (below) in words and figures
fit IoU and chamfer before and after, the edge RMS, residual counts, per-frame figures
scale one pixel of the working image at the robot's median contour depth (mm_per_px, deg_per_px)
overlay a thumbnail (base64 PNG) of the frame with the largest silhouette, with outlines before and after
render the renderer (GPU), MuJoCo version, render count
method, settings, defaults, notes, seconds

The estimate never reads the dataset's ground-truth sidecar.

Method

Frames. Up to max_frames (default 12) frames are chosen by farthest-point sampling (max-norm) on the joint vectors q(t) at the frames' timestamps. q(t) is interpolated linearly per joint from the state rows. Joints the episode does not record stay at home.

Image features, at each level of a pyramid (default scales 1/4, 1/2 and 1 of a working image at most max_width = 640 px wide; levels narrower than 160 px are left out):

Rendered features at the current estimate: the robot mask S (segmentation owners that are robot links) and its contour points:

Points next to a nearer body (an object in front of the robot) or within 2 px of the image border are left out. Each point is back-projected with its rendered depth along the lens model's ray to a world point X. One point per point_spacing_px cell is kept (default 3 px), at most max_points (400) per frame. For the foreground residuals, only outer points away from the majority mask M are used (M = pixels inside S in more than half of the frames, dilated by 2 px). There the observed F's boundary is the robot's own outline; elsewhere the median background is the robot itself.

Residuals. A point projecting to u, matched to edge pixel e with normal n_e, has the point-to-tangent residual r = n_e · (u − e). It counts only when the distance transform at u is within the truncation τ. τ is truncate_px (10 px) at the coarsest level and tightens as the levels refine, τ_L = max(3, 10 · s₀ / s_L): 10, 5 and 3 px at 1/4, 1/2 and 1. The loss is Huber with threshold huber_px (1 px). An out-of-range point costs as much as a residual at τ, so pushing points out of range is not free. The foreground residuals are weighted by mask_weight (1).

Optimisation of ΔT, ξ = (ρ, φ) composed on the right, D ← D · Exp(ξ):

  1. Coarse search on the coarsest level: a pattern search over the twelve moves ±step along and about the sensor body axes, each move rendered (no gradient). The cost is J = mean truncated chamfer / τ + iou_weight · (1 − IoU), where the IoU compares the observed F with the predicted foreground S_i XOR M. Steps start at 4 coarse pixels at the robot's median depth and halve down to ½ px.
  2. Levenberg–Marquardt on every level, coarse to fine. The contour points are re-rendered at each outer iteration (default 4) and held fixed for the inner iterations (default 8), because the contour generator slides over curved links as the pose changes. The Jacobian is analytic in the pose and the edge: ∂p/∂ρ = −R_soᵀ, ∂p/∂φ = R_soᵀ [y]ₓ (y the point in the current sensor body frame, p in the optical frame) and ∂r/∂u = n_eᵀ. The lens projection's ∂u/∂p is by central differences of CameraModel.project, so every lens model (pinhole, Brown–Conrady, Kannala–Brandt, the fisheyes) works the same way.

Uncertainty, at the solution on the finest level:

sigma is the largest of the three per axis.

Observability. I = σ̂⁻² JᵀJ (deduplicated) is scaled by the requirement: N = S I S, S = diag(need_mm × 3 in m, need_deg × 3 in rad) (defaults 5 mm and 0.5°). The estimate is observable when all of these hold:

why names the test that failed: "too small", "too static" (with the largest joint range over the frames), or the weakest eigenvector, named by its dominant component in the optical frame (for example "the camera's rotation about the image's x axis (tilt)").

Drift. drift estimates each episode independently. Between consecutive episodes the change Δ is compared with the combined σ: z = max |Δ| / √(σ_a² + σ_b²). It is a step when z > step_z (3) and the change is beyond the tolerance (tolerance_mm 2 mm or tolerance_deg 0.2°). A least-squares trend per episode is reported from three episodes on.

Status (the page's headline):

All of these thresholds are DexVantage defaults, not standards.

Validation

check reference tolerance measured (2026-11-07, RTX 5080 through EGL device 0)
handeye.silhouette_recovery the generator's sidecar (read after the estimate), synthetic LeRobot episodes (640 × 360, AV1) of the SO-100 third-person and UR5e overhead cameras, a 5 mm and 1° slip from episode 1 (only mount_slip on) 2 px of the working image; every estimate observable; the slip found as a step 1.66 px: SO-100 2.39 and 2.16 mm, 0.30°; UR5e 1.28 and 0.37 mm, 0.03°. Steps found: SO-100 5.5 mm and 0.96° (truth 5.0 mm and 1.0°), UR5e 5.9 mm and 1.00°
handeye.silhouette_vs_board the board-based bundle adjustment (core/calib/handeye.py) of a simulated ChArUco capture (15 planned poses) of the same SO-100 rig with the same slip 2 px; the board solve within 0.5 mm and 0.05° of the truth 1.65 px (2.12 mm, 0.30°); the board solve 0.039 mm and 0.005° from the truth

The tolerance is in pixels of the working image so every rig is held to the same image-space standard. One pixel is 1.9 mm sideways at the SO-100's contour depth through its third-person camera (fx 320 px at 640 px wide) and 0.18°. For the UR5e's overhead D435 (fx 466 px) it is 1.1–1.8 mm and 0.12°. In quick mode the recovery check runs the UR5e only (1.13 px, 16 s); the full checks take 35 s and 8 s.

Other measurements (in-memory renders, no codec, 640 × 360, 12 frames, 2026-11-07):

The board-based solve is 20–50 times sharper than the silhouette. The silhouette's value is that it needs no board and runs on every episode.

tests/test_render_calib.py covers the following:

Known limits

References

Barrow et al. 1977 (chamfer matching); Borgefors 1988 (hierarchical chamfer matching); Canny 1986; Liu, Tuzel, Veeraraghavan and Chellappa 2010 (fast directional chamfer matching); Efron 1979 (the bootstrap); Liang and Zeger 1986 (cluster-robust covariance); OpenCV distanceTransformWithLabels; MuJoCo 3.17.0 cameras (docs/models/groundtruth.md). Keys in dexvantage/validation/references.py: barrow1977, borgefors1988, canny1986, liu2010_fdcm, opencv_distance_transform, efron1979, liang_zeger1986, mujoco_camera_317.