sunjiahao1999/SPFormer

It always occurs index -1 is out of bounds for axis 0 with size 0

Closed this issue · 0 comments

2024-03-18 17:35:30,344 - INFO - Load train dataset: 5 scans
2024-03-18 17:35:30,345 - INFO - Load val dataset: 2 scans
2024-03-18 17:35:30,345 - INFO - Training
2024-03-18 17:36:36,287 - INFO - Validation
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.35it/s]
2024-03-18 17:36:37,770 - INFO - Evaluate instance segmentation
Traceback (most recent call last):
File "tools/train.py", line 162, in
main()
File "tools/train.py", line 157, in main
eval(epoch, model, val_loader, cfg, logger, writer)
File "/home/mayiwen/.conda/envs/spformer/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "tools/train.py", line 96, in eval
eval_res = scannet_eval.evaluate(pred_insts, gt_insts)
File "/home/mayiwen/hongfu/SPFormer/spformer/evaluation/instance_eval.py", line 391, in evaluate
ap_scores, rc_scores = self.evaluate_matches(matches)
File "/home/mayiwen/hongfu/SPFormer/spformer/evaluation/instance_eval.py", line 159, in evaluate_matches
num_true_examples = y_true_sorted_cumsum[-1]
IndexError: index -1 is out of bounds for axis 0 with size 0