The code is for the paper "A Self-Distillation Embedded Supervised Affinity Attention Model for Few-Shot Segmentation" [arxiv]
config/
includes config fileslists/
includes train/validation list filesmodel/
includes related model and moduleutil/
includes data processing, seed initialization
python==3.7, torch==1.8, scipy, opencv-python, tensorboardX
Please prepare related datasets:
Specify the paths of datasets in config files, including data root and list files paths
We provide 8 pre-trained models: 4 ResNet-50 based models for Pascal-5i and 4 ResNet-101 based models for COCO-20i
- Download the pre-trained models [Pre-trained models]
- Specify the split setting, shot setting and path of weights in config files
-
Use the following command for testing
sh test.sh {data} {split_backbone}
E.g. Test SD-AANet with ResNet50 on the split 0 of PASCAL-5i:
sh test.sh pascal split0_resnet50
-
Use the following command for training
sh train.sh {data} {split_backbone}
E.g. Train SD-AANet with ResNet50 on the split 0 of PASCAL-5i:
sh train.sh pascal split0_resnet50
If you have any question, please discuss with me by sending email to liubinghao@buaa.edu.cn
Please consider citing the paper if you find it useful:
@ARTICLE{10057432,
author={Zhao, Qi and Liu, Binghao and Lyu, Shuchang and Chen, Huojin},
journal={IEEE Transactions on Cognitive and Developmental Systems},
title={A Self-Distillation Embedded Supervised Affinity Attention Model for Few-Shot Segmentation},
year={2023},
pages={1-1},
doi={10.1109/TCDS.2023.3251371}}
The code is based on PFENet and kd-pytorch. Thanks for their great works!