pysaliency icon indicating copy to clipboard operation
pysaliency copied to clipboard

How to compute the IG score of the LSUN 2016 Challenge.

Open junting opened this issue 8 years ago • 2 comments

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

junting avatar Oct 19 '16 20:10 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.

matthias-k avatar Dec 04 '16 20:12 matthias-k

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'

ManooshSamiei avatar Mar 24 '21 17:03 ManooshSamiei