waxnkw / IETrans-SGG.pytorch

This is the code of ECCV 2022 (Oral) paper "Fine-Grained Scene Graph Generation with Data Transfer".
Other
96 stars 7 forks source link

方便把这三个文件的生成代码公布一下吗? #15

Open DrugD opened 1 year ago

DrugD commented 1 year ago
          Sorry for the late reply. Some of the files are actually not used. Only "vg_clip_logits.pk","vg_sup_data.pk","VGKB.json" are used. Let me introduce one by one?

vg_sup_data.pk is the pk version of VG-SGG.h5 just for easier to load and visualize.

VGKB.json is the possible relational triplets in the training set. The format is a dictionary, where the key are object pairs and value is the possible relationships between these two object. For example, "3_4": [1, 3, 4] means the possible predicates between subject 3 and object 4 can be [1,3,4].

vg_clip_logits.pk aims for External Transfer, which is to generate logits for all possible object pairs. Each item is a dictionary. The keys are {'img_path', 'boxes', 'labels', 'pairs', 'possible_rels', 'rel_logits'}, where img_path is image path, boxes is the object locations (x1y1x2y2), labels are object labels, pairs are object pair indexes you want to relabel (if object boxes have overlap and the possible predicates in VGKB.json is not None), possible_rels are possible predicates between the pairs (can get from VGKB.json). rel_logits are not used and you can just ignore them.

Originally posted by @waxnkw in https://github.com/waxnkw/IETrans-SGG.pytorch/issues/14#issuecomment-1461450368