MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / psnr

Function psnr

utils/image_utils.py:17–19  ·  view source on GitHub ↗
(img1, img2)

Source from the content-addressed store, hash-verified

15 return (((img1 - img2)) ** 2).view(img1.shape[0], -1).mean(1, keepdim=True)
16
17def psnr(img1, img2):
18 mse = (((img1 - img2)) ** 2).view(img1.shape[0], -1).mean(1, keepdim=True)
19 return 20 * torch.log10(1.0 / torch.sqrt(mse))

Callers 2

training_reportFunction · 0.90
evaluateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected