/HFKT

Zhong Zhang,Zhiping Wu, Minjie Hu, Hong Zhao*, Knowledge transfer based hierarchical few-shot learning via tree-structured knowledge graph

Primary LanguagePython

✔️ Requirements

⚙️ Conda environmnet installation

conda env create --name HFKT --file environment.yml
conda activate HFKT

📚 Datasets

cd datasets
bash download_miniimagenet.sh
bash download_cub.sh
bash download_cifar_fs.sh
bash download_tieredimagenet.sh

📌 Quick start: testing scripts

To test in the 5-way K-shot setting:

bash scripts/test/{dataset_name}_5wKs.sh

For example, to test HFKT on the CIFAR-FS dataset in the 5-way 1-shot setting:

bash scripts/test/cifar_fs_5w1s.sh

🔥 Training scripts

To train in the 5-way K-shot setting:

bash scripts/train/{dataset_name}_5wKs.sh

For example, to train HFKT on the CIFAR-FS dataset in the 5-way 1-shot setting:

bash scripts/train/cifar_fs_5w1s.sh

🔍 Related repos

Our project references the codes in the following repos:

📜 Citing HFFDK

If you find our code or paper useful to your research work, please consider citing our work using the following bibtex:

@article{zhang2023knowledge,
  title={Knowledge transfer based hierarchical few-shot learning via tree-structured knowledge graph},
  author={Zhang, Zhong and Wu, Zhiping and Zhao, Hong and Hu, Minjie},
  journal={International Journal of Machine Learning and Cybernetics},
  volume={14},
  number={1},
  pages={281--294},
  year={2023},
  publisher={Springer}
}

💌 Acknowledgement

We adopted the main code bases from ReNet, and we really appreciate it 😃.