Skip to content

qiyanhero/TDSNet

Repository files navigation

TDSNet

Code release for the paper "A Task-aware Dual Similarity Network for Fine-grained Few-shot Learning", by Yan Qi, Han Sun, Ningzhong Liu, and Huiyu Zhou.

Requirements

  • python=3.6
  • PyTorch=1.2+
  • torchvision=0.4.2
  • pillow=6.2.1
  • numpy=1.18.1
  • h5py=1.10.2

Dataset

CUB-200-2011

  • Change directory to ./filelists/CUB
  • run source ./download_CUB.sh

Train

python ./train.py --dataset CUB  --model Conv4 --method OurNet      --n_shot 1 --train_aug --gpu 0
python ./train.py --dataset CUB  --model Conv4 --method OurNet      --n_shot 5 --train_aug --gpu 0

Save features

python ./save_features.py --dataset CUB  --model Conv4 --method OurNet      --n_shot 1 --train_aug --gpu 0
python ./save_features.py --dataset CUB  --model Conv4 --method OurNet      --n_shot 5 --train_aug --gpu 0

Test

python ./test.py --dataset CUB  --model Conv4 --method OurNet      --n_shot 1 --train_aug --gpu 0
python ./test.py --dataset CUB  --model Conv4 --method OurNet      --n_shot 5 --train_aug --gpu 0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published