Closed Barnonewdm closed 4 years ago
We measure the standard deviation of the Jacobian Det. following the paper "A Deep Learning Framework for Unsupervised Affine and Deformable Image Registration", which quantitatively reflects the smoothness of a deformation field.
I have noticed that the Jacobian Det. is supplied in your code.
def jacobian_det(self, flow):
_, var = tf.nn.moments(tf.linalg.det(tf.stack([
flow[:, 1:, :-1, :-1] - flow[:, :-1, :-1, :-1] +
tf.constant([1, 0, 0], dtype=tf.float32),
flow[:, :-1, 1:, :-1] - flow[:, :-1, :-1, :-1] +
tf.constant([0, 1, 0], dtype=tf.float32),
flow[:, :-1, :-1, 1:] - flow[:, :-1, :-1, :-1] +
tf.constant([0, 0, 1], dtype=tf.float32)
], axis=-1)), axes=[1, 2, 3])
return tf.sqrt(var)
My question is why choose the
tf.sqrt(var)
to represent the Det. of Jacobian. Could you help explain why you choose to compute tf.nn.momnets? The Jacobain Det. should be a map instead of a single value for a given deformation flow.