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
Support for removing combined concept outputs
Hi, forgive me if this is the wrong place to ask this question.
I'm facing an issue where prompts with multiple classes result in some classes being combined. It is the same issue described in the source GroundingDINO repo: https://github.com/IDEA-Research/GroundingDINO/issues/85
It seems that some time after the issue was raised, an argument ("remove_combined") was added. When running inference, setting "remove_combined" to True results in a set of preprocessing steps before get_phrases_from_posmap(...) is called: https://github.com/IDEA-Research/GroundingDINO/blob/main/groundingdino/util/inference.py (Lines 80-95)
After looking through: https://github.com/huggingface/transformers/blob/main/src/transformers/models/grounding_dino/processing_grounding_dino.py, I do not believe the HF GroundingDINO implementation currently performs this set of preprocessing steps.
Am I mistaken, and if I'm not, are there any plans to add support for this?