Skip to content

MyChocer/KGTN

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Knowledge Graph Transfer Network for Few-Shot Recognition

This is the implementation code of KGTN paper:

@inproceedings{chen2020knowledge,
  title={Knowledge Graph Transfer Network for Few-Shot Recognition.},
  author={Chen, Riquan and Chen, Tianshui and Hui, Xiaolu and Wu, Hefeng and Li, Guanbin and Lin, Liang},
  booktitle={AAAI},
  pages={10575--10582},
  year={2020}
}

Preparation

  • Python==2.7
  • Pytorch==1.0.1
  • Torchvision==0.2.1

Running the code

Our trained feature extractor is available at onedrive. Download the feature extractor and place it into directory checkpoints/ResNet50_sgm/. If do so, go to Step-2.

1.Train feature extractor

./scripts/TrainFeatureExtractor.sh 

2. Save feature

./scripts/SaveFeature.sh

3. Train the Knowledge Graph Transfer Network (KGTN)

For semantic similarity knowledge graph:

./scripts/KGTN_wv_InnerProduct.sh [GPU_ID]

or

For category hierarchy knowledge graph:

./scripts/KGTN_wordnet.sh [GPU_ID]

Performance

*We take the model with a plain fully-connected layer as the baseline model, which is used in Low-shot Visual Recognition by Shrinking and Hallucinating Features.

Top5 Novel

Knowledge Graph (n-shot) 1 2 5 10
None(baseline) 53.7 67.5 77.8 82.2
category hierarchy 60.3 69.9 78.3 82.3
semantic similarity 62.1 71.0 78.5 82.4

Top5 All

Knowledge Graph (n-shot) 1 2 5 10
None(baseline) 61.7 72.1 80.2 83.5
category hierarchy 67.0 74.5 80.8 83.3
semantic similarity 68.4 75.2 80.9 83.4

Contributing

Feel free to contact us sysucrq@gmail.com & tianshuichen@gmail.com & wuhefeng@gmail.com if you have any question.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published