Skip to content

Commit

Permalink
bugfixed: add num_points_in_gt to the waymo_infos for evaluation (ope…
Browse files Browse the repository at this point in the history
  • Loading branch information
sshaoshuai authored Nov 27, 2020
1 parent 5949628 commit c37a7a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pcdet/datasets/waymo/waymo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
def generate_labels(frame):
obj_name, difficulty, dimensions, locations, heading_angles = [], [], [], [], []
tracking_difficulty, speeds, accelerations, obj_ids = [], [], [], []

num_points_in_gt = []
laser_labels = frame.laser_labels
for i in range(len(laser_labels)):
box = laser_labels[i].box
Expand All @@ -36,6 +36,7 @@ def generate_labels(frame):
dimensions.append([box.length, box.width, box.height]) # lwh in unified coordinate of OpenPCDet
locations.append(loc)
obj_ids.append(laser_labels[i].id)
num_points_in_gt.append(laser_labels[i].num_lidar_points_in_box)

annotations = {}
annotations['name'] = np.array(obj_name)
Expand All @@ -46,6 +47,7 @@ def generate_labels(frame):

annotations['obj_ids'] = np.array(obj_ids)
annotations['tracking_difficulty'] = np.array(tracking_difficulty)
annotations['num_points_in_gt'] = np.array(num_points_in_gt)

annotations = common_utils.drop_info_with_name(annotations, name='unknown')
if annotations['name'].__len__() > 0:
Expand Down

0 comments on commit c37a7a1

Please sign in to comment.