tensorflow / addons

Useful extra functionality for TensorFlow 2.x maintained by SIG-addons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`tfa.losses.GIoULoss` docs not clear about input format

VachanVY opened this issue · comments

The bounding box input format is unclear in GIoULoss. Please include in which format the boxes should be in the docs.

As per the source code

Args:
y_true: true targets tensor. The coordinates of the each bounding
box in boxes are encoded as [y_min, x_min, y_max, x_max].
y_pred: predictions tensor. The coordinates of the each bounding
box in boxes are encoded as [y_min, x_min, y_max, x_max].
mode: one of ['giou', 'iou'], decided to calculate GIoU or IoU loss.

include the above in docs

I am stuck here as well. The source code implies that the designated format is min-max, with y before x, which is quite unusual. With addons getting deprecated, I am not certain if we will obtain any clarity on this.

@coder-amey In many keras tutorials, they use box util functions like swap_xy, may be that's a Tensorflow-keras thing. Go according to the source code.