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

how to run 'demo.py' #19

Closed CGC1031 closed 4 years ago

CGC1031 commented 4 years ago

Thanks for your contributions in this field.

I have successfully run your code of 'train.py' and 'eval.py' .But the results of them don't have any pictures. I really want to get the images and flow field after registration. Can I get them from 'demo.py'?And how can I get -f FIXED_IMAGE -m MOVING_IMAGE to run 'demo.py'?

Thanks a lot.Looking forward to your reply.

zsyzzsoft commented 4 years ago

demo.py requires two raw images. Otherwise, this answer #14 may be helpful to you.

hjl2009 commented 4 years ago

As a newbie, I still have some questions. Where to download the raw images of liver and brain of DICOM series? Should these images fits the 128128128 size as well ? Or perhaps you can share your raw images with us

zsyzzsoft commented 4 years ago

If you only want to visualize the results, I recommend making some changes to eval.py, e.g., adding "real_flow" to the keys (see demo.py line 95-107).

CGC1031 commented 4 years ago

Hellow,how to run my training code on two gpus at the same time ? My code can successfully run on GPU 0,but it is quiet slow. So I tried to use two gpus 0 and 1. parser.add_argument('-g', '--gpu', type=str, default='0,1',help='Specifies gpu device(s)') But something went wrong. QQ图片20200529183656 QQ图片20200529184003 QQ图片20200529184039 QQ图片20200529184105 According to the prompt, the error is found in the class MultiGPUs in line 192. Therefore, I suspect that there is something wrong with the format when I specify GPU. Do you have any good Suggestions to specify two GPUs?Looking forward to hearing from you.

zsyzzsoft commented 4 years ago

Hi, have you resolved this issue? I can't replicate this error but it seems like no gpu is specified.

CGC1031 commented 4 years ago

Thank you for your reply. I have solved the problem. There is something wrong with my code.

------------------ 原始邮件 ------------------ 发件人: "zsyzzsoft"<notifications@github.com>; 发送时间: 2020年6月9日(星期二) 凌晨4:34 收件人: "microsoft/Recursive-Cascaded-Networks"<Recursive-Cascaded-Networks@noreply.github.com>; 抄送: "蔡港成"<244040023@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] how to run 'demo.py' (#19)

Hi, have you resolved this issue? I can't replicate this error but it seems like no gpu is specified.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

w19787 commented 4 years ago

Thank you for your reply. I have solved the problem. There is something wrong with my code. ------------------ 原始邮件 ------------------ 发件人: "zsyzzsoft"<notifications@github.com>; 发送时间: 2020年6月9日(星期二) 凌晨4:34 收件人: "microsoft/Recursive-Cascaded-Networks"<Recursive-Cascaded-Networks@noreply.github.com>; 抄送: "蔡港成"<244040023@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] how to run 'demo.py' (#19) Hi, have you resolved this issue? I can't replicate this error but it seems like no gpu is specified. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

@CGC1031 how do you fix the problem? i have exact same problem when running on 4 gpus, but work fine on 1 gpu.

CGC1031 commented 4 years ago

I have removed the ’Batch Normalization‘ code that I write and it has resolved the problem.

------------------ 原始邮件 ------------------ 发件人: "w19787"<notifications@github.com>; 发送时间: 2020年6月12日(星期五) 中午12:32 收件人: "microsoft/Recursive-Cascaded-Networks"<Recursive-Cascaded-Networks@noreply.github.com>; 抄送: "蔡港成"<244040023@qq.com>; "Mention"<mention@noreply.github.com>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] how to run 'demo.py' (#19)

Thank you for your reply. I have solved the problem. There is something wrong with my code. … ------------------ 原始邮件 ------------------ 发件人: "zsyzzsoft"<notifications@github.com>; 发送时间: 2020年6月9日(星期二) 凌晨4:34 收件人: "microsoft/Recursive-Cascaded-Networks"<Recursive-Cascaded-Networks@noreply.github.com>; 抄送: "蔡港成"<244040023@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] how to run 'demo.py' (#19) Hi, have you resolved this issue? I can't replicate this error but it seems like no gpu is specified. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

@CGC1031 how do you fix the problem? i have exact same problem when running on 4 gpus, but work fine on 1 gpu.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.