可用于通用零样本学习任务,通过多视图图表示与相似性扩散技术,处理ImageNet等数据集,生成多视图图和相似图,训练图网络并支持多种测试集与拆分方式评估。【此简介由AI生成】
MGSD
Multi-view Graph Representation with Similarity Diffusion for General Zero-Shot Learning
Data Preparation
ImageNet and part visual features
- Download ImageNet.
An ImageNet root directory should contain image folders, each folder with the wordnet id of the class.
Glove Word Embedding
- Download: http://nlp.stanford.edu/data/glove.6B.zip
- Unzip it, find and put
glove.6B.300d.txttograph/.
Multi-view Graph and Similarity Graph
cd graph/- Run
graph.py, and get `multi_view_graph.json - Run
similar.py, and get `similar-10.json
Pretrained ResNet50
- Download: https://figshare.com/articles/dataset/data_rar/20342646, get
fc-weights.jsonandresnet50-base.pth - Put files :
cd visual - Run 'python resnet_process.py' get visual features of imagenet in
datasets/imagenet
Train Graph Networks
Run python train.py, and get F.pred results for testing.
Testing (General and detailed test)
Run python evaluate.py with the args:
--pred: the.predfile for testing.--test-set: choose test set, choices:[Hierarchy, Most Populated, Least Populated, All]--split: choose test set, choices:['2-hops, 3-hops, all,' 'lp-500, lp-1000, lp-5000,' 'mp-500, mp-1000, mp-5000']- (optional)
--keep-ratiofor the ratio of testing data,--consider-trainsto include training classes' classifiers,--test-trainfor testing with train class images only.
Introduction
可用于通用零样本学习任务,通过多视图图表示与相似性扩散技术,处理ImageNet等数据集,生成多视图图和相似图,训练图网络并支持多种测试集与拆分方式评估。【此简介由AI生成】
Customize your domain