fastdev.datasets.s3dis ====================== .. py:module:: fastdev.datasets.s3dis Module Contents --------------- .. py:data:: logger .. py:function:: collect_point_label(anno_path, out_filename, class_names_path, file_format='txt') Convert original dataset files to data_label file (each line is XYZRGBL). We aggregated all the points from each instance in the room. :param anno_path: path to annotations. e.g. Area_1/office_2/Annotations/ :param out_filename: path to save collected points and labels (each line is XYZRGBL) :param file_format: txt or numpy, determines what file format to save. :returns: None .. note:: the points are shifted before save, the most negative point is now at origin. .. py:function:: sample_points(points: numpy.ndarray, labels: numpy.ndarray, room_coord_max: numpy.ndarray, num_points: int = 4096, block_size: float = 1.0) .. py:class:: S3DISDatasetConfig Configuration for S3DISDataset. .. py:attribute:: data_root :type: str .. py:attribute:: download_if_not_exist :type: bool :value: False .. py:attribute:: num_points :type: int :value: 4096 .. py:attribute:: test_area :type: int :value: 5 .. py:attribute:: block_size :type: float :value: 1.0 .. py:attribute:: sample_rate :type: float :value: 1.0 .. py:class:: S3DISDataset(config: S3DISDatasetConfig, split: Literal['train', 'test'] = 'train') Bases: :py:obj:`torch.utils.data.Dataset` S3DIS dataset. .. py:attribute:: config .. py:attribute:: num_points .. py:attribute:: block_size .. py:attribute:: labelweights .. py:attribute:: room_idxs .. py:method:: __getitem__(idx) .. py:method:: __len__() .. py:method:: download_data(data_root: str) :staticmethod: