This is the complete error I'm getting:
<ipython-input-4-77b9831c6ca8> in main(argv)
187 im_fn_list = get_images()
188 for im_fn in im_fn_list:
--> 189 im = cv2.imread(im_fn)[:, :, ::-1]
190 logger.debug('image file:{}'.format(im_fn))
191
TypeError: 'NoneType' object is not subscriptable
This is the part of code where it points to, I guess here opencv reads the list:
im_fn_list = get_images()
for im_fn in im_fn_list:
im = cv2.imread(im_fn)[:, :, ::-1]
logger.debug('image file:{}'.format(im_fn))
and this is the function to get images:
def get_images():
'''
find image files in test data path
:return: list of files found
'''
files = []
exts = ['jpg', 'png', 'jpeg', 'JPG']
for parent, dirnames, filenames in os.walk(FLAGS.test_data_path):
for filename in filenames:
for ext in exts:
if filename.endswith(ext):
files.append(os.path.join(parent, filename))
break
logger.info('Find {} images'.format(len(files)))
return files
No matter which image I load, it gives me TypeError: 'NoneType' object is not subscriptable. Im stuck at this point, I reinstalled opencv and opevncv-contrib, didn't work at all.