Instructions to use feyninc/FeyNobg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- nobg
How to use feyninc/FeyNobg with nobg:
pip install nobg
# Option 1: use via the predict method from nobg import AutoModel, AutoProcessor model = AutoModel.from_pretrained("feyninc/FeyNobg").eval() processor = AutoProcessor.from_pretrained("feyninc/FeyNobg") cutout = model.predict(processor, "image.jpg")# 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/FeyNobg").eval() processor = AutoProcessor.from_pretrained("feyninc/FeyNobg") 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
Commit History
-
Update README.md
Verified signaturec1fd67f -
🔨 update tags
Verified signaturec9edb8a
-
update license
Verified signatureas per my internal communication with the original author he did allow us to use apache 2.0 license621cd9b -
Add blogposts
Verified signature77e95a5 -
Update README.md
Verified signature4900c61 -
Update README.md
Verified signaturec1728f9 -
Update README.md
Verified signature042699d
-
Update README.md
Verified signatureba63323
-
Upload processor
Verified signaturec3a45de -
Push model using huggingface_hub.
Verified signature0a29d58 -
initial commit
Verified signature448c023