Hierarchical Context-Agnostic Network with Contrastive Feature Diversity for One-Shot Semantic Segmentation
python==3.7, torch==1.6, opencv-python, tensorboardX
Prepare related datasets: Pascal-5i (VOC 2012, SBD) and COCO-20i (COCO 2014)
- Pre-trained backbones and models can be found in Google Driver
- Download backbones and put the pth files under
initmodel/
folder
-
Specify the path of datasets and pre-trained models in the data/config file
-
Use the following command
sh tool/test.sh|train.sh {data} {model} {split_backbone}
E.g. Test HCNet with ResNet50 on the split 0 of PASCAL-5i:
sh tool/test.sh pascal hcnet split0_resnet50
-
We provide trained Models with the ResNet-50 and VGG-16 backbone on Pascal-5i and COCO-20i for performance evalution. You can download them from Google Driver
The code is based on semseg and PFENet. Thanks for their great work!