depth_anything_3
depth_anything_3
#
Depth Anything 3, run by cgr.depth inside the GPU interpreter.
Only torch, numpy and PIL are imported here, never capturegraph: this is a
standalone script, so its argument parsing, image loading and output writing
are its own (pi3.py repeats them for the same reason). The model runs at
its own processing resolution; every output is resampled to the staged
image's size.
python depth_anything_3.py --images DIR --weights DIR --output DIR [--multiview]
Reads NNNNN.<ext> from --images in sorted order and writes, per image,
NNNNN.npy (float32 depth) and NNNNN_conf.npy (float32 confidence in
[0, 1]) into --output. With --multiview the images are posed
together and cameras.json (camera-to-world 4×4 and pixel intrinsics per
image, OpenCV convention), points.npy (N×3 float32) and colors.npy
(N×3 uint8) are written beside them.
main()
#
Predict depth for every staged image and write the contract's outputs.