1 | initial version |
one of your images is invalid. please DON'T do this:
images.append(cv2.imread(path, 0))
imread() may fail silently, and return None,you absolutely HAVE TO CHECK (and python users never do ...) like:
im = cv2.imread(path, 0)
if im == None:
continue
images.append(im)
2 | No.2 Revision |
one of your train images is invalid. please DON'T do this:
images.append(cv2.imread(path, 0))
imread() may fail silently, and return None,you absolutely HAVE TO CHECK (and python users never do ...) like:
im = cv2.imread(path, 0)
if im == None:
continue
images.append(im)
3 | No.3 Revision |
one of your train images is invalid. please DON'T do this:
images.append(cv2.imread(path, 0))
imread() may fail silently, and return None,you absolutely HAVE TO CHECK (and python users never do ...) like:
im = cv2.imread(path, 0)
if im == None:
None: # wrong path ?
continue
images.append(im)
4 | No.4 Revision |
one of your train images is invalid. please DON'T do this:
images.append(cv2.imread(path, 0))
imread() may fail silently, and return None,you absolutely HAVE TO CHECK (and python users never do ...) like:
im = cv2.imread(path, 0)
if im == None: # wrong path ? not an image ?
continue
images.append(im)