BioMedIA / deepali

Image, point set, and surface registration in PyTorch.
https://biomedia.github.io/deepali/
Apache License 2.0
26 stars 6 forks source link

Fix calculation of bending energy #114

Closed aschuh-hf closed 1 year ago

aschuh-hf commented 1 year ago

The bending_loss multiplies the mixed partial derivatives with a factor of two before taking the square.

https://github.com/BioMedIA/deepali/blob/ea3c16d1217877592dc68756f8d78c4363c2c5c5/src/deepali/losses/functional.py#L1210-L1214

The factor 2 should however just account for the missing squared partial derivative term, which is not included in the return value of the spatial_derivatives() function because these two terms are expected to have equal value.