# Plug-and-Play Retrieval-Augmented Active Test-Time Adaptation for VLMs

This is the code for experiments in the submitted paper. You can follow the below instructions to run the code. 

### Requirements 
In each directory, there is a `requirements.txt` to build the environment setup. 
```
pip isntall -r requirements.txt 
```

### Scripts 
#### Train-based TTA 
If you want to run the code of TPT or C-TPT, you should look into `C-TPT` directory, and refer to the `scripts` folder. You can run the code that you want in script file. Here is the example for running code.

``` 
sh scripts/test_tpt_fg.sh fgvc 0 
```


#### Train-free TTA 
If you want to run the code of TDA, you should look into `TDA` directory, and refer to the `scripts` folder. You can run the code that you want in script file. Here is the example for running code. 

```
sh scripts/run_cd_benchmark_react.sh 0
```

