asus4 / tf-lite-unity-sample

TensorFlow Lite Samples on Unity
834 stars 249 forks source link

Adjustment to SSD Bounding Box Size Calculation to Account for Texture Aspect Ratio #357

Closed kaku-panda closed 1 month ago

kaku-panda commented 1 month ago

Hello,

I have noticed that the current implementation does not fully accommodate textures where the width is greater than the height, leading to inaccurately scaled bounding boxes for wider textures. This PR proposes a solution to dynamically adjust the scaling based on the texture's aspect ratio, ensuring that bounding boxes are correctly scaled regardless of whether the texture is wider or taller.

This adjustment ensures that the bounding boxes are always scaled appropriately, improving the accuracy of the visual representation of detected objects.

asus4 commented 1 month ago

Thank you @kaku-panda !