huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.15k stars 26.07k forks source link

`target_sizes` in Owlv2 `post_process_image_guided_detection` #31915

Closed catalys1 closed 1 month ago

catalys1 commented 1 month ago

System Info

N/A

Who can help?

No response

Information

Tasks

Reproduction

In post_process_image_guided_detection (link), there's no check for when target_sizes = None, so calling it without providing target_sizes raises an error.

Expected behavior

The case where target_sizes is None should be handled, as done in post_process_detection (link)

amyeroberts commented 1 month ago

Hi @catalys1, thanks for raising! Would you like to open a PR to address this? This way you get the github contribution for spotting the error and the fix

catalys1 commented 1 month ago

I've submitted a pull request