Instructions to use IDEA-Research/grounding-dino-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IDEA-Research/grounding-dino-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-object-detection", model="IDEA-Research/grounding-dino-base")# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection processor = AutoProcessor.from_pretrained("IDEA-Research/grounding-dino-base") model = AutoModelForZeroShotObjectDetection.from_pretrained("IDEA-Research/grounding-dino-base") - Notebooks
- Google Colab
- Kaggle
Output labels different from labels in input prompt.
Hello, after some experiments it seems that GroundingDino will output different labels from the ones provided in input. I tried with the following prompt: "s = "a chest of drawers. a door. a bed.", thus I expected GroundingDino to find only "chest of drawers", "door" or "bed". Instead one of the output labels is just "a chest". It seems that the first label I provided got truncated. Is this an expected behaviour?
Yes, when you use .post_processing_grounded_object_detection from GroundingDinoProcessor it uses the text_threshold to select the tokens. We could probably return both the original prompt and the thresholded prompt though, feel free to open an issue in the transformers repo