From 875a1eec0505b91cc7bea27ecd15668b5fb300f1 Mon Sep 17 00:00:00 2001 From: HTensor Date: Thu, 27 Apr 2023 13:29:57 +0800 Subject: [PATCH] change d1 to err2.0 in middlebury --- IGEV-Stereo/core/submodule.py | 1 + IGEV-Stereo/evaluate_stereo.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/IGEV-Stereo/core/submodule.py b/IGEV-Stereo/core/submodule.py index eec0fe5..c5a5f8a 100644 --- a/IGEV-Stereo/core/submodule.py +++ b/IGEV-Stereo/core/submodule.py @@ -157,6 +157,7 @@ def groupwise_correlation(fea1, fea2, num_groups): return cost def build_gwc_volume(refimg_fea, targetimg_fea, maxdisp, num_groups): + # batch, groups, max_disp, height, width B, C, H, W = refimg_fea.shape volume = refimg_fea.new_zeros([B, num_groups, maxdisp, H, W]) for i in range(maxdisp): diff --git a/IGEV-Stereo/evaluate_stereo.py b/IGEV-Stereo/evaluate_stereo.py index a13d026..ae61eea 100644 --- a/IGEV-Stereo/evaluate_stereo.py +++ b/IGEV-Stereo/evaluate_stereo.py @@ -200,7 +200,7 @@ def validate_middlebury(model, iters=32, split='F', mixed_prec=False, max_disp=1 out = (epe_flattened > 2.0) image_out = out[val].float().mean().item() image_epe = epe_flattened[val].mean().item() - logging.info(f"Middlebury Iter {val_id+1} out of {len(val_dataset)}. EPE {round(image_epe,4)} D1 {round(image_out,4)}") + logging.info(f"Middlebury Iter {val_id+1} out of {len(val_dataset)}. EPE {round(image_epe,4)} Err2.0 {round(image_out,4)}") epe_list.append(image_epe) out_list.append(image_out) @@ -208,10 +208,10 @@ def validate_middlebury(model, iters=32, split='F', mixed_prec=False, max_disp=1 out_list = np.array(out_list) epe = np.mean(epe_list) - d1 = 100 * np.mean(out_list) + err2 = 100 * np.mean(out_list) - print(f"Validation Middlebury{split}: EPE {epe}, D1 {d1}") - return {f'middlebury{split}-epe': epe, f'middlebury{split}-d1': d1} + print(f"Validation Middlebury{split}: EPE {epe}, Err2.0 {err2}") + return {f'middlebury{split}-epe': epe, f'middlebury{split}-err2.0': err2} if __name__ == '__main__':