Skip to content
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

No such file or directory: 'cococaption/annotations/vqaX_test_annot_exp.json' #5

Closed
dschaehi opened this issue Aug 15, 2022 · 6 comments

Comments

@dschaehi
Copy link

Hi @fawazsammani,

Thank you for the sharing the code!
I have a little issue in training the model on VQA-X. The training script complains that file cococaption/annotations/vqaX_test_annot_exp.json is missing. Indeed there is no such a file in that folder (cf.~https://github.com/ruotianluo/coco-caption/tree/ea20010419a955fed9882f9dcc53f2dc1ac65092/annotations). Could you help me with this issue? Thank you.

Below is the full error message:

Evaluation: Finished 1967/1968          loading annotations into memory...
Traceback (most recent call last):
  File "/data/lee/home/Projects/nlxgpt/vqaX.py", line 595, in <module>
    filter_and_get_scores(
  File "/data/lee/home/Projects/nlxgpt/vqaX.py", line 126, in filter_and_get_scores
    coco = COCO(annFileExp)
  File "/data/lee/home/Projects/nlxgpt/cococaption/pycocotools/coco.py", line 76, in __init__
    dataset = json.load(open(annotation_file, 'r'))
FileNotFoundError: [Errno 2] No such file or directory: 'cococaption/annotations/vqaX_test_annot_exp.json'
Traceback (most recent call last):
  File "/export/home/lee/miniconda3/envs/nlx-gpt/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/export/home/lee/miniconda3/envs/nlx-gpt/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/export/home/lee/miniconda3/envs/nlx-gpt/lib/python3.9/site-packages/accelerate/commands/launch.py", line 837, in launch_command
    simple_launcher(args)
  File "/export/home/lee/miniconda3/envs/nlx-gpt/lib/python3.9/site-packages/accelerate/commands/launch.py", line 354, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/export/home/lee/miniconda3/envs/nlx-gpt/bin/python3.9', 'vqaX.py']' returned non-zero exit status 1.
@fawazsammani
Copy link
Owner

fawazsammani commented Aug 16, 2022

Hi @dschaehi
I have uploaded the annotations file. Please see the README.md. Sorry that I forgot to upload them.

Regards

@dschaehi
Copy link
Author

Hi @fawazsammani,

Thank you for your reply! The code works so far.
By the way, for coco caption I had to follow the setup procedure (i.e.., downloading Stanford CoreNLP 3.6.0 and Google News negative 300 word2vec model) to correctly install it. This is missing in the current README.md of this repo. Perhaps you can consider including it.

@fawazsammani
Copy link
Owner

@dschaehi Google News negative 300 word2vec model is only required for WMD, which we do not use. As for Stanford CoreNLP, the instructions are already in the cococaption repo.

Regards

@dschaehi
Copy link
Author

@fawazsammani Yes, but based on the current README.md I was only required to download coco caption and put it in the cococaption folder. I took this instruction "literally" (i.e., I just downloaded it) and did not try to follow the installation guideline in the coco caption repo. Maybe it was my fault.

By the way, without the Google News negative 300 word2vec model I got the error message below. So I had to download it with the script provided by the coco caption repo.

                                                                                                                 
FileNotFoundError: [Errno 2] No such file or directory: '/data/lee/home/Projects/nlxgpt/cococaption/pycocoevalcap/wmd/data/GoogleNews-vectors-negative300.bin'  

@fawazsammani
Copy link
Owner

@dschaehi you have to also comment out the line: from .wmd.wmd import WMD in the script coco-caption/pycocoevalcap/eval.py. But nevermind if you already installed it.

Regards

@dschaehi
Copy link
Author

@fawazsammani Thanks for the tip. I am currently trying to reproduce the results on the paper. I'll let you know if there is any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants