microsoft / Recursive-Cascaded-Networks

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

Questions about 'flow' #43

Closed CGC1031 closed 3 years ago

CGC1031 commented 3 years ago

Hello, I have a question about the code in network.py. 'flow': pred0 * 20 * self.flow_multiplier, Why do I have to multiply pred0 by 20? Looking forward to hearing from you soon, thank you.

CGC1031 commented 3 years ago

What happens if you don't do this multiplication?

zsyzzsoft commented 3 years ago

This is to make the initialized flow have a larger scale. The training would progress slowly in the first iterations if you don't do this multiplication.

CGC1031 commented 3 years ago

赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: 我想在请教您一个困扰我很久的问题, 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么?

和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。

zsyzzsoft commented 3 years ago

你好,我们画图的时候相当于是按照你的理解再取个反,变成255 - r, 255 - g, 255 - b,只是因为我们觉得这样比较好看

CGC1031 @.***> 于 2021年7月24日周六 13:18写道:

赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: 我想在请教您一个困扰我很久的问题, 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么?

和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886002046, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMGUMZY6N6CC6GY6XMDSNTTZJEL7ANCNFSM4U7PWFLQ .

CGC1031 commented 3 years ago

尊敬的赵博士您好: 感谢您的解答,您可以帮我看一下我的理解对不对么?(想在毕业论文中用您方法画流场图,因为画的太好看了) 也就是说: (x,y,z)方向的偏移绝对值分别在(R,G,B)上相对应的 假设在图像中A位置在(x,y,z)的偏移量(分别为255,255,0),即位移场在x和y上偏移最多(那么红色和绿色比较明显,蓝色基本没有)。 那么经过取反为(0,0,255),此时R=0,G=0,B=255,应该蓝色比较显眼(即代表位移场在z轴上偏移多)。 这好像与我们实际情况正好相反呢?应该是我理解的有偏差,但我不知道问题在哪里,博士您是怎么解决的呢?

------------------ 原始邮件 ------------------ 发件人: "Shengyu @.>; 发送时间: 2021年7月24日(星期六) 中午1:26 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about 'flow' (#43)

你好,我们画图的时候相当于是按照你的理解再取个反,变成255 - r, 255 - g, 255 - b,只是因为我们觉得这样比较好看

CGC1031 @.***> 于 2021年7月24日周六 13:18写道:

> 赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: > 我想在请教您一个困扰我很久的问题, > 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么? > > 和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) > 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。 > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <" rel="noopener" target="_blank">https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886002046&gt;;, > or unsubscribe > <" rel="noopener" target="_blank">https://github.com/notifications/unsubscribe-auth/AFMGUMZY6N6CC6GY6XMDSNTTZJEL7ANCNFSM4U7PWFLQ&gt;; > . >

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

zsyzzsoft commented 3 years ago

可以参考demo.py中RenderFlow这个函数,我们就是用这个函数画流场的: https://github.com/microsoft/Recursive-Cascaded-Networks/blob/0709490fe010e4acc6357990d1d871c170e3ef31/demo.py#L122-L130

CGC1031 @.***> 于2021年7月24日周六 下午2:34写道:

尊敬的赵博士您好: 感谢您的解答,您可以帮我看一下我的理解对不对么?(想在毕业论文中用您方法画流场图,因为画的太好看了) 也就是说: (x,y,z)方向的偏移绝对值分别在(R,G,B)上相对应的 假设在图像中A位置在(x,y,z)的偏移量(分别为255,255,0),即位移场在x和y上偏移最多(那么红色和绿色比较明显,蓝色基本没有)。 那么经过取反为(0,0,255),此时R=0,G=0,B=255,应该蓝色比较显眼(即代表位移场在z轴上偏移多)。 这好像与我们实际情况正好相反呢?应该是我理解的有偏差,但我不知道问题在哪里,博士您是怎么解决的呢?

------------------ 原始邮件 ------------------ 发件人: "Shengyu @.>; 发送时间: 2021年7月24日(星期六) 中午1:26 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about 'flow' (#43)

你好,我们画图的时候相当于是按照你的理解再取个反,变成255 - r, 255 - g, 255 - b,只是因为我们觉得这样比较好看

CGC1031 @.***> 于 2021年7月24日周六 13:18写道:

> 赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: > 我想在请教您一个困扰我很久的问题, > 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么? > > 和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) > 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。 > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <" rel="noopener" target="_blank"> https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886002046&gt;;,

> or unsubscribe > <" rel="noopener" target="_blank"> https://github.com/notifications/unsubscribe-auth/AFMGUMZY6N6CC6GY6XMDSNTTZJEL7ANCNFSM4U7PWFLQ&gt;;

> . >

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

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886008385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMGUM67MFAFRPRYI64ECKDTZJNHHANCNFSM4U7PWFLQ .

CGC1031 commented 3 years ago

感谢,我根据您的建议已经把流场画出来了。 您代码中的Line126-Line128实际上是对形变场的后处理,为了更加美观是么? 我最困惑的是RGB正好分别对应的x,y,z的三个轴的方向么?如果是,那我接下来的就基本明白了。谢谢博士!

------------------ 原始邮件 ------------------ 发件人: "Shengyu @.>; 发送时间: 2021年7月24日(星期六) 下午5:02 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about 'flow' (#43)

可以参考demo.py中RenderFlow这个函数,我们就是用这个函数画流场的: https://github.com/microsoft/Recursive-Cascaded-Networks/blob/0709490fe010e4acc6357990d1d871c170e3ef31/demo.py#L122-L130

CGC1031 @.***> 于2021年7月24日周六 下午2:34写道:

> 尊敬的赵博士您好: > 感谢您的解答,您可以帮我看一下我的理解对不对么?(想在毕业论文中用您方法画流场图,因为画的太好看了) > 也就是说: > (x,y,z)方向的偏移绝对值分别在(R,G,B)上相对应的 > 假设在图像中A位置在(x,y,z)的偏移量(分别为255,255,0),即位移场在x和y上偏移最多(那么红色和绿色比较明显,蓝色基本没有)。 > 那么经过取反为(0,0,255),此时R=0,G=0,B=255,应该蓝色比较显眼(即代表位移场在z轴上偏移多)。 > 这好像与我们实际情况正好相反呢?应该是我理解的有偏差,但我不知道问题在哪里,博士您是怎么解决的呢? > > > > > > > ------------------&nbsp;原始邮件&nbsp;------------------ > 发件人: "Shengyu @.&gt;; > 发送时间: 2021年7月24日(星期六) 中午1:26 > 收件人: @.&gt;; > 抄送: @.&gt;; @.&gt;; > 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about > &#39;flow&#39; (#43) > > > > > > 你好,我们画图的时候相当于是按照你的理解再取个反,变成255 - r, 255 - g, 255 - b,只是因为我们觉得这样比较好看 > > CGC1031 @.***&gt; 于 2021年7月24日周六 13:18写道: > > &gt; 赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: > &gt; 我想在请教您一个困扰我很久的问题, > &gt; 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么? > &gt; > &gt; 和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) > &gt; 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。 > &gt; > &gt; — > &gt; You are receiving this because you modified the open/close state. > &gt; Reply to this email directly, view it on GitHub > &gt; <" rel="noopener" target="_blank"> > https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886002046&amp;gt;;, > > &gt; or unsubscribe > &gt; <" rel="noopener" target="_blank"> > https://github.com/notifications/unsubscribe-auth/AFMGUMZY6N6CC6GY6XMDSNTTZJEL7ANCNFSM4U7PWFLQ&amp;gt;; > > &gt; . > &gt; > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe. > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886008385&gt;, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AFMGUM67MFAFRPRYI64ECKDTZJNHHANCNFSM4U7PWFLQ&gt; > . >

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

zsyzzsoft commented 3 years ago

是的,但是x方向形变越大R越小

CGC1031 @.***> 于2021年7月24日周六 下午5:08写道:

感谢,我根据您的建议已经把流场画出来了。 您代码中的Line126-Line128实际上是对形变场的后处理,为了更加美观是么? 我最困惑的是RGB正好分别对应的x,y,z的三个轴的方向么?如果是,那我接下来的就基本明白了。谢谢博士!

------------------ 原始邮件 ------------------ 发件人: "Shengyu @.>; 发送时间: 2021年7月24日(星期六) 下午5:02 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about 'flow' (#43)

