experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 784 forks source link

'NoneType' object has no attribute 'shape' #257

Open mohamedabdallah1996 opened 6 years ago

mohamedabdallah1996 commented 6 years ago

I got this error while training and I don't know what is the reason of this error. I checked my data and I found all my images has its own annotation file. But inside this function aug_image(self, train_instance, jitter) some images becomes 'None' so when it reaches to this line h, w, c = image.shape it gets this error 'NoneType' object has no attribute 'shape'

so why this occurs? is this image file corrupted ? and how i know these images that have None type and I can delete them from my dataset?

please any help would be appreciated.

experiencor commented 6 years ago

It means that the image is not found. You should be able to find the path to that None image the log.