Pytorch_Retinaface icon indicating copy to clipboard operation
Pytorch_Retinaface copied to clipboard

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

Open zhebawomenjiuyaochangshenle opened this issue 3 years ago • 1 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.

arch-raven avatar Jun 03 '22 17:06 arch-raven