Skip to main content

Visualizer for PyTorch image models

Project description

PyTorch Image Models Visualizer

Implementation of various visualization techniques for pytorch image classifiers. This library can be used to visualize and understand any PyTorch image classifier. This is NOT an official PyTorch library, nor is it affiliated with Ross Wightman's pytorch-image-models library. details.ipynb has visual examples of all methods implemented.

Currently, the following methods are implemented:

  • Filter visualization
  • Activations visualization
  • Maximally activated patches
  • Saliency maps [1]
  • Synthetic image generation [1]
  • Adversarial attacks to fool models
  • Feature inversion [2]
  • Grad-CAM [3]
  • Deep Dream [4]

Specific examples and details about the implementation and parameters of the above methods are described in details.ipynb. All of the above visualization techniques are discussed in this lecture.

Installation

$ pip install timm-vis

Usage

from timm_vis.methods import *

# available methods - visualize_filters, visualize_activations, 
#   maximally_activated_patches, saliency_map, 
#   generate_image, fool_model, feature_inversion, deep_dream

Paper References

[1] Karen Simonyan, Andrea Vedaldi, Andrew Zisserman. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps. https://arxiv.org/abs/1312.6034.

[2] Aravindh Mahendran, Andrea Vedaldi. Understanding Deep Image Representations by Inverting Them https://arxiv.org/abs/1412.0035

[3] Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, Dhruv Batra. Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization [https://arxiv.org/abs/1610.02391 (https://arxiv.org/abs/1610.02391)]

[4] Alexander Mordvintsev, Christopher Olah, Mike Tyka. Inceptionism: Going Deeper into Neural Networks https://ai.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html

Code References

[5] Ross Wightman pytorch-image-models

[6] Irfan Alghani Khalid Saliency Map for Visualizing Deep Learning Model Using PyTorch

[7] Utku Ozbulak. pytorch-cnn-adversarial-attacks

[8] Duc Ngo deep-dream-in-pytorch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timm_vis-2.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

timm_vis-2.0.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file timm_vis-2.0.0.tar.gz.

File metadata

  • Download URL: timm_vis-2.0.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for timm_vis-2.0.0.tar.gz
Algorithm Hash digest
SHA256 bdc42c3d6b0cb541cc91148e5d501fb9bfbde96820f8749d9b9586854ff531fc
MD5 af9aa954cf5d92f198215ee0b98a3f23
BLAKE2b-256 74104e258078d0083a689526df9b92a6897d6337a4abcacdcfd312796f32b9cb

See more details on using hashes here.

File details

Details for the file timm_vis-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: timm_vis-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for timm_vis-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c40e233620332cd4e27457c958b5195420f4d6ba059cda12fb5dac677dfdf1d
MD5 ce13970f2e1f7c444ea50f66b8eb2618
BLAKE2b-256 bc131b8a2a1ef80334fe757268a69186e74c9c4cbb65ac342abbf7e723c51243

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page