anibali / margipose

3D monocular human pose estimation
Apache License 2.0
98 stars 20 forks source link

Loss values #37

Closed mshooter closed 1 year ago

mshooter commented 1 year ago

Could you tell me if your values are getting negative? When I use the loss described in your paper I am getting negative values

anibali commented 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:

mshooter commented 1 year ago

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.