├── .DS_Store ├── README.md ├── data ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-37.pyc │ ├── cub2011.cpython-37.pyc │ ├── dataset_factory.cpython-37.pyc │ ├── loader.cpython-37.pyc │ ├── nabirds.cpython-37.pyc │ ├── stanford_dogs.cpython-37.pyc │ ├── transforms_factory.cpython-37.pyc │ └── vtab.cpython-37.pyc ├── cub2011.py ├── dataset_factory.py ├── loader.py ├── nabirds.py ├── stanford_dogs.py ├── transforms_factory.py └── vtab.py ├── figures ├── Train_cost.png ├── few-shot.png ├── ssf_ada_pssp.png ├── sup_mae_clip.png └── whole.png ├── models ├── as_mlp.py ├── clip.py ├── convnext.py ├── representation │ ├── .ipynb_checkpoints │ │ └── cross_head-checkpoint.py │ ├── MP.py │ ├── PSRP.py │ ├── __init__.py │ └── __pycache__ │ │ ├── MHC3.cpython-37.pyc │ │ ├── MP.cpython-37.pyc │ │ ├── PSRP.cpython-37.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── __init__.cpython-38.pyc │ │ ├── cross_head.cpython-37.pyc │ │ ├── cross_head.cpython-38.pyc │ │ └── normalization.cpython-38.pyc ├── swin_transformer.py └── vision_transformer.py ├── optim_factory.py ├── results ├── .DS_Store └── vit │ ├── fgvc │ └── results.csv │ └── imagenet │ ├── full-finetune.csv │ ├── linear_probe.csv │ ├── mp+.csv │ └── mp.csv ├── train.py ├── train_scripts ├── .DS_Store └── vit │ ├── .DS_Store │ ├── fgvc │ ├── cub2011 │ │ ├── train_mp+.sh │ │ └── train_mp.sh │ ├── nabirds │ │ ├── train_mp+.sh │ │ └── train_mp.sh │ ├── oxford_flowers │ │ ├── train_mp+.sh │ │ └── train_mp.sh │ ├── stanford_cars │ │ ├── train_mp+.sh │ │ └── train_mp.sh │ └── stanford_dogs │ │ ├── train_mp+.sh │ │ └── train_mp.sh │ └── imagenet │ ├── imagenet_1k │ ├── train_full.sh │ ├── train_linear_probe.sh │ ├── train_mp+.sh │ └── train_mp.sh │ ├── imagenet_a │ └── eval_mp.sh │ ├── imagenet_c │ └── eval_mp.sh │ └── imagenet_r │ └── eval_mp.sh ├── utils ├── __init__.py ├── imagenet_a.py ├── imagenet_r.py ├── mce_utils.py ├── scaler.py └── utils.py └── validate_ood.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/README.md -------------------------------------------------------------------------------- /data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__init__.py -------------------------------------------------------------------------------- /data/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/cub2011.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/cub2011.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/dataset_factory.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/dataset_factory.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/loader.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/loader.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/nabirds.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/nabirds.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/stanford_dogs.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/stanford_dogs.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/transforms_factory.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/transforms_factory.cpython-37.pyc -------------------------------------------------------------------------------- /data/__pycache__/vtab.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/__pycache__/vtab.cpython-37.pyc -------------------------------------------------------------------------------- /data/cub2011.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/cub2011.py -------------------------------------------------------------------------------- /data/dataset_factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/dataset_factory.py -------------------------------------------------------------------------------- /data/loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/loader.py -------------------------------------------------------------------------------- /data/nabirds.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/nabirds.py -------------------------------------------------------------------------------- /data/stanford_dogs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/stanford_dogs.py -------------------------------------------------------------------------------- /data/transforms_factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/transforms_factory.py -------------------------------------------------------------------------------- /data/vtab.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/data/vtab.py -------------------------------------------------------------------------------- /figures/Train_cost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/figures/Train_cost.png -------------------------------------------------------------------------------- /figures/few-shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/figures/few-shot.png -------------------------------------------------------------------------------- /figures/ssf_ada_pssp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/figures/ssf_ada_pssp.png -------------------------------------------------------------------------------- /figures/sup_mae_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/figures/sup_mae_clip.png -------------------------------------------------------------------------------- /figures/whole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/figures/whole.png -------------------------------------------------------------------------------- /models/as_mlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/as_mlp.py -------------------------------------------------------------------------------- /models/clip.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/clip.py -------------------------------------------------------------------------------- /models/convnext.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/convnext.py -------------------------------------------------------------------------------- /models/representation/.ipynb_checkpoints/cross_head-checkpoint.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/.ipynb_checkpoints/cross_head-checkpoint.py -------------------------------------------------------------------------------- /models/representation/MP.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/MP.py -------------------------------------------------------------------------------- /models/representation/PSRP.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/PSRP.py -------------------------------------------------------------------------------- /models/representation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__init__.py -------------------------------------------------------------------------------- /models/representation/__pycache__/MHC3.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/MHC3.cpython-37.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/MP.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/MP.cpython-37.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/PSRP.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/PSRP.cpython-37.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/cross_head.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/cross_head.cpython-37.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/cross_head.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/cross_head.cpython-38.pyc -------------------------------------------------------------------------------- /models/representation/__pycache__/normalization.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/representation/__pycache__/normalization.cpython-38.pyc -------------------------------------------------------------------------------- /models/swin_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/swin_transformer.py -------------------------------------------------------------------------------- /models/vision_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/models/vision_transformer.py -------------------------------------------------------------------------------- /optim_factory.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/optim_factory.py -------------------------------------------------------------------------------- /results/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/results/.DS_Store -------------------------------------------------------------------------------- /results/vit/fgvc/results.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/results/vit/fgvc/results.csv -------------------------------------------------------------------------------- /results/vit/imagenet/full-finetune.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/results/vit/imagenet/full-finetune.csv -------------------------------------------------------------------------------- /results/vit/imagenet/linear_probe.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/results/vit/imagenet/linear_probe.csv -------------------------------------------------------------------------------- /results/vit/imagenet/mp+.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/results/vit/imagenet/mp+.csv -------------------------------------------------------------------------------- /results/vit/imagenet/mp.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/results/vit/imagenet/mp.csv -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train.py -------------------------------------------------------------------------------- /train_scripts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/.DS_Store -------------------------------------------------------------------------------- /train_scripts/vit/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/.DS_Store -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/cub2011/train_mp+.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/cub2011/train_mp+.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/cub2011/train_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/cub2011/train_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/nabirds/train_mp+.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/nabirds/train_mp+.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/nabirds/train_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/nabirds/train_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/oxford_flowers/train_mp+.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/oxford_flowers/train_mp+.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/oxford_flowers/train_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/oxford_flowers/train_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/stanford_cars/train_mp+.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/stanford_cars/train_mp+.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/stanford_cars/train_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/stanford_cars/train_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/stanford_dogs/train_mp+.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/stanford_dogs/train_mp+.sh -------------------------------------------------------------------------------- /train_scripts/vit/fgvc/stanford_dogs/train_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/fgvc/stanford_dogs/train_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_1k/train_full.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_1k/train_full.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_1k/train_linear_probe.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_1k/train_linear_probe.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_1k/train_mp+.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_1k/train_mp+.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_1k/train_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_1k/train_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_a/eval_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_a/eval_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_c/eval_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_c/eval_mp.sh -------------------------------------------------------------------------------- /train_scripts/vit/imagenet/imagenet_r/eval_mp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/train_scripts/vit/imagenet/imagenet_r/eval_mp.sh -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/utils/__init__.py -------------------------------------------------------------------------------- /utils/imagenet_a.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/utils/imagenet_a.py -------------------------------------------------------------------------------- /utils/imagenet_r.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/utils/imagenet_r.py -------------------------------------------------------------------------------- /utils/mce_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/utils/mce_utils.py -------------------------------------------------------------------------------- /utils/scaler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/utils/scaler.py -------------------------------------------------------------------------------- /utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/utils/utils.py -------------------------------------------------------------------------------- /validate_ood.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mingzeG/Moment-Probing/HEAD/validate_ood.py --------------------------------------------------------------------------------