[ECCV20] Content-Consistent Matching for Domain Adaptive Semantic Segmentation
This is a PyTorch implementation of CCM.
GTA-4K list is available!
News:A smaller subset of GTA5 dataset that shares higher layout similarites with Cityscapes.
Prerequisites
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
Getting Started
- Download the dataset GTA5 and Cityscapes.
- Download the ImageNet-pretrained Model [Link].
- Download the Source-only Model Link.
Training
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
Evaluation
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
Citation
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}
}