JudyYe / zero-shot-gcn

Zero-Shot Learning with GCN (CVPR 2018)
MIT License
917 stars 178 forks source link

data lists missing #3

Closed michael20at closed 6 years ago

michael20at commented 6 years ago

When I run python test_imagenet.py --model ../data/wordnet_resnet_glove_feat_2048_1024_512_300 on windows 10 with bash I get:

File "test_imagenet.py", line 221, in <module>
    res = test_imagenet_zero(fc_file_pred=args.model, has_train=args.train)
  File "test_imagenet.py", line 23, in test_imagenet_zero
    fname, lbl = line.split()
ValueError: need more than 1 value to unpack

What could be the problem? This looks great, would love to try it out, thank you for your work!

Edit: img-all.txt and img-2-hops.txt appear to be missing??

JudyYe commented 6 years ago

Hi, We only include img-2-hops.txt because img-3-hops.txt and img-all.txt are too large for git.

To get the image list, please refer to https://drive.google.com/open?id=1br9dS99LeiNJB0S2NvzJLHl1xWpX5jQS.

Let me explain the two lists here: class list and image list. Class lists such as 2-hops.txt (3-hops.txt/ all.txt) are lists of wnid. Each wnid corresponds to one class. The images of those classes are in img-2-hops.txt(img-3-hopts.txt, img-all.txt) with line format: $image_path $class_id. The class_id is the line number +1000 in the former wnid list.

To make the image lists, we download each class in one imagenet query returning a tar, and then list all images. For details, please refer download_image.py.