From b0f2cc0b8f70332ce9ccf255bd35312936f3b944 Mon Sep 17 00:00:00 2001 From: Lucas Nunes Date: Mon, 28 Oct 2024 15:21:00 +0100 Subject: [PATCH] fix eval script --- lidiff/utils/eval_path.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lidiff/utils/eval_path.py b/lidiff/utils/eval_path.py index 58c5179..2b34414 100644 --- a/lidiff/utils/eval_path.py +++ b/lidiff/utils/eval_path.py @@ -106,17 +106,16 @@ def get_ground_truth(pose, cur_scan, seq_map, max_range): @click.option('--path', '-p', type=str, default='', help='path to the scan sequence') @click.option('--voxel_size', '-v', type=float, default=0.05, help='voxel size') @click.option('--max_range', '-m', type=float, default=50, help='max range') -@click.option('--ckpt_path', '-c', type=str, help='path to the checkpoint for diffusion pipeline') -@click.option('--diff', '-d', is_flag=True, help='run diffusion pipeline') -def main(path, voxel_size, max_range, ckpt_path, diff): - diff_completion = DiffCompletion(ckpt_path) if diff else None +@click.option('--denoising_steps', '-t', type=int, default=50, help='number of denoising steps') +@click.option('--cond_weight', '-s', type=float, default=6.0, help='conditioning weights') +@click.option('--diff', '-d', type=str, help='run diffusion pipeline') +@click.option('--refine', '-r', type=str, help='path to the checkpoint for refinement net') +def main(path, voxel_size, max_range, denoising_steps, cond_weight, diff, refine): + diff_completion = DiffCompletion(diff, refine, denoising_steps, cond_weight) poses = load_poses(os.path.join(PATH_DATA, 'calib.txt'), os.path.join(PATH_DATA, 'poses.txt')) seq_map = np.load(f'{PATH_DATA}/map_clean.npy') - if not diff: - print(f'Evaluating baseline {path.split("/")[-3]}') - jsd_3d = [] jsd_bev = []