pvcnn icon indicating copy to clipboard operation
pvcnn copied to clipboard

vox_coords = torch.round(norm_coords).to(torch.int32)

Open PhantomRing opened this issue 1 year ago • 1 comments

About these two lines of code:

norm_coords = torch.clamp(norm_coords * self.r, 0, self.r - 1)
vox_coords = torch.round(norm_coords).to(torch.int32)

The range of norm_coords should be [0,1], so if self.r =2, the range of norm_coords will be [0,2]. Then, vox_coords will change the number of [0,0.5] to 0 and the number of [0.5,2] to 1, resulting in uneven voxelization. Is there something wrong with my understanding?

PhantomRing avatar Nov 11 '23 06:11 PhantomRing

If self.r = 2, then the range of norm_coords will be [0,1] instead of [0,2].

zhijian-liu avatar Dec 11 '23 04:12 zhijian-liu