Skip to content

Commit d35781f

Browse files
davnov134facebook-github-bot
authored andcommitted
Rename psnr -> psnr_masked to avoid confusion
Summary: Previously, "psnr" was evaluated between the masked g.t. image and the render. To avoid confusion, "psnr" is now renamed to "psnr_masked". Reviewed By: bottler Differential Revision: D38707511 fbshipit-source-id: 8ee881ab1a05453d6692dde9782333a47d8c1234
1 parent b677123 commit d35781f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pytorch3d/implicitron/evaluation/evaluate_new_view_synthesis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def eval_batch(
297297
mask=mask_crop,
298298
)
299299

300-
for loss_fg_mask, name_postfix in zip((mask_crop, mask_fg), ("", "_fg")):
300+
for loss_fg_mask, name_postfix in zip((mask_crop, mask_fg), ("_masked", "_fg")):
301301

302302
loss_mask_now = mask_crop * loss_fg_mask
303303

@@ -345,11 +345,11 @@ def eval_batch(
345345
)
346346

347347
if lpips_model is not None:
348-
for gt_image_type in ("_full_image", ""):
348+
for gt_image_type in ("_full_image", "_masked"):
349349
im1, im2 = [
350350
2.0 * im.clamp(0.0, 1.0) - 1.0 # pyre-ignore[16]
351351
for im in (
352-
image_rgb_masked if gt_image_type == "" else image_rgb,
352+
image_rgb_masked if gt_image_type == "_masked" else image_rgb,
353353
cloned_render["image_render"],
354354
)
355355
]

tests/implicitron/test_evaluation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ def _check_metrics(self, frame_data, implicitron_render, eval_result):
254254
)
255255

256256
lower_better = {
257-
"psnr": False,
257+
"psnr_masked": False,
258258
"psnr_fg": False,
259259
"psnr_full_image": False,
260260
"depth_abs_fg": True,
261261
"iou": False,
262-
"rgb_l1": True,
262+
"rgb_l1_masked": True,
263263
"rgb_l1_fg": True,
264-
"lpips": True,
264+
"lpips_masked": True,
265265
"lpips_full_image": True,
266266
}
267267

0 commit comments

Comments
 (0)