Git Product home page Git Product logo

project-tcav's Introduction

Project-TCAV

About

A framework built on top of the original work from Been Kim in "Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)" See https://github.com/tensorflow/tcav.

The framework includes - among other things - funtionality for running the original work using bash on linux, generating and running tcav on noisy versions of the original images, as well as classifing the same images using GoogleNet to compare accuracy with the tcav interpretability score and saliency maps.

The target concept of zebra, as well as the concepts of striped, zigzagged and dotted are already downloaded and available in the tcav/data/ directory in clean images and for 10 different noise levels. Additional data can be downloaded and/or generated using download_and_make_datasets.py and saltandpepper.ipynb

Usage

The main functionality can be run like so

Recreating original paper results: To recreate the original paper results the file RECREATE_RESULTS.ipynb has been used.

Generate images with salt/pepper noise: Generate noisy versions of the target images using saltandpepper.ipynb.

Run TCAV Framework for a given folder of data: This can be done using the RUNTCAV.py and passed arguments based on the needs and data available in tcav/data. Generated TCAV scores for the concepts and saves results.

Run TCAV Framework for many folders at once: Useful when getting results for images of many different noise levels. Can be run in RUN_ALL_TCAVS.py.

Plot results: Many different results can be plotted in plot_resuts.py.

Compute saliency maps: Saliency maps for images can be computed and visualized in saliency_maps.ipynb. Please note that the code for computing saliency maps is mostly copied from the github repository at: https://github.com/sunnynevarekar/pytorch-saliency-maps

project-tcav's People

Contributors

sebastianbitsch avatar

Watchers

 avatar

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.