Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
check image existence
import sys
import cv2
for img_path in all_image_path:
one_img = cv2.imread(img_path, -1 | 128)
if one_img == None:
print(img_path, 'has problem, exit...')
exit(-1)
else:
print(img_path, 'exists')
@hlzz
Copy link
Author

hlzz commented May 31, 2018

#resized_img = cv2.resize(one_img, (int(ARGS.size), int(ARGS.size)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment