Merge pull request #10 from OCR-D/glob-not-listdir

glob *.h5 files only in model dir, fix #7
pull/12/head
Clemens Neudecker 4 years ago committed by GitHub
commit c7e8e49eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,8 @@ Tool to load model and binarize a given image.
"""
import sys
from os import listdir, environ, devnull
from glob import glob
from os import environ, devnull
from os.path import join
from warnings import catch_warnings, simplefilter
@ -191,7 +192,7 @@ class SbbBinarizer:
if image_path is not None:
image = cv2.imread(image)
self.start_new_session()
list_of_model_files = listdir(self.model_dir)
list_of_model_files = glob('%s/*.h5' % self.model_dir)
img_last = 0
for model_in in list_of_model_files:

Loading…
Cancel
Save