AttributeError: 'NoneType' object has no attribute 'shape'
zhebawomenjiuyaochangshenle opened this issue · comments
File "D:\gitspace\Pytorch_Retinaface\data\wider_face.py", line 42, in getitem
height, width, _ = img.shape
AttributeError: 'NoneType' object has no attribute 'shape'
why it goes wrong?
Well that's probably because of openCV failing to load image (silently). Ensure that the path to image passed does exist. opencv doesn't throw errors (with imread
& imwrite
at least) instead fails silently.