This repo contains code for our ICCV 2019 paper PANet: Few-Shot Image Semantic Segmentation with Prototype Alignment.
- Python 3.6 +
- PyTorch 1.0.1
- torchvision 0.2.1
- NumPy, SciPy, PIL
- pycocotools
- sacred 0.7.5
- tqdm 4.32.2
-
Download
SegmentationClassAug
,SegmentationObjectAug
,ScribbleAugAuto
from here and put them underVOCdevkit/VOC2012
. -
Download
Segmentation
from here and use it to replaceVOCdevkit/VOC2012/ImageSets/Segmentation
.
-
Download the ImageNet-pretrained weights of VGG16 network from
torchvision
: https://download.pytorch.org/models/vgg16-397923af.pth and put it underPANet/pretrained_model
folder. -
Change configuration via
config.py
, then train the model usingpython train.py
or test the model usingpython test.py
. You can usesacred
features, e.g.python train.py with gpu_id=2
.
Please consider citing our paper if the project helps your research. BibTeX reference is as follows.
@article{wang2019panet,
title={PANet: Few-Shot Image Semantic Segmentation with Prototype Alignment},
author={Wang, Kaixin and Liew, Jun Hao and Zou, Yingtian and Zhou, Daquan and Feng, Jiashi},
journal={arXiv preprint arXiv:1908.06391},
year={2019}
}