/GRPN

Primary LanguagePython

SAM-Aware Graph Prompt Reasoning Network for Cross-Domain Few-Shot Segmentation

Datasets

The following datasets are used for evaluation in CD-FSS:

Source domain:

  • PASCAL VOC2012:

    Download PASCAL VOC2012 devkit (train/val data):

    wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar

    Download PASCAL VOC2012 SDS extended mask annotations from [Google Drive].

Target domains:

Pre-trained Weight

Download pre-trained ResNet models and SAM-base version weights .

Generating SAM Masks

To save time, we have saved the masks generated by SAM to a file during actual operations, so you don’t need to regenerate them every time . You only need to run p4.py to generate them once.

Evaluate our models

Please run the script file run.sh to evaluate our models. Here is an example on Deepglobe dataset:

CUDA_VISIBLE_DEVICES=0 python -W ignore test-no-train.py \
  --dataset deepglobe --data-root ./dataset \
  --backbone resnet50 --batch-size 6 --shot 1 --refine --positive_point 20 --negative_point 20 --alpha 0.5 --fuse_method entropy \
  --post_refine