-
Notifications
You must be signed in to change notification settings - Fork 0
Model structure
Here you find an overview of the internal workings of the model.
The model expects cd/m^2 scaled input. You can find instructions for this conversion here.
We first apply the helper function watson_filter_eye, which implements a linear shift invariant filter approximation to the optics of the eye as describes by Watson (2013). This function also converts from cd/m^2 into td.
Next we apply foveate_image, which divides by the mean image luminance and subtracts 1 and applies a hand tuned linear filter to the image to adjust to the contrast sensitivity function (CSF).
There are two variants of this function 0 and 1. which differ in whether they apply the foveal cut out or not, i.e.:
- foveate_image0 applies only the two described steps
- foveate_image1 additionally cuts the input to 2x2 degrees around the provided fixation points and applies a raised cosine window to cut out an area.
Which of these is called is the difference between early_vision_model (which calls foveate_image1) and early_vision_model_NoFovea (which calls foveate_image0).
Next we decompose the image into spatial frequencies and orientations using the decomp_Gabor function, which is called as a first step in the V1 function described next.
The V1 function implements the divisive normalization by the surrounding orientations and frequencies. It's behavior is primarily governed by the V1Mode flag passed to the main model function which chooses how the normalization pool is chosen. The two first modes 1 and 2 correspond to a gaussian spatial frequency and orientation specific pool with infinitely small or infinitely large pool in space.
Noise is added in the main model function as a linear combination of a constant variance term plus a multiple of the signal.
To compare images we use the function compare images, which takes the representations of two images with their respective noise images as input and computes their discriminability.