可以参考demo.py中RenderFlow这个函数,我们就是用这个函数画流场的:

https://github.com/microsoft/Recursive-Cascaded-Networks/blob/0709490fe010e4acc6357990d1d871c170e3ef31/demo.py#L122-L130

CGC1031 @.***> 于2021年7月24日周六 下午2:34写道:

> 尊敬的赵博士您好: > 感谢您的解答,您可以帮我看一下我的理解对不对么?(想在毕业论文中用您方法画流场图,因为画的太好看了) > 也就是说: > (x,y,z)方向的偏移绝对值分别在(R,G,B)上相对应的 > 假设在图像中A位置在(x,y,z)的偏移量(分别为255,255,0),即位移场在x和y上偏移最多(那么红色和绿色比较明显,蓝色基本没有)。 > 那么经过取反为(0,0,255),此时R=0,G=0,B=255,应该蓝色比较显眼(即代表位移场在z轴上偏移多)。 > 这好像与我们实际情况正好相反呢?应该是我理解的有偏差,但我不知道问题在哪里,博士您是怎么解决的呢? > > > > > > > ------------------&nbsp;原始邮件&nbsp;------------------ > 发件人: "Shengyu @.&gt;; > 发送时间: 2021年7月24日(星期六) 中午1:26 > 收件人: @.&gt;; > 抄送: @.&gt;; @.&gt;; > 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about > &#39;flow&#39; (#43) > > > > > > 你好,我们画图的时候相当于是按照你的理解再取个反,变成255 - r, 255 - g, 255 - b,只是因为我们觉得这样比较好看 > > CGC1031 @.***&gt; 于 2021年7月24日周六 13:18写道: > > &gt; 赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: > &gt; 我想在请教您一个困扰我很久的问题, > &gt; 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么? > &gt; > &gt; 和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) > &gt; 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。 > &gt; > &gt; — > &gt; You are receiving this because you modified the open/close state. > &gt; Reply to this email directly, view it on GitHub > &gt; <" rel="noopener" target="_blank"> > https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886002046&amp;gt;;,

> > &gt; or unsubscribe > &gt; <" rel="noopener" target="_blank"> > https://github.com/notifications/unsubscribe-auth/AFMGUMZY6N6CC6GY6XMDSNTTZJEL7ANCNFSM4U7PWFLQ&amp;gt;;

> > &gt; . > &gt; > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe. > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > < https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886008385&gt;,

> or unsubscribe > < https://github.com/notifications/unsubscribe-auth/AFMGUM67MFAFRPRYI64ECKDTZJNHHANCNFSM4U7PWFLQ&gt;

> . >

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

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886024707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMGUM2Z42EMCR6Q2DBROWLTZJ7JLANCNFSM4U7PWFLQ .

CGC1031 commented 3 years ago

感谢您的耐心指导,我已经完全弄明白您的方法了。祝您工作生活一切顺顺利利!

------------------ 原始邮件 ------------------ 发件人: "Shengyu @.>; 发送时间: 2021年7月24日(星期六) 下午5:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about 'flow' (#43)

是的,但是x方向形变越大R越小

CGC1031 @.***> 于2021年7月24日周六 下午5:08写道:

