kakaobrain / hotr

Official repository for HOTR: End-to-End Human-Object Interaction Detection with Transformers (CVPR'21, Oral Presentation)
Apache License 2.0
140 stars 19 forks source link

cope with zero-hoi image sample? #10

Closed dragen1860 closed 3 years ago

dragen1860 commented 3 years ago

Dear author: I noticed that there is at least one hoi annotaion for each image in HICO dataset. and when i try to reduce the hoi categoreies number, it will create some images without any hoi annotation. Thus when training, the Matcher will trigger errors. I wonder How to deal with zero-hoi images when traininig your model. I suppose zsero-hoi sample setting is general in real scenario. Thank you.

bmsookim commented 3 years ago

@dragen1860 Refer to https://github.com/kakaobrain/HOTR/blob/a2e19511d6131220f430ba2d76a95a03a0f7556e/hotr/models/hotr_matcher.py#L144. Following lines of code handle the situation where there are boxes but no actions assigned. Modify it to be applied for boxes too and you will be good to go :)