Nodes/Atlas Camera/Atlas Depth Outlier Mask πŸ›‘
ComfyUI Node

Atlas Depth Outlier Mask πŸ›‘

Find the pixels your depth model hallucinated, before they become stretched shards

By mikejamesvfxΒ·Created 3 months agoΒ·Updated a day agoΒ· 1
Atlas Depth Outlier Mask πŸ›‘
  • depth
  • solve
  • outlier_mask
  • report
β—„relative_threshold0.35β–Ί
β—„mad_threshold6.0β–Ί
β—„dilate_px2β–Ί

Monocular depth is a guess, and occasionally a single pixel guesses wildly wrong. Left alone, that one bad value becomes a frame-spanning stretched shard in your relief mesh - a fin of geometry sticking out of an otherwise clean surface. AtlasDepthOutlierMask finds those local hallucinations and turns them into explicit holes, so the mesh tears around them instead of stretching through them.

It's a quiet, surgical node, and it earns its place by being the difference between "the mesh is fine except this one weird spike" and "I spent an hour chasing a spike."

How it works

The algorithm is right in the pack's catalog: a local 3Γ—3 median plus a robust-MAD detector. "Robust MAD" means median absolute deviation - a measure of how far out a value sits relative to its neighbors, one that isn't fooled by the outliers it's trying to find (unlike a mean-based z-score). A depth value that sticks out beyond the thresholds is marked as an outlier. It's a classic statistical-outlier filter, applied locally per-pixel instead of globally, which is what makes it good at catching isolated hallucinations rather than entire mis-scaled regions.

Inputs and outputs

Required: depth (an ATLAS_DEPTH_MAP), and optionally a solve. Then three thresholds:

  • relative_threshold (default 0.35) - how far, in relative terms, a depth value must sit from the local median to count as an outlier.
  • mad_threshold (default 6) - the same idea in units of the local median absolute deviation. Higher = more tolerant.
  • dilate_px (default 2) - grow the flagged regions by this many pixels. Outliers rarely come in clean singleton pixels; a little dilation catches the halo around a genuinely bad patch.

Outputs: outlier_mask (a MASK - 1 where depth looks hallucinated) and a report string summarizing what was flagged.

How to use it

The mask is designed to be OR-ed into the exclusion path on the relief nodes - AtlasDeriveReliefMesh has a dedicated outlier_mask input for exactly this, and AtlasDeriveProjectionGeometry's exclusion works the same way. Wire it in and those cells become explicit holes instead of stretched shards. If you're on AtlasInput's all-in-one path, this is the kind of thing you'd add once you start taking over individual stages.

The defaults are a reasonable first pass, but scene-dependent: a noisy canopy or foliage plate will flag a lot more than a clean architectural plate, and that's when you raise mad_threshold rather than fighting individual flags.

Install

Same pack, same one-liner:

cd <ComfyUI>/custom_nodes
git clone https://github.com/mikejamesvfx/atlas-camera.git

Restart (or Manager β†’ "atlas-camera"). The node itself is lightweight - the [neural] tier is only required because it consumes an ATLAS_DEPTH_MAP from a depth model. The usual install caveats apply: GeoCalib from GitHub, the kornia<0.8.3 cap that protects LTXVideo, and models auto-downloading from HuggingFace on first run.

It's a brand-new pack with zero community folklore yet, so there's no "set this to X" wisdom circulating - the report string and the tooltips are the ground truth. Start at the defaults, feed the mask into the relief node's outlier_mask input, and only start tuning when a real spike survives.

CategoryAtlas/03 Β· Depth

Inputs (5)

NameTypeDefaultDescription
depthATLAS_DEPTH_MAPβ€”
solveoptATLAS_SOLVEβ€”
relative_thresholdoptFLOAT0.350.05–3β€”
mad_thresholdoptFLOAT6.00.5–50β€”
dilate_pxoptINT20–32β€”

Outputs (2)

NameTypeDescription
outlier_maskMASKβ€”
reportSTRINGβ€”