# RrED: Black-box Unsupervised Domain Adaptation via Rectifying-reasoning Errors of Diffusion

This is the implementation of ”RrED: Black-box Unsupervised Domain Adaptation via Rectifying-reasoning Errors of Diffusion“



## Appendix.

The complete appendix is presented in Appendix.pdf



## Main code.

**Step 1. Training black-box source domain**

```shell
# office31
sh office31_src.sh

# officehome
sh officehome_src.sh
```

**Step 2. Adapting to target domain using RrED**

```shell
# office31
sh office31_train.sh

# officehome
sh officehome_train.sh
```



## Visual Experimental Code.

```
python t-sne.py
python cam.py --image-path ./input_img.jpg --output-dir ./ --pt CVH_TDN.pt
python confusion_matrix.py
```

