fit_a_nef.metrics.simse
- fit_a_nef.metrics.simse(a: Array, b: Array) Array
Vectorized version of simse. Takes similar arguments as simse but with additional array axes over which simse is mapped.
Original documentation:
Returns the Scale-Invariant Mean Squared Error between a and b.
For each image pair, a scaling factor for b is computed as the solution to the following problem:
min_alpha || vec(a) - alpha * vec(b) ||_2^2
where a and b are flattened, i.e., vec(x) = np.flatten(x). The MSE between the optimally scaled b and a is returned: mse(a, alpha*b).
This is a scale-invariant metric, so for example: simse(x, y) == sims(x, y*5).
This metric was used in “Shape, Illumination, and Reflectance from Shading” by Barron and Malik, TPAMI, ‘15.
- param a:
First image (or set of images).
- type a:
jax.Array
- param b:
Second image (or set of images).
- type b:
jax.Array
- return:
SIMSE between a and b.
- rtype:
jax.Array