trzy / FasterRCNN

Clean and readable implementations of Faster R-CNN in PyTorch and TensorFlow 2 with Keras.
137 stars 32 forks source link

Buggy implementation of smooth L1 loss #2

Closed flovst closed 1 year ago

flovst commented 1 year ago

The implementation in pytorch/model/detector/regression_loss (line 144) seems to apply x (instead of x_abs) in the case selection. Simply changing is_negative_branch = (x < (1.0 / sigma_squared)) to is_negative_branch = (x_abs ...). shall fix it.

Thank you for this project!

trzy commented 1 year ago

Good eye, thank you! Fixed.