├── .gitignore ├── CLIP ├── .gitignore ├── LICENSE ├── MANIFEST.in ├── clip │ ├── __init__.py │ ├── auxilary.py │ ├── clip.py │ ├── model.py │ └── simple_tokenizer.py ├── example.py ├── model-card.md ├── requirements.txt ├── setup.py └── tests │ └── test_consistency.py ├── README.md ├── approaches ├── abn.py ├── base.py ├── coco_abn.py ├── coco_gender.py └── generic_cnn.py ├── attention └── grad_cam.py ├── configs ├── base.yaml ├── coco_abn.yaml ├── coco_attention.yaml ├── coco_gals.yaml ├── coco_upweight.yaml ├── coco_vanilla.yaml ├── food_abn.yaml ├── food_attention.yaml ├── food_gals.yaml ├── food_vanilla.yaml ├── waterbirds_100_abn.yaml ├── waterbirds_100_attention.yaml ├── waterbirds_100_gals.yaml ├── waterbirds_100_upweight.yaml ├── waterbirds_100_vanilla.yaml ├── waterbirds_95_abn.yaml ├── waterbirds_95_attention.yaml ├── waterbirds_95_gals.yaml ├── waterbirds_95_upweight.yaml ├── waterbirds_95_vanilla.yaml └── waterbirds_attention_background.yaml ├── datasets ├── coco.py ├── food.py ├── normalizations.py ├── waterbirds.py ├── waterbirds_background_task.py └── waterbirds_dataset_utils.py ├── env.yaml ├── extract_attention.py ├── framework.png ├── main.py ├── models ├── resnet.py └── resnet_abn.py ├── notebooks ├── CLIPFinetune.ipynb ├── COCO_gender.ipynb ├── PointingGame.ipynb ├── RunCLIP.ipynb └── Visualize_VL_Attention.ipynb ├── pointing_game.py ├── requirements.txt └── utils ├── attention_utils.py ├── general_utils.py ├── loss_utils.py └── rise.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/.gitignore -------------------------------------------------------------------------------- /CLIP/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/.gitignore -------------------------------------------------------------------------------- /CLIP/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/LICENSE -------------------------------------------------------------------------------- /CLIP/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include clip/bpe_simple_vocab_16e6.txt.gz 2 | -------------------------------------------------------------------------------- /CLIP/clip/__init__.py: -------------------------------------------------------------------------------- 1 | from .clip import * 2 | -------------------------------------------------------------------------------- /CLIP/clip/auxilary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/clip/auxilary.py -------------------------------------------------------------------------------- /CLIP/clip/clip.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/clip/clip.py -------------------------------------------------------------------------------- /CLIP/clip/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/clip/model.py -------------------------------------------------------------------------------- /CLIP/clip/simple_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/clip/simple_tokenizer.py -------------------------------------------------------------------------------- /CLIP/example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/example.py -------------------------------------------------------------------------------- /CLIP/model-card.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/model-card.md -------------------------------------------------------------------------------- /CLIP/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/requirements.txt -------------------------------------------------------------------------------- /CLIP/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/setup.py -------------------------------------------------------------------------------- /CLIP/tests/test_consistency.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/CLIP/tests/test_consistency.py -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/README.md -------------------------------------------------------------------------------- /approaches/abn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/approaches/abn.py -------------------------------------------------------------------------------- /approaches/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/approaches/base.py -------------------------------------------------------------------------------- /approaches/coco_abn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/approaches/coco_abn.py -------------------------------------------------------------------------------- /approaches/coco_gender.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/approaches/coco_gender.py -------------------------------------------------------------------------------- /approaches/generic_cnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/approaches/generic_cnn.py -------------------------------------------------------------------------------- /attention/grad_cam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/attention/grad_cam.py -------------------------------------------------------------------------------- /configs/base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/base.yaml -------------------------------------------------------------------------------- /configs/coco_abn.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/coco_abn.yaml -------------------------------------------------------------------------------- /configs/coco_attention.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/coco_attention.yaml -------------------------------------------------------------------------------- /configs/coco_gals.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/coco_gals.yaml -------------------------------------------------------------------------------- /configs/coco_upweight.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/coco_upweight.yaml -------------------------------------------------------------------------------- /configs/coco_vanilla.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/coco_vanilla.yaml -------------------------------------------------------------------------------- /configs/food_abn.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/food_abn.yaml -------------------------------------------------------------------------------- /configs/food_attention.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/food_attention.yaml -------------------------------------------------------------------------------- /configs/food_gals.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/food_gals.yaml -------------------------------------------------------------------------------- /configs/food_vanilla.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/food_vanilla.yaml -------------------------------------------------------------------------------- /configs/waterbirds_100_abn.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_100_abn.yaml -------------------------------------------------------------------------------- /configs/waterbirds_100_attention.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_100_attention.yaml -------------------------------------------------------------------------------- /configs/waterbirds_100_gals.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_100_gals.yaml -------------------------------------------------------------------------------- /configs/waterbirds_100_upweight.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_100_upweight.yaml -------------------------------------------------------------------------------- /configs/waterbirds_100_vanilla.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_100_vanilla.yaml -------------------------------------------------------------------------------- /configs/waterbirds_95_abn.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_95_abn.yaml -------------------------------------------------------------------------------- /configs/waterbirds_95_attention.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_95_attention.yaml -------------------------------------------------------------------------------- /configs/waterbirds_95_gals.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_95_gals.yaml -------------------------------------------------------------------------------- /configs/waterbirds_95_upweight.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_95_upweight.yaml -------------------------------------------------------------------------------- /configs/waterbirds_95_vanilla.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_95_vanilla.yaml -------------------------------------------------------------------------------- /configs/waterbirds_attention_background.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/configs/waterbirds_attention_background.yaml -------------------------------------------------------------------------------- /datasets/coco.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/datasets/coco.py -------------------------------------------------------------------------------- /datasets/food.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/datasets/food.py -------------------------------------------------------------------------------- /datasets/normalizations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/datasets/normalizations.py -------------------------------------------------------------------------------- /datasets/waterbirds.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/datasets/waterbirds.py -------------------------------------------------------------------------------- /datasets/waterbirds_background_task.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/datasets/waterbirds_background_task.py -------------------------------------------------------------------------------- /datasets/waterbirds_dataset_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/datasets/waterbirds_dataset_utils.py -------------------------------------------------------------------------------- /env.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/env.yaml -------------------------------------------------------------------------------- /extract_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/extract_attention.py -------------------------------------------------------------------------------- /framework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/framework.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/main.py -------------------------------------------------------------------------------- /models/resnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/models/resnet.py -------------------------------------------------------------------------------- /models/resnet_abn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/models/resnet_abn.py -------------------------------------------------------------------------------- /notebooks/CLIPFinetune.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/notebooks/CLIPFinetune.ipynb -------------------------------------------------------------------------------- /notebooks/COCO_gender.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/notebooks/COCO_gender.ipynb -------------------------------------------------------------------------------- /notebooks/PointingGame.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/notebooks/PointingGame.ipynb -------------------------------------------------------------------------------- /notebooks/RunCLIP.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/notebooks/RunCLIP.ipynb -------------------------------------------------------------------------------- /notebooks/Visualize_VL_Attention.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/notebooks/Visualize_VL_Attention.ipynb -------------------------------------------------------------------------------- /pointing_game.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/pointing_game.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/requirements.txt -------------------------------------------------------------------------------- /utils/attention_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/utils/attention_utils.py -------------------------------------------------------------------------------- /utils/general_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/utils/general_utils.py -------------------------------------------------------------------------------- /utils/loss_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/utils/loss_utils.py -------------------------------------------------------------------------------- /utils/rise.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spetryk/GALS/HEAD/utils/rise.py --------------------------------------------------------------------------------