Principal feature visualization is a visualization technique for convolutional neural networks that highlights the contrasting features in a batch of images. It produces one RGB heatmap per input image.
- pytorch
- numpy
- torchvision
- matplotlib
- pillow
Install the dependencies listed above, and run the example in demo.py: python demo.py
A trained network shows good localization:
But an untrained (re-initialized) network shows scrambled output, as expected: