Closed neel-dey closed 4 months ago
I haven't tested whether this fixes the wrapper as I have to run to a meeting, but I think I found the issue. The preprocessing function is different.
The colab demo and paper do (x - x.min()) / (x.max() - x.min())
whereas i think that function only does x/ 0.9*x.max()
which doesn't rescale to [0, 1] as in the paper when your inputs have negative numbers (as in CT).
Thank you for finding this! This is my fault and I will fix it asap
Hi again,
I was using
unigradicon-register
on the L2R-CTMRI dataset (used in the paper) to warp the MR to the CT and there seems to be a bug somewhere in the ITK-based processing. See the intrasubject sample result from subject 0001 below (top left: moving, top right: fixed, bottom: moved):However, the same subject pair works qualitatively fine (/similar to the result in the paper) in the Colab demo which uses the same set of weights and stays in pytorch the entire time.
I'm guessing that there's an issue introduced in going back and forth between pytorch and ITK? I'd offer to help track it down but ITK deformation conventions always trip me up :) Thanks!