Created
May 31, 2018 06:56
-
-
Save hlzz/63b0574f1b24972c28203bce0c5c493d to your computer and use it in GitHub Desktop.
check image existence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#resized_img = cv2.resize(one_img, (int(ARGS.size), int(ARGS.size)))