Saltar al contenido
ModelPublicadoExterno
Descargar

Sapiens2 Onnx

CPU-friendly ONNX exports of Meta's facebook/sapiens2-. 15 task heads across 4 tasks and 4 sizes.

TipoOtherVersiónRevision 2d6b460Ccalidad

Fuente del modelo

Tipo
Other
Tamaño del archivo
3,59–15,8 MB
Versión
vRevision 2d6b460
Actualizado
10 oct 2026
Descargas
0
Fuente
Hugging Face

Descripción de la fuente

Sapiens2 ONNX

CPU-friendly ONNX exports of Meta's facebook/sapiens2-*. 15 task heads across 4 tasks and 4 sizes.

Folder layout

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).

Task0.4b0.8b1b5b
segseg/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)
normalnormal/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)
pointmappointmap/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)
posepose/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.

Precision notes

  • seg-0.4b is fp16 (50 percent smaller than fp32 and verified cos 0.99999)
  • 0.4b/0.8b/1b for normal, pointmap, pose are fp32. Naive fp16 cast produces NaN (normal L2-normalize divides near zero) or cos around 0.7 (pointmap metric scale, pose sigmoid heatmaps saturate)
  • 5B variants are INT8 (per-channel symmetric, MatMulIntegerToFloat)
  • pose-5b is not shipped (the int8 quantize attempt did not complete on the available hardware)

Inference

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.

License

Same as upstream facebook/sapiens2-*.

Fuentes

1 fuente
Hugging FacePrincipalVersión 2d6b460e42ddb77c9694ca7787e9ca35e00cb9ce
huggingface.co/WeReCooking/sapiens2-onnx/tree/2d6b460e42ddb77c9694ca7787e9ca35e00cb9ce

Verificado 10 oct

Artefactos del modelo

15 artefactos

normal/normal_0.4b_fp32.onnx

onnx · 3,59 MB · SHA-256 a6a98218a68a…3fa0 · Hugging Face

Descargar

normal/normal_0.8b_fp32.onnx

onnx · 4,83 MB · SHA-256 04fbfdd8d825…689b · Hugging Face

Descargar

normal/normal_1b_fp32.onnx

onnx · 6,09 MB · SHA-256 4b05e410dcbc…7126 · Hugging Face

Descargar

normal/normal_5b_int8.onnx

onnx · 15,7 MB · SHA-256 225dd119e061…c599 · Hugging Face

Descargar

pointmap/pointmap_0.4b_fp32.onnx

onnx · 3,65 MB · SHA-256 edd61f29cec8…d6c8 · Hugging Face

Descargar

pointmap/pointmap_0.8b_fp32.onnx

onnx · 4,90 MB · SHA-256 9141804c5d56…e7ca · Hugging Face

Descargar

pointmap/pointmap_1b_fp32.onnx

onnx · 6,16 MB · SHA-256 a2c1323d7d6b…81a3 · Hugging Face

Descargar

pointmap/pointmap_5b_int8.onnx

onnx · 15,8 MB · SHA-256 f8991b83b92e…ac7f · Hugging Face

Descargar

pose/pose_0.4b_fp32.onnx

onnx · 3,60 MB · SHA-256 a995a2c503d4…361b · Hugging Face

Descargar

pose/pose_0.8b_fp32.onnx

onnx · 4,85 MB · SHA-256 4ab377312ef6…8e6a · Hugging Face

Descargar

pose/pose_1b_fp32.onnx

onnx · 6,13 MB · SHA-256 273c7606612e…b113 · Hugging Face

Descargar

seg/seg_0.4b_fp16.onnx

onnx · 3,59 MB · SHA-256 b2cf9f8076e4…ca19 · Hugging Face

Descargar

seg/seg_0.8b_fp32.onnx

onnx · 4,76 MB · SHA-256 6674eed65c83…61be · Hugging Face

Descargar

seg/seg_1b_fp32.onnx

onnx · 6,01 MB · SHA-256 25c3dda38931…7db2 · Hugging Face

Descargar

seg/seg_5b_int8.onnx

onnx · 15,8 MB · SHA-256 366c320c6657…4db9 · Hugging Face

Descargar

Extractos de fuentes

2 extractos

--- license: other tags: - onnx - sapiens2 - cpu - segmentation - pose-estimation - normal-estimation - depth-estimation --- # Sapiens2 ONNX CPU-friendly ONNX exports of Meta's `facebook/sapiens2-*`. 15 task heads across 4 tasks and 4 sizes. ## Folder layout 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. ## Precision notes * seg-0.4b is fp16 (50 percent smaller than fp32 and verified cos 0.99999) * 0.4b/0.8b/1b for normal, pointmap, pose are fp32. Naive fp16 cast produces NaN (normal L2-normalize divides near zero) or cos around 0.7 (pointmap metric scale, pose sigmoid heatmaps saturate) * 5B variants are INT8 (per-channel symmetric, MatMulIntegerToFloat) * pose-5b is not shipped (the int8 quantize attempt did not complete on the available hardware) ## Inference ```python 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`. ## License Same as ups...

Source context: 0 downloads · 0 likes · Pipeline depth-estimation · Library sapiens2 · Repo WeReCooking/sapiens2-onnx