jwyang / graph-rcnn.pytorch

[ECCV 2018] Official code for "Graph R-CNN for Scene Graph Generation"
727 stars 158 forks source link

Questions about dataloader #103

Closed kesaroid closed 3 years ago

kesaroid commented 3 years ago

I am trying to run your graph-rcnn on a custom scene-graph dataset. I had some questions regarding how __getitem__ in dataloader creates the targets. I noticed that you create a 2D array obj_relations with the shape of number of bboxes in an image and populate it based on [subj_id, obj_id] = pred I wonder how the subj_id/obj_id does not exceed the number of bbox in each image considering the number of categories in VG. Perhaps it has more to do with what im_to_first_rel & im_to_last_rel are from the load_graphs function. I hope you can provide more clarity on the same. Thank you in advance.