Instructions to use zeromodels/efficientdet_d2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/efficientdet_d2 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/efficientdet_d2") - Keras
How to use zeromodels/efficientdet_d2 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://zeromodels/efficientdet_d2") - Notebooks
- Google Colab
- Kaggle
Download zm_config.json from zeromodels/efficientdet_d2: direct link, hf CLI and curl.
- Browser
- Download file 906 Bytes
-
https://huggingface.co/zeromodels/efficientdet_d2/resolve/main/zm_config.json
- Command line
-
hf download hf://zeromodels/efficientdet_d2/zm_config.json
-
curl -L -o zm_config.json https://huggingface.co/zeromodels/efficientdet_d2/resolve/main/zm_config.json
906 Bytes
| { | |
| "library_name": "zeromodels", | |
| "zeromodels_version": "1.2.6", | |
| "model_module": "zeromodels.models.efficientdet", | |
| "model_class": "EfficientDetModel", | |
| "variant": "efficientdet_d2", | |
| "weights": "model.weights.h5", | |
| "schema_version": 2, | |
| "weight_dtype": "float32", | |
| "model_type": "efficientdet", | |
| "vision_config": { | |
| "backbone_name": "efficientnet_b2", | |
| "image_size": 768, | |
| "num_classes": 90, | |
| "min_level": 3, | |
| "max_level": 7, | |
| "num_scales": 3, | |
| "aspect_ratios": [ | |
| 1.0, | |
| 2.0, | |
| 0.5 | |
| ], | |
| "anchor_scale": 4.0, | |
| "fpn_num_filters": 112, | |
| "fpn_cell_repeats": 5, | |
| "box_class_repeats": 3, | |
| "act_type": "swish", | |
| "separable_conv": true, | |
| "apply_bn_for_resampling": true, | |
| "conv_after_downsample": false, | |
| "conv_bn_act_pattern": false, | |
| "fpn_weight_method": "fastattn", | |
| "survival_prob": null | |
| } | |
| } |