GitHub - lzy7976/union-set-model-adaptation: Union-set Multi-source Model Adaptation for Semantic Segmentation (original) (raw)

Introduction

A PyTorch implementation of our ECCV2022 paper titled "Union-set Multi-source Model Adaptation for Semantic Segmentation".

Requirements

Pytorch version: 1.11.0, CUDA version: 11.1, GPU: one Tesla V100 32GB.

Datasets

Download the datasets, name the folders as the dataset names (Cityscapes, Synscapes, GTA5, SYNTHIA), and put them in the same folder.

Training procedure

python train_stage0.py --source two or three of Synscapes, GTA5 and SYNTHIA \
                       --label_setting f or p or n \
                       --data_dir path/to/datasets \
                       --checkpoint_path path/to/save/checkpoints/to
python pseudo_label.py --source two or three of Synscapes, GTA5 and SYNTHIA \
                       --label_setting f or p or n \
                       --data_dir path/to/datasets \
                       --stage 1 \
                       --restore_path path/to/checkpoint/path/of/stage0 \
                       --pseudo_label_path path/to/save/pseudo/labels/to
python train_stage1.py --source two or three of Synscapes, GTA5 and SYNTHIA \
                       --label_setting f or p or n \
                       --data_dir path/to/datasets \
                       --checkpoint_path path/to/save/checkpoints/to \
                       --restore_path path/to/checkpoint/path/of/stage0 \
                       --pseudo_label_path path/to/pseudo/labels
python pseudo_label.py --source two or three of Synscapes, GTA5 and SYNTHIA \
                       --label_setting f or p or n \
                       --data_dir path/to/datasets \
                       --stage 2 \
                       --restore_path path/to/checkpoint/path/of/stage1 \
                       --pseudo_label_path path/to/save/pseudo/labels/to
python train_stage2.py --source two or three of Synscapes, GTA5 and SYNTHIA \
                       --label_setting f or p or n \
                       --data_dir path/to/datasets \
                       --checkpoint_path path/to/save/checkpoints/to \
                       --restore_path path/to/checkpoint/path/of/stage1 \
                       --pseudo_label_path path/to/pseudo/labels