Sid2697 / HOI-Ref

Code implementation for paper titled "HOI-Ref: Hand-Object Interaction Referral in Egocentric Vision"
https://sid2697.github.io/hoi-ref/
BSD 3-Clause "New" or "Revised" License
20 stars 2 forks source link

KeyError on 'bbox' during Evaluation #4

Open Gidohub opened 2 months ago

Gidohub commented 2 months ago

Hello,

First of all, thank you for providing the HOI-Ref dataset. It’s an invaluable resource, and I’m excited to use it for my research. My goal is to reproduce the scores reported for your paper, but I've encountered an issue while running the evaluation script as described in the README.

Here are the steps I followed:

  1. I prepared the data according to the instructions in the README.
  2. I executed the following command:
python -m eval_scripts.eval_hoiqa --cfg-path eval_configs/vlm4hoi_benchmark_evaluation.yaml --pred_json result_json/predictions.json

However, I encountered the following error during execution:

Traceback (most recent call last):
  File "/home/acg16835fu/.pyenv/versions/3.9.18/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/acg16835fu/.pyenv/versions/3.9.18/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/acg16835fu/HOI-Ref/eval_scripts/eval_hoiqa.py", line 140, in <module>
    for image, question, id in tqdm(iden_eval_dataloader):
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/tqdm/std.py", line 1195, in __iter__
    for obj in iterable:
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 634, in __next__
    data = self._next_data()
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
    return self._process_data(data)
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
    data.reraise()
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/_utils.py", line 644, in reraise
    raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/acg16835fu/.pyenv/versions/hoiref/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/acg16835fu/HOI-Ref/vlm4hoi/datasets/datasets/epic_conversation.py", line 162, in __getitem__
    bbox =
self.bb_normalise(data['bbox'])
KeyError: 'bbox'

I inspected the default dataset (epic-test.json) and found that the "bbox" key or its corresponding values were missing.

Could you please guide me on where to find the appropriate data or how to proceed with the evaluation? Any help would be greatly appreciated.

Thank you!

Sid2697 commented 2 months ago

Thanks for trying out our work and raising the issue. I will have a look at this over the weekend.

Sid2697 commented 7 hours ago

Hello @Gidohub , were you able to sort out this issue after our offline discussion?