The code is implemented with Python(3.6) and Pytorch(1.7).
- Download GTA5 datasets
- Download Synthia datasets
- Download Cityscapes datasets
Pretrained models on source domian can be downloaded here.
If you want to pretrain the model by yourself, you can refer to here.
- GTA5-to-Cityscapes
## ResNet101-based
python train_UDA.py --source_dataset "gta5" --num_classes 19 --backbone "resnet101" --checkpoint_dir "./log/gta2city-res/" --pretrained_ckpt_file "../log/pretrainedmodles/gta5-res.pth"
Our pretrained model is available here.
- GTA5-to-Cityscapes (example)
python evaluate.py --source_dataset "gta5" --num_classes 19 --backbone "resnet101" --split "test" --checkpoint_dir "./log/eval/gta2city-res-UDA/" --pretrained_ckpt_file "./log/gta2city-res/gta52cityscapesfinal.pth"
This codebase is heavily borrowed from UDAclustering and DAST_segmentation.