Instructions to use keras/sam3_pcs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/sam3_pcs with KerasHub:
import keras_hub # Create a ImageSegmenter model task = keras_hub.models.ImageSegmenter.from_preset("hf://keras/sam3_pcs")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/sam3_pcs") - Keras
How to use keras/sam3_pcs with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://keras/sam3_pcs") - Notebooks
- Google Colab
- Kaggle
| { | |
| "module": "keras_hub.src.models.sam3.sam3_tokenizer", | |
| "class_name": "SAM3Tokenizer", | |
| "config": { | |
| "name": "sam3_tokenizer", | |
| "trainable": true, | |
| "dtype": { | |
| "module": "keras", | |
| "class_name": "DTypePolicy", | |
| "config": { | |
| "name": "int32" | |
| }, | |
| "registered_name": null | |
| }, | |
| "config_file": "tokenizer.json", | |
| "sequence_length": null, | |
| "add_prefix_space": false | |
| }, | |
| "registered_name": "keras_hub>SAM3Tokenizer" | |
| } |