castacks / DytanVO

[ICRA'23] DytanVO: Visual Odometry in Dynamic Environments
BSD 3-Clause "New" or "Revised" License
172 stars 20 forks source link

Why predcited motions are scaled using the gtmotion before calculating the ATE? #19

Open mhmd-j opened 9 months ago

mhmd-j commented 9 months ago

Why in line estimations are scaled using the gtmotions before calculating the ATE?

SecureSheII commented 9 months ago

Because monocular methods only predict up-to-scale translations. Need to recover the scale with GT before evaluation.

mhmd-j commented 9 months ago

Thanks for your response! However in evaluator.evaluate_one_trajectory(gtposes, estposes, scale=True, kittitype=(datastr=='kitti')) (here), the flag for the scale is true. Then, is passed to ate_score, gt_ate_aligned, est_ate_aligned = self.ate_eval.evaluate(gt_traj, est_traj, scale) (here) and then is used in rot, trans, trans_error, s = align(gt_xyz, est_xyz, scale) at here. The function align itself calculates the scale using the Horn method which is used to scale the predictions to ground truth. So why was there a need for the initial scaling before using the evaluator?

SecureSheII commented 9 months ago

The scale in per_frame_scale_alignment is the flag to simply scale up all translations to GT. The scale in align is the flag for a scale alignment to be done before comparing trajectories using ATE/RPE. Both are the referring to the same issue so per_frame_scale_alignment is indeed redundant here.