Giter Club home page Giter Club logo

vqa-winner-cvprw-2017's People

Contributors

markdtw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vqa-winner-cvprw-2017's Issues

Add visual genome as extra data

Hi, I try to add this dataset to train, and follow this paper's guide, use ' questions whose correct answers overlap the output vocabulary determined on the VQA v2 dataset'. But I got 970,000 questions or so, and it is much larger than 485,000 questions reported in the paper. Have any ideas?

Performance

Does this implementation get the performance reported by the paper?

training accuracy 64.42%?

you mean the accuracy is 64.42% when training or validating? Why 'sigmoid multi-label classifier is also implemented but I can't train based on that'?

Thank you in advance!

30% accuracy in training

I download the code and try to reimplement your score on VQA 2.0 set. Since my computer cannot support the whole training data, I split the - vqa_train_final.json and - coco_features.npy into 7 folds, each set of them grouped by imageid.(like vqa_train_final.0.json contains image ids : [1, 2, 3] the coco_features.0.npy contains image features of [1, 2, 3] and other sets doesnot have any data related to image [1, 2, 3]) I train the model in two way, one is loading the data from 0 to 6 in each epoch and repeat 50 times. the other is loading each data set training 50 epochs and then move on to the next data set.
However, both of them result in a low accuracy, 30% or so. the tokenized question, coco 36 features is downloaded from the link you described. what do you think might be the cause? Thanks

this is how I split the data

def split_images():
    list_train = os.listdir('G:/train2014/')
    list_train.remove('COCO_train2014_000000372405.jpg')
    ids = [int(f[15:27]) for f in list_train]
    length = int(len(ids)/7)+1
    ids_list = [ids[i:i + length] for i in range(0, len(ids), length)]
    for i in range(len(ids_list)):
        np.savetxt("split/imageIds.train." + str(i), ids_list[i], fmt='%d')

def split_json():
    train = json.load(open('vqa_train_final.json'))
    for i in range(7):
        ids = np.loadtxt("split/imageIds.train." + str(i)).astype(int)
        s = set(ids)
        data = []
        for j in range(len(train)):
            if train[j]['image_id'] in s:
                data.append(train[j])
        json.dump(data, open('split/vqa_train_final.json.' + str(i), 'w'))
for k in range(7):
    ids = np.loadtxt("split/imageIds.train." + str(k)).astype(int)
    s = set(ids)
    in_data = {}
    with open(infile, "rt") as tsv_in_file:
        reader = csv.DictReader(tsv_in_file, delimiter='\t', fieldnames = FIELDNAMES)
        i = 0
        for item in reader:
            i = i+1
            if i % 1000 == 0:
                print(k,i)
            try:
                data = {}
                data['image_id'] = int(item['image_id'])
                if data['image_id'] in s:
                    b = base64.decodestring(bytes(item['features'], encoding = "utf8"))
                    data['features'] = np.frombuffer(b, dtype=np.float32).reshape((36, -1))
                    in_data[data['image_id']] = data['features']
            except:
                print('error',item['image_id'])
        np.save('split/coco_features.npy.train.' + str(k), in_data)

IndexError: index 14 is out of bounds for axis 0 with size 14

Hello, thank you very much for your code, but I raised the following questions during the training, may I ask why?
Traceback (most recent call last):
File "main.py", line 153, in
main()
File "main.py", line 119, in main
train_loader, val_loader, vocab_size, num_classes = prepare_data(args)
File "/home/disk/lmc/vqa-winner-cvprw-2017/data_loader.py", line 72, in prepare_data
VQAv2(root=args.data_root, train=True),
File "/home/disk/lmc/vqa-winner-cvprw-2017/data_loader.py", line 38, in init
que[i] = word2idx[word]
IndexError: index 14 is out of bounds for axis 0 with size 14

que[i] = word2idx[word]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.