Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extractor Comparison Update #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyboreas/data/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def dim(self):
class Aeva(Lidar):
def __init__(self, path):
Lidar.__init__(self, path)
self._dim = 7
self._dim = 10

def load_data(self):
self.points = load_lidar(self.path, dim=self._dim)
Expand Down
22 changes: 20 additions & 2 deletions pyboreas/eval/odometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,17 @@ def eval_odom(pred="test/demo/pred/3d", gt="test/demo/gt", radar=False):
seq = get_sequences(pred, ".txt")
T_pred, times_pred, seq_lens_pred = get_sequence_poses(pred, seq)

# For sequences where there are extractor specific parameters in the name
# Ex: 'boreas-2021-10-15-12-35_kstrongest_3_0f35.txt' -> 'boreas-2021-10-15-12-35.txt'
seq_gt = []
for s in seq:
curr_seq = s.split('_')[0]
if ".txt" != curr_seq[-4:]:
curr_seq=curr_seq+".txt"
seq_gt.append(curr_seq)

# get corresponding groundtruth poses
T_gt, _, seq_lens_gt, crop = get_sequence_poses_gt(gt, seq, dim)
T_gt, _, seq_lens_gt, crop = get_sequence_poses_gt(gt, seq_gt, dim)

# compute errors
t_err, r_err, _ = compute_kitti_metrics(
Expand All @@ -45,8 +54,17 @@ def eval_odom_vel(pred="test/demo/pred/3d", gt="test/demo/gt", radar=False):
seq = get_sequences(pred, ".txt")
vel_pred, times_pred, seq_vel_lens_pred = get_sequence_velocities(pred, seq, dim)

# For sequences where there are extractor specific parameters in the name
# Ex: 'boreas-2021-10-15-12-35_kstrongest_3_0f35.txt' -> 'boreas-2021-10-15-12-35.txt'
seq_gt = []
for s in seq:
curr_seq = s.split('_')[0]
if ".txt" != curr_seq[-4:]:
curr_seq=curr_seq+".txt"
seq_gt.append(curr_seq)

# get corresponding groundtruth poses
vel_gt, _, seq_lens_gt, crop = get_sequence_velocities_gt(gt, seq, dim)
vel_gt, _, seq_lens_gt, crop = get_sequence_velocities_gt(gt, seq_gt, dim)

# compute errors
v_RMSE, v_mean, v_RMSE_out, v_mean_out = compute_vel_metrics(vel_gt, vel_pred, times_pred, seq, pred, dim, crop)
Expand Down