Instructions to use IDEA-Research/grounding-dino-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IDEA-Research/grounding-dino-tiny 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-tiny")# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection processor = AutoProcessor.from_pretrained("IDEA-Research/grounding-dino-tiny") model = AutoModelForZeroShotObjectDetection.from_pretrained("IDEA-Research/grounding-dino-tiny") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -39,6 +39,7 @@ model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
|
|
| 39 |
image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 40 |
image = Image.open(requests.get(image_url, stream=True).raw)
|
| 41 |
# Check for cats and remote controls
|
|
|
|
| 42 |
text = "a cat. a remote control."
|
| 43 |
|
| 44 |
inputs = processor(images=image, text=text, return_tensors="pt").to(device)
|
|
|
|
| 39 |
image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 40 |
image = Image.open(requests.get(image_url, stream=True).raw)
|
| 41 |
# Check for cats and remote controls
|
| 42 |
+
# VERY important: text queries need to be lowercased + end with a dot
|
| 43 |
text = "a cat. a remote control."
|
| 44 |
|
| 45 |
inputs = processor(images=image, text=text, return_tensors="pt").to(device)
|