Instructions to use zeromodels/levit-384 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/levit-384 with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/levit-384") - Keras
How to use zeromodels/levit-384 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/levit-384") - Notebooks
- Google Colab
- Kaggle
Download zm_preprocessor.json from zeromodels/levit-384: direct link, hf CLI and curl.
- Browser
- Download file 674 Bytes
-
https://huggingface.co/zeromodels/levit-384/resolve/main/zm_preprocessor.json
- Command line
-
hf download hf://zeromodels/levit-384/zm_preprocessor.json
-
curl -L -o zm_preprocessor.json https://huggingface.co/zeromodels/levit-384/resolve/main/zm_preprocessor.json
674 Bytes
| { | |
| "library_name": "zeromodels", | |
| "zeromodels_version": "1.2.7", | |
| "preprocessor_module": "zeromodels.models.levit", | |
| "preprocessor_class": "LevitImageProcessor", | |
| "variant": "levit-384", | |
| "size": { | |
| "height": 224, | |
| "width": 224 | |
| }, | |
| "crop_size": { | |
| "height": 224, | |
| "width": 224 | |
| }, | |
| "resample": "bicubic", | |
| "do_resize": true, | |
| "do_center_crop": false, | |
| "do_rescale": true, | |
| "rescale_factor": 0.00392156862745098, | |
| "do_normalize": true, | |
| "image_mean": [ | |
| 0.485, | |
| 0.456, | |
| 0.406 | |
| ], | |
| "image_std": [ | |
| 0.229, | |
| 0.224, | |
| 0.225 | |
| ], | |
| "antialias": true, | |
| "return_tensor": true, | |
| "data_format": null | |
| } |