Using metameric loss
This engineering note will give you an idea about using the metameric perceptual loss in
This note is compiled by
If you have further questions regarding this note, please email
Our metameric loss function works in a very similar way to built in loss functions in
pytorch, such as
However, it has a number of parameters which can be adjusted on creation (see the documentation).
Additionally, when calculating the loss a gaze location must be specified. For example:
The loss function caches some information, and performs most efficiently when repeatedly calculating losses for the same image size, with the same gaze location and foveation settings.
We recommend adjusting the parameters of the loss function to match your application.
Most importantly, please set the
real_viewing_distance parameters to correspond to how your image will be displayed to the user.
alpha parameter controls the intensity of the foveation effect.
You should only need to set
alpha once - you can then adjust the width and viewing distance to achieve the same apparent foveation effect on a range of displays & viewing conditions.
Note that we assume the pixels in the displayed image are square, and derive the height from the image dimensions.
We also provide two baseline loss functions
MetamerMSELoss which function in much the same way.
At the present time the loss functions are implemented only for images displayed to a user on a flat 2D display (e.g. an LCD computer monitor). Support for equirectangular 3D images is planned for the future.