-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with finetuned model for VQAv2 (ms coco) #260
Comments
Hm, I didn't use train, I thought that I can use model immediately for a prediction. If you are talking about VQA val set, it doesn't really matter, each time I just extract a text like a usual string as in demo notebook and also give model an image like in demo. |
Hi, the finetuned VQA model cannot directly replace the pretrained checkpoint, since their configs are not compatible. I would recommend to try to use the shell script (evaluate_vqa_beam.sh) to generate your answers. |
If you would like to use Colab, please consider adapting the code in |
@yangapku can I use a finetuned for COCO version of OFA via huggingface interface? Or do I need to use exactly bash script? |
Hi, I suggest to first use our provided script for finetuning (train_vqa_distributed.sh) and evaluation (evaluate_vqa_beam.sh), which are both provided for fairseq-based codebase. |
@yangapku I tried to use the script, however I get the following error. I don't know what's the problem. I had some problems with a fairseq, it wrote that it can't import something. But I downgraded pip to 21 and installed fairseq 12.0. However, now I get this strange thing ' Key 'train_ans2label_file' not in 'VqaGenConfig'', but I also have trains2anslabel file, don't know how to fix it.
|
@yangapku yes, I already did it, downgraded pip, installed from the requirements, as you said. There is some other problem with running the script: |
@25icecreamflavors May I make sure that whether you are using the fairseq in our repo or using the official one? |
I am doing inference for the VQA val set manually to get all answers using your demo colab notebook. I used to do everything like you wrote there and so I was using
Pre-trained checkpoint (OFA-Large)
as it was in tutorial, the quality was around 68% accuracy on a val set. Then I decided to change the model to theFinetuned checkpoint for VQAv2
. It works with the same code, however, it's behaviour is strange, inference is very slow: for pretrained model it was 214k answers by 10 hours and now I got only 30k answers by 15 hours on the same Tesla V100. Also the quality is worse for some reason, it's around 60% accuracy now. Some answers are strange, some are completely correct and some are, for example "bedroom bedroom bedroom bedroom bedroom ...", "no no no no no no no..." etc. For some reason model gives very long answers and doesn't stop generating sequence of words.I am a bit confused, why is it happening, maybe I am doing something wrong. I run model as in this code: https://colab.research.google.com/drive/1lsMsF-Vum3MVyXwSVF5E-Y23rHFvj_3y?usp=sharing
I only change path to finetuned model in this part:
The text was updated successfully, but these errors were encountered: