cgtuebingen / Flex-Convolution

Source code for: Flex-Convolution (Million-Scale Point-Cloud Learning Beyond Grid-Worlds), accepted at ACCV 2018
Apache License 2.0
115 stars 11 forks source link

Discrepancy between paper and code #12

Closed twcostain closed 4 years ago

twcostain commented 4 years ago

In the paper, the formula for computing the weights is: w(theta, l, l^prime) = <theta, l - l^prime> But in the code it seems to be w(theta, l, l^prime) = <theta, l^prime - l> I'm guessing that this doesn't make much of a difference to the resulting values beyond the sign of the weight, but I just wanted to check.

Also, it seems that the 0th neighbour in the neighbours tensor (i.e. k=0) is the point its self. If I'm reading this correct, then does it mean that for k=9 neighbours, then the neighbours tensor will be [B,10,N]?

grohf commented 4 years ago

Hey, since it is a directional vector and further theta is a learned vector the ordering should not matter from the theoretical side. For me the later one makes more sense at least from a geometrical point of view, i.e. it is the outgoing direction from the center point. But of course the ordering might have side effects to the gradients or initialization if you plan to use it in a none uniform/undirected space.

In fact, in our implementation the 0th neighbour is the point itself. In pixel space, this would also be the center point. Hence, we consider the point itself also a part of the neighbourhood, i.e. in the case of k=9 neighbours we still have [B,9,N]. We only using k=9 in the image example to have a 'fairer' comparison against a 3x3 image kernel. For all other experiments we use k=8, for a better GPU utilization.

twcostain commented 4 years ago

That makes it all very clear, thank you!