haofanwang / Score-CAM

Official implementation of Score-CAM in PyTorch
MIT License
399 stars 66 forks source link

I have some questions about paper and your implementation. #13

Closed jeongHwarr closed 3 years ago

jeongHwarr commented 3 years ago

Hello. I'm impressed with the idea of ​​this paper and want to apply it to my project. But there was an incomprehensible part between your thesis and code implementation.

In my understanding, CIC means difference between target score of original input image and target score multiplied by Mask and input image. Did I get it wrong?

In CIC, doesn't $X_b$ mean the input image? In your implementation, you used the target score for the mask multiplied by the input image to get the CIC. The target score for the original image is not subtracted. I can't understand this part very well. I want to know what I misunderstood.

Thank you!

haofanwang commented 3 years ago

Hi, @jeongHwarr. Thanks for your interest!

X_b is not the input image, it is a baseline. In my implementation, I just use a black image (all zeros) as a baseline, so you can ignore X_b here. Then the CIC is just the classification score of the masked input. If you are interested, you can try to use the input image as a baseline, it should also be fine.

Please let me know if you have further questions to apply this method to your project, I'm willing to help.

jeongHwarr commented 3 years ago

@haofanwang Okay I got it! Thank you for your reply