Few-shot Semantic Segmentation with Self-supervision from Pseudo-classes

This is the implementation of paper Few-shot Semantic Segmentation with Self-supervision from Pseudo-classes that has been accepted to BMVC 2021.

This project is built upon this repository.

Get Started

Datasets and Data Preparation

PASCAL-5i

PASCAL-5i is based on the PASCAL VOC 2012 and SBD. Prepare PASCAL-5i data by:

  1. Download VOC and SegmentationClassAug, put them under ./data/pascal
  2. Run python ./data/prepare_pascal.py

Validation set includes VOC validation images. Training set includes VOC training images and part of SBD training images (from this list) which do not overlap with the validation set.

Pretrained Backbone

Download the ImageNet pretrained backbones and store in ./initmodel.

Train

Execute this command at the root directory: python train.py --ss --split {*split*}

Test

Execute this command at the root directory: python eval.py --ss --split {*split*} --shot {*shot*}