Commit 0ccbbaae authored by Shaoshuai Shi's avatar Shaoshuai Shi
Browse files

support FILTER_EMPTY_BOXES_FOR_TRAIN and DISABLE_NLZ_FLAG_ON_POINTS for WOD by...

support FILTER_EMPTY_BOXES_FOR_TRAIN and DISABLE_NLZ_FLAG_ON_POINTS for WOD by default, eval with sample_interval=1
parent f6c824cc
......@@ -161,6 +161,7 @@ class WaymoDataset(DatasetTemplate):
point_features = np.load(lidar_file) # (N, 7): [x, y, z, intensity, elongation, NLZ_flag]
points_all, NLZ_flag = point_features[:, 0:5], point_features[:, 5]
if not self.dataset_cfg.get('DISABLE_NLZ_FLAG_ON_POINTS', False):
points_all = points_all[NLZ_flag == -1]
points_all[:, 3] = np.tanh(points_all[:, 3])
return points_all
......@@ -200,6 +201,12 @@ class WaymoDataset(DatasetTemplate):
else:
gt_boxes_lidar = annos['gt_boxes_lidar']
if self.training and self.dataset_cfg.get('FILTER_EMPTY_BOXES_FOR_TRAIN', False):
mask = (annos['num_points_in_gt'] > 0) # filter empty boxes
annos['name'] = annos['name'][mask]
gt_boxes_lidar = gt_boxes_lidar[mask]
annos['num_points_in_gt'] = annos['num_points_in_gt'][mask]
input_dict.update({
'gt_names': annos['name'],
'gt_boxes': gt_boxes_lidar,
......
......@@ -11,9 +11,12 @@ DATA_SPLIT: {
SAMPLED_INTERVAL: {
'train': 5,
'test': 5
'test': 1
}
FILTER_EMPTY_BOXES_FOR_TRAIN: True
DISABLE_NLZ_FLAG_ON_POINTS: True
USE_SHARED_MEMORY: False
SHARED_MEMORY_FILE_LIMIT: 35000 # set it based on the size of your shared memory
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment