What does 'offset' mean in segmentation?How to get it?
JiachengDeng opened this issue · 6 comments
What is the meaning of the variable offset [line306] in the segmentation model?
And if I only have data in the form of [B, 3, N] can I even get the offset variable?
Also, if I can't get the offset easily, how can I extract the point cloud features in the data of [B, 3, N]?
Really appreciate it if you can reply!
Offset means the breakpoints for each sample in one batch. It means the first dimension is a batch of points (BxN) instead of batch size only (B). To generate the offset, please refer to https://github.com/hancyran/RepSurf/blob/main/segmentation/util/data_util.py#L18.
For example, an input cooridnate variable with size of [M, 3], and the input offset is [N1, N2]. So the batch size is 2 here, and the first sample of coordinates is [N1, 3] and the second is [N2, 3].
Thx!
The question is settled.
Hi Haoxi,
Thanks for sharing the source code!
I have a quick follow-up question on the same topic.
Could you help me understand why this offset
variable is used in the segmentation task? Because I don't see it being used in the classification code.
Also, may I know if the offset
variable is also used in the object detection pipeline? Thanks!
Hi Haoxi,
Thanks for sharing the source code!
I have a quick follow-up question on the same topic. Could you help me understand why this
offset
variable is used in the segmentation task? Because I don't see it being used in the classification code. Also, may I know if theoffset
variable is also used in the object detection pipeline? Thanks!
Sure! We use offset since we use grid sampling strategy for segmentation, and after grid sampling on point cloud scenes, the number of points are different between each other, so we cannot use the input tensor as a form of [B, N, 3] but [N1+N2+..., 3] (here B means batch size, N means number of points for each scene in a batch, N1/N2 means number of points for two different scenes).
Thank you for the quick reply! This is very helpful and answers my question.
I noticed that the grid sampling is only used in segmentation, so I assume this offset
variable is not used for detection, correct?
Yes, we use random sampling with the same number of points on each point cloud, following the protocal of GroupFree3D.