Code Monkey home page Code Monkey logo

isee's Introduction

Kshitij Dwivedi, Gemma Roig, Aniruddh Kembhavi, Roozbeh Mottaghi

CVPR 2022

We present iSEE, a framework that allows interpreting the dynamic representation of the navigation agents in terms of human interpretable concepts. The navigation agents were trained using AllenAct framework. In this repository, we provide:

  • Dataset of RNN activations and concepts
  • Code to evaluate how well trained agents predict concepts
  • Code to get top-K relevant neurons for predicting a given concept

Citation

If you find this project useful in your research, please consider citing:

@InProceedings{Dwivedi_2022_CVPR,
    author    = {Dwivedi, Kshitij and Roig, Gemma and Kembhavi, Aniruddha and Mottaghi, Roozbeh},
    title     = {What Do Navigation Agents Learn About Their Environment?},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {10276-10285}
}

Contents

๐Ÿ’ป Installation

To begin, clone this repository locally

git clone https://github.com/allenai/iSEE.git

Install anaconda and create a new conda environment

conda create -n iSEE
conda activate iSEE

Install xgboost-gpu using the following command

conda install -c anaconda py-xgboost-gpu

Install other requirements

pip install -r requirements.txt

๐Ÿ“Š Dataset

Please download the dataset from here. Then unzip it inside data directory

Concept Prediction

Run the following script to evaluate how well concepts can be predicted by trained agent (Resnet-objectnav) and compare it to corresponding untrained baseline

python predict concepts.py --model resnet --task objectnav
Arguments:
  • --model: We used two architectures Resnet and SimpleConv. Options are resnet and simpleconv
  • --task: Options are objectnav and pointnav

The script will generate plots and save them in results/task/model/plots directory

TopK neurons

Run the following script to find which neurons were most relevant in predicting a given concept (e.g. front reachability) by a trained agent (Resnet-objectnav).

python get_topk_neurons.py --model resnet --task objectnav --concept reachable_R=2_theta=000
Arguments:
  • --model: We used two architectures Resnet and SimpleConv. Options are resnet and simpleconv
  • --task: Options are objectnav and pointnav
  • --concept: The concepts used in the paper are reachable_R=2_theta=000 (Reachability at 2xgridSize and front) and target_visibility. For full list of concepts in the dataset, please refer to columns of data/trajectory_dataset/train/objectnav_ithor_default_resnet_pretrained/metadata.pkl file.

The script will generate SHAP beeswarm plot for the concept and save it in results/task/model/shap_plots directory.

Acknowledgements

We thank the SHAP authors for easy to use code and ManipulaThor authors for Readme template.

isee's People

Contributors

kshitijd20 avatar

Watchers

 avatar  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.