Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am currently doing some experiments with the Waymo 3D Object Detector Centernet and found out that there is a bug in the CenterNetBoxLoss function.
I trained the model for 2 epochs with the original loss function which results in the following predictions on the val set:
Notably there is a constant yaw offset caused by the false
ops.floor()
operation in the loss function applied on the gt heading.This PR fixes this issue. The following image depicts the predictions after 2 epochs using the fixed loss function.
(Note, that the network has not converged and no NMS has been applied)
The problem probably raised during the conversion from the Tensorflow op tf.math.floormod to Keras ops. However,
tf.math.floormod(a, b)
!=ops.floor(ops.mod(a, b))
but
tf.math.floormod(a, b)
=ops.mod(a, b)
Hence
ops.floor()
simply removes the accuracy of the gt heading during loss computation.Additionally, I implemented a test case for the heading classification (+regression) part of the
CenterNetBoxLoss
.Frameworks & Versions:
@divyashreepathihalli @sampathweb