wypr/dataset/s3dis/s3dis.py [73:120]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.num_points_sampled = num_points
        self.use_color = use_color        
        self.use_height = use_height
        self.use_normal = use_normal
        self.augment = augment
        self.sampling_method = sampling_method

        # proposals
        self.precomputed_prop = precomputed_prop 
        self.prop_path = os.path.join(BASE_DIR, 'proposals')
       
    def __len__(self):
        return len(self.scan_names)

    def augment_input(self, mesh_vertices, normals):
        if not self.use_color:
            point_cloud = mesh_vertices[:, 0:3] # do not use color for now
            pcl_color = mesh_vertices[:, 3:6]
        else:
            point_cloud = mesh_vertices[:, 0:6] 
            point_cloud[:,3:] = (point_cloud[:, 3:] - MEAN_COLOR_RGB) / 256.0
            pcl_color = mesh_vertices[:, 3:6]
        
        if self.use_height:
            floor_height = np.percentile(point_cloud[:, 2], 0.99)
            height = point_cloud[:, 2] - floor_height
            point_cloud = np.concatenate([point_cloud, np.expand_dims(height, 1)], 1) 

        if self.use_normal and normals is not None:
            point_cloud = np.concatenate([point_cloud, normals], 1) 

        return point_cloud, pcl_color
      
    def __getitem__(self, idx):
        """ Returns a dict with following keys:
            point_clouds: (N,3+C)
            center_label: (MAX_NUM_OBJ,3) for GT box center XYZ
            sem_cls_label: (MAX_NUM_OBJ,) semantic class index
            angle_class_label: (MAX_NUM_OBJ,) with int values in 0,...,NUM_HEADING_BIN-1
            angle_residual_label: (MAX_NUM_OBJ,)
            size_classe_label: (MAX_NUM_OBJ,) with int values in 0,...,NUM_SIZE_CLUSTER
            size_residual_label: (MAX_NUM_OBJ,3)
            box_label_mask: (MAX_NUM_OBJ) as 0/1 with 1 indicating a unique box
            scan_idx: int scan index in scan_names list
            pcl_color: unused
        """
        while True:
            scan_name = self.scan_names[idx]        
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



wypr/dataset/scannet/scannet.py [73:120]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self.num_points_sampled = num_points
        self.use_color = use_color        
        self.use_height = use_height
        self.use_normal = use_normal
        self.augment = augment
        self.sampling_method = sampling_method

        # proposals
        self.precomputed_prop = precomputed_prop 
        self.prop_path = os.path.join(BASE_DIR, 'proposals')
       
    def __len__(self):
        return len(self.scan_names)

    def augment_input(self, mesh_vertices, normals):
        if not self.use_color:
            point_cloud = mesh_vertices[:, 0:3] # do not use color for now
            pcl_color = mesh_vertices[:, 3:6]
        else:
            point_cloud = mesh_vertices[:, 0:6] 
            point_cloud[:,3:] = (point_cloud[:, 3:] - MEAN_COLOR_RGB) / 256.0
            pcl_color = mesh_vertices[:, 3:6]
        
        if self.use_height:
            floor_height = np.percentile(point_cloud[:, 2], 0.99)
            height = point_cloud[:, 2] - floor_height
            point_cloud = np.concatenate([point_cloud, np.expand_dims(height, 1)], 1) 

        if self.use_normal and normals is not None:
            point_cloud = np.concatenate([point_cloud, normals], 1) 

        return point_cloud, pcl_color
      
    def __getitem__(self, idx):
        """ Returns a dict with following keys:
            point_clouds: (N,3+C)
            center_label: (MAX_NUM_OBJ,3) for GT box center XYZ
            sem_cls_label: (MAX_NUM_OBJ,) semantic class index
            angle_class_label: (MAX_NUM_OBJ,) with int values in 0,...,NUM_HEADING_BIN-1
            angle_residual_label: (MAX_NUM_OBJ,)
            size_classe_label: (MAX_NUM_OBJ,) with int values in 0,...,NUM_SIZE_CLUSTER
            size_residual_label: (MAX_NUM_OBJ,3)
            box_label_mask: (MAX_NUM_OBJ) as 0/1 with 1 indicating a unique box
            scan_idx: int scan index in scan_names list
            pcl_color: unused
        """
        while True:
            scan_name = self.scan_names[idx]        
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



