README.md
August 17, 2023 ยท View on GitHub
Knowledge-aware Neuron Interpretation for Scene Classification
This repository contains the data and code for the paper "Knowledge-aware Neuron Interpretation for Scene Classification".
Data
All experimental results are conducted on the scenes datasets ADE20k with atomic concepts defined by annotations.
Experiments for Model Prediction Explanation
False Prediction
python Model_Prediction_Explanation/false_prediction.py
True Prediction
python Model_Prediction_Explanation/true_prediction.py
Experiments for Compositional Explanation
Using Concept Filtering
The complete results is at: Compositional_Explanation/using_concept_filtering/results-TransE-Dismult-TransD-ProjE_CLIP.csv.
Experiments for Model Manipulation
Data and Code Preparation
- Replace "/site-packages/torchvision/models/resnet.py" in your environment with "Model_Manipulation/replace_code/resnet.py"
Disabling Positive Neurons
python Model_Manipulation/model_manipulation/run_disable_pos_neurons.py
Disabling Negative Neurons
python Model_Manipulation/model_manipulation/run_disable_nega_neurons.py
Dependencies
pandas==0.25.3tqdm==4.30.0imageio==2.6.1scipy==1.4.1matplotlib==3.1.3Pillow==7.0.0seaborn==0.9.0scikit-image==0.16.2pyparsing==2.4.6pyeda==0.28.0pycocotools==2.0