nr3d_lib icon indicating copy to clipboard operation
nr3d_lib copied to clipboard

fix calculation of PSNR(if only_in_mask)

Open Maemaemaeko opened this issue 10 months ago • 0 comments

If only_in_mask is True, the PSNR is too small, because the shape of mask does not match x (or y).

For example, when x(or y) is (W, H, 3) and mask is (W, H, 1), the sum of error should be divided by not mask.sum(), but mask.sum()*3.

Maemaemaeko avatar Feb 26 '25 15:02 Maemaemaeko