Pytorch-yolov3: ValueError: not enough values to unpack (expected 3, got 0)

Created on 9 Jul 2019  路  6Comments  路  Source: eriklindernoren/PyTorch-YOLOv3

true_positives, pred_scores, pred_labels = [np.concatenate(x, 0) for x in list(zip(*sample_metrics))]
ValueError: not enough values to unpack (expected 3, got 0)

Most helpful comment

The problem is because no object was detected during the first iteration. You have several ways to solve the problem: 1. do not execute the validation process during the first iteration; 2. Increase the number of validation set, or just copy some from the train set. 3. Load the pre-trained darknet weights.

All 6 comments

The problem is because no object was detected during the first iteration. You have several ways to solve the problem: 1. do not execute the validation process during the first iteration; 2. Increase the number of validation set, or just copy some from the train set. 3. Load the pre-trained darknet weights.

The issue was solved by doing the multiscale training to false in line no. 38 train.py scripts. By default its True, you can change it to false and the issue will be solved.

The issue can be solved by change the value in line numbers 150. You can change 0 to 1 and the issue will be solved. For example:
if epoch % opt.evaluation_interval == 0:
print("\n---- Evaluating Model ----")
change to
if epoch % opt.evaluation_interval == 1:
print("\n---- Evaluating Model ----")

Resolution provided by hyhyni is helpful, thanks

hyhyni's solution works, thank you very much

I am closing this because its a duplicate of #178

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stadtgiraffe picture stadtgiraffe  路  3Comments

MAP
nationalflag picture nationalflag  路  5Comments

a954217436 picture a954217436  路  4Comments

0merjavaid picture 0merjavaid  路  4Comments

ghimiredhikura picture ghimiredhikura  路  4Comments