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

ScoreCAM paper Algorithm1 implementation question #31

Open
CHILLQQ opened this issue Jun 30, 2023 · 1 comment
Open

ScoreCAM paper Algorithm1 implementation question #31

CHILLQQ opened this issue Jun 30, 2023 · 1 comment

Comments

@CHILLQQ
Copy link

CHILLQQ commented Jun 30, 2023

Hello,

I have a question about the implementation of the Algorithm1 of the ScoreCAM paper.
The code

              # how much increase if keeping the highlighted region
              # predication on masked input
              output = self.model_arch(input * norm_saliency_map)
              output = F.softmax(output)
              score = output[0][predicted_class]

suggests that the output is simply the masked images run through the original neural net. However, in the paper there is an additional step:
$S^{c} = f^c(M) - f^c(X_b)$.

I am not sure exactly why this step is needed in the first place, but since it is in the paper, I am curious why it does not seem to be in the code?

Thank you.

@usamahassan965
Copy link

Just comparing with baseline . But if you see the methodology diagram , this step is not done there.

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