BFC-BL: Few-Shot Classification and Segmentation combining Bi-directional Feature Correlation and Boundary constraint
Make sure to replace YOURCONDADIR in the installation path with your conda dir, e.g., ~/anaconda3
Set up the following basic environment:
- Ubuntu 18.04或Windows 10(带有Anaconda/Miniconda)
- Python 3.7
- CUDA 11.0
conda create -n bfc-bl python==3.7
conda activate bfc-bl
The required packages are as follows:
pytorch==1.7.0torchvision==0.8.1cudatoolkit==11.0.3pytorch-lightning==1.3.8einops==0.3.0
- PASCAL VOC 2012 and SBD
YOUR_DATASET_DIR/
├── VOC2012/
│ ├── Annotations/
│ ├── JPEGImages/
│ ├── ...
We follow the dataset protocol of ASNet, HSNet and PFENet.
Our project refers to and heavily borrows some the codes from the following repos:
- [PANet]: Wang et al., Few-shot image semantic segmentation with prototype alignment, ICCV'19.
- [PFENet]: Tian et al., Prior guided feature enrichment network for few-shot segmentation, TPAMI'20.
- [HSNet]: Min et al., Hypercorrelation squeeze for few-shot segmentation, ICCV'21.
- [ASNet]: Kang et al., Integrative Few-Shot Learning for Classification and Segmentation, CVPR'22 =======
