ICCV2019《KPConv: Flexible and Deformable Convolution for Point Clouds》

针对semantic3D数据集:

  • 1.数据集准备:

Semantic3D dataset can be found <a href="http://www.semantic3d.net/view_dbase.php?chl=2">here</a>. Download and unzip every point cloud as ascii files and place them in a folder called `Data/Semantic3D/original_data`. You also have to download and unzip the groundthruth labels as ascii files in the same folder.

        # Dict from labels to names
        self.label_to_names = {0: 'unlabeled',
                               1: 'man-made terrain',
                               2: 'natural terrain',
                               3: 'high vegetation',
                               4: 'low vegetation',
                               5: 'buildings',
                               6: 'hard scape',
                               7: 'scanning artefacts',
                               8: 'cars'}
  • 2.降采样以节约空间
                # Subsample to save space
                sub_points, sub_colors, sub_labels = grid_subsampling(points,
                                                                      features=colors,
                                                                      labels=labels,
                                                                      sampleDl=0.01)
  • 3.降采样后的点写入文件.ply文件,储存格式是:x,y,z,r,g,b,l.
                # Write the subsampled ply file
                write_ply(ply_file_full, (sub_points, sub_colors, sub_labels), ['x', 'y', 'z', 'red', 'green', 'blue', 'class'])
原文地址:https://www.cnblogs.com/yibeimingyue/p/11931320.html