Instructions to use keras/siglip2_so400m_patch16_512 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/siglip2_so400m_patch16_512 with KerasHub:
import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/siglip2_so400m_patch16_512") - Keras
How to use keras/siglip2_so400m_patch16_512 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/siglip2_so400m_patch16_512") - Notebooks
- Google Colab
- Kaggle
Download image_converter.json from keras/siglip2_so400m_patch16_512: direct link, hf CLI and curl.
- Browser
- Download file 931 Bytes
-
https://huggingface.co/keras/siglip2_so400m_patch16_512/resolve/main/image_converter.json
- Command line
-
hf download hf://keras/siglip2_so400m_patch16_512/image_converter.json
-
curl -L -o image_converter.json https://huggingface.co/keras/siglip2_so400m_patch16_512/resolve/main/image_converter.json
931 Bytes
| { | |
| "module": "keras_hub.src.models.siglip.siglip_image_converter", | |
| "class_name": "SigLIPImageConverter", | |
| "config": { | |
| "name": "sig_lip_image_converter", | |
| "trainable": true, | |
| "dtype": { | |
| "module": "keras", | |
| "class_name": "DTypePolicy", | |
| "config": { | |
| "name": "float32" | |
| }, | |
| "registered_name": null | |
| }, | |
| "image_size": [ | |
| 512, | |
| 512 | |
| ], | |
| "scale": [ | |
| 0.00784313725490196, | |
| 0.00784313725490196, | |
| 0.00784313725490196 | |
| ], | |
| "offset": [ | |
| -1.0, | |
| -1.0, | |
| -1.0 | |
| ], | |
| "interpolation": "bicubic", | |
| "antialias": true, | |
| "crop_to_aspect_ratio": false, | |
| "pad_to_aspect_ratio": false, | |
| "bounding_box_format": "yxyx" | |
| }, | |
| "registered_name": "keras_hub>SigLIPImageConverter" | |
| } |