Nodes/camera-comfyUI/FisheyeDepthEstimator
ComfyUI Node

FisheyeDepthEstimator

Full 180° depth without the fisheye-bow headache

By Alexankharin·Created about a year ago·Updated about a month ago· 36
FisheyeDepthEstimator
  • image
  • depthmap
  • mask
model_nameDepth-Anything-V2-Metric-Indoor-Base-hf
depth_scale1.00
pinhole_fov90.00
pinhole_resolution1024
fisheye_resolution4096
modeAVERAGE
softmerge_radius25
median_blur_kernel1

Depth estimators hate fisheye images. They're trained on rectilinear photos, so a 180° fisheye frame - everything curved, edges stretched - comes back with mush at the borders and wrong geometry in the middle. FisheyeDepthEstimator is this pack's answer: instead of fighting the distortion, it plays the multi-view game. It estimates depth on the full fisheye image, extracts several 90° pinhole views (front, left, right, up, down), estimates depth on each of those, reprojects them back into the fisheye, and fuses everything into one coherent full-FOV depth map.

This node is what makes the locked-off 180° VR camera workflow (fisheye_static_video_to_4d.json) possible - and it's the packaged version of what used to be a manual multi-node graph. The README notes that the old Fisheye_depth_workflow.json did this by hand; this node now performs the whole fusion internally. If you've ever tried to make VR180 depth work, you know this is the part that always broke.

What you set

  • model_name - same Depth Anything V2 metric family as DepthEstimatorNode (Indoor/Outdoor × Small/Base/Large), defaulting to Indoor Base.
  • depth_scale (default 1.0) - output multiplier / unit control.
  • pinhole_fov (default 90°) and pinhole_resolution (default 1024) - the views it extracts for the multi-view pass. 90° is a good balance; narrower views are sharper but need more of them.
  • fisheye_resolution (default 4096) - the working resolution of the output. This is the VRAM lever: 4096 on a moderate GPU gets spicy, drop to 2048 for previews.
  • mode (default AVERAGE) - how the six depth estimates (full + five pinholes) get merged: AVERAGE, SRC, DST, SOFTMERGE, or DISTANCE_AWARE, the same family as CombineDepthsNode.
  • softmerge_radius (default 25) - Gaussian radius for the soft merge when that's your mode.
  • median_blur_kernel (default 1 = off) - speckle scrub on the final map, set odd (3/5) before lifting to points.

Two outputs: depthmap (TENSOR, [B,H,W,1]) and mask (MASK) - the circular mask of the fisheye region itself, which you'll want because the corners of a fisheye frame are empty black and shouldn't become geometry.

The one thing to remember

The output is still Z-depth relative to each view, and the node's fusion has already renormalized the overlaps - but when you push this into point clouds or splats, the pack's ray-depth rule still applies at wide FOVs. Wire ZDepthToRayDepthNode after it before lifting, same as any depth output here.

Install

Shared camera-comfyUI install: Manager → search "camera-comfyUI" → Install, or clone https://github.com/Alexankharin/camera-comfyUI into custom_nodes/ and run python install.py. The Depth Anything V2 weights download automatically on first run; the fusion math is CPU-friendly but the five-view estimation is not - this is a CUDA node in practice, and the multi-view pass means it's several times slower than a single DepthEstimatorNode call.

Troubleshooting

  • Blurry seams between views: switch mode from AVERAGE to DISTANCE_AWARE or SOFTMERGE and raise softmerge_radius; the naive mean is where the smearing comes from.
  • Black corners becoming points: forgot to use the mask output downstream. And it - that's what it's for.
  • OOM at default 4096: drop fisheye_resolution to 2048–3072 for the preview pass.
  • Wrong proportions in VR: the fisheye is 180°; if you built it with pinhole_fov far from 90 the reprojection math gets strained. Keep the defaults until you know you need otherwise.
CategoryCamera/Depth

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
model_nameCOMBODepth-Anything-V2-Metric-Indoor-Base-hf6 options: Depth-Anything-V2-Metric-Indoor-Base-hf, Depth-Anything-V2-Metric-Indoor-Small-hf, Depth-Anything-V2-Metric-Indoor-Large-hf, Depth-Anything-V2-Metric-Outdoor-Base-hf, Depth-Anything-V2-Metric-Outdoor-Small-hf, Depth-Anything-V2-Metric-Outdoor-Large-hf
depth_scaleFLOAT1.000–1000
pinhole_fovFLOAT90.001–179
pinhole_resolutionINT1024
fisheye_resolutionINT409664–8192
modeCOMBOAVERAGE5 options: SRC, DST, AVERAGE, SOFTMERGE, DISTANCE_AWARE
softmerge_radiusINT25Gaussian radius for merging
median_blur_kernelINT11–31Kernel size for median blur of depthmap

Outputs (2)

NameTypeDescription
depthmapTENSOR
maskMASK