Improving saliency models’ predictions of the next fixation with humans’ intrinsic cost of gaze shifts
This is the official code for the Kadner et al. (2023) paper. It allows to calculate value maps for an arbitrary image given the saliency map of any model that we have covered in the paper.
The repository provides a pyproject.toml listing all requirements and a uv.lock file for exactly reproducing our environment with uv. These are necessary for running the Example notebook. The code for the inference of our model only depends on numpy and scipy.
The only function needed to interact with the model is evaluate_scan, which requires a saliency map, a scanpath and the information which model produced this saliency map and returns a value map for every fixation in the scanpath.
The scanpath is expected to be a numpy array of shape (N,2) with being the number of fixations in that scanpath.
For an example how to interact with this function, check out the Example notebook.