Code for our paper: **Activate and Adapt: A Two-Stage Framework for Open-Set Model Adaptation**



We build our code on DASSL, which is a popular framework to support research in domain adaptation and generalization.

 **Environment:**

```
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
pip install -r requirements.txt
python setup.py develop
```

**UASC:**

```
bash scripts/uasc.sh
cd DatasetCondensation
bash scripts/dcoh.sh
```

You need to correct the path of your dataset, and path of your source-trained model.

**OMA:**

```
bash scripts/oma.sh
```

