Instructions to use zeromodels/sam_vit_huge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasFormers
How to use zeromodels/sam_vit_huge with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use zeromodels/sam_vit_huge with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zeromodels/sam_vit_huge") - Notebooks
- Google Colab
- Kaggle
Update quick start to the current SAM API
Browse files
README.md
CHANGED
|
@@ -43,11 +43,11 @@ import numpy as np
|
|
| 43 |
from PIL import Image
|
| 44 |
from kerasformers.models.sam import (
|
| 45 |
SAMPromptableSegment,
|
| 46 |
-
|
| 47 |
)
|
| 48 |
|
| 49 |
model = SAMPromptableSegment.from_weights("kerasformers/sam_vit_huge")
|
| 50 |
-
processor =
|
| 51 |
|
| 52 |
image = Image.open("your_image.jpg").convert("RGB")
|
| 53 |
inputs = processor(
|
|
|
|
| 43 |
from PIL import Image
|
| 44 |
from kerasformers.models.sam import (
|
| 45 |
SAMPromptableSegment,
|
| 46 |
+
SAMProcessor,
|
| 47 |
)
|
| 48 |
|
| 49 |
model = SAMPromptableSegment.from_weights("kerasformers/sam_vit_huge")
|
| 50 |
+
processor = SAMProcessor.from_weights("kerasformers/sam_vit_huge")
|
| 51 |
|
| 52 |
image = Image.open("your_image.jpg").convert("RGB")
|
| 53 |
inputs = processor(
|