AarohiSingla/Faster-R-CNN-on-Custom-Dataset

AttributeError: 'NoneType' object has no attribute 'shape'

Opened this issue · 1 comments

Hi, I love your video,It very easy to fallow.
I am geting this error
AttributeError Traceback (most recent call last)
in
8 img = cv2.imread('train/' + row['ImageID'])
9 #print(img) #none
---> 10 height, width = img.shape[:2]
11 x1 = int(row['XMin'] * width)
12 x2 = int(row['XMax'] * width)

AttributeError: 'NoneType' object has no attribute 'shape'

I have look for solutions but I cant make it run. Can you help me?

All the images have the width and height of 416 so I changed the code from
height, width = img.shape[:2]
to
height, width = 416,416
what the [:2] mean pick the first two values and drop the third