We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am a beginner and I would like to know how TransMorph-diff obtains an inverse deformation field? Can I use this method below?
flow_mean = self.flow_mean(x) log_sigma = self.flow_sigma(x) noise = torch.randn(flow_mean.shape).cuda() if self.training: flow = flow_mean + torch.exp(log_sigma / 2.0) * noise else: flow = flow_mean # + 1 * noise # get inverse inverse_flow = -flow for _ in range(self.int_steps): deform_field = flow + self.low_res_id_transform flow_1 = self.bilinear(flow, deform_field) flow = flow_1 + flow disp_field = F.interpolate(flow, scale_factor=self.sample_rate, mode='bilinear') disp_field = self.scale_map(disp_field, np.array([1, 1])) deform_field = disp_field + affine_map warped_source = self.bilinear_img(source_image, deform_field) self.res_flow_mean = flow self.res_log_sigma = log_sigma for _ in range(self.int_steps): inverse_deform_field = inverse_flow + self.low_res_id_transform inverse_flow_1 = self.bilinear(inverse_flow, inverse_deform_field) inverse_flow = inverse_flow_1 + inverse_flow inverse_disp_field = F.interpolate(inverse_flow, scale_factor=self.sample_rate, mode='bilinear') inverse_disp_field = self.scale_map(inverse_disp_field, np.array([1, 1])) inverse_deform_field = inverse_disp_field + affine_map warped_target = self.bilinear_img(target_image, inverse_deform_field) self.inverse_res_flow_mean = inverse_flow
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am a beginner and I would like to know how TransMorph-diff obtains an inverse deformation field? Can I use this method below?
Thanks!
The text was updated successfully, but these errors were encountered: