Skip to content
IBD: Interpretable Basis Decomposition for Visual Explanation
Branch: master
Clone or download
sunyiyou update readme
Latest commit 6fda25a Aug 7, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
result/pytorch_resnet18_places365 init Jul 11, 2018
script init Jul 11, 2018
util add train and test script Aug 6, 2018
visualize update readme Aug 7, 2018 update readme Aug 7, 2018 update readme Aug 7, 2018

IBD: Interpretable Basis Decomposition for Visual Explanation


This repository contains the demo code for the ECCV'18 paper "Interpretable Basis Decomposition for Visual Explanation".


  • Clone the code of Network Dissection Lite from github
    git clone
    cd IBD
  • Download the Broden dataset (~1GB space) and the example pretrained model. If you already download this, you can create a symbolic link to your original dataset.

Note that AlexNet models work with 227x227 image input, while VGG, ResNet, GoogLeNet works with 224x224 image input.


  • Python Environments
    pip3 install numpy sklearn scipy scikit-image matplotlib easydict torch torchvision

Note: The repo was written by pytorch-0.3.1. (PyTorch, Torchvision)

Run IBD in PyTorch

  • You can configure to load your own model, or change the default parameters.

  • Run IBD


IBD Result

  • At the end of the dissection script, a HTML-formatted report will be generated inside result folder that summarizes the interpretable units of the tested network.

Train Concept Basis

  • If you want to train the concept basis, delete the pretrained files first.
    rm result/pytorch_resnet18_places365/snapshot/14.pth 
    rm result/pytorch_resnet18_places365/decompose.npy 

  • Run the train script.
  • Then run IBD.


If you find the codes useful, please cite this paper

  title={Interpretable Basis Decomposition for Visual Explanation},
  author={Zhou, Bolei* and Sun, Yiyou* and Bau, David* and Torralba, Antonio},
  booktitle={European Conference on Computer Vision},
You can’t perform that action at this time.