graph-rcnn.pytorch icon indicating copy to clipboard operation
graph-rcnn.pytorch copied to clipboard

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

Open folkaholic opened this issue 4 years ago • 5 comments

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

folkaholic avatar Mar 03 '20 14:03 folkaholic

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

nyj-ocean avatar Jun 17 '20 07:06 nyj-ocean

@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~

wffancy avatar Nov 02 '20 07:11 wffancy

@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

kwhuang88228 avatar Jan 19 '21 03:01 kwhuang88228

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)

donggu-kang avatar Feb 14 '21 10:02 donggu-kang

@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?

yang1332133 avatar Apr 16 '22 08:04 yang1332133