GithubHelp home page GithubHelp logo

cvlab-tohoku / dense-coattention-network Goto Github PK

View Code? Open in Web Editor NEW
102.0 102.0 16.0 2.18 MB

Improved Fusion of Visual and Language Representations by Dense Symmetric Co-Attention for Visual Question Answering

License: MIT License

Python 50.73% Jupyter Notebook 49.27%
deep-learning dense-coattn-network dense-symmetric-co-attention vqa

dense-coattention-network's People

Contributors

kienduynguyen 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

dense-coattention-network's Issues

VQADataset

hello, I try to run your train.py. However, "from dense_coattn.data import VQADataset". Maybe you forget updating your code in dense_coattn.data.

KeyError in model

Hi, I trained the model followed train.py and want to get the answers from answer.py, but when I ran it, I got an error like:

Initializing Dynamic LSTM...
Freezing resnet152 ...
Loading model from checkpoint at /home/annie/Dense-CoAttention-Network/VQA/model/DCN1.pt
Traceback (most recent call last):
  File "answer.py", line 156, in <module>
    main(args)
  File "answer.py", line 109, in main
    model.load_state_dict(checkpoint["model"])
  File "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 522, in load_state_dict
    .format(name))
KeyError: 'unexpected key "lang_extract.rnn.weight_ih_l1" in state_dict'

Could you tell me what's wrong with it?

Single_machine_demo.py gives attribute error

Building model...
Loading pretrained word vectors from /home/prudhvik/data/glove_840B.pt
Loading model from checkpoint at /home/prudhvik//models/trained.pt
Traceback (most recent call last):
File "test_dcn.py", line 202, in
model, idx2ans, word2idx = load_pretrained_model(opt)
File "test_dcn.py", line 121, in load_pretrained_model
model.cuda(opt['gpus'][0])
AttributeError: 'dict' object has no attribute 'cuda'

I am unable to resolve it.

Evaluation

hello,I have some questions after running your answer.py. and ensemble.py. I have got the .json file with question_id and answer. But there's nothing like the percentage that you get after running train.py. What can I do for getting the percentage result? look forward to hearing from you.

pretrained resnet152 h5 file

I only find load_features.ipynb for loading pre-trained features from Faster RCNN, but I cannot find preprocess files to load pre-trained features from resnet 152.
So, how can I generate h5 files of pre-trained features from resnet 152, if I want to train the model with resnet 152?
Thanks!

How do you predict the answer while you don't use the answer feature for prediction?

I read your code here, it seems that you predict a list of scores based barely on the image and question feature, find the index of the largest score, and use this index to find the answer in the answer list.
However, since you didn't use the answer feature, I think you may predict the same scores even if you shuffle the answer list randomly.

Did I miss something in the code? I will be happy if you can give me an answer :)

pretrained model

Hello,can you provide the pretrained model to me? I want to test the model directly.Thank you!

dataset

Hello, I want to know where the "rcnn_trainval.pt","rcnn_trainval.h5","rcnn_test.pt","rcnn_test.h5" from the class RCNNDataset from dataset.py(dense_coattn/data/). Are they from 'prepross/load_features.ipynb'? But in this program they are named trainval_images.h5,trainval_image.pt,test_images.h5,test_images.pt.
I have renamed them. However, when I run the train.py, it will get stack on β€œfor I, batch in enumerate(dataloader)” from def trainEpoch.
I think it might be a dataset problem. I hope you can help me. Thanks for your reading.

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.