Depth Output

Read with AI
All docs in one file (llms-full.txt)
DepthOutput #ProFx #Node
Depth Output

Estimates depth from the input image and outputs the foreground and background as grayscale.

  • Enable — initial value ON. When OFF, the input passes straight through (it does not go black) (Enable input / enableInput / isEnabled)
  • Inference Every N Frames — how many frames between inferences. Minimum 1, initial value 2. The slider in the node UI is 1-10 (Inference Every N Frames input / skipFramesInput / inferenceEveryNFrames)

The output is relative depth, normalized to 0-1 using the minimum and maximum values of that frame on each inference. It is not an absolute distance, so if the arrangement of subjects on screen changes, the brightness of the same object changes too. For an image with constant depth (min == max) it is a uniform 0.5.

On frames where no inference is performed, the output buffer is not updated and the previous result remains as it is.

The output resolution is the global resolution (it does not follow the input).

On every inference the depth tensor is downloaded to the CPU and transferred via a temporary Texture2D. This is expensive, so raise Inference Every N Frames if it feels heavy.

The output RT is allocated and published 5 frames after startup. When the input is not connected, the output is filled with black.

Input ports

Port IDType
Input TextureRenderTexture
Enablebool
Inference Every N Framesint

Output ports

Port IDType
Depth OutputRenderTexture

Scriptable members

PathType
enableInputbool
skipFramesInputint
isEnabledbool
inferenceEveryNFramesint

Synapse Apps (scripting)

await synapse.modules.create({ type: "DepthOutput" })