diff --git a/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py b/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py index 143235aa..9393ac40 100644 --- a/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py +++ b/pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py @@ -297,7 +297,7 @@ def eval_batch( mask=mask_crop, ) - for loss_fg_mask, name_postfix in zip((mask_crop, mask_fg), ("", "_fg")): + for loss_fg_mask, name_postfix in zip((mask_crop, mask_fg), ("_masked", "_fg")): loss_mask_now = mask_crop * loss_fg_mask @@ -345,11 +345,11 @@ def eval_batch( ) if lpips_model is not None: - for gt_image_type in ("_full_image", ""): + for gt_image_type in ("_full_image", "_masked"): im1, im2 = [ 2.0 * im.clamp(0.0, 1.0) - 1.0 # pyre-ignore[16] for im in ( - image_rgb_masked if gt_image_type == "" else image_rgb, + image_rgb_masked if gt_image_type == "_masked" else image_rgb, cloned_render["image_render"], ) ] diff --git a/tests/implicitron/test_evaluation.py b/tests/implicitron/test_evaluation.py index 375f6ab0..1ac9db3b 100644 --- a/tests/implicitron/test_evaluation.py +++ b/tests/implicitron/test_evaluation.py @@ -254,14 +254,14 @@ class TestEvaluation(unittest.TestCase): ) lower_better = { - "psnr": False, + "psnr_masked": False, "psnr_fg": False, "psnr_full_image": False, "depth_abs_fg": True, "iou": False, - "rgb_l1": True, + "rgb_l1_masked": True, "rgb_l1_fg": True, - "lpips": True, + "lpips_masked": True, "lpips_full_image": True, }