|
Algorithm 1 Class activation mapping. |
|
Require:
Image ; Network N
|
|
Ensure:
Replace FC layer with average pooling layer in Network N
|
| procedure CAM(I, N) |
| N(I) |
▹ Input image into network |
|
|
▹ Get weights from average polling layer |
|
|
▹ Feature map of the last convolution layer |
| layer |
|
|
▹ Weighted linear summation |
|
|
▹ Normalize and up-sample to Network input size |
|
|
▹ Final image heat map |
| end procedure |