Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Ge committed Feb 12, 2023
1 parent e81c990 commit 2279f83
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,42 @@ Domain adaption via prompt learning (DAPL), extends from CLIP and CoOp, offers a

Our method is to tailor the powerful CLIP for UDA by designing trainable domain-agnostic, domain-specific and class prompt. By learning the representation of the prompt, our method actually learns a conditional propability distribution to deal with distribution shift. Hence, our method learns different decision boundaries for each domain. Moreover, we show that this allows disentanglement of semantic and domain representation with contrastive learning.


## Performance of DAPrompt

<div align="center">VisDA-2017</div>

| | Acc(%) | |
|:-------:|:---------:|:--------:|
| | ResNet101 | ViT-B/16 |
| CLIP | 84.4 | 88.7 |
| CLIP+FT | 74.5 | 80.5 |
| DAP | 86.9 | 89.8 |



<div align="center">mini-DomainNet</div>

| Model | Method | c-p | c-r | c-s | p-c | p-r | p-s | r-c | r-p | r-s | s-c | s-p | s-r | Avg |
|:-----------:|:-------:|:-----:|:-----:|:-----:|:-----:|:-----:|:----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:----:|
| | CLIP | 67.9 | 84.8 | 62.9 | 69.1 | 84.8 | 62.9 | 69.2 | 67.9 | 62.9 | 69.1 | 67.9 | 84.8 | 71.2 |
| ResNet50 | CLIP-FT | 58.9 | 73.5 | 52.5 | 60.2 | 79.5 | 52.9 | 62.9 | 65.7 | 55.7 | 61.9 | 51.8 | 72.9 | 62.4 |
| | DAP | 72.4 | 87.6 | 65.9 | 72.7 | 87.6 | 65.6 | 73.2 | 72.4 | 66.2 | 73.8 | 72.9 | 87.8 | 74.8 |
| | CLIP | 80.3 | 90.5 | 77.8 | 82.7 | 90.5 | 77.8 | 82.7 | 80.3 | 77.8 | 82.7 | 80.3 | 90.5 | 82.8 |
| Vit-B/16 | CLIP-FT | 72.2 | 84.3 | 71.3 | 79.5 | 84.3 | 67.5 | 80.3 | 76.5 | 75.9 | 80.2 | 70.0 | 83.7 | 77.1 |
| | DAP | 83.3 | 92.4 | 81.1 | 86.4 | 92.1 | 81.0 | 86.7 | 83.3 | 80.8 | 86.8 | 83.5 | 91.9 | 85.8 |

<div align="center">Office-Home</div>

| Model | Method | A-C | A-P | A-R | C-A | C-P | C-R | P-A | P-C | P-R | R-A | R-C | R-P | Avg |
|:-----------:|:-------:|:-----:|:-----:|:-----:|:-----:|:-----:|:----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:----:|
| | CLIP | 51.6 | 81.9 | 82.6 | 71.9 | 81.9 | 82.6 | 71.9 | 51.6 | 82.6 | 71.9 | 51.6 | 81.9 | 72 |
| ResNet50 | CLIP-FT | 44.9 | 67.4 | 74.5 | 61.4 | 69.1 | 70.4 | 61.0 | 45.4 | 77.6 | 70.5 | 49.0 | 81.4 | 64.4 |
| | DAP | 54.1 | 84.3 | 84.8 | 74.4 | 83.7 | 85 | 74.5 | 54.6 | 84.8 | 75.2 | 54.7 | 83.8 | 74.5 |
| | CLIP | 67.8 | 89.0 | 89.8 | 82.9 | 89.0 | 89.8 | 82.9 | 67.8 | 89.8 | 82.9 | 67.8 | 89.0 | 82.4 |
| Vit-B/16 | CLIP-FT | 64.3 | 79.4 | 84.4 | 77.6 | 83.9 | 83.8 | 73.5 | 66.8 | 86.3 | 79.0 | 67.0 | 88.7 | 77.9 |
| | DAP | 70.7 | 91.0 | 90.9 | 85.2 | 91.0 | 91.0 | 85.1 | 70.7 | 90.9 | 85.3 | 70.4 | 91.4 | 84.4 |

## How to Install

Our code is built based on the source code of [CoOp](https://github.com/KaiyangZhou/CoOp). So you need to install some dependent environments.
Expand Down

0 comments on commit 2279f83

Please sign in to comment.