Multi-view Graph Representation with Similarity Diffusion for General Zero-Shot Learning
- Download ImageNet.
An ImageNet root directory should contain image folders, each folder with the wordnet id of the class.
- Download: http://nlp.stanford.edu/data/glove.6B.zip
- Unzip it, find and put
glove.6B.300d.txt
tograph/
.
cd graph/
- Run
graph.py
, and get `multi_view_graph.json - Run
similar.py
, and get `similar-10.json
- Download: https://figshare.com/articles/dataset/data_rar/20342646, get
fc-weights.json
andresnet50-base.pth
- Put files :
cd visual
- Run 'python resnet_process.py' get visual features of imagenet in
datasets/imagenet
Run python train.py
, and get F.pred
results for testing.
Run python evaluate.py
with the args:
--pred
: the.pred
file 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-ratio
for the ratio of testing data,--consider-trains
to include training classes' classifiers,--test-train
for testing with train class images only.