YOLO_v3_tutorial_from_scratch
YOLO_v3_tutorial_from_scratch copied to clipboard
'NoneType' object has no attribute 'shape'
Hey first of all thanks for this great tutorial! I have encountered this error while running the code:
#PyTorch Variables for images im_batches = list(map(prep_image, loaded_ims, [inp_dim for x in range(len(imlist))])) #List containing dimensions of original images im_dim_list = [(x.shape[1], x.shape[0]) for x in loaded_ims] im_dim_list = torch.FloatTensor(im_dim_list).repeat(1,2)
AttributeError Traceback (most recent call last)
1 frames
AttributeError: 'NoneType' object has no attribute 'shape' --------------------------------------------------------------------------------------------------------------How can this be resolved?
You should double check if the loaded image has properly read the opencv image. I had the same error and when I checked it did not have the absolute path to read the image to make imlist and later loaded_ims.