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

cope with none hoi image? #22

Open
dragen1860 opened this issue Jul 15, 2021 · 0 comments
Open

cope with none hoi image? #22

dragen1860 opened this issue Jul 15, 2021 · 0 comments

Comments

@dragen1860
Copy link

Dear author:
recently i did some modification on hico dataset, remove some of the original 117 hoi categories, say 20 categories only. Therefore there are no hoi annotation on some images.
When i try to train the modified hico dataset, I get an error:

File "/media/sdf/long/hoi/qpic/models/hoi.py", line 226, in forward
    indices = self.matcher(outputs_without_aux, targets)
  File "/media/sdf/long/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/media/sdf/long/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
    return func(*args, **kwargs)
  File "/media/sdf/long/hoi/qpic/models/matcher.py", line 119, in forward
    cost_verb_class = -(out_verb_prob.matmul(tgt_verb_labels_permute) / \
RuntimeError: mat1 dim 1 must match mat2 dim 0

I debugged into code and realise that for no hoi annotation image, the tensor in target will be emtpy tensor, such as
image

I guess this should be the reason of above error.

I wonder does the code support none-hoi-annotation images? if not , how to make it supported ?

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

1 participant