Bounding boxes

Why is fastai’s bounding box system is between -1 and 1 .Its pretty difficult to work with it while 0 and 1 seems as a nice way to work with. Can somebody guide me?. I want to know how i can scale those back to the original bboxes to be plotted in the image.

I may assume that It is far easier to scale picture in every direction when 0 represents center of picture (pivot)

It may also be more convenient for the network to count offset from the center rather than from the corner.

TensorBBox use PointScaler which is responsible for scaling BBoxes. In the docs:

To work with data augmentation, and in particular the grid_sample method, points need to be represented with coordinates going from -1 to 1 (-1 being top or left, 1 bottom or right) , which will be done unless you pass do_scale=False .

So you can switch it off if you want to.


Exactly this. A unique feature of fastai is its ability to augment points extremely well, and this is why.


Thank you everyone