Skip to content

TYLfromSEU/DPStyler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DPStyler: Dynamic PromptStyler for Source-Free Domain Generalization

method

Datasets

Note: After downloading the data, unzip it into the 'datasets' folder.

Requirements

How to Start:

conda env create -f environment.yml

Training & Inference

Here, taking the training and inference of PACS as an example:

# Training:
cd scripts
sh run_clip_pacs.sh

Please note that the current default text template used for training is 'a CLS in a X style'. If you intend to perform multi-model ensemble inference, modify the text in 'DPStyler/dassl/txts/text_template.txt'.

Here are three text templates used in this paper:

  1. a CLS in a X style
  2. a X style of a CLS
  3. a photo of a CLS with X like style

# Inference:
cd scripts
sh run_clip_pacs_test.sh

Model Weights

Model weights can be downloaded at https://drive.google.com/drive/folders/17C5NbTMGHRWkrH68nWFoxMVEOo1SCrRl?usp=share_link .

About

DPStyler: Dynamic PromptStyler for Source-Free Domain Generalization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors