microsoft / scene_graph_benchmark

image scene graph generation benchmark
MIT License
382 stars 86 forks source link

How to extract the scene graph? #12

Closed JXT218 closed 3 years ago

JXT218 commented 3 years ago

I would like to extract the scene graph like what is shown on R152FPN_demo.png. Which script should I try?

hanxiaotian commented 3 years ago

You could try following commands: # visualize OpenImage scene graph generation by RelDN python tools/demo/demo_image.py --config_file sgg_configs/vrd/R152FPN_vrd_reldn.yaml --img_file demo/1024px-Gen_Robert_E_Lee_on_Traveler_at_Gettysburg_Pa.jpg --save_file demo/1024px-Gen_Robert_E_Lee_on_Traveler_at_Gettysburg_Pa_output.jpg --visualize_relation MODEL.ROI_RELATION_HEAD.DETECTOR_PRE_CALCULATED False

alice-cool commented 3 years ago

python tools/demo/demo_image.py --config_file sgg_configs/vrd/R152FPN_vrd_reldn.yaml --img_file demo/1024px-Gen_Robert_E_Lee_on_Traveler_at_Gettysburg_Pa.jpg --save_file demo/1024px-Gen_Robert_E_Lee_on_Traveler_at_Gettysburg_Pa_output.jpg --visualize_relation MODEL.ROI_RELATION_HEAD.DETECTOR_PRE_CALCULATED False

I run your pointed code. But I got the error No such file or directory: './datasets/openimages_v5c/vrd/vrd_frequency_prior_include_background.npy'.

May I ask that the file download link?

DorianMood commented 3 years ago

You may want to read this part of the README to download all the required files.

https://github.com/microsoft/scene_graph_benchmark#perform-training

tejan-rgb commented 2 years ago

@DorianMood Were you able to generate scene graph for an image?

tejan-rgb commented 2 years ago

@hanxiaotian Could you please help? Not able to understand how to generate scene graphs.