Пример #1
0
 def __call__(self, x):
     import kaolin.conversions as cvt
     x = super().__call__(x)
     t = []
     for i in range(x.shape[0]):
         t.append(
             cvt.voxelgrid_to_pointcloud(x[i], self.res, normalize=True))
     return torch.stack(t)
Пример #2
0
    def __call__(self, voxel: Type[VoxelGrid]):
        """
        Args:
            voxel (torch.Tensor): Voxel grid.

        Returns:
            (torch.Tensor): Converted point cloud.
        """
        return cvt.voxelgrid_to_pointcloud(voxel, self.num_points, self.thresh, self.mode, self.normalize)