VoxelNet-tensorflow icon indicating copy to clipboard operation
VoxelNet-tensorflow copied to clipboard

Something wrong with preprocess

Open WhooCloud opened this issue 6 years ago • 1 comments

I think there is something wrong with the logic of preprocess.py.

By original logic,

    # [K, T, 7] feature buffer as described in the paper
    feature_buffer = np.zeros(shape=(K, T, 7), dtype=np.float32)

    # build a reverse index for coordinate buffer
    index_buffer = {}
    for i in range(K):
        index_buffer[tuple(coordinate_buffer[i])] = i

    for voxel, point in zip(voxel_index, point_cloud):
        index = index_buffer[tuple(voxel)]
        number = number_buffer[index]
        if number < T:
            feature_buffer[index, number, :4] = point
            number_buffer[index] += 1

    feature_buffer[:, :, -3:] = feature_buffer[:, :, :3] - \
        feature_buffer[:, :, :3].sum(axis=1, keepdims=True)/number_buffer.reshape(K, 1, 1)

Since a voxel always contains less than T points, those entries will be [0,0,0,0, -vx, -vy, -vz] if implemented as above. I don't know whether this implementation is resonable because the original paper seems does not give instruction about how to hundle this case.

I think a reasonable result should be [vx, vy, vz, 0, 0,0,0]. Do you have some ideas?

WhooCloud avatar May 01 '18 07:05 WhooCloud

@WhooCloud hii, did find a solution for this?

OneManArmy93 avatar May 20 '19 14:05 OneManArmy93