YaoleiQi / DSCNet

Pytorch Implement of Dynamic Snake Convolution (ICCV2023)
418 stars 37 forks source link

Question about code - 'base' 'flatten' 'reshape' #24

Open Chen-AMD4800U opened 1 year ago

Chen-AMD4800U commented 1 year ago

首先十分感谢您所开源的这份优秀工作,我在阅读代码时遇到了一些不懂的地方,因此想请教您几个问题。

  1. 在2D S3_DSConv.py 289行到298行出现的'base': 我理解的base用于对应batch中的不同图像,但是在代码中加入base后紧接着又减去了base,我认为这会导致后续的value_a0 value_a1 value_c0 value_c1仅对应batch中第0个图像,感觉会影响双线性插值的结果。

  2. 在2D S3_DSConv.py 270-272行代码的逻辑': 在这两行代码中,首先将输入特征flatten,接着又reshape到原维度,我不理解这样做的原因。

  3. 在2D S3_DSConv.py 225-227行代码计算offset时: 循环似乎没有处理到最外层的卷积核offset。

First of all thank you very much for this excellent work that you have open sourced, I am reading through the code and have come across something I don't understand, so I want to ask you a few questions.

  1. In 2D S3_DSConv.py lines 289 to 298 'base' appears: I understand that 'base' is used to correspond to the different images in single batch, but by adding base and then subtracting it immediately after in the code, I think this causes the subsequent value_a0 value_a1 value_c0 value_c1 to correspond only to the 0th image in a batch, which I feel affects the results of the bilinear interpolation.

  2. Logic in 2D S3_DSConv.py lines 270-272 of code': In these two lines of code, the input features are first flatten and then reshape to the original dimension, I don't understand the reason for this.

  3. In 2D S3_DSConv.py lines 225-227 the code calculates the offset: The loop doesn't seem to process to the outermost convolution kernel offset.

期待您的回复。