pysaliency
pysaliency copied to clipboard
How to compute the IG score of the LSUN 2016 Challenge.
Hello @matthias-k ,
I don't really understand how you compute the information gain score as unique number for the LSUN challenge. Could please show me how to compute this score, with jupiter or a python script?
Thanks, Junting
Hello @junting,
sorry for the long delay. For a probabilistic model (pysaliency.model
) this is easy: You need a baseline model to compare to. I recommend to use a nonparametric prior model to capture the centerbias:
from pysaliency.baselines import BaselineModel
baseline = BaselineModel(stimuli, fixations, bandwidth=0.03)
ig = (my_model.log_likelihood(stimuli, fixations) - baseline.log_likelihood(stimuli, fixations))/np.log(2)
I divide by log(2) to get a number in bits/fixation instead of nats/fixation.
If don't have a probabilistic saliency model, you first have to convert the model to a probabilistic model. If this is the case let me know, then I will give you more details on how we did this for this years LSUN challenge.
Hello @junting,
sorry for the long delay. For a probabilistic model (
pysaliency.model
) this is easy: You need a baseline model to compare to. I recommend to use a nonparametric prior model to capture the centerbias:from pysaliency.baselines import BaselineModel baseline = BaselineModel(stimuli, fixations, bandwidth=0.03) ig = (my_model.log_likelihood(stimuli, fixations) - baseline.log_likelihood(stimuli, fixations))/np.log(2)
I divide by log(2) to get a number in bits/fixation instead of nats/fixation.
If don't have a probabilistic saliency model, you first have to convert the model to a probabilistic model. If this is the case let me know, then I will give you more details on how we did this for this years LSUN challenge.
Hello, would you please include the instructions on how to convert our model to a probabilistic model? When I use your code, I encounter the error : 'SaliencyMapModelFromDirectory' object has no attribute 'log_likelihood'