Jingkang50 / OpenPSG

Benchmarking Panoptic Scene Graph Generation (PSG), ECCV'22
https://psgdataset.org
MIT License
409 stars 68 forks source link

Some confusion on code. #56

Closed flyfaerss closed 1 year ago

flyfaerss commented 2 years ago

In line 323 and 329 on psgtr_head.py file, it is confused to use function 'view' to change shape (100, 3, ...) to (3, 100, ...). Do you mean to convert query unit into batch unit? I don't think the 'view' function can achieve this goal. Why isn't it suitable for permute or transpose?

GSeanCDAT commented 1 year ago

Hi, thanks for your interest in our work! The codes you mentioned are what we simply adopt from the original repo of DETR: https://github.com/facebookresearch/detr/blob/8a144f83a287f4d3fece4acdf073f387c5af387d/models/segmentation.py#L59 In our experiments, we set the batch size as 1 (per GPU), so there isn't any problem. We haven't tried with a larger batch_size.
But I think that you might be right, the permute/transpose function is more appropriate for the case