Getting this error while training my Mask RCNN model. I ran this command:
!python optic_disc.py train --dataset=dataset/ --weights=coco
Traceback (most recent call last):
File "optic_disc.py", line 364, in
train(model)
File "optic_disc.py", line 183, in train
dataset_train.load_optic_disc(args.dataset, "train")
File "optic_disc.py", line 128, in load_optic_disc
polygons = [r['shape_attributes'] for r in a['regions']]
File "optic_disc.py", line 128, in
polygons = [r['shape_attributes'] for r in a['regions']]
TypeError: 'NoneType' object is not subscriptable
I tried searching the net, but I am unable to find a solution. Can you help me with this?
Solved ✅
Seems this error is caused by ShapeError. There was some mistake while labelling my dataset. After rectifying the mistake and passing the correct labelled dataset, the model started training as usual.
Getting this error while training my Mask RCNN model. I ran this command: !python optic_disc.py train --dataset=dataset/ --weights=coco
Traceback (most recent call last): File "optic_disc.py", line 364, in
train(model)
File "optic_disc.py", line 183, in train
dataset_train.load_optic_disc(args.dataset, "train")
File "optic_disc.py", line 128, in load_optic_disc
polygons = [r['shape_attributes'] for r in a['regions']]
File "optic_disc.py", line 128, in
polygons = [r['shape_attributes'] for r in a['regions']]
TypeError: 'NoneType' object is not subscriptable
I tried searching the net, but I am unable to find a solution. Can you help me with this?