Closed zhenyu202020 closed 1 year ago
Hi @zhenyu202020,
Which Jacobian_determinant
function are you using? I guess the problem is in the Jacobian_determinant
. Because for any identity deformation (empty displacement), the Jacobian determinant should be 1 ("after *-1 should be -1), but your function returns 0. Perhaps you should add the identity grid to the F_BA
before using this function.
Thank you very much for your reply! I have changed the calculation function and added the identity grid as follows, but still have the problem. I've tested 20 consecutive numbers and they're all zero.
Could you use F_BA*0.0
as input for the Jaco function to see if the function works properly or not?
I see the problem. The "F.relu" is an inplace operation. Try removing the "F.relu" operation.
As you said we used F_BA*0.0 as input, and the results are shown below: I've removed the "F.relu" operation, but there is still a problem I've tested 20 consecutive numbers and they're still all zero.
The result is correct now. You can see most values in neg_Jet
are close to 1.
Since this method is a diffeomorphic method, you will observe 0 voxels with negative Jdet for most of the cases.
If you prefer a non-smooth solution, you can fine-tune the weights of smoothness and Jaco regularization in the training.
Thank you very much for the patient answers! This helps a lot!
Hi, @cwmok, Thanks for your great job. I have a little question. I reproduced the SYMNet on the OASIS DataSet, and I compute the number of non-positive Jacobian determinant. But the number of non-positive Jacobian determinant is too large as shown below:
I don't know what's wrong and would appreciate your help! Looking forward to your reply!