Closed Hichengdong closed 11 months ago
# a very beautiful implementation voxel_ids = torch.arange(0, pillars.size(1)).to(device) # (num_points, ) mask = voxel_ids[:, None] < npoints_per_pillar[None, :] # (num_points, p1 + p2 + ... + pb) mask = mask.permute(1, 0).contiguous() # (p1 + p2 + ... + pb, num_points) features *= mask[:, :, None]
4. find mask for (0, 0, 0) and update the encoded features