ICCV2019《KPConv: Flexible and Deformable Convolution for Point Clouds》
阅读原文时间:2023年07月13日阅读:1

针对semantic3D数据集:

  • 1.数据集准备:

Semantic3D dataset can be found here. 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'\])