Home

Awesome

Cooperative Self-Training for Multi-Target Adaptive Semantic Segmentation

[Paper] [Supp Mat.]

Abstract

In this work we address multi-target domain adaptation (MTDA) in semantic segmentation, which consists in adapting a single model from an annotated source dataset to multiple unannotated target datasets that differ in their underlying data distributions. To address MTDA, we propose a self-training strategy that employs pseudo-labels to induce cooperation among multiple domain-specific classifiers. We employ feature stylization as an efficient way to generate image views that forms an integral part of self-training. Additionally, to prevent the network from overfitting to noisy pseudo-labels, we devise a rectification strategy that leverages the predictions from different classifiers to estimate the quality of pseudo-labels. Our extensive experiments on numerous settings, based on four different semantic segmentation datasets, validates the effectiveness of the proposed self-training strategy and shows that our method outperforms state-of-the-art MTDA approaches.

1664807094912

Preparation

Installation

conda create -n coast python=3.7
conda activate coast
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
pip install pyyaml==5.4.1 easydict
conda install tqdm scipy

Datasets

By default, the datasets are put in <root_dir>/Dataset. We use symlinks to hook the CoaST codebase to the datasets, i.e. ln -s path_GTA5 <root_dir>/Dataset/GTA5

<root_dir>/Dataset/GTA5/                               % GTA dataset root
<root_dir>/Dataset/GTA5/images/                        % GTA images
<root_dir>/Dataset/GTA5/labels/                        % Semantic segmentation labels
...
<root_dir>/Dataset/Cityscapes/                         % Cityscapes dataset root
<root_dir>/Dataset/Cityscapes/leftImg8bit              % Cityscapes images
<root_dir>/Dataset/Cityscapes/leftImg8bit/train
<root_dir>/Dataset/Cityscapes/leftImg8bit/val
<root_dir>/Dataset/Cityscapes/gtFine                   % Semantic segmentation labels
<root_dir>/Dataset/Cityscapes/gtFine/train
<root_dir>/Dataset/Cityscapes/gtFine/val
...
<root_dir>/Dataset/Mapillary/                          % Mapillary dataset root
<root_dir>/Dataset/Mapillary/train                     % Mapillary train set
<root_dir>/Dataset/Mapillary/train/images
<root_dir>/Dataset/Mapillary/validation                % Mapillary validation set
<root_dir>/Dataset/Mapillary/validation/images
<root_dir>/Dataset/Mapillary/validation/labels
...
<root_dir>/Dataset/IDD_Segmentation/                         % IDD dataset root
<root_dir>/Dataset/IDD_Segmentation/leftImg8bit              % IDD images
<root_dir>/Dataset/IDD_Segmentation/leftImg8bit/train
<root_dir>/Dataset/IDD_Segmentation/leftImg8bit/val
<root_dir>/Dataset/IDD_Segmentation/gtFine                   % Semantic segmentation labels
<root_dir>/Dataset/IDD_Segmentation/gtFine/val
...

Pre-trained models

Due to my google drive limits, I can only upload the checkpoints for G2CM 7-classes and 19-classes settings.

Evaluation

7-class setting

<details> <summary> <b>1. Synthetic to Real</b> </summary> </details> <details> <summary> <b>2. Real to Real</b> </summary> </details>

19-class setting

<details> <summary> <b>1. Synthetic to Real</b> </summary> </details> <details> <summary> <b>2. Real to Real</b> </summary> </details>

Training

To ensure reproduction, the random seed has been fixed in the code. Still, you may need to train a few times to reach the comparable performance.

7-class setting

<details> <summary> <b>1. Synthetic to Real</b> </summary> </details> <details> <summary> <b>2. Real to Real</b> </summary> </details>

19-class setting

<details> <summary> <b>1. Synthetic to Real</b> </summary> </details> <details> <summary> <b>2. Real to Real</b> </summary> </details>

Acknowledgements

This codebase is heavily borrowed from MTAF and ProDA.