Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draw_bounding_boxes and save_image require different input dtype #8138

Closed
SeucheAchat9115 opened this issue Dec 3, 2023 · 3 comments · Fixed by #8150 or #8328
Closed

draw_bounding_boxes and save_image require different input dtype #8138

SeucheAchat9115 opened this issue Dec 3, 2023 · 3 comments · Fixed by #8150 or #8328

Comments

@SeucheAchat9115
Copy link

SeucheAchat9115 commented Dec 3, 2023

Hi, when using draw_bounding boxes an image torch.tensor needs to be converted to uint8 dtype because the function expects that dtype. When inserting the image with drawn boxes to save_image, it needs to be converted back to float32 dtype. Can this be changed to easily insert the images to both functions without type conversion?

@NicolasHug
Copy link
Member

Thanks for the report @SeucheAchat9115 , we should add float32 support to the draw_* utils. Would you like to submit a PR for that?

@SeucheAchat9115
Copy link
Author

I think I have no capacity to do that.

@GsnMithra
Copy link
Contributor

Hey @NicolasHug

Can you please re-open this issue? I have lined up a new PR #8276

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants