Run this model with HF Jobs

Run starifiedwill/DAV2SW on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/starifiedwill/DAV2SW. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/starifiedwill/DAV2SW on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Depth Anything V2 Small, as files a web page can run

The Small model of Depth Anything V2 (commit a561b849, weights depth_anything_v2_vits.pth), packed so that a web page can download it and run it in the visitor's own browser with ONNX Runtime Web. The photo being read never has to leave the visitor's device.

This is not the makers' own release. The model and its weights are theirs; only the packing below is new.

Files

File What it holds
graph.onnx The model's steps, without its weights (it asks for them under weights.f32)
weights-0.bin to weights-4.bin The weights and the grid of positions as 16-bit floats, one stream cut in five
manifest.json How the pieces fit together, and the SHA-256 of every file
LICENSE The makers' license (Apache 2.0)

Reading it

  1. Join the five pieces in order (49,418,240 bytes) and read them as little-endian 16-bit floats, widened to 32-bit.
  2. The first 24,183,040 values are the weights, in the order graph.onnx asks for them: hand them to the runtime as the external data weights.f32 (96,732,160 bytes).
  3. The next 1,370 x 384 values are the model's positions for a 37 x 37 grid of patches, the class token's first.

The graph has two inputs and one output:

  • image: float32, [1, 3, H, W], red, green, blue, prepared as the makers' code prepares it (shorter side to 518, each side a multiple of 14, cubic resize, mean and deviation of ImageNet).
  • pos: float32, [1, 1 + rows x cols, 384], the positions for this picture's grid of patches. For a 37 x 37 picture they are the stored ones; for any other size the patches' part is resized the makers' way (cubic, by the patch counts plus 0.1).
  • depth: relative nearness at the fed size, larger is nearer.

What was changed from the makers' release

  • Exported from their PyTorch code to ONNX with the picture size left free. The positions became a second input, because the makers resize them in plain Python, which an export would fix at one size.
  • The weights are stored as 16-bit floats instead of 32-bit to halve the download. Against the makers' code on the same pixels the depth differs by at most 0.0094 of a picture's depth range (mean at most 0.0007).

License

Apache 2.0, the license of the makers' Small model. Their larger models are under a non-commercial license and are not here.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support