One of the major points the authors of CAM insist upon is the ability of Global Average Pooled CNNs to extract features and indentify objects even if they are not specifically trained to do so.

By GAP-CNNs they mean a CNNs which is bestowed with a GAP layer just between the last convolutional and the final fully connected classifier.

The authors summarize the general setting:

enter image description here

Then, they go on and define how the CAM itself can be obtained:

enter image description here

The equation to look upon is $(2)$, since it defines every spatial element of the CAM. In this way they get a tensor which has the same dimensions of the last feature map outputted by the last conv layer. Then, typically one upsamples such map and visualize it in overlay with the original image to 'see what the cnn considers important for classifying such image'.

My question is:

The authors insist a lot about the importance of Global Average Pooling, but in the end, the define their CAMs in a way that does not consider the GAP layer at all.

To avoid ambiguities, I'm referring to:

$$ \sum_{k} w^c_k f_k(x,y) $$

Written as such, it's like the Dense is directly connected with the last conv. On the other hand, if plug in the GAP, you just obtain a vector whose dimesion corresponds to the number of classes, quite useless for visualization purposes.

Can someone shed a bit of light about that? Thanks!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.