hzxie/GRNet

Questions about the Shapenet dataset normalisation and gridding operation.

Closed this issue · 2 comments

Thank you for the great paper and code!!

I have a few questions:

  • I noticed that the precomputed ShapeNet dataset seems to be normalised in the range (-0.5, 0.5) rather than (-1, 1) and the pointclouds after gridding only occupy a [32, 32, 32] subset of the [64, 64, 64] grid. Is that expected? When I tried to pass on pointclouds normalised in the range (-1, 1) I got an error (I'm not sure it's related).
  • From the paper, I would have expected the grid vertices (the output of the Gridding layer) to have values in the range 0-1, but I see much larger values. Did I misunderstand the gridding operation?

Thank you very much

hzxie commented

Sorry, I can't remember the details clearly.

  • I remember that the coordinates of the points in the ShapeNet datasets in the range of (-1, 1). Did you analyze statistically the whole dataset for the maximum and minimum values of the coordinates?
  • Could you provide the error stack trace? BTW, please make sure that the coordinates are ranged in (-1, 1) instead of [-1, 1].
  • According to the code below, the output values of Gridding may be larger than 1. Because the values may come from multiple points. For example, there are multiple points in the same grid cell.

for (int j = index; j < n_pts; j += stride) {
// LLL -> Lower X, Lower Y, Lower Z
gvtx_idx = grid_pt_indexes[j * 8 + 0];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 0] *
grid_pt_weights[j * 24 + 1] *
grid_pt_weights[j * 24 + 2]);
// LLU -> Lower X, Lower Y, Upper Z
gvtx_idx = grid_pt_indexes[j * 8 + 1];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 3] *
grid_pt_weights[j * 24 + 4] *
grid_pt_weights[j * 24 + 5]);
// LUL -> Lower X, Upper Y, Lower Z
gvtx_idx = grid_pt_indexes[j * 8 + 2];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 6] *
grid_pt_weights[j * 24 + 7] *
grid_pt_weights[j * 24 + 8]);
// LUU -> Lower X, Upper Y, Upper Z
gvtx_idx = grid_pt_indexes[j * 8 + 3];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 9] *
grid_pt_weights[j * 24 + 10] *
grid_pt_weights[j * 24 + 11]);
// ULL -> Upper X, Lower Y, Lower Z
gvtx_idx = grid_pt_indexes[j * 8 + 4];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 12] *
grid_pt_weights[j * 24 + 13] *
grid_pt_weights[j * 24 + 14]);
// ULU -> Upper X, Lower Y, Upper Z
gvtx_idx = grid_pt_indexes[j * 8 + 5];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 15] *
grid_pt_weights[j * 24 + 16] *
grid_pt_weights[j * 24 + 17]);
// UUL -> Upper X, Upper Y, Lower Z
gvtx_idx = grid_pt_indexes[j * 8 + 6];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 18] *
grid_pt_weights[j * 24 + 19] *
grid_pt_weights[j * 24 + 20]);
// UUU -> Upper X, Upper Y, Upper Z
gvtx_idx = grid_pt_indexes[j * 8 + 7];
atomicAdd(&(grid_weights[gvtx_idx]), grid_pt_weights[j * 24 + 21] *
grid_pt_weights[j * 24 + 22] *
grid_pt_weights[j * 24 + 23]);
}

Hope the answer helps.

hzxie commented

According to Eq.2 in the paper, the output of Gridding is divided by the number of points in the neighborhood, and I remember I did it.
However, I can't find it in the code. If you find it, please tell me.