Downloads · 30 days
0
WeReCooking/sapiens2-onnx
sapiens2-onnx is a depth estimation model from WeReCooking. Use it for the depth estimation task on the model card, and read the license before you ship it in a product. It is set up for sapiens2. The card lists the license as other.
CPU-friendly ONNX exports of Meta's facebook/sapiens2-. 15 task heads across 4 tasks and 4 sizes.
Downloads · 30 days
0
Access
Public
Updated May 12, 2026
Repo size
62.8 GB
Likes
0
Public
Click a slice to open those files.
.data62.6 GB · 100%
From the Hugging Face model README
CPU-friendly ONNX exports of Meta's facebook/sapiens2-*. 15 task heads across 4 tasks and 4 sizes.
Each task has its own folder. Each model is split into a small .onnx graph file plus a .onnx.data external sidecar (both must live in the same directory at download time).
| Task | 0.4b | 0.8b | 1b | 5b |
|---|---|---|---|---|
| seg | seg/seg_0.4b_fp16.onnx (777 MB, fp16) | seg/seg_0.8b_fp32.onnx (3.3 GB) | seg/seg_1b_fp32.onnx (5.9 GB) | seg/seg_5b_int8.onnx (5.2 GB) |
| normal | normal/normal_0.4b_fp32.onnx (1.7 GB) | normal/normal_0.8b_fp32.onnx (3.5 GB) | normal/normal_1b_fp32.onnx (6.2 GB) | normal/normal_5b_int8.onnx (6.1 GB) |
| pointmap | pointmap/pointmap_0.4b_fp32.onnx (2.0 GB) | pointmap/pointmap_0.8b_fp32.onnx (3.9 GB) | pointmap/pointmap_1b_fp32.onnx (6.5 GB) | pointmap/pointmap_5b_int8.onnx (6.2 GB) |
| pose | pose/pose_0.4b_fp32.onnx (1.6 GB) | pose/pose_0.8b_fp32.onnx (3.4 GB) | pose/pose_1b_fp32.onnx (6.1 GB) | not shipped |
Cosine similarity vs the PyTorch reference is 0.999 or better on every shipped file.
import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
# Download both the .onnx graph and the .onnx.data sidecar side by side
for fn in ("seg/seg_0.4b_fp16.onnx", "seg/seg_0.4b_fp16.onnx.data"):
hf_hub_download(repo_id="WeReCooking/sapiens2-onnx", filename=fn, local_dir=".")
sess = ort.InferenceSession("seg/seg_0.4b_fp16.onnx", providers=["CPUExecutionProvider"])
# Input expects (N, 3, 1024, 768) fp32 BGR mean-subtracted preprocessed tensor
out = sess.run(None, {"input": preprocessed})
For a standalone CLI without sapiens2 or PyTorch, see app.py onnx ... in the source Space WeReCooking/sapiens2-cpu.
Same as upstream facebook/sapiens2-*.