microsoft / Recursive-Cascaded-Networks

[ICCV 2019] Recursive Cascaded Networks for Unsupervised Medical Image Registration
https://arxiv.org/abs/1907.12353
MIT License
362 stars 87 forks source link

The flow field output #14

Open Barnonewdm opened 4 years ago

Barnonewdm commented 4 years ago

Thanks for your work in this field.

I have tried your code. It gives results as reported. However, the flow field is not given. Note the flow field is quite needed than the warped image or segmentation map. In this way, could you help figure me out what is the best way to check the flow field in your code? How to save the deformation fields in your eval.py?

Thanks a lot.

zsyzzsoft commented 4 years ago

Check demo.py where some part of the code generates the deformation fields (there is a key "real_flow" in the output").

Barnonewdm commented 4 years ago

Thanks. I have figured it out. If anyone else is curious, here is an option in eval.py:

  1. add the 'real_flow' in the key, which can also include 'image_fixed', 'warped_moving' and so on. keys = ['real_flow', 'image_fixed', 'warped_moving']

  2. The subject i flow result can be extracted by: flow = results['real_flow'][i]

krisice commented 3 years ago

Thanks. I have figured it out. If anyone else is curious, here is an option in eval.py:

  1. add the 'real_flow' in the key, which can also include 'image_fixed', 'warped_moving' and so on. keys = ['real_flow', 'image_fixed', 'warped_moving']
  2. The subject i flow result can be extracted by: flow = results['real_flow'][i]

where to add this code?

Hoodini-Gzj commented 2 years ago

Thanks. I have figured it out. If anyone else is curious, here is an option in eval.py:

1. add the 'real_flow' in the key, which can also include 'image_fixed', 'warped_moving' and so on.
   `keys = ['real_flow', 'image_fixed', 'warped_moving']`

2. The subject i flow result can be extracted by:
   `flow = results['real_flow'][i]`

Hello, is that right to replace keys = ['pt_mask', 'landmark_dists', 'jaccs', 'dices', 'jacobian_det', ] in eval.py with keys = ['real_flow', 'image_fixed', 'warped_moving']? Are there any specific changes that need to be made elsewhere? Looking forward to your reply.