v0.9.19
GroundingDINO bugfixes and enhancements!
Allows users to pass custom box_threshold and text_threshold params to Grounding DINO core model.
Update docs to reflect box_threshold and text_threshold params.
Fixes error by filtering out detections where text similarity is lower than text_threshold and Grounding DINO returns None for class ID.
Fixes images passed to Grounding DINO model being loaded as RBG instead of BGR.
Adds NMS to Grounding DINO, optionally using class agnostic NMS via CLASS_AGNOSTIC_NMS env var.
Try it out:
from inference.models.grounding_dino import GroundingDINO
model = GroundingDINO(api_key="")
results = model.infer(
{
"image": {
"type": "url",
"value": "https://media.roboflow.com/fruit.png",
},
"text": ["apple"],
# Optional params
"box_threshold": 0.5
"text_threshold": 0.5
}
)
print(results.json())
Full Changelog: v0.9.18...v0.9.19