hila-chefer / Transformer-Explainability

[CVPR 2021] Official PyTorch implementation for Transformer Interpretability Beyond Attention Visualization, a novel method to visualize classifications by Transformer based networks.
MIT License
1.75k stars 232 forks source link

ImageNet-Segmentation dataset #23

Closed JindongGu closed 3 years ago

JindongGu commented 3 years ago

Thank you for sharing your project code! Is that possible to release your ImageNet-Segmentation preparation code? The public available format is .mat, while the one used in your project is hdf5 and the data is organized in a specific way. Or any info to obtain the prepared dataset? Thanks in advance!

hila-chefer commented 3 years ago

Hi @JindongGu thanks for your interest in our work!

This is the code that produces the results for the segmentation tests, and it should work with a .mat format (this is the one that we used as well). You can see an example of the command to run in our readme: CUDA_VISIBLE_DEVICES=0 PYTHONPATH=./:$PYTHONPATH python baselines/ViT/imagenet_seg_eval.py --method transformer_attribution --imagenet-seg-path /path/to/gtsegs_ijcv.mat have you tried it yet?

Best, Hila.

hila-chefer commented 3 years ago

@JindongGu closing due to inactivity, please re-open if necessary. Thanks.