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
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,6 +5,7 @@ tags:
|
|
| 5 |
- model_hub_mixin
|
| 6 |
- nobg
|
| 7 |
- pytorch_model_hub_mixin
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
<p align="center">
|
|
@@ -47,4 +48,4 @@ If you use this model, please cite:
|
|
| 47 |
```
|
| 48 |
|
| 49 |
## Contributions
|
| 50 |
-
Any contributions are welcome at https://github.com/feyninc/nobg
|
|
|
|
| 5 |
- model_hub_mixin
|
| 6 |
- nobg
|
| 7 |
- pytorch_model_hub_mixin
|
| 8 |
+
license: cc-by-nc-4.0
|
| 9 |
---
|
| 10 |
|
| 11 |
<p align="center">
|
|
|
|
| 48 |
```
|
| 49 |
|
| 50 |
## Contributions
|
| 51 |
+
Any contributions are welcome at https://github.com/feyninc/nobg
|