waxnkw / IETrans-SGG.pytorch

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

scene graph generation for custom image #21

Open liuJP2 opened 1 year ago

liuJP2 commented 1 year ago

Hello~This is a really cool work! I'm trying to use SGDET to generate a scenegraph of my own image, I just need to modify the visualization/demo_imgs/ section in "bash cmds/50/transformer/demo_sgdet.sh visualization/demo_imgs/", I downloaded the transformer_sgdet_I70_E100.pth model. I mean can this model automatically extract bounding box according to image? I just need to provide the image, right?

liuJP2 commented 1 year ago

And the visualization results given by vis.ipynb are the result of which model?

waxnkw commented 1 year ago

Yes, you just need to provide the image. The visualization results are of vg1800_motif_sgcls_I90_E100.pth. The corresponding command is:

bash cmds/1000/motif/demo_sgdet.sh visualization/demo_imgs/
liuJP2 commented 1 year ago

Yes, you just need to provide the image. The visualization results are of vg1800_motif_sgcls_I90_E100.pth. The corresponding command is:

bash cmds/1000/motif/demo_sgdet.sh visualization/demo_imgs/

Thank you for your reply I have another question, for the demo_bbox.pk file, is it necessary to contain the following form of information? ['bowl', 'bowl', 'bowl', 'plate', 'carrot', 'carrot', 'carrot', 'carrot', 'carrot', 'carrot', 'carrot', 'table', 'cucumber', 'bowl', 'carrot', 'bag', 'carrot', 'spoon', 'food', 'carrot', 'carrot', 'carrot', 'tomato', 'plate', 'carrot', 'bag', 'broccoli', 'food', 'broccoli', 'spoon', 'handle', 'food', 'vegetable', 'food', 'plastic', 'carrot', 'fork', 'carrot', 'countertop', 'wrapper', 'pepper', 'carrot', 'plastic', 'countertop', 'cucumber', 'carrot']] Does that mean it has to be like this: { image_name1: [ np.ndarray([[x1, y1, x2, y2], ... ]), [label1, label2, ...] ], } If I only have np.ndarray, is that allowed? That is, modify the format as follows: { image_name1: [ np.ndarray([[x1, y1, x2, y2], ... ]) ], }