Skip to content

no empty label when Grounding Dino detects nothing#45982

Open
catwell wants to merge 1 commit into
huggingface:mainfrom
catwell:pr/grounding-dino-empty
Open

no empty label when Grounding Dino detects nothing#45982
catwell wants to merge 1 commit into
huggingface:mainfrom
catwell:pr/grounding-dino-empty

Conversation

@catwell
Copy link
Copy Markdown

@catwell catwell commented May 14, 2026

What does this PR do?

Avoid this when Grounding Dino returns no result:

list(zip(results["boxes"], results["labels"], results["scores"], strict=True))
# ValueError: zip() argument 2 is longer than argument 1

I tried to fix it at tokenizer level first but other models (e.g. Mistral) expect the empty string.

Code Agent Policy

  • I confirm that this is not a pure code agent PR.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline, Pull Request section?
  • Was this discussed/approved via a Github issue or the forum?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

maybe @yonigozlan or @zucchini-nlp

@github-actions
Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: grounding_dino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant