Home

Awesome

SSMA: Self-Supervised Model Adaptation for Multimodal Semantic Segmentation

PWC PWC PWC PWC PWC PWC

SSMA is a state-of-the-art deep learning fusion scheme for self-supervised multimodal semantic image segmentation, where the goal is to exploit complementary features from different modalities and assign semantic labels (e.g., car, road, tree and so on) to every pixel in the input image. SSMA is easily trainable on a single GPU with 12 GB of memory and has a fast inference time. SSMA achieves state-of-the-art multimodal semantic segmentation performance on Cityscapes, Synthia, ScanNet, SUN RGB-D and Freiburg Forest datasets.

This repository contains our TensorFlow implementation of SSMA which allows you to train your own model on any dataset and evaluate the results in terms of the mean IoU metric.

If you find the code useful for your research, please consider citing our paper:

@article{valada19ijcv,
         author = {Valada, Abhinav and Mohan, Rohit and Burgard, Wolfram},
         title = {Self-Supervised Model Adaptation for Multimodal Semantic Segmentation},
         journal = {International Journal of Computer Vision (IJCV)},
         year = {2019},
         month = {jul},
         doi = {10.1007/s11263-019-01188-y},
         note = {Special Issue: Deep Learning for Robotic Vision},
         issn = {1573-1405},
         day = {08}}
}

Live Demo

http://deepscene.cs.uni-freiburg.de

Example Segmentation Results

DatasetModality1Modality2Segmented Image
Cityscapes<img src="images/city1.jpg" width=200><img src="images/city1_jet.jpg" width=200><img src="images/city1_fusion.png" width=200>
Forest<img src="images/forest2.jpg" width=200><img src="images/forest2_evi.jpg" width=200><img src="images/forest2_fusion.png" width=200>
Sun RGB-D<img src="images/sun1.jpg" width=200><img src="images/sun1_hha.jpg" width=200><img src="images/sun1_fusion.png" width=200>
Synthia<img src="images/synthia2.jpg" width=200><img src="images/synthia2_jet.jpg" width=200><img src="images/synthia2_fusion.png" width=200>
ScanNet v2<img src="images/scannet1.jpg" width=200><img src="images/scannet1_hha.jpg" width=200><img src="images/scannet1_fusion.png" width=200>

Contacts

System Requirements

Programming Language

Python 2.7

Python Packages

tensorflow-gpu 1.4.0

Configure the Network

First train an individual AdapNet++ model for modality 1 and modality 2 in the dataset. We will use this pre-trained modality-secific models for initializing our SSMA network.

Data

Run the convert_to_tfrecords.py from dataset folder for each of the train, test, val sets to create the tfrecords:

   python convert_to_tfrecords.py --file path_to_.txt_file --record tf_records_name 

(Input to model is in BGR and 'NHWC' form)

Training Params

    gpu_id: id of gpu to be used
    model: name of the model
    num_classes: number of classes
    checkpoint1:  path to pre-trained model for modality 1 (rgb)
    checkpoint2:  path to pre-trained model for modality 2 (jet,hha,evi)
    checkpoint: path to save model
    train_data: path to dataset .tfrecords
    batch_size: training batch size
    skip_step: how many steps to print loss 
    height: height of input image
    width: width of input image
    max_iteration: how many iterations to train
    learning_rate: initial learning rate
    save_step: how many steps to save the model
    power: parameter for poly learning rate

Evaluation Params

    gpu_id: id of gpu to be used
    model: name of the model
    num_classes: number of classes
    checkpoint: path to saved model
    test_data: path to dataset .tfrecords
    batch_size: evaluation batch size
    skip_step: how many steps to print mIoU
    height: height of input image
    width: width of input image

Please refer our paper for the dataset preparation procedure for each modality and the training protocol to be employed.

Training and Evaluation

Training Procedure

Edit the config file for training in config folder. Run:

python train.py -c config cityscapes_train.config or python train.py --config cityscapes_train.config

Evaluation Procedure

Select a checkpoint to test/validate your model in terms of the mean IoU. Edit the config file for evaluation in config folder.

python evaluate.py -c config cityscapes_test.config or python evaluate.py --config cityscapes_test.config

Models

Cityscapes (void + 11 classes)

Modality1_Modality2mIoU
RGB_Depth82.29
RGB_HHA82.64

Synthia (void + 11 classes)

Modality1_Modality2mIoU
RGB_Depth91.25

SUN RGB-D (void + 37 classes)

Modality1_Modality2mIoU
RGB_Depth43.9
RGB_HHA44.3

ScanNet v2 (void + 20 classes)

Modality1_Modality2mIoU
RGB_Depth66.29
RGB_HHA66.34

Freiburg Forest (void + 5 classes)

Modality1_Modality2mIoU
RGB_Depth83.81
RGB_EVI83.9

Benchmark Results

Cityscapes

MethodBackbonemIoU_val (%)mIoU_test (%)Params (M)Time (ms)
DRNWideResNet-3879.6982.82129.161259.67
DPCModified Xception80.8582.6641.82144.41
SSMAResNet-5082.1982.3156.44101.95
DeepLabv3+Modified Xception79.5582.1443.48127.97
MapillaryWideResNet-3878.3182.03135.86214.46
Adapnet++ResNet-5081.2481.3430.2072.94
DeepLabv3ResNet-10179.3081.3458.1679.90
PSPNetResNet-10180.9181.1956.27172.42

ScanNet v2

MethodmIoU_test (%)
SSMA57.7
FuseNet52.1
Adapnet++50.3
3DMV (2d proj)49.8
ILC-PSPNet47.5

Additional Notes:

License

For academic usage, the code is released under the GPLv3 license. For any commercial purpose, please contact the authors.