biubug6 / Pytorch_Retinaface

Retinaface get 80.99% in widerface hard val using mobilenet0.25.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.