Giter Club home page Giter Club logo

timm-vis's Introduction

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

timm-vis's People

Contributors

novice03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

timm-vis's Issues

Load custom model

Dear @novice03

I would like to visualize features of my trained pre-trained model? I firstly used timm pre-trained model, fine-tune it and now i want to visualize features.

Dependencies aren't listed

setup.py is normally expected to have the 'requires*' section.
There are import statements for the matplotlib package, and it isn't listed as a run-time dependency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.