jwyang / graph-rcnn.pytorch

[ECCV 2018] Official code for "Graph R-CNN for Scene Graph Generation"
727 stars 158 forks source link

ValueError: not enough values to unpack (expected 2, got 1) #87

Open folkaholic opened 4 years ago

folkaholic commented 4 years ago

Anyone has the same problem? I tested a joint model which retrained in my machine. When I ran python main.py --config-file configs/sgg_res101_joint.yaml --inference --resume 99999 --algorithm grnn --instance 32

I got this error: Traceback (most recent call last): File "main.py", line 135, in main() File "main.py", line 132, in main test(cfg, args) File "main.py", line 81, in test model.test(visualize=args.visualize) File "../graph-rcnn.pytorch/lib/model.py", line 234, in test output, output_pred = output ValueError: not enough values to unpack (expected 2, got 1)

I don't know why :( Anyone help? Thanks

nyj-ocean commented 4 years ago

@folkaholic I meet the same issue with you have you solved this issue? how to solved it?

wffancy commented 3 years ago

@jwyang @folkaholic when I ran python main.py --config-file configs/sgg-res101-joint.yaml --inference --use_freq_prior --resume 99999 --visualize --algorithm SGG I also met such error.

When I removed the last argument, namely the algothrim, I can get rid of such error. However, the visualized results seem to be only belong to the detector without any image indicating the relationship between objects. How's it going? Need Help here, thanks~

kwhuang88228 commented 3 years ago

@folkaholic @wffancy @nyj-ocean Also getting the same error when I run python main.py --config-file configs/sgg_res101_joint.yaml --inference --resume 99999 --algorithm graph-rcnn --visualize. Were you guys able to resolve this? Appreciate any suggestions!

Resolved! I needed to add paths to my object detection and scene graph generation model in configs/sgg_res101_joint.yaml file

donggu-kang commented 3 years ago

I also have the same problem.

++ HELP!! @kwhuang88228

$ python main.py --config-file ./configs/sgg_res101_joint.yaml --inference --resume 100000 --algorithm graph-rcnn --visualize
2021-02-14 19:02:50,091 scene_graph_generation INFO: Namespace(algorithm='graph-rcnn', batchsize=0, config_file='./configs/sgg_res101_joint.yaml', distributed=False, inference=True, instance=-1, local_rank=0, resume=100000, session=0, use_freq_prior=False, visualize=True)
2021-02-14 19:02:50,091 scene_graph_generation INFO: Loaded configuration file ./configs/sgg_res101_joint.yaml
2021-02-14 19:02:50,091 scene_graph_generation INFO: Saving config into: logs/config.yml
images_per_batch: 8, num_gpus: 1
images_per_batch: 1, num_gpus: 1
2021-02-14 19:03:14,859 scene_graph_generation.trainer INFO: Train data size: 56224
2021-02-14 19:03:14,859 scene_graph_generation.trainer INFO: Test data size: 26446
2021-02-14 19:03:20,535 scene_graph_generation.checkpointer INFO: Loading checkpoint from catalog://ImageNetPretrained/MSRA/R-101
2021-02-14 19:03:20,535 scene_graph_generation.checkpointer INFO: catalog://ImageNetPretrained/MSRA/R-101 points to https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-101.pkl
2021-02-14 19:03:20,536 scene_graph_generation.checkpointer INFO: url https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-101.pkl cached in /home/ubuntu/.torch/models/R-101.pkl
2021-02-14 19:03:20,714 scene_graph_generation.checkpointer INFO: missed keys: ['bac.........................................
2021-02-14 19:03:20,789 scene_graph_generation.inference INFO: Start evaluating
2021-02-14 19:03:21,084 scene_graph_generation.inference INFO: inference on batch 0/26446...
Traceback (most recent call last):
  File "main.py", line 92, in <module>
    main()
  File "main.py", line 89, in main
    test(cfg, args)
  File "main.py", line 38, in test
    model.test(visualize=args.visualize)
  File "/home/ubuntu/donggu/graph-rcnn.pytorch/lib/model.py", line 234, in test
    output, output_pred = output
ValueError: not enough values to unpack (expected 2, got 1)
yang1332133 commented 2 years ago

@folkaholic @wffancy @nyj-ocean Also getting the same error when I run python main.py --config-file configs/sgg_res101_joint.yaml --inference --resume 99999 --algorithm graph-rcnn --visualize. Were you guys able to resolve this? Appreciate any suggestions!

Resolved! I needed to add paths to my object detection and scene graph generation model in configs/sgg_res101_joint.yaml file

hello,How do I add it?