> 感谢,我根据您的建议已经把流场画出来了。 > 您代码中的Line126-Line128实际上是对形变场的后处理,为了更加美观是么? > 我最困惑的是RGB正好分别对应的x,y,z的三个轴的方向么?如果是,那我接下来的就基本明白了。谢谢博士! > > > > > ------------------&nbsp;原始邮件&nbsp;------------------ > 发件人: "Shengyu @.&gt;; > 发送时间: 2021年7月24日(星期六) 下午5:02 > 收件人: @.&gt;; > 抄送: @.&gt;; @.&gt;; > 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about > &#39;flow&#39; (#43) > > > > > > 可以参考demo.py中RenderFlow这个函数,我们就是用这个函数画流场的: > > https://github.com/microsoft/Recursive-Cascaded-Networks/blob/0709490fe010e4acc6357990d1d871c170e3ef31/demo.py#L122-L130 > > CGC1031 @.&gt; 于2021年7月24日周六 下午2:34写道: > > &gt; 尊敬的赵博士您好: > &gt; 感谢您的解答,您可以帮我看一下我的理解对不对么?(想在毕业论文中用您方法画流场图,因为画的太好看了) > &gt; 也就是说: > &gt; (x,y,z)方向的偏移绝对值分别在(R,G,B)上相对应的 > &gt; > 假设在图像中A位置在(x,y,z)的偏移量(分别为255,255,0),即位移场在x和y上偏移最多(那么红色和绿色比较明显,蓝色基本没有)。 > &gt; 那么经过取反为(0,0,255),此时R=0,G=0,B=255,应该蓝色比较显眼(即代表位移场在z轴上偏移多)。 > &gt; 这好像与我们实际情况正好相反呢?应该是我理解的有偏差,但我不知道问题在哪里,博士您是怎么解决的呢? > &gt; > &gt; > &gt; > &gt; > &gt; > &gt; > &gt; ------------------&amp;nbsp;原始邮件&amp;nbsp;------------------ > &gt; 发件人: &quot;Shengyu @.&amp;gt;; > &gt; 发送时间: 2021年7月24日(星期六) 中午1:26 > &gt; 收件人: @.&amp;gt;; > &gt; 抄送: @.&amp;gt;; @.&amp;gt;; > &gt; 主题: Re: [microsoft/Recursive-Cascaded-Networks] Questions about > &gt; &amp;#39;flow&amp;#39; (#43) > &gt; > &gt; > &gt; > &gt; > &gt; > &gt; 你好,我们画图的时候相当于是按照你的理解再取个反,变成255 - r, 255 - g, 255 - b,只是因为我们觉得这样比较好看 > &gt; > &gt; CGC1031 @.&amp;gt; 于 2021年7月24日周六 13:18写道: > &gt; > &gt; &amp;gt; 赵博士您好,我是苏州大学的一名研究生。我对您的工作非常倾佩,之前也有请教过您的问题,感谢您的耐心解答。Q: > &gt; &amp;gt; 我想在请教您一个困扰我很久的问题, > &gt; &amp;gt; > 当用x,y,z位移的绝对值映射在RGB三个通道上来绘制形变场,但一般的RGB三色为(0,0,0)时,合成的颜色不是应该为黑色么? > &gt; &amp;gt; > &gt; &amp;gt; 和在论文中说“流场中的白色区域部分是位移为0的”有点不一致呢?您能解答一下我的困惑么?(详细一点就更好啦,万分感谢您。) > &gt; &amp;gt; 因为我最近在写说是的论文,这个点我始终没搞明白,谢谢了。 > &gt; &amp;gt; > &gt; &amp;gt; — > &gt; &amp;gt; You are receiving this because you modified the open/close > state. > &gt; &amp;gt; Reply to this email directly, view it on GitHub > &gt; &amp;gt; <&quot; rel=&quot;noopener&quot; > target=&quot;_blank&quot;&gt; > &gt; > https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886002046&amp;amp;gt;;, > > &gt; > &gt; &amp;gt; or unsubscribe > &gt; &amp;gt; <&quot; rel=&quot;noopener&quot; > target=&quot;_blank&quot;&gt; > &gt; > https://github.com/notifications/unsubscribe-auth/AFMGUMZY6N6CC6GY6XMDSNTTZJEL7ANCNFSM4U7PWFLQ&amp;amp;gt;; > > &gt; > &gt; &amp;gt; . > &gt; &amp;gt; > &gt; > &gt; — > &gt; You are receiving this because you authored the thread. > &gt; Reply to this email directly, view it on GitHub, or unsubscribe. > &gt; > &gt; — > &gt; You are receiving this because you modified the open/close state. > &gt; Reply to this email directly, view it on GitHub > &gt; < > https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886008385&amp;gt;, > > &gt; or unsubscribe > &gt; < > https://github.com/notifications/unsubscribe-auth/AFMGUM67MFAFRPRYI64ECKDTZJNHHANCNFSM4U7PWFLQ&amp;gt; > > &gt; . > &gt; > > &mdash; > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or unsubscribe. > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/microsoft/Recursive-Cascaded-Networks/issues/43#issuecomment-886024707&gt;, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AFMGUM2Z42EMCR6Q2DBROWLTZJ7JLANCNFSM4U7PWFLQ&gt; > . >

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