zhulf0804 / PointPillars

A Simple PointPillars PyTorch Implementation for 3D LiDAR(KITTI) Detection.
MIT License
454 stars 112 forks source link

Can someone explain what this step is about? #56

Closed Hichengdong closed 11 months ago

Hichengdong commented 11 months ago

4. find mask for (0, 0, 0) and update the encoded features

    # 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]