Instructions to use feyninc/multimatte with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- nobg
How to use feyninc/multimatte with nobg:
pip install nobg
# Option 1: use via the predict method from nobg import AutoModel, AutoProcessor model = AutoModel.from_pretrained("feyninc/multimatte").eval() processor = AutoProcessor.from_pretrained("feyninc/multimatte") cutout = model.predict(processor, "image.jpg", "prompt")# Option 2: use the model and processor directly import torch from loadimg import load_img from nobg import AutoModel, AutoProcessor model = AutoModel.from_pretrained("feyninc/multimatte").eval() processor = AutoProcessor.from_pretrained("feyninc/multimatte") image = load_img("image.jpg").convert("RGB") inputs = processor(image, return_tensors="pt") with torch.no_grad(): outputs = model(pixel_values=inputs["pixel_values"]) alpha = processor.post_process_alpha_matting(outputs, target_sizes=[(image.height, image.width)])[0] processor.cutout(image, alpha).save("output.png") - Notebooks
- Google Colab
- Kaggle
Push model using huggingface_hub.
Browse filesFiles changed (2)
- README.mdAdded+51
- model.safetensorsAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051---library_name: nobglicense: apache-2.0tags:- model_hub_mixin- nobg- nobg-sam3- pytorch_model_hub_mixin---
<p align="center"><img src="https://usefeyn.com/feyn/feyn_mark.svg"/></p>
This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration.
Library: [nobg](https://github.com/feyninc/nobg)
## how to load```pip install nobg```
use the AutoModel class```pythonfrom nobg import AutoModel, AutoProcessormodel = AutoModel.from_pretrained("feyninc/multimatte")processor = AutoProcessor.from_pretrained("feyninc/multimatte")model.predict(processor, image)```or you can use the model class directly```pythonfrom nobg import Sam3model = Sam3.from_pretrained("feyninc/multimatte")```
## CitationIf you use this model, please cite:```bibtex@article{sam3, title={SAM 3: Segment Anything with Concepts}, author={Carion, Nicolas and Gustafson, Laura and Hu, Yuan-Ting and Debnath, Shoubhik and Hu, Ronghang and Suris, Didac and Ryali, Chaitanya and Alwala, Kalyan Vasudev and Khedr, Haitham and Huang, Andrew and Lei, Jie and Ma, Tengyu and Guo, Baishan and Marks, Markus and Greer, Joseph and Wang, Meng and Sun, Peize and R{\"a}dle, Roman and Afouras, Triantafyllos and Mavroudi, Effrosyni and Dollar, Piotr and Ravi, Nikhila and Saenko, Kate and Zhang, Pengchuan and Feichtenhofer, Christoph}, journal={arXiv preprint}, year={2025}, url={https://ai.meta.com/research/publications/sam-3-segment-anything-with-concepts/},}```
## ContributionsAny contributions are welcome at https://github.com/feyninc/nobg123version https://git-lfs.github.com/spec/v1oid sha256:ace8a4b1970313ff46429a673d71db031373412911530a82162d3c4b09f6fa16size 3361696392README.mdAdded+51
model.safetensorsAdded+3