Instructions to use netprojects/SAM-3D-Body-DINOv3-LayerFit-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/SAM-3D-Body-DINOv3-LayerFit-MLX-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download netprojects/SAM-3D-Body-DINOv3-LayerFit-MLX-4bit --local-dir SAM-3D-Body-DINOv3-LayerFit-MLX-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
SAM 3D Body DINOv3 — LayerFit 4-bit MLX
Compact NetProjects build for Apple Silicon; 1.60 GB of safetensors. From an image and a person box, the included runner estimates body-mesh vertices, 3D keypoints, and camera parameters. Quantization is limited to eligible DINOv3 backbone linear layers (affine, group size 64); the rig, decoder and heads are preserved. LayerFit uses geometry sensitivity to allocate 3 and 5 bits at the uniform 4-bit size budget.
Run locally
Tested with Python 3.12, mlx==0.32.4 and mlx-vlm==0.7.11. Download the weights, config, quantization recipe and run_mesh.py from this repository. Read the runner before executing it; it does not fetch files or execute remote model code. Use a single-person crop or provide bounds in pixels (--bbox X1 Y1 X2 Y2).
python -B ./run_mesh.py --model . --image person.jpg --out body.npz
The NPZ contains 18,439 mesh vertices, 70 3D keypoints and camera parameters. The runner does not emit a textured mesh, run person detection, or verify hand refinement. Stock packed loading is not supported by this release; use the included runner and pinned versions.
Validation and limitations
The pilot compared against the community BF16 build on Meta's example photo and three transformations, not ground-truth 3D scans or independent test subjects. Uniform 6-bit tracked BF16 most closely; LayerFit 4-bit reduced mean vertex drift from 0.006880 to 0.005602 model units versus uniform 4-bit on those three transformations at the same weight size. This is not a measurement of absolute reconstruction accuracy. Treat estimates of occluded anatomy as approximate. See the notebook and paper linked from Meta's model card for the upstream method.
Provenance and license
Unofficial quantized derivative of Meta SAM 3D Body DINOv3, starting from the MLX Community BF16 conversion. SAM materials and derivatives are distributed under Meta's SAM License (LICENSE), not Apache-2.0. Meta's Momentum Human Rig is separately made available under Apache-2.0 (LICENSE-APACHE). See NOTICE for attribution and modifications.
- Downloads last month
- -
Quantized
Model tree for netprojects/SAM-3D-Body-DINOv3-LayerFit-MLX-4bit
Base model
facebook/sam-3d-body-dinov3