Skip to main content
Glama

Create depth from 2D

create_depth_from_2d

Converts any 2D image or video TOP into a depth map using Depth Anything v2 with NVIDIA TensorRT/ONNX, no depth sensor required. Outputs depth TOP path directly for displacement, pop field, or silhouette.

Instructions

Wraps TDDepthAnything v2 (community TOX by IntentDev) to convert any 2D image/video TOP into a depth map TOP using Depth Anything v2 via NVIDIA TensorRT/ONNX — no Kinect or RealSense required. Given a source TOP path, drops the TOX into a fresh container, wires the source, exposes a depth Null TOP whose path can be fed directly into create_depth_displacement, create_depth_pop_field, or create_depth_silhouette. Requires the user to have installed TDDepthAnything.tox from https://github.com/IntentDev/TDDepthAnything and an NVIDIA GPU with CUDA + TensorRT pre-built weights (.engine/.onnx). NOT supported on macOS. First cook may take 30–60 s for engine compile. Returns container_path, dropped_tox_path, depth_top_path (the key output), source_top_path, output_resolution, model_variant, and warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_top_pathYesAbsolute TD path of the 2D source TOP (movieFileInTOP / videoDeviceInTOP / NDI-in / any cooked TOP). Required.
tox_pathNoOverride path to TDDepthAnything.tox. When omitted, candidates are tried in order. Set this when the TOX lives outside ~/Documents/Derivative.
output_resolutionNoSquare inference resolution. Lower = faster, higher = sharper depth edges. Default 512 matches Depth Anything v2 sweet spot on a 30-series GPU.512
model_variantNoDepth Anything v2 model size. small = ~25 ms/frame on RTX 3070, large = ~80 ms but cleaner edges. The TOX must have the matching .engine/.onnx weight on disk.small
parent_pathNoParent network for the depth_from_2d baseCOMP./project1
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses key behaviors: it creates a container, drops a TOX, wires the source, and exposes a depth Null TOP. It warns of a 30-60s first cook for engine compile. It lists return values. Annotations (destructiveHint: false, openWorldHint: true) are consistent with creating but not destroying. It could more explicitly state that it modifies the network by adding nodes, but overall transparency is good.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core action. It efficiently combines the technical concept, requirements, limitations, and output details in a few sentences. Each sentence adds value, though it could be slightly trimmed without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (reliance on third-party TOX, CUDA, TensorRT) and lack of output schema, the description covers essential aspects: purpose, dependencies, first-cook delay, output paths, and integration with siblings. It lacks explicit error handling or TOX-not-found scenarios, but overall provides sufficient context for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents each parameter's purpose, defaults, and constraints. The description adds value by explaining how outputs (especially depth_top_path) are used by sibling tools, but does not enrich parameter meanings beyond the schema. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: converting any 2D image/video TOP into a depth map TOP using Depth Anything v2 via NVIDIA TensorRT/ONNX. It specifies the technique, dependencies, and distinguishes it from hardware-based depth solutions. The mention of sibling tools (create_depth_displacement, etc.) further clarifies its role in a pipeline.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear when-to-use context: for depth map generation from 2D without requiring depth sensors. It outlines prerequisites (NVIDIA GPU, CUDA, TensorRT, manual installation of .tox) and explicitly states it is not supported on macOS. However, it does not explicitly contrast with alternative depth methods or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pantani/tdmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server