0

I am trying to train my own dataset with MaskRCNN, I got the code from https://github.com/matterport/Mask_RCNN and I started training my dataset with this framework I got this error.

I tried training another dataset of some other person then the code was running fine but not in my case

Traceback (most recent call last):
    File "farm.py", line 363, in <module>
        train(model)
    File "farm.py", line 183, in train
        dataset_train.load_custom(args.dataset, "train")
    File "farm.py", line 135, in load_custom
        height, width = image.shape[:2]
ValueError: not enough values to unpack (expected 2, got 1)
Smart Manoj
  • 5,230
  • 4
  • 34
  • 59
bh.gaurang
  • 1
  • 1
  • 3

2 Answers2

1

1). height, width = image.shape[:2]
Here height and width are expecting 2 values and we are providing them only 1, in this condition, you will get Error given below:-
ValueError: not enough values to unpack (expected 2, got 1)
2). print the value of image.shape[0:2] to see the number of values.

print(image.shape[0:2])
Rahul charan
  • 765
  • 7
  • 15
0

check print(image.shape[0:2]) You will get an idea where you are wrong.