

Using flashtorch.saliency module, let's visualize image-specific class saliency maps of AlexNet pre-trained on ImageNet classification tasks. By creating a saliency map for neural networks, we can gain some intuition on "where the network is paying the most attention to" in an input image. Saliency maps in computer vision provide indications of the most salient regions within images. Saliency in human visual perception is a subjective quality that makes certain things within the field of view stand out from the rest and grabs our attention.

You can inspect each module with Python built-in function help. _ascent: GradientAscent class for activation maximization.: Backprop class for calculating gradients.: ImageNetIndex class for easy-ish retrieval of class index.flashtorch.utils: some useful utility functions for data handling & transformation.
PYTHON VIDEO TOOLKIT INSTALL
Or if you are upgrading it: $ pip install flashtorch -U If you are installing FlashTorch for the first time: $ pip install flashtorch Take a look at the quick 3min intro/demo to FlashTorch below! Want to try? It is compatible with pre-trained models that come with torchvision, and seamlessly integrates with other custom models built in PyTorch. You can apply feature visualization techniques (such as saliency maps and activation maximization) on your model, with as little as a few lines of code. However, implementing such techniques is often complicated.įlashTorch was created to solve this problem! The lack of understanding on how neural networks make predictions enables unpredictable/biased models, causing real harm to society and a loss of trust in AI-assisted systems.įeature visualization is an area of research, which aims to understand how neural networks perceive images. Neural networks are often described as "black box". A Python visualization toolkit, built with PyTorch, for neural networks in PyTorch.
