The implementation code of the paper ’Cluster Alignment with Target Knowledge Mining for Unsupervised Domain Adaptation Semantic Segmentation'
- Create a conda virtual environment and activate it.
conda create --name uncertainty python=3.6
conda activate CAUDA
- Install Pytorch and torchvision following the official instructions, e.g.,
conda install pytorch==1.8.0 torchvision==0.6.0 cudatoolkit=10.1 -c pytorch
- Install the dependent libraries.
pip install ninja yacs cython matplotlib tqdm opencv-python imageio mmcv
Download the datasets GTA5 (Download link) and CityScapes (Download link), then place them under the directory like:
semantic-segmentation/datasets
├── gta5
│ ├── images/
│ ├── labels/
│ └── gtav_label_info.p
└── cityscapes
├── gtFine/
└── leftImg8bit/
...
The training code is coming soon.
- Evaluate the cluster alignment checkpoint
python test.py -cfg configs/deeplabv2_r101_CAUDA.yaml resume results/CAUDA/CAUDA.pth
The checkpoints and logs can be found at link. The extraction code is mimu.
- Evaluate the multi-round self-training checkpoint
python test.py -cfg configs/deeplabv2_r101_tgt_self_distill.yaml resume results/CAUDA_MST/MST.pth
The checkpoints and logs can be found at link. The extraction code is c13y.
The implementation is based on FADA. Thanks for their great projects.