updated render and metrics files

This commit is contained in:
Ethan Weber committed 2023-04-12 22:48:40 +00:00
1 parent b9131de476
commit 8146ea1ed4
4 files changed
+23 -24

No files matched your search

+2 -7
View File
@@ -3,7 +3,7 @@ Test metrics
"""
import torch
from nerfstudio.utils.metrics import PSNRModule, SSIMModule, LPIPSModule
from nerfstudio.utils.metrics import LPIPSModule, PSNRModule, SSIMModule
def test_psnr():
@@ -55,14 +55,9 @@ def test_lpips():
# test non-masked version
lpips = lpips_module(preds=pred, target=target)
print(lpips)
assert lpips.shape == (bs,)
# test masked version
lpips = lpips_module(preds=pred, target=target, mask=mask)
assert lpips.shape == (bs,)
if __name__ == "__main__":
test_psnr()
test_ssim()
test_lpips()