Parameters
ImageInput
required
RGB image as file path, URL, PIL Image, or numpy array.
float | None
Optional timeout in seconds for the HTTP request.
Optional[Union[str, Sequence[str]]]
Keyword-only. Optional selection of maps to return —
"depth", "normals", or a non-empty subset of both. None (default) returns both. Requesting only what you need shrinks the response payload (normals are 3x the size of depth).Returns
Dict with the requested subset of:"depth": (H, W) float32 array, metric depth in metres."normals": (H, W, 3) float32 array, unit surface normals.
Example
Example Output
Depth
The depth map contains per-pixel metric distance in meters. Brighter regions (yellow/white) are farther from the camera; darker regions (purple/black) are closer. Values are absolute metric depth — larger values mean greater distance, and you can directly compare values across different images.Surface Normals
Surface normals represent the direction each surface faces as a unit vector(x, y, z). In the RGB visualization, each channel maps to an axis: red = +x (right), green = +y (down), blue = +z (away from camera). Flat surfaces appear as uniform color; edges and curves show color transitions. Normals are mapped to RGB as (normal + 1) / 2 * 255 for display.