microsoft / scene_graph_benchmark

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

KeyError: 533 Issue with extracting features for vinvl #66

Open shizhediao opened 2 years ago

shizhediao commented 2 years ago

Hi, I am trying to extract features for my own images with VinVL but encountered the following issue. Could you please take a look? Thanks!

INFO:maskrcnn_benchmark.inference:Model inference time: 0:45:24.369859 (0.5032083226342372 s / img per device, on 1 devices)
2022-01-27 12:06:56,402 maskrcnn_benchmark.inference INFO: Convert prediction results to tsv format and save.
INFO:maskrcnn_benchmark.inference:Convert prediction results to tsv format and save.
Traceback (most recent call last):
  File "tools/test_sg_net.py", line 197, in <module>
    main()
  File "tools/test_sg_net.py", line 193, in main
    run_test(cfg, model, args.distributed, model_name)
  File "tools/test_sg_net.py", line 72, in run_test
    save_predictions=cfg.TEST.SAVE_PREDICTIONS,
  File "/opt/tiger/scene_graph_benchmark/maskrcnn_benchmark/engine/inference.py", line 297, in inference
    relation_on=cfg.MODEL.RELATION_ON,
  File "/opt/tiger/scene_graph_benchmark/maskrcnn_benchmark/engine/inference.py", line 211, in convert_predictions_to_tsv
    tsv_writer(gen_rows(), os.path.join(output_folder, output_tsv_name))
  File "/opt/tiger/scene_graph_benchmark/maskrcnn_benchmark/structures/tsv_file_ops.py", line 42, in tsv_writer
    for value in values:
  File "/opt/tiger/scene_graph_benchmark/maskrcnn_benchmark/engine/inference.py", line 166, in gen_rows
    cur_d['class'] = labelmap[labels[i]]
KeyError: 533