kakaxi314 / GuideNet

Implementation for our paper 'Learning Guided Convolutional Network for Depth Completion'
MIT License
154 stars 15 forks source link

Question for the kernel design in multi-batch input. #5

Open LifeBeyondExpectations opened 4 years ago

LifeBeyondExpectations commented 4 years ago

Thank you for your nice work. Since the code is not yet open, I write down my question for your kernel design.

In the paper, given the image feature information, you set this feature as the convolution weight. My question is when the size of the batch of the input images is larger than 1, how did you compute the convolution operation?

In pytorch, kernel shape of CNN is [out_channels, in_channels, kernel_size, kernel_size] which means that the same kernels are applied to different multi-batch tensor (e.g. img.shape = [batch, channel, height, width]). So I guess that you may split the multi-batch-tensor into single-batch-tensor for computation... or did you personally re-implement the convolution operation??..

LiangliangGuo commented 4 years ago

@LifeBeyondExpectations Have you released the paper successfully?

JUGGHM commented 4 years ago

Thank you for your nice work. Since the code is not yet open, I write down my question for your kernel design. In the paper, given the image feature information, you set this feature as the convolution weight. My question is when the size of the batch of the input images is larger than 1, how did you compute the convolution operation? In pytorch, kernel shape of CNN is [out_channels, in_channels, kernel_size, kernel_size] which means that the same kernels are applied to different multi-batch tensor (e.g. img.shape = [batch, channel, height, width]). So I guess that you may split the multi-batch-tensor into single-batch-tensor for computation... or did you personally re-implement the convolution operation??..

The author claimed that he wrote some CUDA code. I have a reimplemented version of guideconv version using conv and bmm. But I got even worse results with the guideconv fusion blocks than the naïve concatenating strategy. That's weird.

dv0340 commented 4 years ago

@JUGGHM could you please share your code with me ?maybe i can provide some suggestions

JUGGHM commented 4 years ago

@JUGGHM could you please share your code with me ?maybe i can provide some suggestions

The implemention actually refered to the CSPN naïve implemention by the author of CSPN, and it's easy to understand.

AlanDecode commented 4 years ago

Hi guys, I've shared my naive implementation based on CSPN in https://github.com/kakaxi314/GuideNet/issues/10, let me known if it helps, or you have any questions or suggestions.