Instructions to use keras/sam_base_sa1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/sam_base_sa1b with KerasHub:
import keras_hub # Create a ImageSegmenter model task = keras_hub.models.ImageSegmenter.from_preset("hf://keras/sam_base_sa1b")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/sam_base_sa1b") - Keras
How to use keras/sam_base_sa1b with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://keras/sam_base_sa1b") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,6 +4,7 @@ license: apache-2.0
|
|
| 4 |
tags:
|
| 5 |
- image-segmentation
|
| 6 |
- keras
|
|
|
|
| 7 |
---
|
| 8 |
## Model Overview
|
| 9 |
The Segment Anything Model (SAM) produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a dataset of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks. This model is supported in both KerasCV and KerasHub. KerasCV will no longer be actively developed, so please try to use KerasHub.
|
|
|
|
| 4 |
tags:
|
| 5 |
- image-segmentation
|
| 6 |
- keras
|
| 7 |
+
pipeline_tag: image-segmentation
|
| 8 |
---
|
| 9 |
## Model Overview
|
| 10 |
The Segment Anything Model (SAM) produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a dataset of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks. This model is supported in both KerasCV and KerasHub. KerasCV will no longer be actively developed, so please try to use KerasHub.
|