Home

Awesome

IBD: Interpretable Basis Decomposition for Visual Explanation

Introduction

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

Download

    git clone https://github.com/CSAILVision/IBD
    cd IBD
    ./script/dlbroden.sh
    ./script/dlzoo.sh

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

Requirements

    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

    python3 test.py

IBD Result

Train Concept Basis

    rm result/pytorch_resnet18_places365/snapshot/14.pth 
    rm result/pytorch_resnet18_places365/decompose.npy 

    python3 train.py
    python3 test.py

Reference

If you find the codes useful, please cite this paper

@inproceedings{IBD2018,
  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},
  year={2018}
}