art-programmer / MASC

MIT License
58 stars 6 forks source link

Error when inferencing #10

Closed d289760860 closed 3 years ago

d289760860 commented 3 years ago

When I run:

python inference.py --dataFolder=[SCANNET_PATH] --task=predict_cluster_write split=test

I got the following error:

Traceback (most recent call last): File "inference.py", line 274, in write(filename, model, validator, test_dir=test_dir, num_scales=num_scales, num_cross_scales=num_cross_scales, scan_scale=scan_scale) File "inference.py", line 150, in write coords, colors, edges, semantic_pred, neighbors, num_ori_coords, instance_pred = torch.load(test_dir + '/cache/' + scene_id + '.pth') ValueError: not enough values to unpack (expected 7, got 6)

Do I need to change something in inference.py?

d289760860 commented 3 years ago

I changed

coords, colors, edges, semantic_pred, neighbors, num_ori_coords, instance_pred = torch.load(test_dir + '/cache/' + scene_id + '.pth') in inference.py (line 150)

into

coords, colors, edges, semantic_pred, neighbors, num_ori_coords = torch.load(test_dir + '/cache/' + scene_id + '.pth') instance_pred, _ = findInstances(coords, edges, semantic_pred, neighbors, num_scales, num_cross_scales, print_info=True)

And it seems to work.

d289760860 commented 3 years ago

It seems that the problem is because of my typing an addtional letter in the command by accident, and the original code is alright. Sorry to bother you.