"git@developer.sourcefind.cn:OpenDAS/mmdetection3d.git" did not exist on "c42ad9587210431b36b862b66dd91a367b2d73d0"
Unverified Commit 2b635d25 authored by meng-zha's avatar meng-zha Committed by GitHub
Browse files

[Fix]: create_gt_database (#211)

* Fix bugs for the create_gt_database of kitti

* Fix bugs for '__get_item__' of BasePoints
parent b54cd169
...@@ -236,7 +236,9 @@ class BasePoints(object): ...@@ -236,7 +236,9 @@ class BasePoints(object):
stop = self.tensor.shape[1] + \ stop = self.tensor.shape[1] + \
1 if item[1].stop is None else item[1].stop 1 if item[1].stop is None else item[1].stop
step = 1 if item[1].step is None else item[1].step step = 1 if item[1].step is None else item[1].step
item = list(item)
item[1] = list(range(start, stop, step)) item[1] = list(range(start, stop, step))
item = tuple(item)
p = self.tensor[item[0], item[1]] p = self.tensor[item[0], item[1]]
keep_dims = list( keep_dims = list(
......
...@@ -157,6 +157,7 @@ def create_groundtruth_database(dataset_class_name, ...@@ -157,6 +157,7 @@ def create_groundtruth_database(dataset_class_name,
pipeline=[ pipeline=[
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=4, load_dim=4,
use_dim=4, use_dim=4,
file_client_args=file_client_args), file_client_args=file_client_args),
...@@ -174,6 +175,7 @@ def create_groundtruth_database(dataset_class_name, ...@@ -174,6 +175,7 @@ def create_groundtruth_database(dataset_class_name,
dict(type='LoadPointsFromFile', load_dim=5, use_dim=5), dict(type='LoadPointsFromFile', load_dim=5, use_dim=5),
dict( dict(
type='LoadPointsFromMultiSweeps', type='LoadPointsFromMultiSweeps',
coord_type='LIDAR',
sweeps_num=10, sweeps_num=10,
use_dim=[0, 1, 2, 3, 4], use_dim=[0, 1, 2, 3, 4],
pad_empty_sweeps=True, pad_empty_sweeps=True,
...@@ -198,6 +200,7 @@ def create_groundtruth_database(dataset_class_name, ...@@ -198,6 +200,7 @@ def create_groundtruth_database(dataset_class_name,
pipeline=[ pipeline=[
dict( dict(
type='LoadPointsFromFile', type='LoadPointsFromFile',
coord_type='LIDAR',
load_dim=6, load_dim=6,
use_dim=5, use_dim=5,
file_client_args=file_client_args), file_client_args=file_client_args),
...@@ -232,7 +235,7 @@ def create_groundtruth_database(dataset_class_name, ...@@ -232,7 +235,7 @@ def create_groundtruth_database(dataset_class_name,
example = dataset.pipeline(input_dict) example = dataset.pipeline(input_dict)
annos = example['ann_info'] annos = example['ann_info']
image_idx = example['sample_idx'] image_idx = example['sample_idx']
points = example['points'] points = example['points'].tensor.numpy()
gt_boxes_3d = annos['gt_bboxes_3d'].tensor.numpy() gt_boxes_3d = annos['gt_bboxes_3d'].tensor.numpy()
names = annos['gt_names'] names = annos['gt_names']
group_dict = dict() group_dict = dict()
......
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