cwmok / Fast-Symmetric-Diffeomorphic-Image-Registration-with-Convolutional-Neural-Networks

Fast Symmetric Diffeomorphic Image Registration with Convolutional Neural Networks
MIT License
147 stars 36 forks source link

Question about the 0.5 deformation field #13

Closed iCherishxixixi closed 2 years ago

iCherishxixixi commented 2 years ago

Hi, Thanks for sharing your code. After reading your paper, I have some question about the 0.5 deformation field. The paper says the 0.5 deformation field is obtained by the recurrence φ^(1/2^(t−1) )=φ^(1/2^t ) o φ^(1/2^t ) until t=2. However, the 0.5 deformation field is calculated by class DiffeomorphicTransform in the code and the recurrence is terminated until t=1. Would it be better if for _ in range(self.time_step) is changed to for _ in range(self.time_step-1) in class DiffeomorphicTransform or there is something wrong with my understanding. 1

cwmok commented 2 years ago

@iCherishxixixi Yes, you are correct. We have put a special note in the readme file regarding this issue. Both approaches can achieve diffeomorphic solutions.

"We found that estimating the time 1 solution instead of 0.5 solution tends to produce a smoother result in our later experiments. If you want to switch back to 0.5 solution, please replace the "self.time_step" with "self.time_step-1" at line 165 in Models.py and train a new model from scratch."

iCherishxixixi commented 2 years ago

Thank you very much!