grounding_dino_tiny / README.md
IMvision12's picture
Upload README.md with huggingface_hub
b1f44fd verified
|
Raw
History Blame Contribute Delete
1.03 kB
---
library_name: kerasformers
pipeline_tag: zero-shot-object-detection
license: apache-2.0
tags:
- keras
- kerasformers
- grounding-dino
- tf
- jax
- pytorch
---
# grounding_dino_tiny
Grounding DINO performs open-set, text-grounded object detection: a Swin backbone and a BERT text encoder feed a cross-modality transformer that grounds free-form text prompts to boxes.
Pure-Keras 3 model in [kerasformers](https://github.com/IMvision12/KerasFormers). The repo is self-describing: `kf_config.json` holds the architecture and `tokenizer.json` the text tokenizer, so it loads by its Hub repo id (weights download automatically):
```python
from kerasformers.models.grounding_dino import (
GroundingDinoDetect,
GroundingDinoProcessor,
)
model = GroundingDinoDetect.from_weights("kerasformers/grounding_dino_tiny")
processor = GroundingDinoProcessor.from_weights("kerasformers/grounding_dino_tiny")
inputs = processor(images=image, text="a cat. a remote control.")
outputs = model(inputs) # logits + pred_boxes
```