├── .gitignore ├── LICENSE ├── README.md ├── configs ├── datasets │ ├── office31.yaml │ ├── officehome.yaml │ └── visda17.yaml └── trainers │ ├── .DS_Store │ ├── CLIP │ ├── b32_ep100_office31.yaml │ ├── b32_ep100_officehome.yaml │ ├── b32_ep100_visda.yaml │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml │ ├── CoCoOp │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml │ ├── CoOp │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml │ ├── DAPL │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ ├── b32_ep20_office31.yaml │ └── ep25-32.yaml │ ├── IVLP │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml │ ├── MaPLe │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml │ ├── PDA │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml │ └── VPT │ ├── b32_ep10_officehome.yaml │ ├── b32_ep10_visda.yaml │ └── b32_ep20_office31.yaml ├── datasets ├── __init__.py ├── office31.py ├── officehome.py └── visda17.py ├── model.jpg ├── requirements.txt ├── scripts ├── clip │ ├── eval_clip.sh │ └── main_clip.sh ├── cocoop │ ├── eval_cocoop.sh │ └── main_cocoop.sh ├── coop │ ├── eval_coop.sh │ └── main_coop.sh ├── dapl │ ├── eval_dapl.sh │ └── main_dapl.sh ├── ivlp │ ├── eval_ivlp.sh │ └── main_ivlp.sh ├── maple │ ├── eval_maple.sh │ └── main_maple.sh ├── pda │ ├── eval_pda.sh │ └── main_pda.sh └── vpt │ ├── eval_vpt.sh │ └── main_vpt.sh ├── train.py ├── trainers ├── __init__.py ├── baseda.py ├── clip │ ├── clip_ft.py │ ├── clip_lpfc.py │ ├── clip_lplr.py │ └── clip_zs.py ├── da │ ├── dapl.py │ └── pda.py ├── lp │ ├── cocoop.py │ └── coop.py ├── vlp │ ├── ivlp.py │ └── maple.py └── vp │ └── vpt.py └── utils ├── clip_part.py ├── ift_block.py ├── templates.py └── visual_prompt.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/README.md -------------------------------------------------------------------------------- /configs/datasets/office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/datasets/office31.yaml -------------------------------------------------------------------------------- /configs/datasets/officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/datasets/officehome.yaml -------------------------------------------------------------------------------- /configs/datasets/visda17.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/datasets/visda17.yaml -------------------------------------------------------------------------------- /configs/trainers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/.DS_Store -------------------------------------------------------------------------------- /configs/trainers/CLIP/b32_ep100_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CLIP/b32_ep100_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/CLIP/b32_ep100_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CLIP/b32_ep100_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/CLIP/b32_ep100_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CLIP/b32_ep100_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/CLIP/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CLIP/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/CLIP/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CLIP/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/CLIP/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CLIP/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/CoCoOp/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CoCoOp/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/CoCoOp/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CoCoOp/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/CoCoOp/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CoCoOp/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/CoOp/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CoOp/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/CoOp/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CoOp/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/CoOp/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/CoOp/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/DAPL/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/DAPL/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/DAPL/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/DAPL/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/DAPL/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/DAPL/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/DAPL/ep25-32.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/DAPL/ep25-32.yaml -------------------------------------------------------------------------------- /configs/trainers/IVLP/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/IVLP/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/IVLP/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/IVLP/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/IVLP/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/IVLP/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/MaPLe/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/MaPLe/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/MaPLe/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/MaPLe/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/MaPLe/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/MaPLe/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/PDA/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/PDA/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/PDA/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/PDA/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/PDA/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/PDA/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /configs/trainers/VPT/b32_ep10_officehome.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/VPT/b32_ep10_officehome.yaml -------------------------------------------------------------------------------- /configs/trainers/VPT/b32_ep10_visda.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/VPT/b32_ep10_visda.yaml -------------------------------------------------------------------------------- /configs/trainers/VPT/b32_ep20_office31.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/configs/trainers/VPT/b32_ep20_office31.yaml -------------------------------------------------------------------------------- /datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /datasets/office31.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/datasets/office31.py -------------------------------------------------------------------------------- /datasets/officehome.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/datasets/officehome.py -------------------------------------------------------------------------------- /datasets/visda17.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/datasets/visda17.py -------------------------------------------------------------------------------- /model.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/model.jpg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/clip/eval_clip.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/clip/eval_clip.sh -------------------------------------------------------------------------------- /scripts/clip/main_clip.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/clip/main_clip.sh -------------------------------------------------------------------------------- /scripts/cocoop/eval_cocoop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/cocoop/eval_cocoop.sh -------------------------------------------------------------------------------- /scripts/cocoop/main_cocoop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/cocoop/main_cocoop.sh -------------------------------------------------------------------------------- /scripts/coop/eval_coop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/coop/eval_coop.sh -------------------------------------------------------------------------------- /scripts/coop/main_coop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/coop/main_coop.sh -------------------------------------------------------------------------------- /scripts/dapl/eval_dapl.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/dapl/eval_dapl.sh -------------------------------------------------------------------------------- /scripts/dapl/main_dapl.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/dapl/main_dapl.sh -------------------------------------------------------------------------------- /scripts/ivlp/eval_ivlp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/ivlp/eval_ivlp.sh -------------------------------------------------------------------------------- /scripts/ivlp/main_ivlp.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/ivlp/main_ivlp.sh -------------------------------------------------------------------------------- /scripts/maple/eval_maple.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/maple/eval_maple.sh -------------------------------------------------------------------------------- /scripts/maple/main_maple.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/maple/main_maple.sh -------------------------------------------------------------------------------- /scripts/pda/eval_pda.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/pda/eval_pda.sh -------------------------------------------------------------------------------- /scripts/pda/main_pda.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/pda/main_pda.sh -------------------------------------------------------------------------------- /scripts/vpt/eval_vpt.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/vpt/eval_vpt.sh -------------------------------------------------------------------------------- /scripts/vpt/main_vpt.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/scripts/vpt/main_vpt.sh -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/train.py -------------------------------------------------------------------------------- /trainers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/__init__.py -------------------------------------------------------------------------------- /trainers/baseda.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/baseda.py -------------------------------------------------------------------------------- /trainers/clip/clip_ft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/clip/clip_ft.py -------------------------------------------------------------------------------- /trainers/clip/clip_lpfc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/clip/clip_lpfc.py -------------------------------------------------------------------------------- /trainers/clip/clip_lplr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/clip/clip_lplr.py -------------------------------------------------------------------------------- /trainers/clip/clip_zs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/clip/clip_zs.py -------------------------------------------------------------------------------- /trainers/da/dapl.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/da/dapl.py -------------------------------------------------------------------------------- /trainers/da/pda.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/da/pda.py -------------------------------------------------------------------------------- /trainers/lp/cocoop.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/lp/cocoop.py -------------------------------------------------------------------------------- /trainers/lp/coop.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/lp/coop.py -------------------------------------------------------------------------------- /trainers/vlp/ivlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/vlp/ivlp.py -------------------------------------------------------------------------------- /trainers/vlp/maple.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/vlp/maple.py -------------------------------------------------------------------------------- /trainers/vp/vpt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/trainers/vp/vpt.py -------------------------------------------------------------------------------- /utils/clip_part.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/utils/clip_part.py -------------------------------------------------------------------------------- /utils/ift_block.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/utils/ift_block.py -------------------------------------------------------------------------------- /utils/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/utils/templates.py -------------------------------------------------------------------------------- /utils/visual_prompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaiShuanghao/Prompt-based-Distribution-Alignment/HEAD/utils/visual_prompt.py --------------------------------------------------------------------------------