depth-anything-3-p150 on Tenstorrent p150
Derived from depth-anything/DA3METRIC-LARGE, the metric-depth model of Depth Anything 3 by ByteDance Seed (ByteDance-Seed/Depth-Anything-3), with unmodified weights. Paper: arXiv:2511.10647. Port: changh95/tt-Depth-Anything-3. See the original model card for training details.
Depth Anything 3 metric model (DA3Metric-Large): a DINOv2 ViT-L/14 encoder (304M parameters) and a DPT depth head (30M parameters), 334M parameters in total. One RGB image goes in and is squashed to 518x518 without keeping its aspect ratio; out comes a 518x518 depth map (larger values are farther), optionally resized to the input size. The values are DA3-Metric's depth output, which DA3 converts to metres with the camera's focal length; the server returns them unconverted. The encoder and the depth head run on the chip, and so do the input normalisation and resize for inputs of up to about 4 megapixels.
Runs on Tenstorrent p150 (mesh P150).
Packaged and published with tt-model-manager 0.1.0 (manifest schema 5.1).
At a glance
| Hardware | p150 |
| License | apache-2.0 |
Intended use
Monocular relative depth from single RGB images and video frames, for example indoor rooms and driving scenes, for research, prototyping and offline analysis. Distances in metres need a scale from your own reference or DA3's focal-length conversion, whose accuracy is under Expected performance.
Prerequisites
- The Tenstorrent CLI,
tt:uv tool install tenstorrent(or use tt-model alone, see the Quickstart) - Docker
- Tenstorrent hardware: p150
Quickstart
tt serve changh95/depth-anything-3-p150
tt serve downloads the Docker image and the depth-anything/DA3Metric-Large at 4010e39f3634a45bc60553321fb49fb760bd594e weights (into your HF cache; they are not in the image), then starts the model's own HTTP server on port 20000 (or the next free port, if that one is busy). The first start compiles kernels for your device, which takes several minutes; the server is ready when it logs Application startup complete.
Without tt-cli: tt-model serve changh95/depth-anything-3-p150.
Send the sample image of this repo to /predict (JSON in and out) and to /predict_png (the raw file in, a
16-bit depth PNG out), on the port tt serve reported:
curl -sLO https://huggingface.co/changh95/depth-anything-3-p150/resolve/main/media/source_1.png
printf '{"image":"%s"}' "$(base64 -w0 source_1.png)" > req.json
curl -s localhost:20000/predict -H 'Content-Type: application/json' -d @req.json -o resp.json
curl -s localhost:20000/predict_png -H 'Content-Type: image/png' --data-binary @source_1.png -o depth16.png
Capabilities
This package exposes the model's own HTTP server on port 20000, not an OpenAI-compatible chat API β its request and response shapes are the model's own. See the author's notes for the payload it expects.
POST /predict takes one base64 image and returns its depth map in JSON; POST /predict_png takes the raw image
file and returns the depth map as a 16-bit PNG. GET /health and GET /info report the server and device state;
GET /v1/models is a stub, not a chat API.
request field (POST /predict) |
meaning |
|---|---|
image |
base64 PNG or JPEG of one image, at least 8x8 pixels and at most 50 megapixels |
output_format (optional) |
png (default: a base64 16-bit grayscale PNG, uint16 = round(depth * png_scale)), npz (a base64 .npz with the float32 array depth_m, lossless) or json (nested lists rounded to 3 decimals; large) |
png_scale (optional) |
scale of the 16-bit PNG, default 1000: values above 65.535 saturate (counted in saturated_pixels) |
resize_to_original (optional) |
false (default): the 518x518 map of the squashed image; true: resized bilinearly to the input's height and width |
max_depth_m (optional) |
upper clamp of the depth values, default none |
POST /predict_png takes the PNG or JPEG file as the request body and an optional ?png_scale= (default 1000).
It returns the same PNG as /predict's default depth.data (image/png), with the response fields in the
headers X-Shape, X-Original-Size, X-Depth-Scale, X-Saturated-Pixels, X-Stats-M and X-Timing-Ms.
Response of /predict for the sample image (media/source_1.png, 1242x375), PNG data elided:
{"depth": {"format": "png16", "data": "...", "scale": 1000.0, "decode": "depth_m = uint16_value / scale",
"saturation_m": 65.535, "saturated_pixels": 0},
"shape": [518, 518], "original_size": [375, 1242], "model_input_size": [518, 518],
"resized_to_original": false, "units": "metres", "max_depth_m": null,
"stats_m": {"min": 1.6358908414840698, "p05": 1.7482123374938965, "median": 4.446812152862549,
"p95": 20.08553695678711, "max": 42.521080017089844},
"timing_ms": {"preprocess": 6.06, "infer": 14.31, "postprocess": 4.99, "total": 25.36}}
depth.datadecodes to a 518x518 uint16 image (shapeis[height, width]);depth = value / scale.original_sizeis the input's[height, width].- The depth values are DA3-Metric's output for the squashed image, larger is farther. The response labels them
metres(units,stats_m), but they are not calibrated distances (see Limitations). DA3's conversion to metres isfocal * depth / 300, withfocalthe camera focal length in pixels at the 518x518 model input, for example(fx * 518 / width + fy * 518 / height) / 2. stats_mare the minimum, 5th percentile, median, 95th percentile and maximum of the returned map.timing_msgives the server-side stages:preprocess(base64 and image decode on the host CPU),infer(upload, device run, readback),postprocess(exp, statistics and PNG encoding on the host CPU) andtotal.- Errors: 400 for an image that cannot be decoded, is smaller than 8x8 or larger than 50 megapixels, or invalid request fields. Until the server is ready, connections to its port are refused or closed without a response.
- A Python API with the same outputs (
tt_depth_anything_3.DepthAnything3; its depth equals/predict'snpzoutput bit for bit) is described inPYTHON.md, with an example inexamples/quickstart.py. It is installed in this package's image; elsewhere it needs a host ttnn build of the tt-metal commit in Provenance withpatches/tt-metal-8b98410.local.patchapplied.
Example output
The depth /predict returns for the three sample frames, resized to the frame size and drawn as inverse depth
with the turbo colormap (near is red, far is blue), scaled per image. Non-commercial use only: the frames are
from the KITTI dataset, Β© the KITTI authors, CC BY-NC-SA 3.0; the KITTI authors do not endorse this work.
Attributions for every file in media/: media/ATTRIBUTION.md.
Expected performance
Depth accuracy against the ground truth of two public benchmarks, beside the published DA3-metric figure and the same model run in fp32 on the CPU with the same input:
| eval | this package | fp32 CPU reference | published (DA3-metric) | images |
|---|---|---|---|---|
| NYUv2 Eigen test, every 3rd image: AbsRel / Ξ΄1, per-image median scaling | 0.059 / 0.959 | 0.059 / 0.959 | β | 218 |
| NYUv2, same images: AbsRel / Ξ΄1, metric (focal conversion) | 0.102 / 0.939 | 0.098 / 0.943 | 0.070 / 0.963 | 218 |
| KITTI Eigen test with annotated depth, every 4th image: AbsRel / Ξ΄1, per-image median scaling | 0.079 / 0.953 | 0.078 / 0.954 | β | 163 |
| KITTI, same images: AbsRel / Ξ΄1, metric (focal conversion) | 0.188 / 0.541 | 0.186 / 0.547 | 0.086 / 0.953 | 163 |
| Depth PCC against the fp32 CPU reference, mean / minimum | 0.99997 / 0.99968 | β | β | 381 |
Published: the DA3-metric row of Table 11 of the Depth Anything 3 paper, which does not state the split, image
count, crop or input size behind it. NYUv2: the official labeled set, Eigen test split (654 images), every 3rd image, Eigen crop, ground
truth up to 10 m. KITTI: the 652 Eigen test frames with annotated depth (the Hugging Face copy
xcll/kitti_eigen_test_652), every 4th frame, Garg crop, ground truth up to 80 m. Median scaling multiplies each
depth map by the ratio of the medians of ground truth and prediction (relative depth); the metric rows convert
with focal * depth / 300 (focal in pixels at the 518x518 input; NYUv2 toolbox intrinsics, KITTI calibration of
each frame's recording day). AbsRel and Ξ΄1 (share of pixels within a factor 1.25) are per-image means. The fp32
CPU reference is the PyTorch DA3-Metric model in code/models/experimental/depth_anything_v3/reference/ with the
same weights and the same 518x518 input.
| speed (batch 1, warm) | input | median | p99 | throughput |
|---|---|---|---|---|
| Device time per image, one trace replay | 518x518 network input from a 1242x375 frame | 14.03 ms | 15.22 ms | 70 images/s (back-to-back replays: 14.32 to 14.39 ms per image, mean of each run) |
Python model(array) call (upload, device run, readback, exp) |
media/source_1.png, decoded uint8 1242x375 |
14.39 ms | 53.73 ms | 69.5 images/s |
Python model(path) call, also decoding the PNG |
media/source_1.png |
20.55 ms | 58.36 ms | 48.7 images/s |
Served POST /predict, server timing_ms.total |
media/source_1.png |
26.68 ms | 41.65 ms | β |
Served POST /predict, client round trip on loopback |
media/source_1.png |
34.80 ms | 51.70 ms | 28.7 requests/s |
Served POST /predict_png, client round trip on loopback |
media/source_1.png |
30.51 ms | 48.49 ms | 32.8 requests/s |
Served POST /predict, 4 concurrent clients |
media/source_1.png |
95.8 ms | 150.5 ms | 40.0 to 41.6 requests/s |
Measured with this package's image on one p150 in an 8-vCPU AMD EPYC-Rome host whose 1-minute load average was
12 to 18 during the runs, with code/scripts/bench_inproc.py (200 calls after 20 warm-up calls) and
code/scripts/bench_http.py (200 requests per route, one at a time on one keep-alive connection, then 4 clients
with 200 requests each), in 3 runs (median of the runs' medians, highest p99; the throughput of the Python and
one-client served rows is 1000 / median); the served rows add base64 and image decoding, statistics and PNG
encoding on the host CPU to the model call.
Limitations
- Not for driving, robot navigation, obstacle avoidance or any other safety function, and not for measuring distances. The served values are not metric depth: on the evaluation images above, the true distance is about 1.8x (NYUv2) to 2.7x (KITTI) the served value (median of the per-image ratios; 10th to 90th percentile 1.64 to 1.91 on NYUv2 and 2.43 to 2.91 on KITTI). DA3's focal-length conversion gives the metric rows above. Use the output as relative depth, or scale it with a metric reference of your own.
- Not for training or fine-tuning: inference only, with the DA3Metric-Large weights. The other Depth Anything 3 models and their outputs (multi-view depth, camera poses) are not packaged.
- One image per request, batch 1, requests served one at a time. Every image is squashed to 518x518 without keeping its aspect ratio; EXIF orientation is not applied.
- The server prepares the input sizes 1242x375 and 518x518 when it starts. The first request at any other input size builds that size's preprocessing on the chip: it took 0.5 to 1.7 s here, and 7.9 s when its kernels were compiled first; later requests of that size take the normal time. After a new size, the next request of each size prepared before it is also slower once (0.5 s here). Up to 8 input sizes stay prepared.
- Inputs above about 4 megapixels are normalised and resized on the host CPU instead of the chip: a 3840x2160 image took 210 to 250 ms per Python API call here.
- The model's sky-mask output is not computed and no sky masking is applied: sky pixels get a depth value like
any other pixel. Values above 65.535 saturate in the default 16-bit PNG (counted in
saturated_pixels); usenpz, a smallerpng_scaleormax_depth_m. - Accuracy was measured on NYUv2 and KITTI test images only (indoor rooms and driving scenes), at the input sizes 640x480, 1242x375, 1241x376, 1238x374, 1226x370 and 1224x370. Other domains and input sizes were not evaluated.
- The fp32 reference is this package's PyTorch implementation of DA3-Metric; agreement with the upstream
depth_anything_3package was not measured. The Python API was tested inside this package's image only. - One p150 only (one chip): multi-chip meshes are not supported, and other boards were not tested.
- The chip computes in bfloat16. Against the fp32 CPU reference, the depth PCC is 0.99997 on average (minimum 0.99968), and the chip's depth is on average 0.84 % (NYUv2) and 0.25 % (KITTI) smaller.
- Image decoding,
exp, statistics and PNG encoding run on the host CPU, so the latency ofmodel()and of the served requests depends on the host's CPU and rises with its load; the device time does not.
Licensing
- Weights: depth-anything/DA3METRIC-LARGE at commit
4010e39f3634a45bc60553321fb49fb760bd594e, Apache-2.0, downloaded bytt serveat that commit, not redistributed here. Some other Depth Anything 3 models are CC BY-NC 4.0; this one is not. - Port and serving code (
code/): Apache-2.0.code/models/common/lightweightmodule.pyis from tt-metal (Apache-2.0). patches/tt-metal-8b98410.local.patch: the changes the image's tt-metal carries on top of the public commit in Provenance (Blackhole dispatch on Ethernet cores, a row-major reshape fix); tt-metal is Apache-2.0.media/source_1.pngtomedia/source_3.pngare frames of the KITTI dataset, andmedia/result_1.pngtomedia/result_3.pngare this package's outputs for them: non-commercial use only, CC BY-NC-SA 3.0, Β© the KITTI authors, not endorsed by them; seemedia/ATTRIBUTION.md.
Feedback
Questions or problems with this package: open a discussion at https://huggingface.co/changh95/depth-anything-3-p150/discussions β that is what reaches its author. A problem with the tt tooling itself: tt report issue (collects your environment and opens a prefilled issue against tenstorrent/tt-cli). Product feedback: support@tenstorrent.com.
Provenance
The exact sources the image was built from β code/ in this repo is byte-identical to the model code inside the image:
| component | built from |
|---|---|
| tt-metal | 8b98410e730bb504fea43a88609756e34821d91d (dirty tree β the image includes uncommitted changes) |
code/ digest |
95300d96a2cd03de (sha256, first 16 hex digits) |
| built | 2026-11-12T10:55:02+00:00 by tt-model 0.1.0 |
Model tree for changh95/depth-anything-3-p150
Base model
depth-anything/DA3METRIC-LARGE




