diff --git a/requirements.txt b/requirements.txt index 85fd500..9d7d67f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ -numpy >= 1.17.0, < 1.19.0 +numpy setuptools >= 41 opencv-python-headless ocrd >= 2.22.3 -keras >= 2.3.1, < 2.4 h5py < 3 -tensorflow-gpu >= 1.15, < 1.16 +tensorflow-gpu >= 2.4.0 diff --git a/sbb_binarize/sbb_binarize.py b/sbb_binarize/sbb_binarize.py index 8d3a741..5424098 100644 --- a/sbb_binarize/sbb_binarize.py +++ b/sbb_binarize/sbb_binarize.py @@ -14,10 +14,11 @@ import cv2 environ['TF_CPP_MIN_LOG_LEVEL'] = '3' stderr = sys.stderr sys.stderr = open(devnull, 'w') -from keras.models import load_model -from keras.backend import tensorflow_backend -sys.stderr = stderr import tensorflow as tf +from tensorflow.keras.models import load_model +from tensorflow.python.keras import backend as tensorflow_backend +sys.stderr = stderr + import logging