Few-shot Semantic Segmentation with Self-supervision from Pseudo-classes
January 19, 2022 ยท View on GitHub
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:
- Download VOC and
SegmentationClassAug,
put them under
./data/pascal - 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*}