Skip to content

Instantly share code, notes, and snippets.

@hlzz
Created May 31, 2018 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hlzz/63b0574f1b24972c28203bce0c5c493d to your computer and use it in GitHub Desktop.
Save hlzz/63b0574f1b24972c28203bce0c5c493d to your computer and use it in GitHub Desktop.
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