waxnkw / IETrans-SGG.pytorch

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

How did you generate these files #14

Open wyz-gitt opened 1 year ago

wyz-gitt commented 1 year ago

First of all, I am very interested in your excellent work,but i have some issues.These files in “datasets/vg/50/*” the"cc_clip_logits.pk","CCKB.json","vg_clip_logits.pk","vg_sup_data.pk","VGKB.json",How are these files different from these(“image_data.json”,“scene_graphs.json”,“attribute_synsets.json”,“VG-SGG.h5”)and How did you generate these files ? Looking forward to your early reply!

imkzh commented 1 year ago

Follow instructions in DATASET.md to find them.

wyz-gitt commented 1 year ago

Thanks you for your reply! @imkzh I can find those files, but my question is how to generate them if they are blong another dataset

waxnkw 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.

wyz-gitt 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.

Thanks you very much!