What is range_flow used for?
XXZhou25 opened this issue · comments
Hi, Thanks for sharing your code!
When I go through the code, I don't quite understand what range_flow parameter used for.
Is it because smooth loss (which is deformation field's gradient loss) too small?
Can I move this parameter safely?
Thanks!
(This reply is not correct, please refer to my latest reply below.)
Hi @XXZhou25,
The "range_flow" variable limits the searching space of the deformation field, i.e., the maximum magnitude of the predicted displacement field will be bounded by 40% of the input height/width/depth if the "range_flow=0.4".
If you are working with brain registration, removing it is acceptable (please remember to be consistent in both training/testing script). Empirically, the "range_flow" is necessary for some applications, e.g., the inter-patient abdominal CT registration and hippocampus registration task in the Learn2Reg2020 Challenge, as to stabilize the training.
Even simpler, you can set "range_flow=1.0" in both the training and testing script. The effect is equivalent to "removing the range_flow parameter" without heavily modify the code.
Hi @XXZhou25,
The "range_flow" variable limits the searching space of the deformation field, i.e., the maximum magnitude of the predicted displacement field will be bounded by 40% of the input height/width/depth if the "range_flow=0.4".If you are working with brain registration, removing it is acceptable (please remember to be consistent in both training/testing script). Empirically, the "range_flow" is necessary for some applications, e.g., the inter-patient abdominal CT registration and hippocampus registration task in the Learn2Reg2020 Challenge, as to stabilize the training.
Even simpler, you can set "range_flow=1.0" in both the training and testing script. The effect is equivalent to "removing the range_flow parameter" without heavily modify the code.
Hi @cwmok , Thank you so much for your prompt response! I see. I am working on lung CT registration. I guess probably I also need to bound my displacement? I am sorry I am just start with diffeomorphic registration.
And besides, I notice the range_flow
in your script is set as 100
. Should I set range_flow
within [0, 1]
?
I do appreciate your work and thanks for sharing your everything again!
I am mixed with my other work. In this work, the unit of the range_flow
is voxel, i.e., range_flow
=100 means the maximum magnitude of the predicted displacement field is 100 voxels in each dimension.
In my other work (LapIRN), I used the normalized displacement field such that the range_flow
is within [0,1].
Empirically, using the normalized displacement field/vector field is better and less sensitive to the domain variation.
Sorry for the confusion.
I am mixed with my other work. In this work, the unit of the
range_flow
is voxel, i.e.,range_flow
=100 means the maximum magnitude of the predicted displacement field is 100 voxels in each dimension.In my other work (LapIRN), I used the normalized displacement field such that the
range_flow
is within [0,1].Empirically, using the normalized displacement field/vector field is better and less sensitive to the domain variation.
Sorry for the confusion.
I see. Thanks for your very clear clarification. Thanks for being so helpful. Will look into that work, too!