mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
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
This commit is contained in:
parent
b6771233e0
commit
d35781f2d7
@ -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"],
|
||||
)
|
||||
]
|
||||
|
@ -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,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user