alievk / npbg

Neural Point-Based Graphics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get the indices for rasterizing descriptors?

BostonLobster opened this issue · comments

I saw the descriptors are stored in PointTexture class as nn.Parameters, and they are rasterized to image through index_select. I am wondering how to get these indices?

@BostonLobster are you referring to this line?

sample = torch.index_select(texture, 1, ind) # CxB*H*W

In this case, the ind array should be suitable.

ind = ids.contiguous().view(-1).long()

@seva100 Yes, that is the line I referred. I am confused about where did you get the ind array.

hi, in my understanding, the ids is obtained from the rendering of the scene, ids = inputs[:, 0], some parameters of the point cloud are passed into the NNScene class as some parameters of the scene, and then rendered to get the inputs, The pixel value of this inputs[:,0] is a corresponding index value from the 3D point cloud to the 2D plane.