tensorflow-ocr
tensorflow-ocr copied to clipboard
where is current_model.h5
Can you please share your architecture model. Im trying text_recognizer, but it needs the current_model.h5 which is not available.
Thanks.
added softlink 'current_weights.h5' -> 'best_weights.h5'
current_model.h5
is still missing
Still there is problem with OSError: Unable to open file (unable to open file: name = 'current_model.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Yes, I have similar issue too,
PS D:\AlexeyKolosov\tensorflow-ocr> python text_recognizer.py Using TensorFlow backend. (4, 512, 64, 1) Traceback (most recent call last): File "text_recognizer.py", line 77, in <module> words = predict_tensor(tensor) File "text_recognizer.py", line 39, in predict_tensor if not model: init_model() File "text_recognizer.py", line 25, in init_model model = load_model(model_file) File "D:\All_Python_here\Python 3.6.6\lib\site-packages\keras\engine\saving.py", line 492, in load_wrapper return load_function(*args, **kwargs) File "D:\All_Python_here\Python 3.6.6\lib\site-packages\keras\engine\saving.py", line 583, in load_model with H5Dict(filepath, mode='r') as h5dict: File "D:\All_Python_here\Python 3.6.6\lib\site-packages\keras\utils\io_utils.py", line 191, in __init__ self.data = h5py.File(path, mode=mode) File "D:\All_Python_here\Python 3.6.6\lib\site-packages\h5py\_hl\files.py", line 408, in __init__ swmr=swmr) File "D:\All_Python_here\Python 3.6.6\lib\site-packages\h5py\_hl\files.py", line 173, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5f.pyx", line 88, in h5py.h5f.open OSError: Unable to open file (file signature not found)
I tried print(os.path.exists('./current_model.h5'))
, it returns False
. But os.listdir('./')
has the model in it. :|
Anyone have found a solutions/workaround to this issue?
added softlink 'current_weights.h5' -> 'best_weights.h5'
In the repo, the symlink is to 'model1000.h5', not 'best_weights.h5'. It shows up as a broken symlink after cloning, because there's no file named 'model1000.h5'
pannous committed on Sep 6, 2019 1 parent c746c8f commit 52579ae55549429a1631193b2e6218087d0c60de Showing with 2 additions and 0 deletions. 1 current_model.h5 @@ -0,0 +1 @@ model1000.h5
And in the repo file itself at https://github.com/pannous/tensorflow-ocr/blob/master/current_model.h5: `Symbolic Link 1 lines (1 sloc) 12 Bytes
model1000.h5`