Instructions to use facebook/sam-3d-objects with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- SAM 3D Objects
How to use facebook/sam-3d-objects with SAM 3D Objects:
from inference import Inference, load_image, load_single_mask from huggingface_hub import hf_hub_download path = hf_hub_download("facebook/sam-3d-objects", "pipeline.yaml") inference = Inference(path, compile=False) image = load_image("path_to_image.png") mask = load_single_mask("path_to_mask.png", index=14) output = inference(image, mask) - Notebooks
- Google Colab
- Kaggle
Results for SAM 3D on living organisms (blind human votes, with reference photos)
I run Taxon3D, a blind pairwise arena where people compare two anonymised 3D models of a named
organism, with CC-licensed photos of the real thing beside them. SAM 3D is on the image-to-3D
board with a Bradley-Terry score of 941, 95% interval 872 to 991, over 126 head-to-head games,
which is the most games of any model in the set. Its record against every opponent is here:
https://taxon3d.org/models/fal:sam-3d?c=hf-sam3d
Every task ships the input photo, so you can see exactly what the model was given. The set is
plants, fungi and animals, which are harder than props: thin surfaces, branching, self-occlusion.
That last part is where the interesting failures are, and they are visible per task rather than
averaged away.
If a newer checkpoint appears I will run it on the same tasks. Code is MIT and the votes are
published on Hugging Face.
Happy to answer questions about the protocol.