Closed mshooter closed 1 year ago
That should not be possible since each term in equation (6) of the paper is non-negative (l2 loss can't be negative, and JSD is lower-bounded by zero). Make sure that you have a) normalised the heatmaps, and b) implemented JSD correctly. My guess is that the heatmaps have not been normalised (each 2D heatmap should sum to one).
I assume that you are trying to create your own implementation of a MargiPose-like loss function without using this package. These days I suggest using Kornia to assist with this, which provides:
dsnt
with spatial_expectation2d
.Thank you for your suggestions! I did try not to implement it myself I mostly used the code that was available. However, I did have to change certain things depending on the dataset.
Could you tell me if your values are getting negative? When I use the loss described in your paper I am getting negative values