microsoft / scene_graph_benchmark

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

demo_image.py not working #10

Closed JXT218 closed 3 years ago

JXT218 commented 3 years ago

Hi,

I am running the following code:

python tools/demo/demo_image.py --config_file sgg_configs/vgattr/vinvl_x152c4.yaml --img_file women_fish.jpg --save_file output/woman_fish_x152c4.obj.jpg MODEL.WEIGHT models/vinvl/vinvl_vg_x152c4.pth MODEL.ROI_HEADS.NMS_FILTER 1 MODEL.ROI_HEADS.SCORE_THRESH 0.2 DATA_DIR "." TEST.IGNORE_BOX_REGRESSION False

Here is the error:

    rel_subj_centers = [r['subj_center'] for r in rel_dets]
UnboundLocalError: local variable 'rel_dets' referenced before assignment

I believe the bug is in line https://github.com/microsoft/scene_graph_benchmark/blob/f91725d8b831ba7ee52a583eab3317fbbeffbfe6/tools/demo/demo_image.py#L118

EddieKro commented 3 years ago

Have the same issue

pzzhang commented 3 years ago

@JXT218 @EddieKro Just fixed the bug. Please try again

EddieKro commented 3 years ago

@pzzhang everything works fine, thank you. You've done an amazing job in this repo!