LifeBeyondExpectations / ECCV22-PointMixer

[ECCV 2022] Official pytorch implementation of the paper, "PointMixer: MLP-Mixer for Point Cloud Understanding"
100 stars 12 forks source link

What's the mean of parameter 'offset' in knnquery? #6

Closed linhaojia13 closed 2 years ago

linhaojia13 commented 2 years ago

Hi, thank you for your open codes. Why do we need an offset when searching the k-nearest neighbours of a given central point?

LifeBeyondExpectations commented 2 years ago

https://github.com/LifeBeyondExpectations/ECCV22-PointMixer/blob/bf1c3fb7187d737d68901e7165e78d64ab3abe4d/sem_seg/model/network/pointmixer.py#L51-L54

(TL;DR) The offset o is for the batch-wise computation.

In the line 51, p is the xyz location of the point, o is the offset, and x is the corresponding point feature vectors. Here, the shape of the p is [npts, 3] where npts (=number of points) counts all points in different batches. Accordingly, we need to assign the index of the batch of the points for multi-batch training. The role of the o is to do this job.

Please refer to this code for more details of o. https://github.com/LifeBeyondExpectations/ECCV22-PointMixer/blob/bf1c3fb7187d737d68901e7165e78d64ab3abe4d/sem_seg/dataset/loader_s3dis.py#L28-L41

linhaojia13 commented 2 years ago

Thank you for your detailed explaination.