dingfengshi / TriDet

[CVPR2023] Code for the paper, TriDet: Temporal Action Detection with Relative Boundary Modeling
MIT License
160 stars 13 forks source link

some problem in computing offset loss in ctr_giou_loss_1d #8

Closed OpenSorceYCW closed 1 year ago

OpenSorceYCW commented 1 year ago

I found some problem in computing offeset loss, path is: https://github.com/dingfengshi/TriDet/blob/master/libs/modeling/losses.py#L91, it seems lkis = torch.max(lp, lg) rather than lkis = torch.min(lp, lg) ? I can not understand it, please check it , thank you!

dingfengshi commented 1 year ago

Hello, the output of the prediction are the offsets (>=0) from a central point, rather than the left and right coordinates of a segment. Therefore, torch.min(lp, lg) will represent the point closer to the central points.