This is a PyTorch implementation of CCM.
News: GTA-4K list is available!
A smaller subset of GTA5 dataset that shares higher layout similarites with Cityscapes.
To install requirements:
pip install -r requirements.txt
- Python 3.6
- GPU Memory: 24GB for the first stage(Source-only Model), and 12GB for the second stage
- Pytorch 1.4.0
- Download the dataset GTA5 and Cityscapes.
- Download the ImageNet-pretrained Model [Link].
- Download the Source-only Model Link.
To train the source-only model:
CUDA_VISIBLE_DEVICES=0 python so_run.py
To train the adaptation model:
CUDA_VISIBLE_DEVICES=0 python run.py
To perform evaluation on a multiple models under a directory:
python eval.py --frm your_dir
To perform evaluation on single model:
python eval.py --frm model.pth --single
If you find it helpful, please consider citing:
@inproceedings{li2020content,
title={Content-consistent matching for domain adaptive semantic segmentation},
author={Li, Guangrui and Kang, Guoliang and Liu, Wu and Wei, Yunchao and Yang, Yi},
booktitle={European Conference on Computer Vision},
pages={440--456},
year={2020},
organization={Springer}
}