Nodes/Atlas Camera/Atlas Apply Depth Calibration πŸ“
ComfyUI Node

Atlas Apply Depth Calibration πŸ“

Stop trusting your depth model's guess

By mikejamesvfxΒ·Created 3 months agoΒ·Updated 2 days agoΒ· 1
Atlas Apply Depth Calibration πŸ“
  • depth
  • depth
  • report
β—„scene_typeoutdoorβ–Ί
β—„store_pathatlas_depth_calibration.jsonβ–Ί
β—„enabledtrueβ–Ί
β—„on_extrapolationreportβ–Ί

Monocular depth models are wrong in a very specific, very annoying way: the error is systematic. A Depth Anything build might be consistently off by 30% on outdoor scenes and spot-on indoors - and it'll be wrong the same way every time. Atlas Apply Depth Calibration πŸ“ is the fix for that. It applies a stored correction, fitted once against a known measurement, to every depth map that comes after.

This node is the apply half of a two-node system. Its partner is AtlasFitDepthCalibration, which fits a correction curve from a handful of measured captures (you photograph something, you know how far away it is, the model disagrees) and writes it to a JSON store. This node looks that correction up and rescales your depth accordingly. If you're on a clean pipeline with a well-calibrated solve you may never need it - it exists for the "my camera height comes out 4 m on this one location type" class of problem.

How it works

The lookup is by (depth.model_id, scene_type) - and it's exact or nothing. There's deliberately no near-miss fallback, because a coefficient fitted on a 1.2 m interior wall should absolutely not be rescaling a 200 m exterior. That's the whole design philosophy: a miss is a passthrough that says so in the report, never a silent wrong answer.

The settings you actually touch:

  • scene_type - must match the scene type the correction was fitted under (outdoor, indoor, mountains, aerial, towers_spires, …). Lookup is exact; if you fitted "mountains" and apply "outdoor," you get a passthrough.
  • store_path - the calibration store written by AtlasFitDepthCalibration, default atlas_depth_calibration.json.
  • enabled - off is a pure passthrough, stated in the report. This is the killer feature for A/B testing: you can flip a calibration on and off without rewiring, and compare the downstream camera height.
  • on_extrapolation - what to do when your depth lands outside the range the correction was fitted on. report (default) applies everywhere and tells you how far out it went. nan voids out-of-range samples. Note what it never does: clamp. A clamp would hand you confident depth the fit has no evidence for, which is worse than no depth.

The node outputs the corrected depth and a report. Read the report once - it tells you the fitted range, the sample count, and the improvement percentage, so you can judge whether the calibration is actually earning its keep.

Where it sits in the pipeline

Plumb it right after your depth map is produced and before anything that consumes metric depth - AtlasBoundedBand, the clean-plate layers, the patch nodes. Since the correction is keyed to the depth model's ID, re-running with a different depth backend (say MoGe instead of Depth Anything) just yields a passthrough until you fit a calibration for it too.

Install is the pack's usual clone-and-go; no extra dependencies for the apply half (the fit half wants [neural] since it works against metric depth). One honest caveat: a calibration only ever corrects what you measured. It's a band-aid for systematic bias, not a replacement for a good solve.

CategoryAtlas/03 Β· Depth

Inputs (5)

NameTypeDefaultDescription
depthATLAS_DEPTH_MAPβ€”
scene_typeoptCOMBOoutdoorMust match the scene_type the correction was fitted and stored under. Lookup is exact.
store_pathoptSTRINGatlas_depth_calibration.jsonThe calibration store written by AtlasFitDepthCalibration.
enabledoptBOOLEANtrueOff = passthrough, stated in the report. Use it to A/B a calibration without rewiring.
on_extrapolationoptCOMBOreport'report' applies everywhere and says how far outside the fitted range it went. 'nan' voids out-of-range samples instead β€” never a clamp, which would return confident depth the fit has no evidence for.

Outputs (2)

NameTypeDescription
depthATLAS_DEPTH_MAPβ€”
reportSTRINGβ€”