Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
folkaholic opened this issue Mar 3, 2020 · 5 comments
Open

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

folkaholic opened this issue Mar 3, 2020 · 5 comments

Comments

@folkaholic
Copy link

folkaholic commented Mar 3, 2020

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
Copy link

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

@wffancy
Copy link

wffancy commented Nov 2, 2020

@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
Copy link

kwhuang88228 commented Jan 19, 2021

@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
Copy link

donggu-kang commented Feb 14, 2021

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants