Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic error in code #195

Open
Anupam-USP opened this issue Sep 7, 2021 · 1 comment
Open

Logic error in code #195

Anupam-USP opened this issue Sep 7, 2021 · 1 comment

Comments

@Anupam-USP
Copy link

Anupam-USP commented Sep 7, 2021

In the file saliency_detection.py, at line 384, the distance formulae were expected to be from page 4 of the source paper by Zhou B. et al. However, the weight coefficient is omitted from the code. As varying the weight coefficient results in comparatively different outputs, I wanted to know whether the omission was intended or not. We have integrated the weight coefficient as such,

D = math.sqrt(dc2 + w * ds2 * math.pow(m/interval , 2) )

@zhuzhenxi
Copy link
Contributor

zhuzhenxi commented Sep 11, 2021

D1 = math.sqrt(dc2 + ds2 * (m1 / interval) ** 2)
D2 = math.sqrt(dc2 + w * ds2 * math.pow(m2/interval , 2) )

Because here m, interval, and w depend on 3 independent hyperparameters, these two ways of writing differ by only one constant. Specifically,

math.pow(m1 , 2) == w * math.pow(m2 , 2)

You can change m1 to vary the weight coefficient to get different outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants