Novel Class Discovery in Semantic Segmentation

License PyTorch

This repository contains the official implementation of our paper:

Novel Class Discovery in Semantic Segmentation, CVPR 2022

Yuyang Zhao, Zhun Zhong, Nicu Sebe, Gim Hee Lee

Paper: ArXiv Project Page: Website

Abstract: We introduce a new setting of Novel Class Discovery in Semantic Segmentation (NCDSS), which aims at segmenting unlabeled images containing new classes given prior knowledge from a labeled set of disjoint classes. In contrast to existing approaches that look at novel class discovery in image classification, we focus on the more challenging semantic segmentation. In NCDSS, we need to distinguish the objects and background, and to handle the existence of multiple classes within an image, which increases the difficulty in using the unlabeled data. To tackle this new setting, we leverage the labeled base data and a saliency model to coarsely cluster novel classes for model training in our basic framework. Additionally, we propose the Entropy-based Uncertainty Modeling and Self-training (EUMS) framework to overcome noisy pseudo-labels, further improving the model performance on the novel classes. Our EUMS utilizes an entropy ranking technique and a dynamic reassignment to distill clean labels, thereby making full use of the noisy data via self-supervised learning. We build the NCDSS benchmark on the PASCAL-5^i dataset and COCO-20^i dataset. Extensive experiments demonstrate the feasibility of the basic framework (achieving an average mIoU of 49.81% on PASCAL-5^i) and the effectiveness of EUMS framework (outperforming the basic framework by 9.28% mIoU on PASCAL-5^i).

Illustration of Novel Class Discovery in Semantic Segmentation (NCDSS).

Requirements

  • Python = 3.7
  • Pytorch = 1.8.0
  • CUDA = 11.1
  • Install other packages in requirements.txt

Data preparation

We follow MaskContrast to prepare the data

Download PASCAL VOC 2012. Unzip the dataset and ensure the file structure is as follows:

VOCSegmentation
├── images
├── SegmentationClassAug
├── saliency_supervised_model
└── sets

Inference

You can download the pre-trained models in this paper from Google Drive. Then run the command.

sh scripts/eval.sh

Training

  • Base Training.

    sh scripts/base_train.sh
  • Clustering Pseudo-labeling.

    sh scripts/clustering_cmd.sh
  • Novel Fine-tuning.

    The pseudo-labels generated in the Clustering Pseudo-labeling stage is used for Novel Fine-tuning stage. To ensure the reproducibility, you can directly download our generated clustering pseudo-labels from Google Dive.

    • Basic framework.

      sh scripts/finetune_basic.sh
    • Entropy ranking.

      sh scripts/entropy_ranking.sh

      The clean and unclean splits are also provided in Google Dive.

    • EUMS framework.

      sh scripts/finetune_eums.sh

Acknowledgement

Our code is designed based on MaskContrast. If you use this code, please also acknowledge their paper.

Citation

We hope you find our work useful. If you would like to acknowledge it in your project, please use the following citation:

@inproceedings{zhao2022ncdss,
title={Novel Class Discovery in Semantic Segmentation},
author={Zhao, Yuyang and Zhong, Zhun and Sebe, Nicu and Lee, Gim Hee},
booktitle={Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2022}}

Contact me

If you have any questions about this code, please do not hesitate to contact me.

Yuyang Zhao

GitHub

View Github