Skip to content

Float for pixels #44

Answered by laclouis5
limesqueezy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

Indeed, this choice was intentional and is designed to avoid any loss of precision during the conversion operations. For instance if you have a workflow where you resize and image and the corresponding annotation to a smaller size, you will lose precision if you keep the coordinates as integers. This can cause issues if you resize back the image/annotation further down your pipeline.

This allows using sub-pixel precision in various operations such as for the computation of the bounding box center, which could result in a non-integer value if the width or height is odd. This can cause issues when using very small bounding boxes of few pixels for instance.

Keeping the coordinates in flo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by limesqueezy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants