uber-research / UPSNet

UPSNet: A Unified Panoptic Segmentation Network
Other
649 stars 120 forks source link

Is the bounding box regression loss different from Mask RCNN? #34

Closed JoyHuYY1412 closed 5 years ago

JoyHuYY1412 commented 5 years ago

https://github.com/uber-research/UPSNet/blob/96b7b5172b7b76446f637f4922b7a2054e46703b/upsnet/models/rcnn.py#L179 You code here just use the coordinates to calculate loss, but original bounding box regression in MaskRCNN uses ground truth like this: tx=(Gx−Px)/Pw, ty=(Gy−Py)/Ph, tw=log(Gw/Pw), th=log(Gh/Ph).

Does it matter?

YuwenXiong commented 5 years ago

This is regular smooth l1, we calculate regression target here: https://github.com/uber-research/UPSNet/blob/4da1b65bbd79212ec78f29f359063eb93a8f4ab6/upsnet/bbox/bbox_transform.py#L114

JoyHuYY1412 commented 5 years ago

This is regular smooth l1, we calculate regression target here:

https://github.com/uber-research/UPSNet/blob/4da1b65bbd79212ec78f29f359063eb93a8f4ab6/upsnet/bbox/bbox_transform.py#L114

Sorry, but I cannot find in your code where you use this function. Could you point out?

JoyHuYY1412 commented 5 years ago

This is regular smooth l1, we calculate regression target here:

https://github.com/uber-research/UPSNet/blob/4da1b65bbd79212ec78f29f359063eb93a8f4ab6/upsnet/bbox/bbox_transform.py#L114

Do you mean this one? https://github.com/uber-research/UPSNet/blob/4da1b65bbd79212ec78f29f359063eb93a8f4ab6/upsnet/bbox/bbox_transform.py#L332